mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
sys: Update for caps/pad template related API changes
This commit is contained in:
parent
03f9ca3d64
commit
6392dfc072
3 changed files with 15 additions and 15 deletions
|
@ -641,7 +641,7 @@ gst_v4lmjpegsrc_getcaps (GstPad * pad)
|
|||
0};
|
||||
|
||||
if (!GST_V4L_IS_OPEN (GST_V4LELEMENT (v4lmjpegsrc))) {
|
||||
return gst_caps_copy (gst_pad_get_pad_template_caps (pad));
|
||||
return gst_pad_get_pad_template_caps (pad);
|
||||
}
|
||||
|
||||
g_value_init (&fps, GST_TYPE_FRACTION);
|
||||
|
|
|
@ -1030,13 +1030,11 @@ gst_ximagesink_getcaps (GstBaseSink * bsink, GstCaps * filter)
|
|||
g_mutex_unlock (ximagesink->x_lock);
|
||||
|
||||
/* get a template copy and add the pixel aspect ratio */
|
||||
caps =
|
||||
gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SINK
|
||||
(ximagesink)->sinkpad));
|
||||
for (i = 0; i < gst_caps_get_size (caps); ++i) {
|
||||
GstStructure *structure = gst_caps_get_structure (caps, i);
|
||||
|
||||
if (ximagesink->par) {
|
||||
caps = gst_pad_get_pad_template_caps (GST_BASE_SINK (ximagesink)->sinkpad);
|
||||
if (ximagesink->par) {
|
||||
caps = gst_caps_make_writable (caps);
|
||||
for (i = 0; i < gst_caps_get_size (caps); ++i) {
|
||||
GstStructure *structure = gst_caps_get_structure (caps, i);
|
||||
int nom, den;
|
||||
|
||||
nom = gst_value_get_fraction_numerator (ximagesink->par);
|
||||
|
|
|
@ -1512,6 +1512,7 @@ static GstCaps *
|
|||
gst_xvimagesink_getcaps (GstBaseSink * bsink, GstCaps * filter)
|
||||
{
|
||||
GstXvImageSink *xvimagesink;
|
||||
GstCaps *caps;
|
||||
|
||||
xvimagesink = GST_XVIMAGESINK (bsink);
|
||||
|
||||
|
@ -1523,15 +1524,16 @@ gst_xvimagesink_getcaps (GstBaseSink * bsink, GstCaps * filter)
|
|||
return gst_caps_ref (xvimagesink->xcontext->caps);
|
||||
}
|
||||
|
||||
caps = gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (xvimagesink));
|
||||
if (filter) {
|
||||
return gst_caps_intersect_full (filter,
|
||||
gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (xvimagesink)),
|
||||
GST_CAPS_INTERSECT_FIRST);
|
||||
} else {
|
||||
return
|
||||
gst_caps_copy (gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD
|
||||
(xvimagesink)));
|
||||
GstCaps *intersection;
|
||||
|
||||
intersection =
|
||||
gst_caps_intersect_full (filter, caps, GST_CAPS_INTERSECT_FIRST);
|
||||
gst_caps_unref (caps);
|
||||
caps = intersection;
|
||||
}
|
||||
return caps;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue