Skip to content
This repository has been archived by the owner on Apr 16, 2018. It is now read-only.

qt: Does not accept movies as commandline parameters #122

Open
sdroege opened this issue Oct 24, 2015 · 5 comments
Open

qt: Does not accept movies as commandline parameters #122

sdroege opened this issue Oct 24, 2015 · 5 comments

Comments

@sdroege
Copy link
Owner

sdroege commented Oct 24, 2015

@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).

@sdroege
Copy link
Owner Author

sdroege commented Nov 1, 2015

The pull request does not completely solve this.

  1. After selecting a movie from the file chooser it should probably also start immediately
  2. 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

@moleike
Copy link
Contributor

moleike commented Nov 1, 2015

@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)

@sdroege
Copy link
Owner Author

sdroege commented Nov 1, 2015

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 :)

@sdroege
Copy link
Owner Author

sdroege commented Nov 2, 2015

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.

@moleike
Copy link
Contributor

moleike commented Nov 2, 2015

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants