gst/videorate/gstvideorate.c (gst_video_rate_reset)

Original commit message from CVS:
2006-04-06  Andy Wingo  <wingo@pobox.com>

* 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.
This commit is contained in:
Andy Wingo 2006-04-06 11:40:45 +00:00
parent 2a9a1bcfdc
commit a8e9a6d7a1
3 changed files with 19 additions and 21 deletions

View file

@ -1,5 +1,16 @@
2006-04-06 Andy Wingo <wingo@pobox.com> 2006-04-06 Andy Wingo <wingo@pobox.com>
* 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 * ext/ogg/gstoggmux.c (gst_ogg_mux_push_buffer): Set caps on
buffers being pushed out. Fixes oggmux ! multifdsink. buffers being pushed out. Fixes oggmux ! multifdsink.

View file

@ -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_change_wave (GstAudioTestSrc * src);
/*
static void gst_audio_test_src_get_times (GstBaseSrc * basesrc, static void gst_audio_test_src_get_times (GstBaseSrc * basesrc,
GstBuffer * buffer, GstClockTime * start, GstClockTime * end); GstBuffer * buffer, GstClockTime * start, GstClockTime * end);
*/
static GstFlowReturn gst_audio_test_src_create (GstBaseSrc * basesrc, static GstFlowReturn gst_audio_test_src_create (GstBaseSrc * basesrc,
guint64 offset, guint length, GstBuffer ** buffer); 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); GST_DEBUG_FUNCPTR (gst_audio_test_src_is_seekable);
gstbasesrc_class->do_seek = GST_DEBUG_FUNCPTR (gst_audio_test_src_do_seek); 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->query = GST_DEBUG_FUNCPTR (gst_audio_test_src_query);
/* gstbasesrc_class->get_times =
gstbasesrc_class->get_times = GST_DEBUG_FUNCPTR (gst_audio_test_src_get_times);
GST_DEBUG_FUNCPTR (gst_audio_test_src_get_times);
*/
gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_audio_test_src_create); 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 static void
gst_audio_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer, gst_audio_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
GstClockTime * start, GstClockTime * end) GstClockTime * start, GstClockTime * end)
@ -602,7 +597,6 @@ gst_audio_test_src_get_times (GstBaseSrc * basesrc, GstBuffer * buffer,
*end = -1; *end = -1;
} }
} }
#endif
static gboolean static gboolean
gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment) gst_audio_test_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment)

View file

@ -360,10 +360,6 @@ gst_video_rate_reset (GstVideoRate * videorate)
{ {
GST_DEBUG ("resetting data"); 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->in = 0;
videorate->out = 0; videorate->out = 0;
videorate->drop = 0; videorate->drop = 0;
@ -395,6 +391,11 @@ gst_video_rate_init (GstVideoRate * videorate)
gst_video_rate_reset (videorate); gst_video_rate_reset (videorate);
videorate->silent = DEFAULT_SILENT; videorate->silent = DEFAULT_SILENT;
videorate->new_pref = DEFAULT_NEW_PREF; 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 */ /* 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, "old is best, dup, pushing buffer outgoing ts %" GST_TIME_FORMAT,
GST_TIME_ARGS (push_ts)); GST_TIME_ARGS (push_ts));
if ((res = gst_pad_push (videorate->srcpad, outbuf)) != GST_FLOW_OK) res = gst_pad_push (videorate->srcpad, outbuf);
goto push_error;
return res; return res;
@ -444,13 +444,6 @@ eos_before_buffers:
GST_INFO_OBJECT (videorate, "got EOS before any buffer was received"); GST_INFO_OBJECT (videorate, "got EOS before any buffer was received");
return GST_FLOW_OK; 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 static void