mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 03:52:25 +00:00
gst/real/: Use gst_pad_use_fixed_caps() on source pads, to avoid negotiation errors in certain situations (e.g. dec !...
Original commit message from CVS: * gst/real/gstrealaudiodec.c: (gst_real_audio_dec_init): * gst/real/gstrealvideodec.c: (gst_real_video_dec_init): Use gst_pad_use_fixed_caps() on source pads, to avoid negotiation errors in certain situations (e.g. dec ! cs ! ximagesink and the imagesink window is resized); also, some minor clean-ups.
This commit is contained in:
parent
bc8d60a4e3
commit
13f0156587
3 changed files with 25 additions and 14 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-02-26 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst/real/gstrealaudiodec.c: (gst_real_audio_dec_init):
|
||||||
|
* gst/real/gstrealvideodec.c: (gst_real_video_dec_init):
|
||||||
|
Use gst_pad_use_fixed_caps() on source pads, to avoid negotiation
|
||||||
|
errors in certain situations (e.g. dec ! cs ! ximagesink and the
|
||||||
|
imagesink window is resized); also, some minor clean-ups.
|
||||||
|
|
||||||
2007-02-24 Tim-Philipp Müller <tim at centricular dot net>
|
2007-02-24 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
|
|
@ -319,13 +319,15 @@ could_not_set_caps:
|
||||||
static void
|
static void
|
||||||
gst_real_audio_dec_init (GstRealAudioDec * dec, GstRealAudioDecClass * klass)
|
gst_real_audio_dec_init (GstRealAudioDec * dec, GstRealAudioDecClass * klass)
|
||||||
{
|
{
|
||||||
dec->snk =
|
dec->snk = gst_pad_new_from_static_template (&snk_t, "sink");
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get (&snk_t), "sink");
|
gst_pad_set_setcaps_function (dec->snk,
|
||||||
gst_pad_set_setcaps_function (dec->snk, gst_real_audio_dec_setcaps);
|
GST_DEBUG_FUNCPTR (gst_real_audio_dec_setcaps));
|
||||||
gst_pad_set_chain_function (dec->snk, gst_real_audio_dec_chain);
|
gst_pad_set_chain_function (dec->snk,
|
||||||
|
GST_DEBUG_FUNCPTR (gst_real_audio_dec_chain));
|
||||||
gst_element_add_pad (GST_ELEMENT (dec), dec->snk);
|
gst_element_add_pad (GST_ELEMENT (dec), dec->snk);
|
||||||
dec->src =
|
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get (&src_t), "src");
|
dec->src = gst_pad_new_from_static_template (&src_t, "src");
|
||||||
|
gst_pad_use_fixed_caps (dec->src);
|
||||||
gst_element_add_pad (GST_ELEMENT (dec), dec->src);
|
gst_element_add_pad (GST_ELEMENT (dec), dec->src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -743,19 +743,20 @@ close_library (GstRealVideoDecHooks hooks)
|
||||||
static void
|
static void
|
||||||
gst_real_video_dec_init (GstRealVideoDec * dec, GstRealVideoDecClass * klass)
|
gst_real_video_dec_init (GstRealVideoDec * dec, GstRealVideoDecClass * klass)
|
||||||
{
|
{
|
||||||
dec->snk =
|
dec->snk = gst_pad_new_from_static_template (&snk_t, "sink");
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get (&snk_t), "sink");
|
gst_pad_set_setcaps_function (dec->snk,
|
||||||
gst_pad_set_setcaps_function (dec->snk, gst_real_video_dec_setcaps);
|
GST_DEBUG_FUNCPTR (gst_real_video_dec_setcaps));
|
||||||
gst_pad_set_chain_function (dec->snk, gst_real_video_dec_chain);
|
gst_pad_set_chain_function (dec->snk,
|
||||||
|
GST_DEBUG_FUNCPTR (gst_real_video_dec_chain));
|
||||||
gst_pad_set_activatepush_function (dec->snk,
|
gst_pad_set_activatepush_function (dec->snk,
|
||||||
gst_real_video_dec_activate_push);
|
GST_DEBUG_FUNCPTR (gst_real_video_dec_activate_push));
|
||||||
gst_element_add_pad (GST_ELEMENT (dec), dec->snk);
|
gst_element_add_pad (GST_ELEMENT (dec), dec->snk);
|
||||||
|
|
||||||
dec->src =
|
dec->src = gst_pad_new_from_static_template (&src_t, "src");
|
||||||
gst_pad_new_from_template (gst_static_pad_template_get (&src_t), "src");
|
gst_pad_use_fixed_caps (dec->src);
|
||||||
gst_element_add_pad (GST_ELEMENT (dec), dec->src);
|
gst_element_add_pad (GST_ELEMENT (dec), dec->src);
|
||||||
|
|
||||||
dec->adapter = g_object_new (GST_TYPE_ADAPTER, NULL);
|
dec->adapter = gst_adapter_new ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue