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