[MPlayer-dev-eng] Improve bluray chapter support

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Apr 24 20:46:54 CEST 2013


On Wed, Apr 24, 2013 at 07:18:03PM +0200, Olivier Rolland wrote:
> Hello,
> 
> Here are some patches to improve chapter support for bluray.

I think you got confused by old code that was forgotten to be removed.
-chapter should work fine with bluray.

> The 2 following patches fix issues in the current code.
> 
> 0001-Fix-chapter-selection.patch: According to the documentation,
> -bluray-chapter indicates the chapter to start playing from, the
> default being 1. However, manually specifying -bluray-chapter 1 starts
> playing from chapter 2 (-bluray-chapter 0 starts playing from chapter
> 1). Moreover, specifying a chapter number greater than or equal to the
> number of chapters starts playing at position -1 because the chapter
> number is not clamped correctly. This patch fixes all that.

Which obsoletes this one since the code should simply be removed.

> 0002-Fix-current-chapter.patch: The current chapter is always the
> start chapter. With this patch, it is indeed the chapter currently
> playing.

This one seems correct, assuming the function called is fast enough
that it doesn't cause issues (if done like this it might end up
getting called 60 times per second).

> The 3 following patches add support for a chapter to stop playing at.
> For that, it is necessary to make stream_bluray.c use the same
> variables for chapters as stream_dvd.c, namely dvd_chapter and
> dvd_last_chapter. It then has to use the same function to parse
> chapter ranges.
> 
> 0003-Extract-chapter-parsing.patch: This patch moves the chapter
> parsing function from stream_dvd.c/h to stream.c/h.

This makes little sense without at the same time moving the parameter
outside the ifdef.

> 0004-Add-last-chapter-support.patch: This patch replaces bluray
> specific chapter variables with dvd variables, makes use of the same
> command line option for dvd and bluray chapter selection, keeps the
> bluray specific command line option for compatibility sake and adds
> full support for end chapter of bluray. It also updates the man page.

That should be obsolete. The man page is wrong, the end chapter
is supported for everything already, including dvd, bluray, matroska...


> 0005-Remove-bluray-chapter.patch: This patch removes the bluray
> specific command line option for chapter selection from the code and
> the man page.

I do not see any man-page change. Also it would be better to at least
make it print an error message pointing out that -chapter should be used
instead of just failing.


More information about the MPlayer-dev-eng mailing list