Skip to content

Commit

Permalink
Merge pull request popcornmix#307 from ktws/master
Browse files Browse the repository at this point in the history
Bugfix: dbus 'setvideopos' and 'unhidevideo'
  • Loading branch information
popcornmix committed Feb 16, 2015
2 parents 337004e + a34075c commit 5337be8
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions omxplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ int main(int argc, char *argv[])
bool m_packet_after_seek = false;
bool m_seek_flush = false;
bool m_new_win_pos = false;
bool m_chapter_seek = false;
std::string m_filename;
double m_incr = 0;
double m_loop_from = 0;
Expand Down Expand Up @@ -1241,7 +1242,7 @@ int main(int argc, char *argv[])
DISPLAY_TEXT_LONG(strprintf("Chapter %d", m_omx_reader.GetChapter()));
FlushStreams(startpts);
m_seek_flush = true;
m_new_win_pos = true;
m_chapter_seek = true;
}
else
{
Expand All @@ -1255,7 +1256,7 @@ int main(int argc, char *argv[])
DISPLAY_TEXT_LONG(strprintf("Chapter %d", m_omx_reader.GetChapter()));
FlushStreams(startpts);
m_seek_flush = true;
m_new_win_pos = true;
m_chapter_seek = true;
}
else
{
Expand Down Expand Up @@ -1465,7 +1466,7 @@ int main(int argc, char *argv[])
if(m_has_subtitle)
m_player_subtitles.Pause();

if (!m_new_win_pos)
if (!m_chapter_seek)
{
pts = m_av_clock->OMXMediaTime();

Expand All @@ -1476,12 +1477,14 @@ int main(int argc, char *argv[])

if(m_omx_reader.SeekTime((int)seek_pos, m_incr < 0.0f, &startpts))
{
unsigned t = (unsigned)(startpts*1e-6);
auto dur = m_omx_reader.GetStreamLength() / 1000;

DISPLAY_TEXT_LONG(strprintf("Seek\n%02d:%02d:%02d / %02d:%02d:%02d",
(t/3600), (t/60)%60, t%60, (dur/3600), (dur/60)%60, dur%60));
printf("Seek to: %02d:%02d:%02d\n", (t/3600), (t/60)%60, t%60);
if (!m_new_win_pos)
{
unsigned t = (unsigned)(startpts*1e-6);
auto dur = m_omx_reader.GetStreamLength() / 1000;
DISPLAY_TEXT_LONG(strprintf("Seek\n%02d:%02d:%02d / %02d:%02d:%02d",
(t/3600), (t/60)%60, t%60, (dur/3600), (dur/60)%60, dur%60));
printf("Seek to: %02d:%02d:%02d\n", (t/3600), (t/60)%60, t%60);
}
FlushStreams(startpts);
}
}
Expand Down

0 comments on commit 5337be8

Please sign in to comment.