Skip to content
Snippets Groups Projects

WIP: Handle disc folders

This fixes #29 by allowing a disc folder (or an iso) to be detected as a disc and listed as a whole, instead of exposing all individual files it contains.

This is not functional yet, and requires chouquette/vlc!21 (closed) to be merged and included in the CI images

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 5 commits

    • 225fe9d9 - Directory: Explicitely handle Disc type for subitems
    • e24d6caf - IItem: Add an helper to update a task file type
    • ba01e8ca - VLCMetadataService: Handle filetype change after preparsing
    • 20e2cff8 - tests: Tester: Add an 'isDisc' check for media
    • dacc6780 - tests: samples: Add functional tests for DVD folder & DVD isos

    Compare with previous version

  • added 17 commits

    • c75f9d27 - 1 commit from branch videolan:master
    • e9a50aa7 - CI: Bump windows images
    • 1e52559b - fs: IFile: Remove LinkFileType
    • 61fa7c50 - fs: IFile: Expose a file type
    • 647cd342 - fs: IFile: Merge linkedType() and type()
    • ee9bb7d5 - fs: Directory: Start probing the actual file type
    • 83e2529c - FsDiscoverer: Probe the file for its type
    • 0b806723 - fs: Directory: Handle DVD folders
    • 75ec75b3 - MetadataParser: Don't force the file type to Main
    • 6f5e0e83 - File: Consider Disk files as Main files
    • a9b290e8 - MetadataParser: Use the folder name as title for disc folders
    • 57c3c1eb - MetadataParser: Consider Discs to be video media
    • 5784696f - Directory: Explicitely handle Disc type for subitems
    • 5ec6f640 - IItem: Add an helper to update a task file type
    • 86fd44b5 - VLCMetadataService: Handle filetype change after preparsing
    • 2fc5a459 - tests: Tester: Add an 'isDisc' check for media
    • 20e73828 - tests: samples: Add functional tests for DVD folder & DVD isos

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 4 commits

    • a54f020c - VLCMetadataService: Handle filetype change after preparsing
    • 0125be59 - tests: Tester: Add an 'isDisc' check for media
    • 98a50cd1 - tests: samples: Add functional tests for DVD folder & DVD isos
    • ba8d11c7 - Bump libvlcpp submodule

    Compare with previous version

  • added 198 commits

    • ba8d11c7...1158a433 - 183 commits from branch videolan:master
    • 79fbd604 - fs: IFile: Remove LinkFileType
    • 288997bf - fs: IFile: Expose a file type
    • 04683558 - fs: IFile: Merge linkedType() and type()
    • 10c8eb96 - fs: Directory: Start probing the actual file type
    • dad61424 - FsDiscoverer: Probe the file for its type
    • 9c61e95d - fs: Directory: Handle DVD folders
    • 1b5eea67 - MetadataParser: Don't force the file type to Main
    • 2f9bd5ab - File: Consider Disk files as Main files
    • 7408c92a - MetadataParser: Use the folder name as title for disc folders
    • c3794ce1 - MetadataParser: Consider Discs to be video media
    • 3325b016 - Directory: Explicitely handle Disc type for subitems
    • 22bf4aff - IItem: Add an helper to update a task file type
    • 54a73d9c - VLCMetadataService: Handle filetype change after preparsing
    • 10b87c8e - tests: Tester: Add an 'isDisc' check for media
    • 4dd66854 - tests: samples: Add functional tests for DVD folder & DVD isos

    Compare with previous version

  • added 28 commits

    • 4dd66854...306144aa - 13 commits from branch videolan:master
    • d152e82c - fs: IFile: Remove LinkFileType
    • 73966c96 - fs: IFile: Expose a file type
    • f031390c - fs: IFile: Merge linkedType() and type()
    • d868e567 - fs: Directory: Start probing the actual file type
    • e7503734 - FsDiscoverer: Probe the file for its type
    • d15f4c32 - fs: Directory: Handle DVD folders
    • f4ac2258 - MetadataParser: Don't force the file type to Main
    • b55f9251 - File: Consider Disk files as Main files
    • f57d60c6 - MetadataParser: Use the folder name as title for disc folders
    • 484afb57 - MetadataParser: Consider Discs to be video media
    • d901cd0b - Directory: Explicitely handle Disc type for subitems
    • fd64ae02 - IItem: Add an helper to update a task file type
    • bd939d43 - VLCMetadataService: Handle filetype change after preparsing
    • 7b5ae9c2 - tests: Tester: Add an 'isDisc' check for media
    • 1f07f6f5 - tests: samples: Add functional tests for DVD folder & DVD isos

    Compare with previous version

  • mentioned in issue #323 (closed)

  • Some issues remain, on my machine the win32 test crashes in startcode_FindAnnexB_SSE2, it appears to happen when executing this line:

    #  ifdef HAS_ATTRIBUTE_VECTORSIZE
            const v16qu zeros = { 0 };
    #  endif

    which seems to be similar to than https://sourceforge.net/p/mingw-w64/discussion/723797/thread/bc936130/

    On win64, it seems to crash in dvdnav, but I haven't investigate it further yet.

    I'll try to rebuild the win32 tests with llvm to see if it could be a compiler issue

    Edited by Hugo Beauzée-Luyssen
  • On win64 (and AFAICS on win32 when building with LLVM) a crash seems to be caused by an invalid dvd_state_t.pgc pointer value:

    CHECK_VALUE failed in src/ifo_read.c:1100 for tt_srpt->title[i].nr_of_angles != 0
    CHECK_VALUE failed in src/ifo_read.c:1105 for tt_srpt->title[i].title_set_nr != 0
    CHECK_VALUE failed in src/ifo_read.c:1107 for tt_srpt->title[i].vts_ttn != 0
    Unable to open device file Z:\home\chouquette\dev\medialibrary\test\samples\samples\discs\dvd_folder.
    vm: dvd_read_name failed
    DVD disk reports itself with Region mask 0x00000000. Regions: 01 02 03 04 05 06 07 08
    Entering CommonOpen
    In dvdnav_describe_title_chapters
    Calling set_FP_PGC
    calling process command
    play_PGC: first_play_pgc
    PGC pointer: 0000000000c650a0
    Playback mode: 0
    libdvdnav: Registers before transaction
    libdvdnav:    #     0 |  1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
    libdvdnav: SRPMS: 656e|000f|003e|0001|0001|0001|0000|0001|0400|0000|0000|0000|5553|000f|0100|7cfc|656e|0000|656e|0000|0001|0000|0000|0000|
    libdvdnav: GRPMS: 0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|
    libdvdnav: Gmode: 0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|
    libdvdnav: Gtime: 0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|
    libdvdnav: Full list of commands to execute
    (001) 71 00 00 00 00 64 00 00 | g[0] = 0x64
    (002) 71 00 00 01 00 00 00 00 | g[1] = 0x0
    (003) 71 00 00 02 04 00 00 00 | g[2] = 0x400
    (004) 71 00 00 03 00 00 00 00 | g[3] = 0x0
    (005) 30 06 00 01 00 c0 00 00 | JumpSS VMGM (pgc 1)
    libdvdnav: --------------------------------------------
    libdvdnav: Single stepping commands
    (001) 71 00 00 00 00 64 00 00 | g[0] = 0x64
    (002) 71 00 00 01 00 00 00 00 | g[1] = 0x0
    (003) 71 00 00 02 04 00 00 00 | g[2] = 0x400
    (004) 71 00 00 03 00 00 00 00 | g[3] = 0x0
    (005) 30 06 00 01 00 c0 00 00 | JumpSS VMGM (pgc 1)
    libdvdnav: Registers after transaction
    libdvdnav:    #     0 |  1 |  2 |  3 |  4 |  5 |  6 |  7 |  8 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
    libdvdnav: SRPMS: 656e|000f|003e|0001|0001|0001|0000|0001|0400|0000|0000|0000|5553|000f|0100|7cfc|656e|0000|656e|0000|0001|0000|0000|0000|
    libdvdnav: GRPMS: 0064|0000|0400|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|
    libdvdnav: Gmode: 0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|
    libdvdnav: Gtime: 0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|
    libdvdnav: eval: Doing Link/Jump/Call
    Before printout starts:
    libdvdnav: JumpSS_VMGM_PGC 1
    Link values 28 1 0 0
    get_PGCN failed. Was trying to find pgcN in domain 1
    First Play Domain: VTS:-1 PGC:0 PG:1 CELL:0 BLOCK:0 VTS_TTN:1 TTN:1 TT_PGCN:0
    Before printout ends.
    play_PGC: (vm->state).pgcN (1)
    PGC pointer: 5380000000100000
    < crash when accessing state.pgc->pg_playback_mode >
  • I was hoping for https://code.videolan.org/videolan/libdvdread/-/issues/16 to be the root cause but it doesn't seem to be. This crash still occurs, even with the fix:

    =================================================================
    ==4356==ERROR: AddressSanitizer: access-violation on unknown address 0xffffffffffffffff (pc 0x7ff842fe78b3 bp 0x00000721aee0 sp 0x00000721ae20 T8)
    ==4356==The signal is caused by a READ memory access.
        #0 0x7ff842fe78b2 in play_PGC /home/chouquette/dev/vlc/contrib/contrib-win64/dvdnav\src/vm\play.c:70:24
        #1 0x7ff842f00652 in process_command /home/chouquette/dev/vlc/contrib/contrib-win64/dvdnav\src/vm\vm.c:1086:21
        #2 0x7ff842eec758 in vm_start /home/chouquette/dev/vlc/contrib/contrib-win64/dvdnav\src/vm\vm.c:345:3
        #3 0x7ff842ed485e in dvdnav_describe_title_chapters /home/chouquette/dev/vlc/contrib/contrib-win64/dvdnav\src\searching.c:656:5
        #4 0x7ff842e5c3e5 in DemuxTitles /home/chouquette/dev/vlc/build-meson-win64-asan\../modules/access\dvdnav.c:1295:30
        #5 0x7ff842e471a7 in CommonOpen /home/chouquette/dev/vlc/build-meson-win64-asan\../modules/access\dvdnav.c:337:5
        #6 0x7ff842e43469 in AccessDemuxOpen /home/chouquette/dev/vlc/build-meson-win64-asan\../modules/access\dvdnav.c:435:13
        #7 0x7ff864f26bb2 in generic_start /home/chouquette/dev/vlc/build-meson-win64-asan\../src/modules\modules.c:275:11
        #8 0x7ff864f2640e in vlc_module_load /home/chouquette/dev/vlc/build-meson-win64-asan\../src/modules\modules.c:243:19
        #9 0x7ff864f26905 in module_need /home/chouquette/dev/vlc/build-meson-win64-asan\../src/modules\modules.c:286:24
        #10 0x7ff864fdb31d in access_New /home/chouquette/dev/vlc/build-meson-win64-asan\../src/input\access.c:149:24
        #11 0x7ff864fdc98d in stream_AccessNew /home/chouquette/dev/vlc/build-meson-win64-asan\../src/input\access.c:294:24
        #12 0x7ff86510b8e6 in InputDemuxNew /home/chouquette/dev/vlc/build-meson-win64-asan\../src/input\input.c:2552:26
        #13 0x7ff8650f9c40 in InputSourceInit /home/chouquette/dev/vlc/build-meson-win64-asan\../src/input\input.c:2719:27
        #14 0x7ff8650f0155 in Init /home/chouquette/dev/vlc/build-meson-win64-asan\../src/input\input.c:1328:15
        #15 0x7ff8650e7030 in Preparse /home/chouquette/dev/vlc/build-meson-win64-asan\../src/input\input.c:492:10
        #16 0x7ff86551389b in vlc_entry /home/chouquette/dev/vlc/build-meson-win64-asan\../src/win32\thread.c:354:16
        #17 0x7ff91648af59  (C:\Windows\System32\msvcrt.dll+0x11013af59)
        #18 0x7ff91648b02b  (C:\Windows\System32\msvcrt.dll+0x11013b02b)
        #19 0x923c9c in __asan::AsanThread::ThreadStart(unsigned long long, __sanitizer::atomic_uintptr_t*) /build/llvm-project/compiler-rt/build-x86_64-sanitizers\../lib/asan\asan_thread.cpp:262:25
        #20 0x7ff916867033  (C:\Windows\System32\KERNEL32.DLL+0x180017033)
        #21 0x7ff917e22650  (C:\Windows\SYSTEM32\ntdll.dll+0x180052650)
  • Steve Lhomme mentioned in merge request libdvdnav!29

    mentioned in merge request libdvdnav!29

  • added 910 commits

    • 1f07f6f5...246fbbb4 - 893 commits from branch videolan:master
    • 0cef0d32 - fs: IFile: Remove LinkFileType
    • 79969031 - fs: IFile: Expose a file type
    • 9fa50e25 - fs: IFile: Merge linkedType() and type()
    • a0dac2a3 - fs: Directory: Start probing the actual file type
    • d950b820 - FsDiscoverer: Probe the file for its type
    • 91abe934 - fs: Directory: Handle DVD folders
    • 1abbb6c3 - MetadataParser: Don't force the file type to Main
    • 1f1d4eb6 - File: Consider Disk files as Main files
    • 08c8a648 - MetadataParser: Use the folder name as title for disc folders
    • b0d47152 - MetadataParser: Consider Discs to be video media
    • 75a6758a - Directory: Explicitely handle Disc type for subitems
    • 22136457 - IItem: Add an helper to update a task file type
    • 7a9ce1b5 - VLCMetadataService: Handle filetype change after preparsing
    • 2d146856 - tests: Tester: Add an 'isDisc' check for media
    • c81cee78 - tests: samples: Add functional tests for DVD folder & DVD isos
    • b19df2a7 - WIP_test_on_msys2
    • 90a1f9c1 - Revert "WIP_test_on_msys2"

    Compare with previous version

Please register or sign in to reply
Loading