Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp
- index bed0d13..da24163 100644
- --- a/src/gui/movieplayer.cpp
- +++ b/src/gui/movieplayer.cpp
- @@ -1350,6 +1350,11 @@ void CMoviePlayerGui::PlayFileLoop(void)
- int position_tmp = 0;
- bool at_eof = !(playstate >= CMoviePlayerGui::PLAY);;
- keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL;
- + neutrino_msg_t lastmsg = 0; //NI
- +
- + //NI - bisectional search
- + int bisection_jump = 300;
- + int bisection_loop = -1;
- while (playstate >= CMoviePlayerGui::PLAY)
- {
- @@ -1366,6 +1371,12 @@ void CMoviePlayerGui::PlayFileLoop(void)
- neutrino_msg_data_t data;
- g_RCInput->getMsg(&msg, &data, 10); // 1 secs..
- + //NI - bisectional search
- + if (bisection_loop > -1)
- + bisection_loop++;
- + if (bisection_loop > 5)
- + bisection_loop = -1;
- +
- if ((playstate >= CMoviePlayerGui::PLAY) && (timeshift != TSHIFT_MODE_OFF || (playstate != CMoviePlayerGui::PAUSE))) {
- if (playback->GetPosition(position, duration)) {
- FileTimeOSD->update(position, duration);
- @@ -1610,10 +1621,24 @@ void CMoviePlayerGui::PlayFileLoop(void)
- SetPosition(duration/2, true);
- } else if (msg == CRCInput::RC_8) { // goto end
- SetPosition(duration - 60 * 1000, true);
- +//NI
- +#if 0
- } else if (msg == CRCInput::RC_page_up) {
- SetPosition(10 * 1000);
- } else if (msg == CRCInput::RC_page_down) {
- SetPosition(-10 * 1000);
- +#endif
- + //NI - bisectional search
- + } else if (msg == CRCInput::RC_page_up || msg == CRCInput::RC_page_down) {
- + if ((lastmsg == CRCInput::RC_page_up || lastmsg == CRCInput::RC_page_down) && (bisection_loop > -1 && bisection_loop <= 5))
- + bisection_jump = bisection_jump/2;
- + else
- + bisection_jump = 300;
- +
- + bisection_loop = 0;
- +
- + int direction = (msg == CRCInput::RC_page_up) ? 1 : -1;
- + SetPosition(direction*bisection_jump * 1000);
- } else if (msg == CRCInput::RC_0) { // cancel bookmark jump
- handleMovieBrowser(CRCInput::RC_0, position);
- } else if (msg == (neutrino_msg_t) g_settings.mpkey_goto) {
- @@ -1736,6 +1761,9 @@ void CMoviePlayerGui::PlayFileLoop(void)
- clearSubtitle();
- }
- }
- + //NI
- + if (msg < CRCInput::RC_MaxRC)
- + lastmsg = msg;
- }
- printf("CMoviePlayerGui::PlayFile: exit, isMovieBrowser %d p_movie_info %p\n", isMovieBrowser, p_movie_info);
- playstate = CMoviePlayerGui::STOPPED;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement