GNOME Bugzilla – Bug 781008
scaletempo: Fix GAP events handle issue when set rate
Last modified: 2017-04-09 07:46:39 UTC
This issue was found when I tried with gstplayer API in our application when I set rate to 2 with clips contain both audio and vdieo tracks, after the clip is finished, it will still not eos until time "duration x rate" (eg. a 12s clips, when set rate to 2.0, it won't quit until 24s) After checking in streamsychnoizer the GST_EVENT_EOS is converted to GST_EVENT_GAP, in scaletempo, it didn't modify the gap event ts and duration accrodingly with the rate. (as in scaletempo segment.rate will be set 1.0 to keep the audio sample rate unchanged.) Could you please have review with attached patch? Thanks Lyon
Created attachment 349428 [details] [review] patch for handle gap event in scaletempo
Created attachment 349432 [details] [review] patch for handle gap event in scaletempo
Review of attachment 349432 [details] [review]: Simply scaling of the timestamp is not enough, you have to replicate the code at the bottom of gst_scaletempo_transform() here (without the latency adjustment).
Created attachment 349441 [details] [review] Updated patch for scaletempo handle gap event Please see updated patch with gap event timestamp adjustment
Review of attachment 349441 [details] [review]: ::: gst/audiofx/gstscaletempo.c @@ +668,3 @@ + gst_event_unref (event); + gap = gst_event_new_gap (gap_ts, gap_duration); + return gst_pad_push_event (GST_BASE_TRANSFORM_SRC_PAD (trans), gap); Why not just fall-through here and pass the event to the base class below?
Created attachment 349450 [details] [review] patch for handle gap event in scaletempo update version2 Please see updated patch, pass the event to base class
commit f26835d8bb7206c8badaeaad17342e727f3bfa75 Author: Lyon Wang <lyon.wang@nxp.com> Date: Fri Apr 7 15:29:43 2017 +0800 scaletempo: Scale GAP event timestamp and duration like for buffers https://bugzilla.gnome.org/show_bug.cgi?id=781008