Share

XBMP (XBox Media Player)

Tracker: Patches

5 Brief rewind for missed lines/subtitles - ID: 888355
Last Update: Attachment added ( gamester17 )

This patch adds a 'brief rewind' feature (similar to Tivo),
which enables one to step back a couple of seconds to
re-hear that mumbled line / read that brief subtitle.
Normal rewind is not really suitable for such brief jumps.

I bound it to the IR "Back" button, which is normally used
for changing the aspect ratio, as is Gamepad-B. The
patch leaves Gamepad-B in its original function, and only
overrides the Back-button during movies.

If you wish I can make a more extensive patch, this is a
bare-bones approach which works for me but is not very
configurable- let me know.

Thanks for a great player!



Comparing files XboxMediaPlayer.cpp and
XboxMediaPlayerPatched.cpp
***** XboxMediaPlayer.cpp
case XINPUT_IR_REMOTE_BACK:

pGamepad->bPressedAnalogButtons[XINPUT_GAMEPAD_B]
=TRUE;
break;
***** XboxMediaPlayerPatched.cpp
case XINPUT_IR_REMOTE_BACK:
if (dwCurrentAppState != IN_MOVIE)
{

pGamepad->bPressedAnalogButtons[XINPUT_GAMEPAD_B]
=TRUE;
}
else
{
if ( (m_pMediaPlayer->IsPlaying()
) && // Movie is playing
(!
(m_pMediaPlayer->GetPlaySpeed())) ) // Not FFWD /
RWND
{
unsigned int currpos =
m_pMediaPlayer->GetPosition();
unsigned int jumpsize = 8 *
1000; // 8 secs; of course better if configurable
currpos = (currpos >
jumpsize) ? currpos-jumpsize : 0;

m_pMediaPlayer->SetPosition(currpos);
}
}
break;
*****


Andy Onymous ( ezdoesit ) - 2004-01-31 23:42

5

Open

None

Nobody/Anonymous

New Feature/Function

None

Public


Comment ( 1 )




Date: 2004-02-01 15:05
Sender: ezdoesit

Logged In: YES
user_id=965112

I've improved the patch by letting it ensure it has passed a
keyframe with a sufficient time interval before the current
position.

Also, I've now bound it to the "3" key (only when no other
digits have been entered) to prevent any overlap with other
functionality on the remote.

Here's the new diff (functionality now in procedure OnKey):

Comparing files XBoxMediaPlayer.cpp and
XBoxMediaPlayerPatched.cpp
***** XBoxMediaPlayer.cpp
m_szTimeStamp[m_iSelectedCount]=0;
}
else
{
***** XBoxMediaPlayerPatched.cpp
m_szTimeStamp[m_iSelectedCount]=0;
}
else if (iKey==3)
{
if ( (m_pMediaPlayer->IsPlaying()) && //
Movie is playing
(!(m_pMediaPlayer->GetPlaySpeed()))
) // Not FFWD / RWND
{
unsigned int orgpos =
m_pMediaPlayer->GetPosition();
unsigned int jumpsize = 8 * 1000; // 8
secs; of course better if configurable
unsigned int setpos=(orgpos >
jumpsize) ? orgpos-jumpsize : 0; // First jump = 2*jumpsize
unsigned int newpos;
do
{
setpos = (setpos > jumpsize) ?
setpos-jumpsize : 0;

m_pMediaPlayer->SetPosition(setpos);
Sleep(300);
newpos =
m_pMediaPlayer->GetPosition();
} while ( (newpos>orgpos-jumpsize)
&& (setpos>0) );
}
}
else
{
*****


Log in to comment.

Attached Files ( 2 )

Filename Description Download
settings_n_smallstepback2.rar updated patch #3 by ezd 10/02-2004 Download
Settings_check.rar same or other patch? 08/02-2004 Download

Changes ( 2 )

Field Old Value Date By
File Added 76265: Settings_check.rar 2004-02-10 11:30 gamester17
File Added 76264: settings_n_smallstepback2.rar 2004-02-10 11:20 gamester17