[MPlayer-G2-dev] [RFC] first draft of stream/demux-metadata support (+playlist-infos)

Arpi arpi at thot.banki.hu
Mon May 26 20:23:55 CEST 2003


Hi,

> I slept a while and think I found the different types, that need to be 
> supported (supposed playlist-handlers will be complete in demuxer-level too)
> 
> To-be-supported Examples:
> 
> QT-MOVIE: (or other playlist)
> 
> Metadata:
> 
> Title: Foo's adventure
> Author: Bar Bar cue
> Date: 2005

isn't title/etc per-track?
(allowing multiple titles in single file)

> References:
>         (Ext-)Reference: 
>                 url: foo-high-res.mov
>                 bitrate: 16000
>                 quality: 9
>                 --
>                 url: foo-medi-res.mov
>                 --
>                 url: foo-low-res1.mov
>                 --
>                 url: foo-low-res2.mov
>         (Ext-)Reference:
>                 url: foo-title2.mov

hmm, does such grouping exists in movs?

> DVD:
> 
> Metadata:
> 
> Title: Foo on DVD
> Author: Bar Bar Cue
> Date: 2005
> 
> DVD-META:
> 
> Titles: 16
> Chapters: 25
> Subtitle-Languages: de en uk fr
> Audio-Languages: de en

no no no
it's not so simple :(
the number of titles is global to a disc.
then each titles has number of chapters, number of angles, sub and audio
langue list.
most dvd disc contain few titles, one for the movie (many chapters, audio
languages etc), one for the trailers (few chapters, one chapter is one
movie's trailer, usually single audio and a few subtitles), one for
werkfilms (how we did that effect in matrix...) and so on.

> References:
>         (Int-)Reference: 
>                 name: Main-Movie (title1)
>                 offset: 1656
>                 (Int-)Reference:
>                         name: Chapter 1
>                         offset: 1656
>                 (Int-)Reference:
>                         name: Chapter 2
>                         offset: 1856
>                    ...
>         (Int-)Reference:
>                 name: title2
>                 offset: 1987

hmm
what's that offset?

btw you should include length (play time) for cdda and dvd for titles and
chapters.

> CD:
> 
> Metadata:
> 
> Title: Bar is singing
> Author: Foo's hidden microphone
> Date: 2008
> 
> CD-META:
> 
> nb_tracks = 16
> length = 00:57:68
> 
> References:
>         (Int-)Reference:
>                 name: Foo Title 1
>                 offset: 108
>         (Int-)Reference:
>                 name: Foo Title 2
>                 offset: 206
> 
> Proposed structures:

i guess we should move metadata stuff to the stream layer.
as demuxer already depend son stream layer, and includes stream.h, it could
use the same.

> -> Metadata as list. (as already implemented)
> <SPEC>-META as an struct specific to media.
> 
> Reference: (somewaht similar to metadata, which should not be specific to 
> demuxer-level)
> 
> struct ref_list_s;
> 
> typedef struct ref_entry_s
> {
>   char* name;
>   int offset;
>   Url_t *URL;
>   int bitrate; // perhaps present in Url_t ?
>   int quality;
>   ...
>   int type; // external / internal reference
>   ref_list_t* alternatives;
>   ref_list_t* sublist;
> } ref_entry_t;

good!
i like the idea of reusing stream layer's URL_t to keep urls parsed instead
of as plain strings.

> typedef struct ref_list_s {
>   int num_refs; // number of available entries
>   int max_refs; // number of allocated entries 
> (if(num_metas>=max_metas)realloc())
>   ref_entry_t* refs;
> } ref_list_t;
>       
> 
> So CD is a flat structure, which do not use alternatives or sublist.
> MOV can make use of alternatives to allow player an choice.
also does .asx and .rmf...  we should also handle playlists at demuxer level,
so don't forget about them!

> DVD does make heavy use of sublist, as disk/titles/chapters have a somewaht 
> nested strucutre.

yes

> One goal in later implementation should be simplicity.

yep. but we cannot (and shouldn't) avoid the hierarchical (tree) structure
of the struct.

btw, shouldn't we put metadata and references into the same struct?
(as there is metadata for references)

> num=add_ext_reference(reflist,name, url) // returns the index ...
> add_ext_reference_alternative(reflist,num, name, url, bitrate, quality, ...)
> add_ext_reference_alternative(reflist,num, name2, url2, bitrate2, quality2, 
> ...)
> 
> num=add_reference(reflist,dvdname, offset) // returns the index ...
> add_reference_sublist(reflist,num, chaptername, offset)
> add_reference_sublist(reflist,num, chaptername2, offset2)
> 
> Later CONTROL-program can get the data via:
> 
> for (i=0;i<reflist.num_refs;i++)
> {
>   printf("Name: %s\n",reflist.refs[i]->name);
> }
> 
> Convert it into own playlist/playtree-format and so on...
> 
> The whole thing shall be in stream_t stream* as 
> 
> meta_t *meta 
> {
>   metadata_list_t data;
>   void* specific_data; // or struct some_specific_s (like stream_priv_s)
>   ref_list_t list;
> }

hmm


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu



More information about the MPlayer-G2-dev mailing list