mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
neutrino: exit movieplayer 10 seconds after EOF
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1098 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 75a644347b
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-01-30 (Sun, 30 Jan 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -444,6 +444,7 @@ void CMoviePlayerGui::PlayFile(void)
|
|||||||
timeb current_time;
|
timeb current_time;
|
||||||
CMovieInfo cMovieInfo; // funktions to save and load movie info
|
CMovieInfo cMovieInfo; // funktions to save and load movie info
|
||||||
MI_MOVIE_INFO *p_movie_info = NULL; // movie info handle which comes from the MovieBrowser, if not NULL MoviePla yer is able to save new bookmarks
|
MI_MOVIE_INFO *p_movie_info = NULL; // movie info handle which comes from the MovieBrowser, if not NULL MoviePla yer is able to save new bookmarks
|
||||||
|
int eof = 0;
|
||||||
|
|
||||||
if (has_hdd)
|
if (has_hdd)
|
||||||
system("(rm /hdd/.wakeup; touch /hdd/.wakeup; sync) > /dev/null 2> /dev/null &");
|
system("(rm /hdd/.wakeup; touch /hdd/.wakeup; sync) > /dev/null 2> /dev/null &");
|
||||||
@@ -914,6 +915,14 @@ void CMoviePlayerGui::PlayFile(void)
|
|||||||
file_prozent = (unsigned char) (position / (duration / 100));
|
file_prozent = (unsigned char) (position / (duration / 100));
|
||||||
playback->GetSpeed(speed);
|
playback->GetSpeed(speed);
|
||||||
printf("CMoviePlayerGui::PlayFile: speed %d position %d duration %d (%d, %d%%)\n", speed, position, duration, duration-position, file_prozent);
|
printf("CMoviePlayerGui::PlayFile: speed %d position %d duration %d (%d, %d%%)\n", speed, position, duration, duration-position, file_prozent);
|
||||||
|
if (duration - position < 1000 && !timeshift)
|
||||||
|
{
|
||||||
|
/* 10 seconds after end-of-file, exit */
|
||||||
|
if (++eof > 10)
|
||||||
|
g_RCInput->postMsg((neutrino_msg_t) g_settings.mpkey_stop, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
eof = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user