mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
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).
This commit is contained in:
parent
8aaf62d816
commit
7b83a2201e
2 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue