25 #ifndef _SB_GSTREAMER_MEDIAINSPECTOR_H_
26 #define _SB_GSTREAMER_MEDIAINSPECTOR_H_
30 #include <nsStringGlue.h>
31 #include <nsIClassInfo.h>
34 #include "sbIJobProgress.h"
35 #include "sbIJobCancelable.h"
36 #include "sbIMediaInspector.h"
37 #include "sbIMediaFormatMutable.h"
52 NS_DECL_SBIMEDIAINSPECTOR
53 NS_DECL_SBIJOBPROGRESS
54 NS_DECL_SBIJOBCANCELABLE
55 NS_DECL_NSITIMERCALLBACK
60 virtual ~sbGStreamerMediaInspector();
62 nsresult OnJobProgress();
64 NS_IMETHOD StopPipeline();
65 virtual nsresult BuildPipeline();
67 nsresult StartTimeoutTimer();
68 nsresult StopTimeoutTimer();
69 nsresult CleanupPipeline();
71 nsresult CompleteInspection();
73 nsresult PadAdded(GstPad *srcPad);
74 nsresult FakesinkEvent(GstPad *srcPad, GstEvent *
event, PRBool isAudio);
75 nsresult ProcessPipelineForInfo();
76 nsresult ProcessContainerProperties(
78 GstStructure *aStructure);
82 GstStructure *aStructure);
85 GstStructure *aStructure);
86 nsresult InspectorateElement (GstElement *
element);
88 void HandleStateChangeMessage(GstMessage *
message);
89 void HandleErrorMessage(GstMessage *message);
91 static void fakesink_audio_event_cb (GstPad *pad, GstEvent *event,
92 sbGStreamerMediaInspector *inspector);
94 static void fakesink_video_event_cb (GstPad *pad, GstEvent *event,
95 sbGStreamerMediaInspector *inspector);
97 static void decodebin_pad_added_cb (GstElement *element, GstPad *pad,
98 sbGStreamerMediaInspector *inspector);
100 nsCOMPtr<sbIMediaFormatMutable> mMediaFormat;
103 nsTArray<nsString> mErrorMessages;
104 nsCOMArray<sbIJobProgressListener> mProgressListeners;
105 nsCOMPtr<nsITimer> mTimeoutTimer;
111 PRBool mTooComplexForCurrentImplementation;
113 GstElement *mDecodeBin;
117 GstPad *mAudioDecoderSink;
118 GstPad *mVideoDecoderSink;
119 GstPad *mDemuxerSink;
125 #define SB_GSTREAMER_MEDIAINSPECTOR_CLASSNAME \
126 "sbGStreamerMediaInspector"
127 #define SB_GSTREAMER_MEDIAINSPECTOR_DESCRIPTION \
128 "Songbird GStreamer Media Inspector"
130 #define SB_GSTREAMER_MEDIAINSPECTOR_CONTRACTID \
131 SB_MEDIAINSPECTOR_CONTRACTID
132 #define SB_GSTREAMER_MEDIAINSPECTOR_CID \
133 {0x200782a4, 0x07c6, 0x4ec7, {0xa3, 0x31, 0xb8, 0x88, 0x87, 0x36, 0x80, 0xa6}}
135 #endif // _SB_GSTREAMER_MEDIAINSPECTOR_H_
Generic interface for exposing long running jobs to the UI.