Commit 7b83a220 authored by Ronald S. Bultje's avatar Ronald S. Bultje

ext/ffmpeg/gstffmpegcolorspace.c: Backport changes from ffmpegcolorspace...

ext/ffmpeg/gstffmpegcolorspace.c: Backport changes from ffmpegcolorspace (gst-plugins) so we can then move the whole ...

Original commit message from CVS:
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
Backport changes from ffmpegcolorspace (gst-plugins) so we can
then move the whole of this plugin back and deprecate this (no,
I'm not insane).
parent 8aaf62d8
2004-10-25 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegcolorspace.c: (gst_ffmpegcsp_pad_link):
Backport changes from ffmpegcolorspace (gst-plugins) so we can
then move the whole of this plugin back and deprecate this (no,
I'm not insane).
2004-10-25 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
......
......@@ -176,15 +176,20 @@ gst_ffmpegcsp_pad_link (GstPad * pad, const GstCaps * caps)
GstPadLinkReturn ret;
int height, width;
double framerate;
const GValue *par = NULL;
space = GST_FFMPEGCSP (gst_pad_get_parent (pad));
GST_DEBUG_OBJECT (space, "pad_link on %s:%s with caps %" GST_PTR_FORMAT,
GST_DEBUG_PAD_NAME (pad), caps);
otherpad = (pad == space->srcpad) ? space->sinkpad : space->srcpad;
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &width);
gst_structure_get_int (structure, "height", &height);
gst_structure_get_double (structure, "framerate", &framerate);
par = gst_structure_get_value (structure, "pixel-aspect-ratio");
/* FIXME attempt and/or check for passthru */
......@@ -218,6 +223,12 @@ gst_ffmpegcsp_pad_link (GstPad * pad, const GstCaps * caps)
"width", G_TYPE_INT, width,
"height", G_TYPE_INT, height,
"framerate", G_TYPE_DOUBLE, framerate, NULL);
if (par) {
gst_caps_set_simple (caps,
"pixel-aspect-ratio", GST_TYPE_FRACTION,
gst_value_get_fraction_numerator (par),
gst_value_get_fraction_denominator (par), NULL);
}
ret = gst_pad_try_set_caps (otherpad, caps);
if (GST_PAD_LINK_FAILED (ret)) {
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment