EDL (and ComSkip) integration

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
DrDDT Offline
Senior Member
Posts: 186
Joined: Apr 2006
Reputation: 0
Post: #51
Hi!

I modified the CMPlayer::seek function to compensate for cutpoints.
So far this was working fine, but I've run into strange mplayer seek behaviour.

Normally, a seek step is 30 seconds, but to jump over a cutpoint, I dynamically increase it. Next CMPlayer::SeekRelativeTime is called with the changed number.

I noticed that sometimes MPlayer seeks with the 'standard' 30 seconds, and not with the number I called SeekRelativeTime with!

I added some debugging to show that the code is correct, only MPlayer doesn't execute the correct seek:

Code:
00:31:12 M: 30973952   DEBUG: Mplayer: SeekRelativeTime:300, command:seek +300 0
00:31:13 M: 30990336   DEBUG: CApplication::OnKey: 166 pressed, action is 22
00:31:13 M: 31039488   DEBUG: CEdl: Compensateseek, curtime:2794.00, old:300 new:300
00:31:13 M: 31039488   DEBUG: Mplayer: SeekRelativeTime:300, command:seek +300 0
00:31:15 M: 30998528   DEBUG: CApplication::OnKey: 168 pressed, action is 20
00:31:15 M: 30994432   DEBUG: CEdl: Compensateseek, curtime:3097.00, old:30 new:455 CORRECTED
00:31:15 M: 30994432   DEBUG: Mplayer: SeekRelativeTime:455, command:seek +455 0
00:31:16 M: 30969856   DEBUG: CApplication::OnKey: 168 pressed, action is 20
00:31:16 M: 30969856   DEBUG: CEdl: Compensateseek, curtime:3553.00, old:30 new:30
00:31:16 M: 30969856   DEBUG: Mplayer: SeekRelativeTime:30, command:seek +30 0
00:31:18 M: 30965760   DEBUG: CApplication::OnKey: 168 pressed, action is 20
00:31:18 M: 31039488   DEBUG: CEdl: Compensateseek, curtime:3585.00, old:30 new:30
00:31:18 M: 31039488   DEBUG: Mplayer: SeekRelativeTime:30, command:seek +30 0
00:31:19 M: 30986240   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:19 M: 30986240   DEBUG: CEdl: Compensateseek, curtime:3617.00, old:-30 new:-30
00:31:19 M: 30986240   DEBUG: Mplayer: SeekRelativeTime:-30, command:seek -30 0
00:31:19 M: 30949376   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:19 M: 30949376   DEBUG: CEdl: Compensateseek, curtime:3588.00, old:-30 new:-30
00:31:19 M: 30949376   DEBUG: Mplayer: SeekRelativeTime:-30, command:seek -30 0
00:31:21 M: 30842880   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:21 M: 30842880   DEBUG: CEdl: Compensateseek, curtime:3559.00, old:-30 new:-455 CORRECTED
00:31:21 M: 30842880   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:21 M: 30965760   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:21 M: 31014912   DEBUG: CEdl: Compensateseek, curtime:3531.00, old:-30 new:-455 CORRECTED
00:31:21 M: 31014912   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:22 M: 31035392   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:22 M: 31035392   DEBUG: CEdl: Compensateseek, curtime:3503.00, old:-30 new:-455 CORRECTED
00:31:22 M: 31035392   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:23 M: 30978048   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:23 M: 31047680   DEBUG: CEdl: Compensateseek, curtime:3476.00, old:-30 new:-455 CORRECTED
00:31:23 M: 31047680   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:24 M: 31010816   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:24 M: 31043584   DEBUG: CEdl: Compensateseek, curtime:3446.00, old:-30 new:-455 CORRECTED
00:31:24 M: 31043584   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0
00:31:25 M: 31023104   DEBUG: CApplication::OnKey: 169 pressed, action is 21
00:31:25 M: 31023104   DEBUG: CEdl: Compensateseek, curtime:3419.00, old:-30 new:-455 CORRECTED
00:31:25 M: 31023104   DEBUG: Mplayer: SeekRelativeTime:-455, command:seek -455 0

Several times, the command 'seek -455' is sent to mplayer, but a seek of -30 is executed.

Any idea what might be wrong, and how to fix this?
find quote
DrDDT Offline
Senior Member
Posts: 186
Joined: Apr 2006
Reputation: 0
Post: #52
I just submitted the edl class/scenemarker code.

http://sourceforge.net/tracker/index.php...tid=581840
find quote
DrDDT Offline
Senior Member
Posts: 186
Joined: Apr 2006
Reputation: 0
Post: #53
DrDDT Wrote:Hi!

I modified the CMPlayer::seek function to compensate for cutpoints.
So far this was working fine, but I've run into strange mplayer seek behaviour.

Normally, a seek step is 30 seconds, but to jump over a cutpoint, I dynamically increase it. Next CMPlayer::SeekRelativeTime is called with the changed number.

I noticed that sometimes MPlayer seeks with the 'standard' 30 seconds, and not with the number I called SeekRelativeTime with!

Several times, the command 'seek -455' is sent to mplayer, but a seek of -30 is executed.

Any idea what might be wrong, and how to fix this?

This behaviour also occurs with the new EDL code, using seektime().

I traced down the problem to the following situation:

Say your EDL file contains a cut from 300 to 600 seconds.
With the 'new' EDL code, the cuttime is removed, so when you're at 610 seconds absolute time, XBMC will display 610-300 cut seconds = 310.

Now when you're at 310 seconds, and trying to seeks before the cutpoint, say to 290 seconds, the bug occurs.

Somehow, the EDL code of MPlayer re-applies the cutpoint, and jumps back to past the cutpoint. A seek to 290 will often throw you back beyond the cutpoint.

I tried debugging, but you cannot debug mplayer.dll easy.

Any ideas would be welcome.
find quote
Post Reply