#222 Make media player seekable

Stable
closed-accepted
Lars Windolf
None
5
2013-09-06
2013-05-05
No

This implements seeking in the media player. It also makes things work with GStreamer 1.0. Hopefully it should still work with GStreamer 0.10, but I haven't been able to test that.

Patch applies against my python3 branch.

See git commit log for further explanation of the changes: https://github.com/skagedal/liferea/commits/mediaplayer

You might instead want to merge directly from git so as to keep log entries:

git pull https://github.com/skagedal/liferea.git mediaplayer
1 Attachments

Discussion

  • Lars Windolf
    Lars Windolf
    2013-05-12

    I tested the patch. It works on some podcasts and crashes on others like http://www.fluxblog.org/feed.

    It seems that right on playing start something dies:

    Program received signal SIGSEGV, Segmentation fault.
    0x00007ffff3834b71 in g_object_ref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    (gdb) bt
    #0  0x00007ffff3834b71 in g_object_ref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #1  0x00007ffff0ed35a1 in gst_object_ref ()
       from /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0
    #2  0x00007fff912a5f9a in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstplaybin.so
    #3  0x00007fff912a6db2 in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstplaybin.so
    #4  0x00007ffff0eeddac in gst_element_change_state ()
       from /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0
    #5  0x00007ffff0eede2f in gst_element_change_state ()
       from /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0
    #6  0x00007ffff0eee6d0 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-0.10.so.0
    #7  0x00007fffeeb4fa14 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
    #8  0x00007fffeeb4f435 in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
    #9  0x00007ffff5229a59 in ?? () from /usr/lib/libgirepository-1.0.so.1
    #10 0x00007ffff522ae0e in g_function_info_invoke () from /usr/lib/libgirepository-1.0.so.1
    #11 0x00007fffd9872d48 in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
    #12 0x00007fffda4443b8 in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0
    #13 0x00007fffda40f605 in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0
    #14 0x00007fffda4448c0 in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0
    #15 0x00007fffda40f605 in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0
    #16 0x00007fffda4448c0 in PyEval_EvalFrameEx () from /usr/lib/libpython2.7.so.1.0
    #17 0x00007fffda40f605 in PyEval_EvalCodeEx () from /usr/lib/libpython2.7.so.1.0
    #18 0x00007fffda40f7bd in ?? () from /usr/lib/libpython2.7.so.1.0
    #19 0x00007fffda4f3e83 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0
    #20 0x00007fffda4d81cf in ?? () from /usr/lib/libpython2.7.so.1.0
    #21 0x00007fffda4f3e83 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0
    #22 0x00007fffda4f47d7 in PyEval_CallObjectWithKeywords () from /usr/lib/libpython2.7.so.1.0
    #23 0x00007fffd9871466 in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
    #24 0x00007ffff382fca2 in g_closure_invoke ()
       from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #25 0x00007ffff3840d71 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #26 0x00007ffff3849099 in g_signal_emit_valist ()
       from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #27 0x00007ffff3849242 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #28 0x00007ffff4c540b8 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
    #29 0x00007ffff382fca2 in g_closure_invoke ()
       from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #30 0x00007ffff3841179 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #31 0x00007ffff3849099 in g_signal_emit_valist ()
       from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #32 0x00007ffff3849242 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #33 0x00007ffff4c527f7 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
    #34 0x00007ffff4d13501 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
    #35 0x00007ffff382feca in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #36 0x00007ffff3848741 in g_signal_emit_valist ()
       from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #37 0x00007ffff3849242 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
    #38 0x00007ffff4e3e7e9 in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
    #39 0x00007ffff4d113ab in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
    #40 0x00007ffff4d130c1 in gtk_main_do_event () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
    #41 0x00007ffff474fd32 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
    #42 0x00007ffff3572d53 in g_main_context_dispatch ()
       from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #43 0x00007ffff35730a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    ---Type <return> to continue, or q <return> to quit---q
    Quit
    (gdb) quit
    

    Could you debug this? Can you reproduce it?

     
  • Lars Windolf
    Lars Windolf
    2013-05-12

    • assigned_to: Lars Windolf
     
  • Whoa, I've completely missed this comment. Doesn't seem like I got it in my mailbox? Anyway, I will gladly test this later - I used to follow fluxblog many years ago, glad to hear it's still around!

     
  • Hi! Did a quick test now, and Fluxblog works fine for me.

    I guess the main suspects are Python 3.0 vs 2.7 and GStreamer 1.0 vs 0.10. I'm a little confused about the former - I assume you first applied the Python 3.0 patch? Since I don't think it will apply otherwise...? Yet I see references to Python 2.7 in the backtrace.

    I'll do some further testing later. Do you have some more examples of podcasts that don't work and some that do? Would be interesting to see if there's some pattern in the type of media they embed.

    Regards, Simon

     
  • I'm pretty sure it's this part of the patch that causes problems. As I mentioned in that commit, I hadn't checked it with Gst 0.10, and apparently using PyGI with GStreamer 0.10 is somehow broken with regards to EOS messages.

    We can't however, as I suggested in the commit message, force a specific Gst version since we need to use the same that the liferea binary already links to (libwebkitgtk brings it in, I think). And that will be Gst 0.10 for all but the newest Linux distributions. I'll submit a patch later that addresses this issue separately, since I think it should be fixed for Liferea 1.10 (otherwise media player won't work on GStreamer 1.0 systems).

    Regards, Simon

     
  • Ok, let's begin here: https://sourceforge.net/p/liferea/patches/225/

    I've not been able to reproduce your crash even with GStreamer 0.10, but found lots of strange behavior on this setup, so I'm guessing it's related.

     
  • Lars Windolf
    Lars Windolf
    2013-07-28

    Patch #225 is now merged

     
  • Lars Windolf
    Lars Windolf
    2013-07-28

    • status: open --> open-accepted
     
  • Lars Windolf
    Lars Windolf
    2013-07-28

    I finally found time to merge the patch. Sorry that I didn't git pull. I promise to do it next time!

    I found that simple clicking (to step in the stream) didn't work, which is why I changed the handling a bit and moved the actual seeking into the release button handler.

    The only thing I'm not sure about is the GST version handling in the constructor. Can you retest this with Gstreamer 1.0?

     
  • Lars Windolf
    Lars Windolf
    2013-07-28

    BTW Fluxblog doesn't crash anymore.

     
  • Lars Windolf
    Lars Windolf
    2013-09-06

    • status: open-accepted --> closed-accepted
     
  • Lars Windolf
    Lars Windolf
    2013-09-06

    Released with 1.10.2