From: <mn...@ke...> - 2008-11-14 19:52:42
|
CVS Root: /cvs/gstreamer Module: gst-plugins-bad Changes by: mnauw Date: Fri Nov 14 2008 19:52:38 UTC Log message: * ext/x264/gstx264enc.c: (gst_x264_enc_set_src_caps): Construct source caps in more conventional (and correct) manner. Modified files: . : ChangeLog ext/x264 : gstx264enc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ChangeLog.diff?r1=1.3702&r2=1.3703 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ext/x264/gstx264enc.c.diff?r1=1.16&r2=1.17 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-bad/ChangeLog,v retrieving revision 1.3702 retrieving revision 1.3703 diff -u -d -r1.3702 -r1.3703 --- ChangeLog 14 Nov 2008 16:15:41 -0000 1.3702 +++ ChangeLog 14 Nov 2008 19:52:22 -0000 1.3703 @@ -1,3 +1,8 @@ +2008-11-14 Mark Nauwelaerts <mar...@co...> + + * ext/x264/gstx264enc.c: (gst_x264_enc_set_src_caps): + Construct source caps in more conventional (and correct) manner. 2008-11-14 Christian Schaller <chr...@co...> * configure.ac: remove experimental build check, -bad is experimental Index: gstx264enc.c RCS file: /cvs/gstreamer/gst-plugins-bad/ext/x264/gstx264enc.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- gstx264enc.c 27 Oct 2008 17:01:22 -0000 1.16 +++ gstx264enc.c 14 Nov 2008 19:52:24 -0000 1.17 @@ -204,7 +204,9 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("video/x-h264") + GST_STATIC_CAPS ("video/x-h264, " + "framerate = (fraction) [0/1, MAX], " + "width = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ]") ); static void gst_x264_enc_finalize (GObject * object); @@ -712,15 +714,14 @@ static gboolean gst_x264_enc_set_src_caps (GstX264Enc * encoder, GstPad * pad, GstCaps * caps) { - GstStructure *structure; GstBuffer *buf; GstCaps *outcaps; gboolean res; - structure = gst_caps_get_structure (caps, 0); - structure = gst_structure_copy (structure); - gst_structure_set_name (structure, "video/x-h264"); - outcaps = gst_caps_new_full (structure, NULL); + outcaps = gst_caps_new_simple ("video/x-h264", + "width", G_TYPE_INT, encoder->width, + "height", G_TYPE_INT, encoder->height, + "framerate", GST_TYPE_FRACTION, encoder->fps_num, encoder->fps_den, NULL); if (!encoder->byte_stream) { buf = gst_x264_enc_header_buf (encoder); |