visual: use CAPS event to configure caps
This commit is contained in:
parent
5acab64178
commit
62536eaa6e
@ -1,114 +1,119 @@
|
|||||||
GObject
|
GObject
|
||||||
GstObject
|
GInitiallyUnowned
|
||||||
GstPad
|
GstObject
|
||||||
GstPadTemplate
|
GstPad
|
||||||
GstPluginFeature
|
GstPadTemplate
|
||||||
GstElementFactory
|
GstPluginFeature
|
||||||
GstTypeFindFactory
|
GstElementFactory
|
||||||
GstIndexFactory
|
GstTypeFindFactory
|
||||||
GstElement
|
GstIndexFactory
|
||||||
GstBin
|
GstElement
|
||||||
GstPipeline
|
GstBin
|
||||||
GstPlayBaseBin
|
GstPipeline
|
||||||
GstPlayBin
|
GstPlayBaseBin
|
||||||
GstPlayBin2
|
GstPlayBin
|
||||||
GstDecodeBin2
|
GstPlayBin2
|
||||||
GstURIDecodeBin
|
GstEncodeBin
|
||||||
GstDecodeBin
|
GstDecodeBin
|
||||||
GstPlaySink
|
GstPlaySink
|
||||||
GstSubtitleOverlay
|
GstSubtitleOverlay
|
||||||
GstEncodeBin
|
GstDecodeBin2
|
||||||
GstVorbisEnc
|
GstURIDecodeBin
|
||||||
GstVorbisDec
|
GstVisual
|
||||||
GstVorbisParse
|
GstVisualjess
|
||||||
GstVorbisTag
|
GstVisualbumpscope
|
||||||
GstVisual
|
GstVisualcorona
|
||||||
GstVisualjess
|
GstVisualinfinite
|
||||||
GstVisualbumpscope
|
GstVisualjakdaw
|
||||||
GstVisualcorona
|
GstVisuallv_analyzer
|
||||||
GstVisualinfinite
|
GstVisuallv_scope
|
||||||
GstVisualjakdaw
|
GstVisualoinksie
|
||||||
GstVisuallv_analyzer
|
GstBaseSrc
|
||||||
GstVisuallv_scope
|
GstGnomeVFSSrc
|
||||||
GstVisualoinksie
|
GstGioBaseSrc
|
||||||
GstBaseSrc
|
GstGioSrc
|
||||||
GstPushSrc
|
GstGioStreamSrc
|
||||||
GstCddaBaseSrc
|
GstPushSrc
|
||||||
GstCdParanoiaSrc
|
GstCddaBaseSrc
|
||||||
GstBaseAudioSrc
|
GstCdParanoiaSrc
|
||||||
GstAudioSrc
|
GstBaseAudioSrc
|
||||||
GstAlsaSrc
|
GstAudioSrc
|
||||||
GstVideoTestSrc
|
GstAlsaSrc
|
||||||
GstTCPClientSrc
|
GstV4lElement
|
||||||
GstTCPServerSrc
|
GstV4lSrc
|
||||||
GstGioBaseSrc
|
GstVideoTestSrc
|
||||||
GstGioSrc
|
GstTCPClientSrc
|
||||||
GstGioStreamSrc
|
GstTCPServerSrc
|
||||||
GstGnomeVFSSrc
|
GstAppSrc
|
||||||
GstAppSrc
|
GstAudioTestSrc
|
||||||
GstAudioTestSrc
|
GstBaseSink
|
||||||
GstBaseSink
|
GstGnomeVFSSink
|
||||||
GstGioBaseSink
|
GstGioBaseSink
|
||||||
GstGioSink
|
GstGioSink
|
||||||
GstGioStreamSink
|
GstGioStreamSink
|
||||||
GstBaseAudioSink
|
GstBaseAudioSink
|
||||||
GstAudioSink
|
GstAudioSink
|
||||||
GstAlsaSink
|
GstAlsaSink
|
||||||
GstGnomeVFSSink
|
GstVideoSink
|
||||||
GstVideoSink
|
GstXvImageSink
|
||||||
GstXImageSink
|
GstXImageSink
|
||||||
GstXvImageSink
|
GstAppSink
|
||||||
GstAppSink
|
GstTCPClientSink
|
||||||
GstTCPClientSink
|
GstMultiFdSink
|
||||||
GstMultiFdSink
|
GstTCPServerSink
|
||||||
GstTCPServerSink
|
GstTheoraDec
|
||||||
GstTextOverlay
|
GstTheoraEnc
|
||||||
GstTimeOverlay
|
GstTheoraParse
|
||||||
GstClockOverlay
|
GstBaseTextOverlay
|
||||||
GstTextRender
|
GstTextOverlay
|
||||||
GstAlsaMixerElement
|
GstTimeOverlay
|
||||||
GstTheoraDec
|
GstClockOverlay
|
||||||
GstTheoraEnc
|
GstTextRender
|
||||||
GstTheoraParse
|
GstOggDemux
|
||||||
GstOggDemux
|
GstOggMux
|
||||||
GstOggMux
|
GstOgmParse
|
||||||
GstOgmParse
|
GstOgmAudioParse
|
||||||
GstOgmAudioParse
|
GstOgmVideoParse
|
||||||
GstOgmVideoParse
|
GstOgmTextParse
|
||||||
GstOgmTextParse
|
GstOggParse
|
||||||
GstOggParse
|
GstOggAviParse
|
||||||
GstOggAviParse
|
GstVorbisEnc
|
||||||
GstAdder
|
GstVorbisDec
|
||||||
GstBaseTransform
|
GstVorbisParse
|
||||||
GstVideoFilter
|
GstVorbisTag
|
||||||
GstVideoScale
|
GstAlsaMixerElement
|
||||||
GstFFMpegCsp
|
GstSubParse
|
||||||
GstAudioFilter
|
GstSsaParse
|
||||||
GstVolume
|
GstBaseTransform
|
||||||
GstAudioConvert
|
GstAudioFilter
|
||||||
GstAudioResample
|
GstVolume
|
||||||
GstVideoRate
|
GstVideoFilter
|
||||||
GstStreamSelector
|
GstVideoScale
|
||||||
GstGDPDepay
|
GstFFMpegCsp
|
||||||
GstGDPPay
|
GstAudioResample
|
||||||
GstSubParse
|
GstAudioConvert
|
||||||
GstSsaParse
|
GstGDPDepay
|
||||||
GstAudioRate
|
GstGDPPay
|
||||||
GstBus
|
GstAudioRate
|
||||||
GstTask
|
GstAdder
|
||||||
GstTaskPool
|
GstVideoRate
|
||||||
GstClock
|
GstStreamSelector
|
||||||
GstSystemClock
|
GstBus
|
||||||
GstAudioClock
|
GstTask
|
||||||
GstPlugin
|
GstTaskPool
|
||||||
GstRegistry
|
GstClock
|
||||||
GstRingBuffer
|
GstSystemClock
|
||||||
GstAudioSrcRingBuffer
|
GstAudioClock
|
||||||
GstAudioSinkRingBuffer
|
GstPlugin
|
||||||
GstSignalObject
|
GstRegistry
|
||||||
|
GstRingBuffer
|
||||||
|
GstAudioSrcRingBuffer
|
||||||
|
GstAudioSinkRingBuffer
|
||||||
GstMixerTrack
|
GstMixerTrack
|
||||||
GstMixerOptions
|
|
||||||
GstStreamInfo
|
GstStreamInfo
|
||||||
|
GstEncodingProfile
|
||||||
|
GstTunerNorm
|
||||||
|
GstTunerChannel
|
||||||
GstColorBalanceChannel
|
GstColorBalanceChannel
|
||||||
PangoFontMap
|
PangoFontMap
|
||||||
PangoFcFontMap
|
PangoFcFontMap
|
||||||
@ -120,14 +125,15 @@ GInterface
|
|||||||
GTypePlugin
|
GTypePlugin
|
||||||
GstChildProxy
|
GstChildProxy
|
||||||
GstURIHandler
|
GstURIHandler
|
||||||
GstTagSetter
|
|
||||||
GstPreset
|
GstPreset
|
||||||
|
GstTagSetter
|
||||||
GstImplementsInterface
|
GstImplementsInterface
|
||||||
GstMixer
|
GstMixer
|
||||||
GstPropertyProbe
|
GstPropertyProbe
|
||||||
GstNavigation
|
GstNavigation
|
||||||
GstXOverlay
|
GstXOverlay
|
||||||
GstColorBalance
|
GstColorBalance
|
||||||
|
GstTuner
|
||||||
GstStreamVolume
|
GstStreamVolume
|
||||||
PangoCairoFontMap
|
PangoCairoFontMap
|
||||||
GFile
|
GFile
|
||||||
|
@ -3,28 +3,30 @@ GstPipeline GstChildProxy
|
|||||||
GstPlayBaseBin GstChildProxy
|
GstPlayBaseBin GstChildProxy
|
||||||
GstPlayBin GstChildProxy
|
GstPlayBin GstChildProxy
|
||||||
GstPlayBin2 GstChildProxy GstStreamVolume
|
GstPlayBin2 GstChildProxy GstStreamVolume
|
||||||
GstDecodeBin2 GstChildProxy
|
GstEncodeBin GstChildProxy
|
||||||
GstURIDecodeBin GstChildProxy
|
|
||||||
GstDecodeBin GstChildProxy
|
GstDecodeBin GstChildProxy
|
||||||
GstPlaySink GstChildProxy
|
GstPlaySink GstChildProxy
|
||||||
GstSubtitleOverlay GstChildProxy
|
GstSubtitleOverlay GstChildProxy
|
||||||
GstEncodeBin GstChildProxy
|
GstDecodeBin2 GstChildProxy
|
||||||
GstVorbisEnc GstTagSetter GstPreset
|
GstURIDecodeBin GstChildProxy
|
||||||
GstVorbisTag GstTagSetter
|
GstGnomeVFSSrc GstURIHandler
|
||||||
|
GstGioSrc GstURIHandler
|
||||||
GstCddaBaseSrc GstURIHandler
|
GstCddaBaseSrc GstURIHandler
|
||||||
GstCdParanoiaSrc GstURIHandler
|
GstCdParanoiaSrc GstURIHandler
|
||||||
GstAlsaSrc GstImplementsInterface GstMixer GstPropertyProbe
|
GstAlsaSrc GstImplementsInterface GstMixer GstPropertyProbe
|
||||||
GstGioSrc GstURIHandler
|
GstV4lElement GstImplementsInterface GstTuner GstXOverlay GstColorBalance GstPropertyProbe
|
||||||
GstGnomeVFSSrc GstURIHandler
|
GstV4lSrc GstImplementsInterface GstTuner GstXOverlay GstColorBalance GstPropertyProbe
|
||||||
GstAppSrc GstURIHandler
|
GstAppSrc GstURIHandler
|
||||||
|
GstGnomeVFSSink GstURIHandler
|
||||||
GstGioSink GstURIHandler
|
GstGioSink GstURIHandler
|
||||||
GstAlsaSink GstPropertyProbe
|
GstAlsaSink GstPropertyProbe
|
||||||
GstGnomeVFSSink GstURIHandler
|
|
||||||
GstXImageSink GstImplementsInterface GstNavigation GstXOverlay
|
|
||||||
GstXvImageSink GstImplementsInterface GstNavigation GstXOverlay GstColorBalance GstPropertyProbe
|
GstXvImageSink GstImplementsInterface GstNavigation GstXOverlay GstColorBalance GstPropertyProbe
|
||||||
|
GstXImageSink GstImplementsInterface GstNavigation GstXOverlay
|
||||||
GstAppSink GstURIHandler
|
GstAppSink GstURIHandler
|
||||||
GstAlsaMixerElement GstImplementsInterface GstMixer GstPropertyProbe
|
|
||||||
GstTheoraEnc GstPreset
|
GstTheoraEnc GstPreset
|
||||||
GstOggMux GstPreset
|
GstOggMux GstPreset
|
||||||
|
GstVorbisEnc GstTagSetter GstPreset
|
||||||
|
GstVorbisTag GstTagSetter
|
||||||
|
GstAlsaMixerElement GstImplementsInterface GstMixer GstPropertyProbe
|
||||||
GstVolume GstImplementsInterface GstMixer GstStreamVolume
|
GstVolume GstImplementsInterface GstMixer GstStreamVolume
|
||||||
PangoCairoFcFontMap PangoCairoFontMap
|
PangoCairoFcFontMap PangoCairoFontMap
|
||||||
|
@ -4,6 +4,7 @@ GstImplementsInterface GstElement
|
|||||||
GstMixer GstImplementsInterface GstElement
|
GstMixer GstImplementsInterface GstElement
|
||||||
GstXOverlay GstImplementsInterface GstElement
|
GstXOverlay GstImplementsInterface GstElement
|
||||||
GstColorBalance GstImplementsInterface GstElement
|
GstColorBalance GstImplementsInterface GstElement
|
||||||
|
GstTuner GstImplementsInterface GstElement
|
||||||
GstStreamVolume GObject
|
GstStreamVolume GObject
|
||||||
PangoCairoFontMap PangoFontMap
|
PangoCairoFontMap PangoFontMap
|
||||||
GFile GObject
|
GFile GObject
|
||||||
|
@ -215,7 +215,6 @@ gst_visual_init (GstVisual * visual)
|
|||||||
{
|
{
|
||||||
/* create the sink and src pads */
|
/* create the sink and src pads */
|
||||||
visual->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
|
visual->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink");
|
||||||
gst_pad_set_setcaps_function (visual->sinkpad, gst_visual_sink_setcaps);
|
|
||||||
gst_pad_set_chain_function (visual->sinkpad, gst_visual_chain);
|
gst_pad_set_chain_function (visual->sinkpad, gst_visual_chain);
|
||||||
gst_pad_set_event_function (visual->sinkpad, gst_visual_sink_event);
|
gst_pad_set_event_function (visual->sinkpad, gst_visual_sink_event);
|
||||||
gst_element_add_pad (GST_ELEMENT (visual), visual->sinkpad);
|
gst_element_add_pad (GST_ELEMENT (visual), visual->sinkpad);
|
||||||
@ -395,7 +394,7 @@ gst_vis_src_negotiate (GstVisual * visual)
|
|||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
GstQuery *query;
|
GstQuery *query;
|
||||||
GstBufferPool *pool;
|
GstBufferPool *pool = NULL;
|
||||||
guint size, min, max, prefix, alignment;
|
guint size, min, max, prefix, alignment;
|
||||||
|
|
||||||
caps = gst_pad_get_caps (visual->srcpad);
|
caps = gst_pad_get_caps (visual->srcpad);
|
||||||
@ -492,6 +491,14 @@ gst_visual_sink_event (GstPad * pad, GstEvent * event)
|
|||||||
gst_visual_reset (visual);
|
gst_visual_reset (visual);
|
||||||
res = gst_pad_push_event (visual->srcpad, event);
|
res = gst_pad_push_event (visual->srcpad, event);
|
||||||
break;
|
break;
|
||||||
|
case GST_EVENT_CAPS:
|
||||||
|
{
|
||||||
|
GstCaps *caps;
|
||||||
|
|
||||||
|
gst_event_parse_caps (event, &caps);
|
||||||
|
res = gst_visual_sink_setcaps (pad, caps);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case GST_EVENT_NEWSEGMENT:
|
case GST_EVENT_NEWSEGMENT:
|
||||||
{
|
{
|
||||||
GstFormat format;
|
GstFormat format;
|
||||||
@ -514,7 +521,7 @@ gst_visual_sink_event (GstPad * pad, GstEvent * event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
res = gst_pad_push_event (visual->srcpad, event);
|
res = gst_pad_event_default (visual->srcpad, event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user