After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793065 - Imagefreeze element does not change the buffer on GST_SEEK_FLAG_FLUSH seek event
Imagefreeze element does not change the buffer on GST_SEEK_FLAG_FLUSH seek event
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.12.2
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-31 13:58 UTC by Liene
Modified: 2018-11-03 15:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample code to repeat the bug (4.95 KB, text/x-csrc)
2018-01-31 16:40 UTC, Liene
Details
Test sample of reported bug (4.94 KB, text/x-csrc)
2018-01-31 16:46 UTC, Liene
Details

Description Liene 2018-01-31 13:58:31 UTC
Even if the pipeline makes the seek with GST_SEEK_FLAG_FLUSH, autovideosink receives from imagefreeze the same buffer as before. So obviously imagefreez does not change the buffer. When I make a query on position, i see that position is changed relevant to seek request. 

Pipeline in use : filesrc location=/path/0.mkv ! matroskademux ! avdec_h264 ! imagefreeze name=frz ! videoconvert ! autovideosink; 

Main steps in code : 

gst_element_query_position (data->pipeline, GST_FORMAT_TIME, &position);

and 

seek_event = gst_event_new_seek (data->rate, GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH),GST_SEEK_TYPE_SET, pos, GST_SEEK_TYPE_NONE, 0);

And console output with GST_DEBUG=3,imagefreeze*:6 reports: 

0:00:17.220709175 31321       0xcdb590 DEBUG            imagefreeze gstimagefreeze.c:681:gst_image_freeze_sink_chain:<imagefreeze0:sink> Already have a buffer, dropping

Absolute seek 
Current position 0:00:16.961000000, new position 0:00:11.961000000
0:00:17.224094233 31321       0xcdb590 DEBUG            imagefreeze gstimagefreeze.c:681:gst_image_freeze_sink_chain:<imagefreeze0:sink> Already have a buffer, dropping
0:00:17.227798715 31321       0xcc7c30 LOG              imagefreeze gstimagefreeze.c:554:gst_image_freeze_src_event:<imagefreeze0:src> Got seek event
0:00:17.227876106 31321 0x7f3b9c014f20 DEBUG            imagefreeze gstimagefreeze.c:801:gst_image_freeze_src_loop:<imagefreeze0:src> Pushing buffer resulted in flushing
0:00:17.227903018 31321 0x7f3b9c014f20 LOG              imagefreeze gstimagefreeze.c:819:gst_image_freeze_src_loop:<imagefreeze0> pausing task, reason flushing
0:00:17.227947396 31321       0xcc7c30 DEBUG            imagefreeze gstimagefreeze.c:647:gst_image_freeze_src_event:<imagefreeze0:src> Seek successful
0:00:17.228017578 31321 0x7f3b9c014f20 DEBUG            imagefreeze gstimagefreeze.c:728:gst_image_freeze_src_loop:<imagefreeze0:src> Pushing SEGMENT event: time segment start=0:00:11.961000000, offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x01, time=0:00:11.961000000, base=0:00:00.000000000, position 0:00:11.961000000, duration 99:99:99.999999999
0:00:17.228077464 31321 0x7f3b9c014f20 DEBUG            imagefreeze gstimagefreeze.c:791:gst_image_freeze_src_loop:<imagefreeze0:src> Handling buffer with timestamp 0:00:11.960000000
0:00:17.229690575 31321       0xcdb590 DEBUG            imagefreeze gstimagefreeze.c:681:gst_image_freeze_sink_chain:<imagefreeze0:sink> Already have a buffer, dropping

Note that i tried some ways like changing target (pipeline, sink, imagefreeze) on which sink event applied. Also tested different versions like (GST_SEEK_FLAG_FLUSH, GST_SEEK_FLAG_SEGMENT), but imagefreeze also fails to change the buffer.
Comment 1 Liene 2018-01-31 16:40:46 UTC
Created attachment 367724 [details]
Sample code to repeat the bug
Comment 2 Liene 2018-01-31 16:46:12 UTC
Created attachment 367725 [details]
Test sample of reported bug

Tiny changes - GstSeekFlags changed back to GST_SEEK_FLAG_FLUSH
Comment 3 GStreamer system administrator 2018-11-03 15:25:53 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/436.