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..bdcfbb9 100644
- --- a/src/gui/movieplayer.cpp
- +++ b/src/gui/movieplayer.cpp
- @@ -1351,6 +1351,10 @@ void CMoviePlayerGui::PlayFileLoop(void)
- bool at_eof = !(playstate >= CMoviePlayerGui::PLAY);;
- keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL;
- + //NI - bisectional search
- + int bisection_jump = 300;
- + int bisection_loop = -1;
- +
- while (playstate >= CMoviePlayerGui::PLAY)
- {
- if (update_lcd) {
- @@ -1366,6 +1370,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 +1620,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) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement