[vlc-commits] MMS: coherence with asf demuxer
Jean-Baptiste Kempf
git at videolan.org
Sun Apr 22 02:03:49 CEST 2012
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 22 01:45:29 2012 +0200| [e38b9b06c9f1a78fed48d3b9b727b99e933a1fbd] | committer: Jean-Baptiste Kempf
MMS: coherence with asf demuxer
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e38b9b06c9f1a78fed48d3b9b727b99e933a1fbd
---
modules/access/mms/asf.c | 16 ++++++++--------
modules/access/mms/asf.h | 8 ++++----
modules/access/mms/mmsh.c | 4 ++--
modules/access/mms/mmstu.c | 6 +++---
modules/demux/asf/libasf.h | 2 +-
5 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/modules/access/mms/asf.c b/modules/access/mms/asf.c
index e84f85f..b109652 100644
--- a/modules/access/mms/asf.c
+++ b/modules/access/mms/asf.c
@@ -52,7 +52,7 @@ void asf_HeaderParse ( asf_header_t *hdr,
hdr->i_min_data_packet_size = 0;
for( unsigned i = 0; i < 128; i++ )
{
- hdr->stream[i].i_cat = ASF_STREAM_UNKNOWN;
+ hdr->stream[i].i_cat = ASF_CODEC_TYPE_UNKNOWN;
hdr->stream[i].i_selected = 0;
hdr->stream[i].i_bitrate = -1;
}
@@ -140,15 +140,15 @@ void asf_HeaderParse ( asf_header_t *hdr,
if( guidcmp( &stream_type, &asf_object_stream_type_video ) )
{
- hdr->stream[i_stream_id].i_cat = ASF_STREAM_VIDEO;
+ hdr->stream[i_stream_id].i_cat = ASF_CODEC_TYPE_VIDEO;
}
else if( guidcmp( &stream_type, &asf_object_stream_type_audio ) )
{
- hdr->stream[i_stream_id].i_cat = ASF_STREAM_AUDIO;
+ hdr->stream[i_stream_id].i_cat = ASF_CODEC_TYPE_AUDIO;
}
else
{
- hdr->stream[i_stream_id].i_cat = ASF_STREAM_UNKNOWN;
+ hdr->stream[i_stream_id].i_cat = ASF_CODEC_TYPE_UNKNOWN;
}
}
else if ( guidcmp( &guid, &asf_object_stream_bitrate_properties ) )
@@ -198,7 +198,7 @@ void asf_StreamSelect ( asf_header_t *hdr,
/* select all valid stream */
for( i = 1; i < 128; i++ )
{
- if( hdr->stream[i].i_cat != ASF_STREAM_UNKNOWN )
+ if( hdr->stream[i].i_cat != ASF_CODEC_TYPE_UNKNOWN )
{
hdr->stream[i].i_selected = 1;
}
@@ -229,11 +229,11 @@ void asf_StreamSelect ( asf_header_t *hdr,
*/
for( i = 1; i < 128; i++ )
{
- if( hdr->stream[i].i_cat == ASF_STREAM_UNKNOWN )
+ if( hdr->stream[i].i_cat == ASF_CODEC_TYPE_UNKNOWN )
{
continue;
}
- else if( hdr->stream[i].i_cat == ASF_STREAM_AUDIO && b_audio &&
+ else if( hdr->stream[i].i_cat == ASF_CODEC_TYPE_AUDIO && b_audio &&
( i_audio <= 0 ||
( ( ( hdr->stream[i].i_bitrate > hdr->stream[i_audio].i_bitrate &&
( i_bitrate_total + hdr->stream[i].i_bitrate - hdr->stream[i_audio].i_bitrate
@@ -259,7 +259,7 @@ void asf_StreamSelect ( asf_header_t *hdr,
}
i_audio = i;
}
- else if( hdr->stream[i].i_cat == ASF_STREAM_VIDEO && b_video &&
+ else if( hdr->stream[i].i_cat == ASF_CODEC_TYPE_VIDEO && b_video &&
( i_video <= 0 ||
(
( ( hdr->stream[i].i_bitrate > hdr->stream[i_video].i_bitrate &&
diff --git a/modules/access/mms/asf.h b/modules/access/mms/asf.h
index 0c678de..9edb552 100644
--- a/modules/access/mms/asf.h
+++ b/modules/access/mms/asf.h
@@ -33,13 +33,13 @@
#include "../../demux/asf/libasf_guid.h"
-#define ASF_STREAM_VIDEO 0x0001
-#define ASF_STREAM_AUDIO 0x0002
-#define ASF_STREAM_UNKNOWN 0xffff
+#define ASF_CODEC_TYPE_VIDEO 0x0001
+#define ASF_CODEC_TYPE_AUDIO 0x0002
+#define ASF_CODEC_TYPE_UNKNOWN 0xffff
typedef struct
{
- int i_cat; /* ASF_STREAM_VIDEO, ASF_STREAM_AUDIO */
+ int i_cat; /* ASF_CODEC_TYPE_VIDEO, ASF_CODEC_TYPE_AUDIO, */
int i_bitrate; /* -1 if unknown */
int i_selected;
} asf_stream_t;
diff --git a/modules/access/mms/mmsh.c b/modules/access/mms/mmsh.c
index 30ff11b..77c0b17 100644
--- a/modules/access/mms/mmsh.c
+++ b/modules/access/mms/mmsh.c
@@ -774,7 +774,7 @@ static int Start( access_t *p_access, uint64_t i_pos )
for( i = 1; i < 128; i++ )
{
- if( p_sys->asfh.stream[i].i_cat == ASF_STREAM_UNKNOWN )
+ if( p_sys->asfh.stream[i].i_cat == ASF_CODEC_TYPE_UNKNOWN )
continue;
i_streams++;
if( p_sys->asfh.stream[i].i_selected )
@@ -816,7 +816,7 @@ static int Start( access_t *p_access, uint64_t i_pos )
for( i = 1; i < 128; i++ )
{
- if( p_sys->asfh.stream[i].i_cat != ASF_STREAM_UNKNOWN )
+ if( p_sys->asfh.stream[i].i_cat != ASF_CODEC_TYPE_UNKNOWN )
{
int i_select = 2;
if( p_sys->asfh.stream[i].i_selected )
diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index 3e3b769..ecf3203 100644
--- a/modules/access/mms/mmstu.c
+++ b/modules/access/mms/mmstu.c
@@ -803,7 +803,7 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
for( i = 1; i < 128; i++ )
{
- if( p_sys->asfh.stream[i].i_cat != ASF_STREAM_UNKNOWN )
+ if( p_sys->asfh.stream[i].i_cat != ASF_CODEC_TYPE_UNKNOWN )
{
i_streams++;
if( i_first != -1 )
@@ -821,7 +821,7 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
msg_Info( p_access,
"selecting stream[0x%x] %s (%d Kib/s)",
i,
- ( p_sys->asfh.stream[i].i_cat == ASF_STREAM_AUDIO ) ?
+ ( p_sys->asfh.stream[i].i_cat == ASF_CODEC_TYPE_AUDIO ) ?
"audio" : "video" ,
p_sys->asfh.stream[i].i_bitrate / 1024);
}
@@ -831,7 +831,7 @@ static int MMSOpen( access_t *p_access, vlc_url_t *p_url, int i_proto )
msg_Info( p_access,
"ignoring stream[0x%x] %s (%d Kib/s)",
i,
- ( p_sys->asfh.stream[i].i_cat == ASF_STREAM_AUDIO ) ?
+ ( p_sys->asfh.stream[i].i_cat == ASF_CODEC_TYPE_AUDIO ) ?
"audio" : "video" ,
p_sys->asfh.stream[i].i_bitrate / 1024);
diff --git a/modules/demux/asf/libasf.h b/modules/demux/asf/libasf.h
index 5eb13b3..6e7ae94 100644
--- a/modules/demux/asf/libasf.h
+++ b/modules/demux/asf/libasf.h
@@ -190,7 +190,7 @@ typedef struct
#define ASF_CODEC_TYPE_VIDEO 0x0001
#define ASF_CODEC_TYPE_AUDIO 0x0002
-#define ASF_CODEC_TYPE_UNKNOW 0xffff
+#define ASF_CODEC_TYPE_UNKNOWN 0xffff
typedef struct
{
More information about the vlc-commits
mailing list