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 657941 - deinterlace: send QoS messages when dropping a frame
deinterlace: send QoS messages when dropping a frame
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other All
: Normal normal
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 657835
 
 
Reported: 2011-09-01 14:46 UTC by Vincent Penquerc'h
Modified: 2012-06-12 14:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
deinterlace: send QoS messages when dropping a frame (4.10 KB, patch)
2011-09-01 14:46 UTC, Vincent Penquerc'h
committed Details | Review
Patched deinterlace 0.10.29. (53.92 KB, text/x-csrc)
2011-09-02 10:09 UTC, Tvrtko Ursulin
  Details

Description Vincent Penquerc'h 2011-09-01 14:46:50 UTC
send QoS messages when dropping a frame
Comment 1 Vincent Penquerc'h 2011-09-01 14:46:53 UTC
Created attachment 195391 [details] [review]
deinterlace: send QoS messages when dropping a frame
Comment 2 Tvrtko Ursulin 2011-09-02 09:24:30 UTC
I tried backporting this to good plugins 0.10.29 where it applies minus last two hunks in gst_deinterlace_do_qos but it segfaults like this:

Program received signal SIGSEGV, Segmentation fault.

Thread 3074423664 (LWP 1600)

  • #0 gst_deinterlace_do_qos
    at gstdeinterlace.c line 914
  • #1 gst_deinterlace_output_frame
    at gstdeinterlace.c line 1052
  • #2 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #3 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #4 ??
    from /usr/lib/libgstbase-0.10.so.0
  • #5 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #6 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #7 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #8 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #9 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #10 ??
    from /usr/lib/gstreamer-0.10/libgstplaybin.so
  • #11 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #12 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #13 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #14 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #15 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #16 ??
    from /usr/lib/gstreamer-0.10/libgstcoreelements.so
  • #17 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #18 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #19 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #20 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #21 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #22 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #23 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #24 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #25 ??
    from /usr/lib/gstreamer-0.10/libgstmpeg2dec.so
  • #26 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #27 ??
    from /usr/lib/gstreamer-0.10/libgstmpegvideoparse.so
  • #28 ??
    from /usr/lib/gstreamer-0.10/libgstmpegvideoparse.so
  • #29 gst_pad_push
    from /usr/lib/libgstreamer-0.10.so.0
  • #30 ??
    from /usr/lib/gstreamer-0.10/libgstcoreelements.so
  • #31 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #32 ??
    from /usr/lib/libgstreamer-0.10.so.0
  • #33 ??
    from /lib/libglib-2.0.so.0
  • #34 ??
    from /lib/libglib-2.0.so.0
  • #35 start_thread
    from /lib/libpthread.so.0
  • #36 clone
    from /lib/libc.so.6

Comment 3 Vincent Penquerc'h 2011-09-02 09:59:29 UTC
That would imply the buffer is either not a buffer, or was already disposed.
When you say the last two hunks did not apply, did you apply them by hand ?
I tested the patch by randomly fiddling with the timestamp so the code would arbitrarily drop random frames and did not get a crash. If you can double check the two hunks are applied, can you please give me the gstdeinterlace.c file you have ? There might be lifetime changes in deinterlace between our versions :/
Comment 4 Tvrtko Ursulin 2011-09-02 10:09:22 UTC
Created attachment 195465 [details]
Patched deinterlace 0.10.29.

No, it seems last two hunks are not really applicable so them not applying looked like a non-issue. But maybe I am mistaking, please have a look.
Comment 5 Vincent Penquerc'h 2011-09-02 10:27:59 UTC
Right, one of the calls to _do_qos is still passing a GstClockTime instead of a const GstBuffer*, this hunk appears to not have been applied:


@@ -1869,7 +1888,7 @@ restart:
     }
 
     /* Check if we need to drop the frame because of QoS */
-    if (!gst_deinterlace_do_qos (self, GST_BUFFER_TIMESTAMP (buf))) {
+    if (!gst_deinterlace_do_qos (self, buf)) {
       self->cur_field_idx--;
       gst_buffer_unref (gst_deinterlace_pop_history (self));
       gst_buffer_unref (outbuf);

Alternatively, if you post the original gstdeinterlace.[hc] you're using, I can post back a patched version, since the code seems to have changed a fair bit between our versions.
Comment 6 Tvrtko Ursulin 2011-09-02 10:36:42 UTC
Doh, sorry, this is what happens when you try to shuffle to many thing at the same time. I assumed code is not there because in the patch last two hunks have no function names so I assumed they were parts of a much grown gst_deinterlace_do_qos. I am rebuilding a fixed version and will let you know how it fares.
Comment 7 Tvrtko Ursulin 2011-09-02 10:53:04 UTC
This works fine now, I even see QOS messages originating from deinterlace being sent.
Comment 8 Vincent Penquerc'h 2011-09-02 11:01:45 UTC
Great!

Please note that I'm not done checking through the elements that might need changing, I'm now looking at the starting-before-the-source issue, which is higher priority, and will get back to QoS later.

Cheers
Comment 9 Tvrtko Ursulin 2012-06-12 09:07:27 UTC
Can this be upstreamed please?
Comment 10 Vincent Penquerc'h 2012-06-12 14:53:25 UTC
It still applies! :)

FWI, there's some cleanup/factoring that's been waiting for a while as well on https://bugzilla.gnome.org/show_bug.cgi?id=658241 about the QoS API.


commit bdcf532a942b9806d3c9293062549eed62937d21
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Thu Sep 1 15:41:26 2011 +0100

    deinterlace: send QoS messages when dropping a frame
    
    https://bugzilla.gnome.org/show_bug.cgi?id=657941


Also pushed on master, though deinterlace isn't ported yet.