From: <wt...@fr...> - 2004-10-18 10:57:59
|
CVS Root: /cvs/gstreamer Module: gst-plugins Changes by: wtay Date: Mon Oct 18 2004 03:57:57 PDT Log message: * ext/speex/gstspeexenc.c: (gst_speexenc_class_init), (gst_speexenc_chain): Fix speex timestamps so that it gets muxed properly. Modified files: . : ChangeLog ext/speex : gstspeexenc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.1170&r2=1.1171 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ext/speex/gstspeexenc.c.diff?r1=1.25&r2=1.26 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.1170 retrieving revision 1.1171 diff -u -d -r1.1170 -r1.1171 --- ChangeLog 15 Oct 2004 14:35:54 -0000 1.1170 +++ ChangeLog 18 Oct 2004 10:57:45 -0000 1.1171 @@ -1,5 +1,11 @@ 2004-10-15 Wim Taymans <wi...@fl...> + * ext/speex/gstspeexenc.c: (gst_speexenc_class_init), + (gst_speexenc_chain): + Fix speex timestamps so that it gets muxed properly. + +2004-10-15 Wim Taymans <wi...@fl...> * ext/raw1394/gstdv1394src.c: (gst_dv1394src_get_type), (gst_dv1394src_base_init), (gst_dv1394src_class_init), (gst_dv1394src_init), (gst_dv1394src_dispose), Index: gstspeexenc.c RCS file: /cvs/gstreamer/gst-plugins/ext/speex/gstspeexenc.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- gstspeexenc.c 4 Oct 2004 14:54:49 -0000 1.25 +++ gstspeexenc.c 18 Oct 2004 10:57:45 -0000 1.26 @@ -196,7 +196,7 @@ 0.0, 10.0, DEFAULT_QUALITY, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BITRATE, g_param_spec_int ("bitrate", "Encoding Bit-rate", - "Specify an encoding bit-rate (in bps). ", + "Specify an encoding bit-rate (in bps). (0 = automatic)", 0, G_MAXINT, DEFAULT_BITRATE, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_VBR, g_param_spec_boolean ("vbr", "VBR", @@ -952,6 +952,10 @@ g_assert (written == outsize); speex_bits_reset (&speexenc->bits); + GST_BUFFER_TIMESTAMP (outbuf) = + (speexenc->frameno * frame_size - + speexenc->lookahead) * GST_SECOND / speexenc->rate; + GST_BUFFER_DURATION (outbuf) = frame_size * GST_SECOND / speexenc->rate; GST_BUFFER_OFFSET (outbuf) = speexenc->bytes_out; GST_BUFFER_OFFSET_END (outbuf) = speexenc->frameno * frame_size - speexenc->lookahead; |