From: Andy Wingo Date: Thu, 6 Apr 2006 11:40:45 +0000 (+0000) Subject: gst/videorate/gstvideorate.c (gst_video_rate_reset) X-Git-Tag: 1.19.3~511^2~12022 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8e9a6d7a1461b5e759400ac3334980c9d3c0433;p=platform%2Fupstream%2Fgstreamer.git gst/videorate/gstvideorate.c (gst_video_rate_reset) Original commit message from CVS: 2006-04-06 Andy Wingo * gst/videorate/gstvideorate.c (gst_video_rate_reset) (gst_video_rate_init): Caps-related parameters should not be reset by a flush -- move their inits to the instance init function. (gst_video_rate_flush_prev): Don't complain if gst_pad_push is not OK, just return the result. * gst/audiotestsrc/gstaudiotestsrc.c (gst_audio_test_src_class_init) (gst_audio_test_src_get_times): Re-enable is-live=true, as was broken by Stefan's commit on 24 March. --- diff --git a/ChangeLog b/ChangeLog index 152ae12b7c..cb7a19ee64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2006-04-06 Andy Wingo + * gst/videorate/gstvideorate.c (gst_video_rate_reset) + (gst_video_rate_init): Caps-related parameters should not be reset + by a flush -- move their inits to the instance init function. + (gst_video_rate_flush_prev): Don't complain if gst_pad_push + is not OK, just return the result. + + * gst/audiotestsrc/gstaudiotestsrc.c + (gst_audio_test_src_class_init) + (gst_audio_test_src_get_times): Re-enable is-live=true, as was + broken by Stefan's commit on 24 March. + * ext/ogg/gstoggmux.c (gst_ogg_mux_push_buffer): Set caps on buffers being pushed out. Fixes oggmux ! multifdsink. diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c index d93f0994a2..2fa3081a3e 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.c +++ b/gst/audiotestsrc/gstaudiotestsrc.c @@ -139,10 +139,8 @@ static gboolean gst_audio_test_src_query (GstBaseSrc * basesrc, static void gst_audio_test_src_change_wave (GstAudioTestSrc * src); -/* static void gst_audio_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer, GstClockTime * start, GstClockTime * end); -*/ static GstFlowReturn gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset, guint length, GstBuffer ** buffer); @@ -196,10 +194,8 @@ gst_audio_test_src_class_init (GstAudioTestSrcClass * klass) GST_DEBUG_FUNCPTR (gst_audio_test_src_is_seekable); gstbasesrc_class->do_seek = GST_DEBUG_FUNCPTR (gst_audio_test_src_do_seek); gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_audio_test_src_query); - /* - gstbasesrc_class->get_times = - GST_DEBUG_FUNCPTR (gst_audio_test_src_get_times); - */ + gstbasesrc_class->get_times = + GST_DEBUG_FUNCPTR (gst_audio_test_src_get_times); gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_audio_test_src_create); } @@ -579,7 +575,6 @@ gst_audio_test_src_change_volume (GstAudioTestSrc * src) } } -#ifdef __DISABLE_NO_LIVE__ static void gst_audio_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer, GstClockTime * start, GstClockTime * end) @@ -602,7 +597,6 @@ gst_audio_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer, *end = -1; } } -#endif static gboolean gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment) diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 5716b9788b..d00b46bc6e 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -360,10 +360,6 @@ gst_video_rate_reset (GstVideoRate * videorate) { GST_DEBUG ("resetting data"); - videorate->from_rate_numerator = 0; - videorate->from_rate_denominator = 0; - videorate->to_rate_numerator = 0; - videorate->to_rate_denominator = 0; videorate->in = 0; videorate->out = 0; videorate->drop = 0; @@ -395,6 +391,11 @@ gst_video_rate_init (GstVideoRate * videorate) gst_video_rate_reset (videorate); videorate->silent = DEFAULT_SILENT; videorate->new_pref = DEFAULT_NEW_PREF; + + videorate->from_rate_numerator = 0; + videorate->from_rate_denominator = 0; + videorate->to_rate_numerator = 0; + videorate->to_rate_denominator = 0; } /* flush the oldest buffer */ @@ -433,8 +434,7 @@ gst_video_rate_flush_prev (GstVideoRate * videorate) "old is best, dup, pushing buffer outgoing ts %" GST_TIME_FORMAT, GST_TIME_ARGS (push_ts)); - if ((res = gst_pad_push (videorate->srcpad, outbuf)) != GST_FLOW_OK) - goto push_error; + res = gst_pad_push (videorate->srcpad, outbuf); return res; @@ -444,13 +444,6 @@ eos_before_buffers: GST_INFO_OBJECT (videorate, "got EOS before any buffer was received"); return GST_FLOW_OK; } - /* ERRORS */ -push_error: - { - GST_WARNING_OBJECT (videorate, "couldn't push buffer on srcpad, reason %s", - gst_flow_get_name (res)); - return res; - } } static void