Skip to content
Snippets Groups Projects

Draft: [RFC] access: Add a guesstype capability

Open Hugo Beauzée-Luyssen requested to merge chouquette/vlc:add_guess_type_module into master

Hi,

This MR aims at adding new (small) module type, guesstype, which can be used to ask the access module for the actual input item type, rather than only relying on the hardcoded array in input/item.c

The rationale here is that, in order to implement podcast import in the medialibrary, I need to be able to ship a podcast as an XML local file and still have the podcast module kick in, which it won't if the stream doesn't expose some specific content types.

Since the file access doesn't implement STREAM_GET_CONTENT_TYPE, it's currently not possible to do so.

I got this fixed by adding a new content_type module that wraps a regular access module, allowing me use an MRL such as contenttype://content-type=text/xml;path=/path/to/podcast.xml, but this causes the scheme not to be recognized by the current GuessType implementation, causing the preparser to skip an item flagged as ITEM_TYPE_UNKNOWN

By asking the module what type it exposes, I can successfully preparse the item without hardcoding something more in the item.c array.

This could be propagated to each modules and completely drop the hardcoded array if need be

v2

  • Remove the content type module
  • Apply suggestions from review
Edited by Hugo Beauzée-Luyssen

Merge request reports

Members who can merge are allowed to add commits.

Merge request pipeline #231493 passed

Merge request pipeline passed for 074b15f0

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
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading