Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
e38b9b06
Commit
e38b9b06
authored
Apr 22, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MMS: coherence with asf demuxer
parent
e7e469f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
18 deletions
+18
-18
modules/access/mms/asf.c
modules/access/mms/asf.c
+8
-8
modules/access/mms/asf.h
modules/access/mms/asf.h
+4
-4
modules/access/mms/mmsh.c
modules/access/mms/mmsh.c
+2
-2
modules/access/mms/mmstu.c
modules/access/mms/mmstu.c
+3
-3
modules/demux/asf/libasf.h
modules/demux/asf/libasf.h
+1
-1
No files found.
modules/access/mms/asf.c
View file @
e38b9b06
...
...
@@ -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
&&
...
...
modules/access/mms/asf.h
View file @
e38b9b06
...
...
@@ -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
;
...
...
modules/access/mms/mmsh.c
View file @
e38b9b06
...
...
@@ -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
)
...
...
modules/access/mms/mmstu.c
View file @
e38b9b06
...
...
@@ -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
);
...
...
modules/demux/asf/libasf.h
View file @
e38b9b06
...
...
@@ -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_UNKNOW
N
0xffff
typedef
struct
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment