From c3c9ba629753bad3b179746a29fa86b4105c7506 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 29 Apr 2004 17:37:01 +0000 Subject: [PATCH] ext/jpeg/: move format setting to inner loop Original commit message from CVS: * ext/jpeg/gstjpegdec.c: (gst_jpegdec_get_type): * ext/jpeg/gstjpegenc.c: (gst_jpegenc_get_type), (gst_jpegenc_getcaps): move format setting to inner loop * gst/ffmpegcolorspace/gstffmpegcolorspace.c: (gst_ffmpegcolorspace_getcaps): use GST_PAD_CAPS if available so that we use already negotiated caps * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (qtdemux_parse_moov), (qtdemux_parse): extra debugging * sys/qcam/qcam-Linux.c: (qc_lock_wait), (qc_unlock): * sys/qcam/qcam-os.c: (qc_lock_wait), (qc_unlock): move hardcoded path to DEFINE --- ChangeLog | 17 +++++++++++++++++ gst/ffmpegcolorspace/gstffmpegcolorspace.c | 10 +++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b916d0be38..caa45e2bb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2004-04-29 Thomas Vander Stichele + + * ext/jpeg/gstjpegdec.c: (gst_jpegdec_get_type): + * ext/jpeg/gstjpegenc.c: (gst_jpegenc_get_type), + (gst_jpegenc_getcaps): + move format setting to inner loop + * gst/ffmpegcolorspace/gstffmpegcolorspace.c: + (gst_ffmpegcolorspace_getcaps): + use GST_PAD_CAPS if available so that we use already negotiated + caps + * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), + (qtdemux_parse_moov), (qtdemux_parse): + extra debugging + * sys/qcam/qcam-Linux.c: (qc_lock_wait), (qc_unlock): + * sys/qcam/qcam-os.c: (qc_lock_wait), (qc_unlock): + move hardcoded path to DEFINE + 2004-04-28 David Schleef * gst/speed/gstspeed.c: (speed_parse_caps): Fix caps parsing. diff --git a/gst/ffmpegcolorspace/gstffmpegcolorspace.c b/gst/ffmpegcolorspace/gstffmpegcolorspace.c index ce0f337a77..922b26c0cc 100644 --- a/gst/ffmpegcolorspace/gstffmpegcolorspace.c +++ b/gst/ffmpegcolorspace/gstffmpegcolorspace.c @@ -62,7 +62,7 @@ struct _GstFFMpegColorspaceClass /* elementfactory information */ static GstElementDetails ffmpegcolorspace_details = { - "FFMPEG Colorspace converter", + "FFMPEG-based colorspace converter in gst-plugins", "Filter/Converter/Video", "Converts video from one colorspace to another", "Ronald Bultje ", @@ -143,7 +143,7 @@ static GstCaps * gst_ffmpegcolorspace_getcaps (GstPad * pad) { GstFFMpegColorspace *space; - GstCaps *othercaps; + GstCaps *othercaps = NULL; GstCaps *caps; GstPad *otherpad; @@ -151,7 +151,11 @@ gst_ffmpegcolorspace_getcaps (GstPad * pad) otherpad = (pad == space->srcpad) ? space->sinkpad : space->srcpad; - othercaps = gst_pad_get_allowed_caps (otherpad); + /* use already negotiated caps if they exist */ + if (GST_PAD_CAPS (otherpad)) + othercaps = gst_caps_copy (GST_PAD_CAPS (otherpad)); + if (!othercaps) + othercaps = gst_pad_get_allowed_caps (otherpad); othercaps = gst_ffmpegcolorspace_caps_remove_format_info (othercaps);