qt: Does not accept movies as commandline parameters
@amorenoc It should probably be possible to call it with a list of movie files from the commandline.
Also when doing that, it should start playing the first one immediately. And also start playing immediately when a movie is selected from the file chooser (or at least go to paused in both cases so you can see the first frame).
The pull request does not completely solve this.
- After selecting a movie from the file chooser it should probably also start immediately
- Adding URIs at the commandline does not work with the autoplay:
0:00:00.219208666 23033 0xded8a0 ERROR qtglwidget qtitem.cc:392:qt_item_init_winsys: 0xdab450 failed to retrieve wrapped context (NULL)
0:00:00.219281495 23033 0xded8a0 ERROR playbin gstplaybin2.c:5391:activate_group:<playbin> failed to activate sinks
0:00:00.219299012 23033 0xded8a0 ERROR gst-player gstplayer.c:877:emit_error:<player0> Error: Failed to pause (gst-player-error-quark, 0)
0:00:02.607661375 23033 0xded8a0 ERROR gst-player gstplayer.c:877:emit_error:<player0> Error: Failed to play (gst-player-error-quark, 0)
I assume this happens because play() is called before the video widget is completely initialized
@sdroege thanks for your feedback :) But I cannot reproduce neither 1) nor 2). Btw you need to rebuild after modifying QML files (it wasn't obvious at least for me)
I assume this happens because play() is called before the video widget is completely initialized
I think the order is correct: first loads the root QML document (video item constructor called), then it sets the video item in the sink, and after that, sets a playlist (which calls pause or play)
So for you a movie selected from the file chooser immediately starts? Ok, maybe the same problem as 2) then.
And maybe that's something Linux specific :)
No, 1) and 2) seem different issues.
After selecting something with the file chooser, it does not automatically start but clicking on play makes it start.
Selecting something via commandline gives the above error, and the same error happens every time you click on play again. After then selecting something with the file chooser, clicking on play makes the video play.
Ok, then issue 2) definitely has to do with different behaviour in Linux, like you said it's very likely we call
play before the video item has been fully initialised.
As per the 1), by default I set autoPlay to false: https://github.com/sdroege/gst-player/blob/master/qt/main.qml#L47 Change it please, and re-run, it should start playing, at least from the file chooser.