-
Notifications
You must be signed in to change notification settings - Fork 333
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
Options for start and end paused #669
base: master
Are you sure you want to change the base?
Conversation
This function allows a user to start omxplayer in a paused state instead of immediately starting playback of the video. The user can then use standard keyboard or dbus commands to begin playback manually. To use this function add the command-line parameter: --start-paused to the omxplayer command. Example: omxplayer -p -o hdmi --start-paused test.mkv This will start the omxplayer, load the buffer to begin playback and then pause. To resume playback, press the key on the keyboard for resume (by default this is the p or space keys), or send a dbus command.
… merge_start_paused
omxplayer.cpp
Outdated
@@ -1435,20 +1441,23 @@ int main(int argc, char *argv[]) | |||
break; | |||
case KeyConfig::ACTION_PLAY: | |||
m_Pause=false; | |||
//m_start_paused=false; |
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.
Can you remove commented out code
omxplayer.cpp
Outdated
if(m_has_subtitle) | ||
{ | ||
m_player_subtitles.Resume(); | ||
} | ||
break; | ||
case KeyConfig::ACTION_PAUSE: | ||
m_Pause=true; | ||
//m_start_paused=false; |
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.
Same
omxplayer.cpp
Outdated
if(m_has_subtitle) | ||
{ | ||
m_player_subtitles.Pause(); | ||
} | ||
break; | ||
case KeyConfig::ACTION_PLAYPAUSE: | ||
m_Pause = !m_Pause; | ||
//m_start_paused = false; |
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.
Same
I think that where some relics from an earlier implementation. Removed them. |
I am working on a home project that could use these additions. Since it isn't merged in, I will need to build it myself locally, are there any issues with that? Seemed like a simple enough change, so I got worried there was a reason the PR was still sitting open. |
Is there a reason this isn't merged, yet? |
As those above have commented, a really useful feature here, why hasn't it been merged yet? Really want this feature for an upcoming project |
Really sucks this hasn't been merged yet. I also have a need for it. |
A great addition. Without it i'm gonna have to ditch omxplayer on my projects. Essential to pause at the end of the media. Any other work around to get this happening. I've tried to compile the new line but get bogged down with library error etc :-( |
Please can someone merge this fork back? Compiling the branch has so many errors, I just cant get it to install on my RPi |
Please merge the functions start-pause und end-paused back. The functions are very simple but helpful. Thanks |
m_av_clock->OMXResume(); | ||
m_Pause=true; | ||
m_start_paused=false; | ||
m_av_clock->OMXPause(); |
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.
From my own experiments, I've found that only m_Pause=true;
is needed, and the player will see that variable has changed and pause once it loops around.
A previous edit of this comment that suggested m_av_clock->OMXResume();
and m_av_clock->OMXPause();
may cause unwanted effects seems to have been related to something else, so I have edited this comment.
However I still think that this suggestion is cleaner and less likely to cause issues.
m_av_clock->OMXResume(); | |
m_Pause=true; | |
m_start_paused=false; | |
m_av_clock->OMXPause(); | |
m_Pause=true; | |
m_start_paused=false; |
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.
@DazB Could you update your prepare-native-raspbian.sh script? Having trouble here trying to compile... It appears that some packages should be replaced: libva1 -> libva2; git-core -> git; libssl1.0-dev -> libssl-dev
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.
Hi @zasnicoff. That's also an issue with omxplayer, and not to do with any changes I've made. I too had those issues when first compiling. I probably should update my own fork of prepare-native-raspbian.sh to remedy this, but since it only happens when first compiling I didn't get round to it. Appreciate the heads up.
Adds options to pause at first frame (written some time ago by bholmes451) and the last frame.
Pausing on first frame allow a player to start fast when needed on files that require some preloading, and start mulitple players running synchronously.
Pausing at the the last frame prevents the console to reappear and the audience to leave the room unnerded :-). It also allow for more complex schemes where two layered omxplayers are used for seamless playback of multiple files.