-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix External subtitle not loading #153
Conversation
I wonder why |
Co-Authored-By: Ryo Nakano <26003928+ryonakano@users.noreply.github.com>
@ryonakano I believe this is because Edit: Build is failing due to error in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seem to work.
This seems to work well for one film but there is still that crash on starting a new film :-(. I notice that the subtitle file uri is lost if the app is closed then reopened, although it saves the currently playing media. It would be nice to save ands restore the corresponding subtitle uri when they work - but that can be left to another PR. @arshubham are you still working on fixing this PR? |
There are a number of issues reported about problems playing a second video for some people. This PR may have exacerbated an underlying problem. I'll have a look. |
* Fix some code style * Use set_property ()
@ryonakano I have made a number of improvements to this PR. If you are able to give it some testing that would be great. Thanks. |
Hmm, the issue @arshubham mentioned seems to be still reproducable for me (not happen in master) if I don't pause the first video. |
Hmm, I though I tested that - but now I find that with the test .avi video I am using Videos does not crash but becomes unresponsive if i do not pause (OK if video paused before going back). But with another .mkv video I do get a crash. I will look into it further - at least I can now reproduce a crash. Thanks for testing! |
…pausing * Do not navigate back before player finishes stopping * Ensure pipeline reset before playing a file * Avoid multiple ended signal from player
@ryonakano The last commit fixes the crashes and hangs I was experiencing. Please re-test when you have time :-) |
Like many Gtk apps this contains signal cascades resulting in hard to diagnose races. It is important that a signal handler ends before triggering another signal - else an Idle loop has to be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested with a mkv and mp4 file of Elephants Dream (mentioned in #32 (comment)) and the issue that external subtitle is not applied seems to be fixed for me. Playing another video in this way still crashes the app, but it should be another issue like #200.
@ryonakano Thanks for testing! So, it looks like my latest changes did not fix the crashing for you then? It seemed to make it pretty stable for me (I may put up a screen capture). But if this crash is also occurring with master then its not a regression and this PR is at least enabling external subtitles to be shown so it may be worth merging anyway. @danrabbit What do you think? |
It looks like Videos crashes on resume video on machines with an Intel video card, not with an NVidia one. This occurs in master too so is not a regression from this PR. |
Set subtitle directly to pipeline, bypassing clutter-gst. A workaround till clutter-gst is fixed. Timeout is needed since pipeline is reset by setting state to
Gst.State.NULL
and setting progress just afterGst.State.PLAYING
has no effect. A better solution for this is welcome.Fixes #32 , Fixes #63 , Fixes #57