mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
get up-to-date with the gst_caps_debug api improved capsnego in mad improved capsnego in adder improved capsnego in i...
Original commit message from CVS: * get up-to-date with the gst_caps_debug api * improved capsnego in mad * improved capsnego in adder * improved capsnego in intfloat plugins * unbroke capsnego in stereomono plugins * fix cothread stack allocation within the main thread in new cothreads
This commit is contained in:
parent
f633a8285d
commit
20d957de03
3 changed files with 24 additions and 18 deletions
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 7b9a18016ec2fe74c23382856a0f480da259f971
|
||||
Subproject commit 2adced54d821c7870fd4d9e5e19482418a64c931
|
|
@ -356,7 +356,7 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
|
|||
gst_caps_debug (caps);
|
||||
GST_INFO (GST_CAT_CAPS, "dumping caps of own pad %s:%s\n", GST_DEBUG_PAD_NAME (pad));
|
||||
*/
|
||||
gst_caps_debug (gst_pad_get_caps (pad));
|
||||
gst_caps_debug (gst_pad_get_caps (pad), "original caps on sink pad");
|
||||
/* check if the supplied caps of the peer element are compatible with our own use gst_pad_get_caps because if caps aren't set yet we need the template */
|
||||
if (!gst_caps_check_compatibility (caps, gst_pad_get_caps (pad)))
|
||||
{
|
||||
|
|
|
@ -61,6 +61,9 @@ struct _GstMad {
|
|||
guint framecount;
|
||||
gint vbr_average; /* average bitrate */
|
||||
gulong vbr_rate; /* average * framecount */
|
||||
|
||||
/* caps */
|
||||
gboolean caps_set;
|
||||
};
|
||||
|
||||
struct _GstMadClass {
|
||||
|
@ -454,25 +457,28 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
|
|||
*outdata++ = scale(*right_ch++) & 0xffff;
|
||||
}
|
||||
}
|
||||
if (GST_PAD_CAPS (mad->srcpad) == NULL) {
|
||||
gst_pad_try_set_caps (mad->srcpad,
|
||||
gst_caps_new (
|
||||
"mad_src",
|
||||
"audio/raw",
|
||||
gst_props_new (
|
||||
"format", GST_PROPS_STRING ("int"),
|
||||
"law", GST_PROPS_INT (0),
|
||||
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
|
||||
"signed", GST_PROPS_BOOLEAN (TRUE),
|
||||
"width", GST_PROPS_INT (16),
|
||||
"depth", GST_PROPS_INT (16),
|
||||
if (mad->caps_set == FALSE) {
|
||||
if (!gst_pad_try_set_caps (mad->srcpad,
|
||||
gst_caps_new (
|
||||
"mad_src",
|
||||
"audio/raw",
|
||||
gst_props_new (
|
||||
"format", GST_PROPS_STRING ("int"),
|
||||
"law", GST_PROPS_INT (0),
|
||||
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
|
||||
"signed", GST_PROPS_BOOLEAN (TRUE),
|
||||
"width", GST_PROPS_INT (16),
|
||||
"depth", GST_PROPS_INT (16),
|
||||
#if MAD_VERSION_MINOR <= 12
|
||||
"rate", GST_PROPS_INT (mad->header.sfreq),
|
||||
"rate", GST_PROPS_INT (mad->header.sfreq),
|
||||
#else
|
||||
"rate", GST_PROPS_INT (mad->header.samplerate),
|
||||
"rate", GST_PROPS_INT (mad->header.samplerate),
|
||||
#endif
|
||||
"channels", GST_PROPS_INT (nchannels),
|
||||
NULL)));
|
||||
"channels", GST_PROPS_INT (nchannels),
|
||||
NULL)))) {
|
||||
gst_element_error (GST_ELEMENT (mad), "could not set caps on source pad, aborting...");
|
||||
}
|
||||
mad->caps_set = TRUE;
|
||||
}
|
||||
|
||||
gst_pad_push (mad->srcpad, outbuffer);
|
||||
|
|
Loading…
Reference in a new issue