-
Notifications
You must be signed in to change notification settings - Fork 334
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -114,6 +114,7 @@ bool m_has_audio = false; | |||||||||||||
bool m_has_subtitle = false; | ||||||||||||||
bool m_gen_log = false; | ||||||||||||||
bool m_loop = false; | ||||||||||||||
bool m_start_paused = false; | ||||||||||||||
|
||||||||||||||
enum{ERROR=-1,SUCCESS,ONEBYTE}; | ||||||||||||||
|
||||||||||||||
|
@@ -569,6 +570,7 @@ int main(int argc, char *argv[]) | |||||||||||||
const int http_user_agent_opt = 0x301; | ||||||||||||||
const int lavfdopts_opt = 0x400; | ||||||||||||||
const int avdict_opt = 0x401; | ||||||||||||||
const int start_paused = 0x214; | ||||||||||||||
|
||||||||||||||
struct option longopts[] = { | ||||||||||||||
{ "info", no_argument, NULL, 'i' }, | ||||||||||||||
|
@@ -618,6 +620,7 @@ int main(int argc, char *argv[]) | |||||||||||||
{ "key-config", required_argument, NULL, key_config_opt }, | ||||||||||||||
{ "no-osd", no_argument, NULL, no_osd_opt }, | ||||||||||||||
{ "no-keys", no_argument, NULL, no_keys_opt }, | ||||||||||||||
{ "start-paused", no_argument, NULL, start_paused }, | ||||||||||||||
{ "orientation", required_argument, NULL, orientation_opt }, | ||||||||||||||
{ "fps", required_argument, NULL, fps_opt }, | ||||||||||||||
{ "live", no_argument, NULL, live_opt }, | ||||||||||||||
|
@@ -765,6 +768,9 @@ int main(int argc, char *argv[]) | |||||||||||||
case no_keys_opt: | ||||||||||||||
m_no_keys = true; | ||||||||||||||
break; | ||||||||||||||
case start_paused: | ||||||||||||||
m_start_paused = true; | ||||||||||||||
break; | ||||||||||||||
case font_opt: | ||||||||||||||
m_font_path = optarg; | ||||||||||||||
m_asked_for_font = true; | ||||||||||||||
|
@@ -1435,20 +1441,23 @@ int main(int argc, char *argv[]) | |||||||||||||
break; | ||||||||||||||
case KeyConfig::ACTION_PLAY: | ||||||||||||||
m_Pause=false; | ||||||||||||||
//m_start_paused=false; | ||||||||||||||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||||||||||||||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||||||||||||||
if (m_av_clock->OMXPlaySpeed() != DVD_PLAYSPEED_NORMAL && m_av_clock->OMXPlaySpeed() != DVD_PLAYSPEED_PAUSE) | ||||||||||||||
{ | ||||||||||||||
printf("resume\n"); | ||||||||||||||
|
@@ -1722,8 +1731,19 @@ int main(int argc, char *argv[]) | |||||||||||||
{ | ||||||||||||||
if (m_av_clock->OMXIsPaused()) | ||||||||||||||
{ | ||||||||||||||
CLog::Log(LOGDEBUG, "Resume %.2f,%.2f (%d,%d,%d,%d) EOF:%d PKT:%p\n", audio_fifo, video_fifo, audio_fifo_low, video_fifo_low, audio_fifo_high, video_fifo_high, m_omx_reader.IsEof(), m_omx_pkt); | ||||||||||||||
m_av_clock->OMXResume(); | ||||||||||||||
if (!m_start_paused) | ||||||||||||||
{ | ||||||||||||||
CLog::Log(LOGDEBUG, "Resume %.2f,%.2f (%d,%d,%d,%d) EOF:%d PKT:%p\n", audio_fifo, video_fifo, audio_fifo_low, video_fifo_low, audio_fifo_high, video_fifo_high, m_omx_reader.IsEof(), m_omx_pkt); | ||||||||||||||
m_av_clock->OMXResume(); | ||||||||||||||
} | ||||||||||||||
else | ||||||||||||||
{ | ||||||||||||||
CLog::Log(LOGDEBUG, "start-paused(%d)\n", m_start_paused); | ||||||||||||||
m_av_clock->OMXResume(); | ||||||||||||||
m_Pause=true; | ||||||||||||||
m_start_paused=false; | ||||||||||||||
m_av_clock->OMXPause(); | ||||||||||||||
Comment on lines
+1759
to
+1762
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my own experiments, I've found that only A previous edit of this comment that suggested However I still think that this suggestion is cleaner and less likely to cause issues.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
else if (m_Pause || audio_fifo_low || video_fifo_low) | ||||||||||||||
|
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