FIX: Add HD DVD detection and handling for HD DVD specific external play... #1348

Merged
2 commits merged into from Oct 7, 2012

Conversation

Projects
None yet
2 participants
Contributor

SlrG commented Aug 31, 2012

Using an external player for HD DVD discs at the moment fails, because the player is called again and again in what seems to be an endless loop.

Simple reason is, that it is called for every single *.evo file on the disc, while it should be one time only.

This fix checks inserted discs for .xpl or HV.ifo files (see: http://www.dvdafteredit.com/wiki/HD_DVD_Structure) and calls the external player once.

*.xpl files inside of an ADV_OBJ folder are HD DVD playlists on discs with so called "Advanced Content". Every single disc I own has them. It seems this is the most common disc type. As XBMC isnt't able to handle these files, the best is to hand them over to an external player.

Discs with only a HVDVD_TS folder and no ADV_OBJ folder seem to be less common. In the HVDVD_TS folder there may be HV*.ifo files. They contain Video Manager, Standard Title Set or Advanced Tile Set information. Stuff that is again handled best by an external player.

So if one of these filetypes is present, a single external player call is initiated, using the name of the found file. This has advantages and drawbacks.

Advantage is, that in theory the user will be able to use different external players for the two filetypes.
Drawback is, that in this case two external player rules will be needed.

The rules could be as follows:

<rule name="HDDVDxpl" filename="D:\\.*" filetypes="xpl" player="Disc_Player"/>
<rule name="HDDVDifo" filename="HV*" filetypes="ifo" player="Disc_Player"/>

Using only the first rule will be sufficient in most cases I guess.

If no rule is defined by the user, or no .xpl or HV.ifo files are present, the internal player will be used to playback the *.evo files, like it did before.

RE: // ToDo: add logic to identify main movie
This means the fix might be enhanced in the future to improve the order the internal player handles the *.evo files. At the moment they are sorted alphabetically which often plays very small files like menus, trailer et cetera before the main movie. I tried sorting by size, but this doesn't work for all discs. Sadly the biggest file is not always the right start of the main feature. I'm still experimenting on this.

UPDATE:
Added algorithm to identify main movie.
*.evo files will be sorted alphabetically first. Then the average size of the files larger than 1gb will be calculated. Files larger than this average will be added to top of a playlist preserving their alphabetical order. They will be followed by all other files sorted by descending size. This works for all discs I own, but may fail if certain conditions apply.

If a disc contains very large extra files (larger than calculated average size) and if these files are in front of the main movie when sorted alphabetically, they will be placed on top of the playlist, too. Shouldn't happen to often I think and is still an improvement to how things are now.

@ghost

ghost commented Sep 13, 2012

you got 20 days to crack at it. assigning to october window.

Contributor

SlrG commented Sep 16, 2012

Added algorithm to identify main movie.

Owner

MartijnKaijser commented Oct 4, 2012

@cptspiff
Ready to merge?

@ghost ghost self-assigned this Oct 4, 2012

ghost pushed a commit that referenced this pull request Oct 7, 2012

Merge pull request #1348 from SlrG/hddvdfix
FIX: Add HD DVD detection and handling for HD DVD specific external play...

@ghost ghost merged commit 44174fc into xbmc:master Oct 7, 2012

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment