summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-22 15:30:54 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-22 15:30:54 +0000
commit56a7e74663b323c379321020bd787d47007f5c37 (patch)
treee380952423036b99c60acab9ad7323e873b33ce0 /libmpdemux
parent437be981be409709d95bdcf78d9536f0f04b2df0 (diff)
downloadmpv-56a7e74663b323c379321020bd787d47007f5c37.tar.bz2
mpv-56a7e74663b323c379321020bd787d47007f5c37.tar.xz
added demux_info support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3071 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/asfheader.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/libmpdemux/asfheader.c b/libmpdemux/asfheader.c
index cb61083b7b..c49084ca32 100644
--- a/libmpdemux/asfheader.c
+++ b/libmpdemux/asfheader.c
@@ -213,7 +213,7 @@ while(!stream_eof(demuxer->stream)){
// case ASF_GUID_PREFIX_index_chunk: return "guid_index_chunk";
case ASF_GUID_PREFIX_content_desc: // Content description
- if(verbose){
+ {
char *string=NULL;
stream_read(demuxer->stream,(char*) &contenth,sizeof(contenth));
le2me_ASF_content_description_t(&contenth);
@@ -222,37 +222,53 @@ while(!stream_eof(demuxer->stream)){
if( contenth.title_size!=0 ) {
string=(char*)malloc(contenth.title_size);
stream_read(demuxer->stream, string, contenth.title_size);
- print_asf_string(" Title: ", string, contenth.title_size);
+ if(verbose)
+ print_asf_string(" Title: ", string, contenth.title_size);
+ else
+ pack_asf_string(string, contenth.title_size);
+ demux_info_add(demuxer, "name", string);
}
// extract the author
if( contenth.author_size!=0 ) {
string=(char*)realloc((void*)string, contenth.author_size);
stream_read(demuxer->stream, string, contenth.author_size);
- print_asf_string(" Author: ", string, contenth.author_size);
+ if(verbose)
+ print_asf_string(" Author: ", string, contenth.author_size);
+ else
+ pack_asf_string(string, contenth.author_size);
+ demux_info_add(demuxer, "author", string);
}
// extract the copyright
if( contenth.copyright_size!=0 ) {
string=(char*)realloc((void*)string, contenth.copyright_size);
stream_read(demuxer->stream, string, contenth.copyright_size);
- print_asf_string(" Copyright: ", string, contenth.copyright_size);
+ if(verbose)
+ print_asf_string(" Copyright: ", string, contenth.copyright_size);
+ else
+ pack_asf_string(string, contenth.copyright_size);
+ demux_info_add(demuxer, "copyright", string);
}
// extract the comment
if( contenth.comment_size!=0 ) {
string=(char*)realloc((void*)string, contenth.comment_size);
stream_read(demuxer->stream, string, contenth.comment_size);
- print_asf_string(" Comment: ", string, contenth.comment_size);
+ if(verbose)
+ print_asf_string(" Comment: ", string, contenth.comment_size);
+ else
+ pack_asf_string(string, contenth.comment_size);
+ demux_info_add(demuxer, "comments", string);
}
// extract the rating
if( contenth.rating_size!=0 ) {
string=(char*)realloc((void*)string, contenth.rating_size);
stream_read(demuxer->stream, string, contenth.rating_size);
- print_asf_string(" Rating: ", string, contenth.rating_size);
+ if(verbose)
+ print_asf_string(" Rating: ", string, contenth.rating_size);
}
mp_msg(MSGT_HEADER,MSGL_V,"\n");
free(string);
- }
break;
-
+ }
} // switch GUID
if(ASF_LOAD_GUID_PREFIX(objh.guid)==ASF_GUID_PREFIX_data_chunk) break; // movi chunk