-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Support pausing at a frame-accurate position #5660
Comments
You can listen to |
@tonihei Thank you for your reply
When changing the source has become the next |
There is only one single moment in which playback changes from window index to the next. If you'd like to know the previous index, you could just save the current index to a variable and check if it changed in the If you want to do something at a specific playback position, you can also try to send a message at a certain time like so: |
@tonihei Send is an imprecise
It's going to stop after the last frame of index not the first frame of next index |
The message is imprecise because it's send on another thread. I'll mark this as an enhancement to support sending precise messages which may block the playback thread while the message is handled. We do something like that in our testutils here if you want to give it a go. An alternative is to NOT add MediaSources behind the current one to the ConcatenatingMediaSource and wait until the state changes to STATE_ENDED. After this happens you can add new sources and seek to the next item. |
Thank you very much |
Sending precise messages is most likely not feasible, because the main reason to do that is to pause at a specific frame-accurate timestamp. As we don't control the last few milliseconds before releasing the frame to the surface, this behavior needs to be implemented by actually holding back samples in the renderer. This can still be implemented, e.g. by using renderer messages sent at an earlier time, but not as a PlayerMessage triggered at the intended position, because by the time the message is triggered, it's already too late. I'll mark the issue as "low priority" because it's more complicated than anticipated. And also rename to only solve the pausing feature. |
@tonihei |
Pausing at a frame-accurate position is a subset of setting the playback speed from a frame-accurate position (pausing := speed=0.0). Or at least both share a similar set-up. @Samrobbo, assigning to you as you may look into the playback speed setting issue anyway. |
There is now a public design doc for this feature at https://exoplayer.dev/design-documents.html (direct doc link) |
Also adds tests covering the internal implementation. Issue:#5660 PiperOrigin-RevId: 300513548
We now support pausing at the end of media items (that is, at the last frame) using I'll leave this issue open for the more general feature to pause at arbitrary exact frame positions. As most requests have been for last frame pausing, I'll mark this enhancement as low priority for now. |
Hi, This is still not published to release-v2 version but has been dev for 6 months. Any particular reason? |
It will be released very soon, in 2.12. |
The work to enable pausing at the end of media items was released in 2.12. This issue remains open to track the more general feature to pause at arbitrary exact frame positions, as per #5660 (comment). |
Hi, Is this planned to be implemented? There is a design doc from 2020-01-15 by @tonihei , and I found a few other issues that were closed because of similarity\duplicate with this. Just saying, there is a demand for this feature |
Hello, I have a question to consult
My English is not very good, please forgive me
I will be more MediaSource add ConcatenatingMediaSource ,
I want to listen CurrentWindowIndex to finish playing
I can't do it that way
The text was updated successfully, but these errors were encountered: