mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
theora: Update for negotiation related API changes
This commit is contained in:
parent
362a025a6b
commit
c276eec54e
2 changed files with 13 additions and 4 deletions
|
@ -252,7 +252,7 @@ static gboolean theora_enc_src_event (GstPad * pad, GstEvent * event);
|
||||||
static GstFlowReturn theora_enc_chain (GstPad * pad, GstBuffer * buffer);
|
static GstFlowReturn theora_enc_chain (GstPad * pad, GstBuffer * buffer);
|
||||||
static GstStateChangeReturn theora_enc_change_state (GstElement * element,
|
static GstStateChangeReturn theora_enc_change_state (GstElement * element,
|
||||||
GstStateChange transition);
|
GstStateChange transition);
|
||||||
static GstCaps *theora_enc_sink_getcaps (GstPad * pad);
|
static GstCaps *theora_enc_sink_getcaps (GstPad * pad, GstCaps * filter);
|
||||||
static gboolean theora_enc_sink_setcaps (GstPad * pad, GstCaps * caps);
|
static gboolean theora_enc_sink_setcaps (GstPad * pad, GstCaps * caps);
|
||||||
static void theora_enc_get_property (GObject * object, guint prop_id,
|
static void theora_enc_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
@ -578,7 +578,7 @@ theora_enc_get_supported_formats (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
theora_enc_sink_getcaps (GstPad * pad)
|
theora_enc_sink_getcaps (GstPad * pad, GstCaps * filter)
|
||||||
{
|
{
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
char *supported_formats, *caps_string;
|
char *supported_formats, *caps_string;
|
||||||
|
@ -599,6 +599,15 @@ theora_enc_sink_getcaps (GstPad * pad)
|
||||||
g_free (supported_formats);
|
g_free (supported_formats);
|
||||||
GST_DEBUG ("Supported caps: %" GST_PTR_FORMAT, caps);
|
GST_DEBUG ("Supported caps: %" GST_PTR_FORMAT, caps);
|
||||||
|
|
||||||
|
if (filter) {
|
||||||
|
GstCaps *intersection;
|
||||||
|
|
||||||
|
intersection =
|
||||||
|
gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
caps = intersection;
|
||||||
|
}
|
||||||
|
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1194,7 +1203,7 @@ theora_enc_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
buffers = g_slist_reverse (buffers);
|
buffers = g_slist_reverse (buffers);
|
||||||
|
|
||||||
/* mark buffers and put on caps */
|
/* mark buffers and put on caps */
|
||||||
caps = gst_pad_get_caps (enc->srcpad);
|
caps = gst_pad_get_caps (enc->srcpad, NULL);
|
||||||
caps = theora_set_header_on_caps (caps, buffers);
|
caps = theora_set_header_on_caps (caps, buffers);
|
||||||
GST_DEBUG ("here are the caps: %" GST_PTR_FORMAT, caps);
|
GST_DEBUG ("here are the caps: %" GST_PTR_FORMAT, caps);
|
||||||
gst_pad_set_caps (enc->srcpad, caps);
|
gst_pad_set_caps (enc->srcpad, caps);
|
||||||
|
|
|
@ -287,7 +287,7 @@ theora_parse_set_streamheader (GstTheoraParse * parse)
|
||||||
|
|
||||||
g_assert (!parse->streamheader_received);
|
g_assert (!parse->streamheader_received);
|
||||||
|
|
||||||
caps = gst_caps_make_writable (gst_pad_get_caps (parse->srcpad));
|
caps = gst_caps_make_writable (gst_pad_get_caps (parse->srcpad, NULL));
|
||||||
theora_parse_set_header_on_caps (parse, caps);
|
theora_parse_set_header_on_caps (parse, caps);
|
||||||
GST_DEBUG_OBJECT (parse, "here are the caps: %" GST_PTR_FORMAT, caps);
|
GST_DEBUG_OBJECT (parse, "here are the caps: %" GST_PTR_FORMAT, caps);
|
||||||
gst_pad_set_caps (parse->srcpad, caps);
|
gst_pad_set_caps (parse->srcpad, caps);
|
||||||
|
|
Loading…
Reference in a new issue