[fixed] ISOResourceProvider Exception on some ISOs only (1 Viewer)

MJGraf

Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    The last thing I could do in this respect before my holidays is a patch for my patch :D

    See attached. The constructors of UdfReader and CDReader do not complain, when the submitted stream can't be opened. They complain later, when you try to access a resource in the iso-file. Instead we have to use UdfReader.Detect(Iso-Stream) and CDReader.Detect(Iso-Stream).

    Now it works with all bluray-isos I have available :)

    cheers and have a good time, will be back in 3 weeks...

    Michael
     

    Attachments

    • 0004-Use-UdfReader.Detect-and-CDReader.Detect-instead-of-.patch
      2.7 KB

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    46
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    AW: ISOResourceProvider Exception on some ISOs only

    Michael, thank you very much again for your work!
    I just pushed a new branch "DiskUtils" (oh, I just notice that the name should have been "DiscUtils"...). That branch contains the source code from the DiscUtils project as a new plugin and the IsoResourceProvider which uses the DiscUtils implementation. I reworked your implementation a bit, it's now a bit simpler.

    Smeulf and Michael, can you both please test that new branch? If it's ok, I'll merge it into the dev branch.

    And Michael, have a great holiday!
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Re: AW: ISOResourceProvider Exception on some ISOs only

    Hi,

    Importer is ok here with the only image I have for testing. I just have a build problem : the output folder for DiscUtils plugin should be "bin\x86\Release\" instead of "bin\Release\".

    For the playing part, it does not solve my problem, it's still pixelized...
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    46
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    AW: ISOResourceProvider Exception on some ISOs only

    Then I'll merge the DiskUtils branch into the dev branch.
    I also noticed that the DVD player doesn't play ISO files well but it seems to be "a bit better" with the new ISO provider.
    I'll check that soon.
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Thanks a lot Albert!

    In short: Import works for all ISOs I have available - including the two former problematic ones and the bluray ISOs. Logs are clean.
    Taking DiscUtils as a separate plugin is a great idea. I'm quite sure, there will be other ResourcceProviders that will use this library as well (already wating for the first one with a movie collection on an iSCSI device :D )

    Two things I noticed:
    - While both, DVD-ISOs and Bluray-ISOs are imported correctly, I can only play DVD-ISOs. For Blurays I get "There is no player registered to play media item xyz.iso". Playing a Bluray-disk locally works.
    - When browsing Home/Movies, DVD-ISOs are displayed as "Film.iso", while Blurays are displayed as "Film" (without ".iso"). I think this must be related to the respective MetadataExtractors.

    A last word about using two readers (udf AND iso9660):
    Although I happily admit that the code now looks MUCH more elegant :D there was a reason why I used two readers. The two (formerly) problematic ISOs I have, have both, a udf-filesystem and a iso9660-filesystem. As a result, they can be opened with both readers. However, when using the iso9660-reader, there seems to be an error in the filesystem. That means, you could open this ISO with the iso9660-reader, you could read the root directory, but when you try to access the VIDEO_TS directory and read its contents, you get an exception. Only when using the udf-filesystem, you can access the directory correctly. I don't know why this is the case. The respective DVDs are old regular movie dvds, which I've bought as original DVDs and when I access the original DVDs with ISOBuster, I get the same result.
    When using your code, it works perfectly, because it first tries UDF, UDF is present and you can access everything through udf. I wasn't sure whether my problem could also happen the other way around, i.e. iso9660 is readable while udf is present but has errors. Therefore I included two readers and for every access I tried both, combining the results.
    I don't think it is necessary to include two readers and thereby using twice the resources of a single reader. As mentioned above, all 27 ISOs I have available right now work perfectly. I just wanted to document this somewhere if someone later has a problem with it so we can easily find it.

    Thank's so much again, Albert, and talk to you all after my holidays!

    Michael
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    46
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    AW: ISOResourceProvider Exception on some ISOs only

    I also ran into exceptions when a DVD had both UDF and ISO9660 filesystems. I didn't check it in detail, but I guess the problem was this:
    In your original implementation, you mixed the child directories/files which were returned by both readers. In my test DVD ISO for example, there was a directory "Audio-Test" in the UDF filesystem, which was present as "AUDIO_TE" in the ISO9660 filesystem. IIRC, GetChildDirectories() returned {"Audio-Test", "AUDIO_TE"}. If you now try to navigate into AUDIO_TE, the implementation tried to open AUDIO_TE in the UDF reader, which lead to an exception because the UDF reader only knows the "Audio-Test" directory.
    Actually, to solve that problem, you would need to remember which of the two readers returned your path element and use that reader to navigate to that path element. But in fact, that would be an implementation of an own sub resource provider inside the ISO resource provider.

    And since the idea of those alternative file systems is to have an alternative way to navigate, we should only provide the "better" file system; we use UDF if present.
    Another solution would be to have two different resource providers, one for UDF and one for ISO9660, together with a small extension of the resource provider core code, and show separate entries for the ISO file (UDF) and for the ISO file (ISO9660) in the browse view.
     

    Smeulf

    Retired Team Member
  • Premium Supporter
  • October 27, 2010
    672
    454
    France
    Home Country
    France France
    Re: AW: ISOResourceProvider Exception on some ISOs only

    Another solution would be to have two different resource providers, one for UDF and one for ISO9660, together with a small extension of the resource provider core code, and show separate entries for the ISO file (UDF) and for the ISO file (ISO9660) in the browse view.

    Would not this get us into a situation where one entry can be read and not the other one ? In this case we will have bug report about "I can see my ISO twice, and only one can be played"...

    Is is not easyer in this case to try to play the iso with the UDF filesystem and if it fails move to the ISO filesystem for a second try (assuming the ISO is a DVD / BD one) ?

    Smeulf.
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    46
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    AW: Re: AW: ISOResourceProvider Exception on some ISOs only

    Would not this get us into a situation where one entry can be read and not the other one ? In this case we will have bug report about "I can see my ISO twice, and only one can be played"...

    I don't suggest to implement it that way - I only say it is possible.
    And - off course the ISO should only be shown twice if it supports both file systems. Currently, an ISO file also only shows up in the browse view if it is readable by the ISO reader (that's at least the idea, haven't tried if it works that way).
     

    Users who are viewing this thread

    Top Bottom