27 #ifndef _SB_GSTREAMER_TRANSCODE_H_
28 #define _SB_GSTREAMER_TRANSCODE_H_
31 #include <nsCOMArray.h>
34 #include <nsStringGlue.h>
38 #include "sbITranscodeJob.h"
39 #include "sbITranscodeProfile.h"
40 #include "sbIJobProgress.h"
41 #include "sbIJobCancelable.h"
46 #define SB_GSTREAMER_TRANSCODE_CID \
47 { 0x67623837, 0xfea5, 0x4005, \
48 { 0xb4, 0x75, 0xe3, 0x4b, 0x73, 0x86, 0x35, 0xc4 } }
50 #define SB_GSTREAMER_TRANSCODE_CONTRACTID "@songbirdnest.com/Songbird/Mediacore/Transcode/GStreamer;1"
51 #define SB_GSTREAMER_TRANSCODE_CLASSNAME "GStreamerTranscode"
63 NS_DECL_SBITRANSCODEJOB
64 NS_DECL_SBIJOBPROGRESS
65 NS_DECL_SBIJOBPROGRESSTIME
66 NS_DECL_SBIJOBCANCELABLE
67 NS_DECL_NSITIMERCALLBACK
76 virtual ~sbGStreamerTranscode();
78 nsresult LocalizeString(
const nsAString&
aName, nsAString&
aValue);
79 nsresult OnJobProgress();
81 void HandleErrorMessage(GstMessage *
message);
82 void HandleEOSMessage(GstMessage *message);
84 GstClockTime QueryPosition();
85 GstClockTime QueryDuration();
87 nsresult StartProgressReporting();
88 nsresult StopProgressReporting();
91 nsresult BuildPipelineString(nsCString description, nsACString &pipeline);
93 nsACString &pipelineFragment);
94 nsresult GetContainer(nsAString &container, nsIArray *properties,
95 nsACString &gstMuxer);
96 nsresult GetAudioCodec(nsAString &codec, nsIArray *properties,
97 nsACString &gstCodec);
98 nsresult AddImageToTagList(GstTagList *aTags, nsIInputStream *aStream);
100 nsCOMPtr<sbIPropertyArray> mMetadata;
101 nsCOMPtr<nsIInputStream> mImageStream;
105 nsCOMPtr<sbITranscodeProfile> mProfile;
108 nsTArray<nsString> mErrorMessages;
110 nsCOMArray<sbIJobProgressListener> mProgressListeners;
111 nsCOMPtr<nsITimer> mProgressTimer;
113 nsCOMPtr<nsIArray> mAvailableProfiles;
119 #endif // _SB_GSTREAMER_TRANSCODE_H_
NS_IMETHOD StopPipeline()
An object defining a transcoding profile.
virtual nsresult BuildPipeline()
Generic interface extending sbIJobProgress that can track expected time, etc in addition to abstract ...
NS_DECL_ISUPPORTS NS_DECL_NSICLASSINFO NS_DECL_SBITRANSCODEJOB NS_DECL_SBIJOBPROGRESS NS_DECL_SBIJOBPROGRESSTIME NS_DECL_SBIJOBCANCELABLE NS_DECL_NSITIMERCALLBACK sbGStreamerTranscode()
NS_IMETHOD PlayPipeline()
An object capable of transcoding a source URI to a destination file.