[MPlayer-G2-dev] [RFC] first draft of stream/demux-metadata support (+playlist-infos)
Fabian Franz
FabianFranz at gmx.de
Mon May 26 20:04:40 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
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
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
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
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:
-> 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;
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.
DVD does make heavy use of sublist, as disk/titles/chapters have a somewaht
nested strucutre.
One goal in later implementation should be simplicity.
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;
}
or similar.
cu
Fabian
More information about the MPlayer-G2-dev
mailing list