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
4d543634
Commit
4d543634
authored
Aug 28, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MMS: use the GUID definitions from the asf demuxer
parent
bf89c903
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
111 deletions
+11
-111
modules/access/mms/Modules.am
modules/access/mms/Modules.am
+1
-0
modules/access/mms/asf.c
modules/access/mms/asf.c
+8
-23
modules/access/mms/asf.h
modules/access/mms/asf.h
+2
-88
No files found.
modules/access/mms/Modules.am
View file @
4d543634
...
@@ -9,6 +9,7 @@ SOURCES_access_mms = \
...
@@ -9,6 +9,7 @@ SOURCES_access_mms = \
buffer.h \
buffer.h \
asf.h \
asf.h \
asf.c \
asf.c \
../../demux/asf/libasf_guid.h \
$(NULL)
$(NULL)
libvlc_LTLIBRARIES += libaccess_mms_plugin.la
libvlc_LTLIBRARIES += libaccess_mms_plugin.la
modules/access/mms/asf.c
View file @
4d543634
...
@@ -31,21 +31,6 @@
...
@@ -31,21 +31,6 @@
#include "asf.h"
#include "asf.h"
#include "buffer.h"
#include "buffer.h"
static
int
CmpGuid
(
const
guid_t
*
p_guid1
,
const
guid_t
*
p_guid2
)
{
return
(
(
p_guid1
->
v1
==
p_guid2
->
v1
&&
p_guid1
->
v2
==
p_guid2
->
v2
&&
p_guid1
->
v3
==
p_guid2
->
v3
&&
p_guid1
->
v4
[
0
]
==
p_guid2
->
v4
[
0
]
&&
p_guid1
->
v4
[
1
]
==
p_guid2
->
v4
[
1
]
&&
p_guid1
->
v4
[
2
]
==
p_guid2
->
v4
[
2
]
&&
p_guid1
->
v4
[
3
]
==
p_guid2
->
v4
[
3
]
&&
p_guid1
->
v4
[
4
]
==
p_guid2
->
v4
[
4
]
&&
p_guid1
->
v4
[
5
]
==
p_guid2
->
v4
[
5
]
&&
p_guid1
->
v4
[
6
]
==
p_guid2
->
v4
[
6
]
&&
p_guid1
->
v4
[
7
]
==
p_guid2
->
v4
[
7
]
)
?
1
:
0
);
}
void
GenerateGuid
(
guid_t
*
p_guid
)
void
GenerateGuid
(
guid_t
*
p_guid
)
{
{
p_guid
->
v1
=
0xbabac001
;
p_guid
->
v1
=
0xbabac001
;
...
@@ -74,7 +59,7 @@ void asf_HeaderParse ( asf_header_t *hdr,
...
@@ -74,7 +59,7 @@ void asf_HeaderParse ( asf_header_t *hdr,
var_buffer_initread
(
&
buffer
,
p_header
,
i_header
);
var_buffer_initread
(
&
buffer
,
p_header
,
i_header
);
var_buffer_getguid
(
&
buffer
,
&
guid
);
var_buffer_getguid
(
&
buffer
,
&
guid
);
if
(
!
CmpG
uid
(
&
guid
,
&
asf_object_header_guid
)
)
if
(
!
CmpG
UID
(
&
guid
,
&
asf_object_header_guid
)
)
{
{
/* ERROR: */
/* ERROR: */
}
}
...
@@ -85,7 +70,7 @@ void asf_HeaderParse ( asf_header_t *hdr,
...
@@ -85,7 +70,7 @@ void asf_HeaderParse ( asf_header_t *hdr,
var_buffer_getguid
(
&
buffer
,
&
guid
);
var_buffer_getguid
(
&
buffer
,
&
guid
);
i_size
=
var_buffer_get64
(
&
buffer
);
i_size
=
var_buffer_get64
(
&
buffer
);
if
(
CmpG
uid
(
&
guid
,
&
asf_object_file_properties_guid
)
)
if
(
CmpG
UID
(
&
guid
,
&
asf_object_file_properties_guid
)
)
{
{
var_buffer_getmemory
(
&
buffer
,
NULL
,
16
);
var_buffer_getmemory
(
&
buffer
,
NULL
,
16
);
hdr
->
i_file_size
=
var_buffer_get64
(
&
buffer
);
hdr
->
i_file_size
=
var_buffer_get64
(
&
buffer
);
...
@@ -96,12 +81,12 @@ void asf_HeaderParse ( asf_header_t *hdr,
...
@@ -96,12 +81,12 @@ void asf_HeaderParse ( asf_header_t *hdr,
var_buffer_getmemory
(
&
buffer
,
NULL
,
i_size
-
24
-
16
-
8
-
8
-
8
-
8
-
8
-
8
-
4
-
4
);
var_buffer_getmemory
(
&
buffer
,
NULL
,
i_size
-
24
-
16
-
8
-
8
-
8
-
8
-
8
-
8
-
4
-
4
);
}
}
else
if
(
CmpG
uid
(
&
guid
,
&
asf_object_header_extension_guid
)
)
else
if
(
CmpG
UID
(
&
guid
,
&
asf_object_header_extension_guid
)
)
{
{
/* Enter it */
/* Enter it */
var_buffer_getmemory
(
&
buffer
,
NULL
,
46
-
24
);
var_buffer_getmemory
(
&
buffer
,
NULL
,
46
-
24
);
}
}
else
if
(
CmpG
uid
(
&
guid
,
&
asf_object_extended_stream_properties_guid
)
)
else
if
(
CmpG
UID
(
&
guid
,
&
asf_object_extended_stream_properties_guid
)
)
{
{
/* Grrrrrr */
/* Grrrrrr */
int16_t
i_count1
,
i_count2
;
int16_t
i_count1
,
i_count2
;
...
@@ -141,7 +126,7 @@ void asf_HeaderParse ( asf_header_t *hdr,
...
@@ -141,7 +126,7 @@ void asf_HeaderParse ( asf_header_t *hdr,
/* It's a hack we just skip the first part of the object until
/* It's a hack we just skip the first part of the object until
* the embed stream properties if any (ugly, but whose fault ?) */
* the embed stream properties if any (ugly, but whose fault ?) */
}
}
else
if
(
CmpG
uid
(
&
guid
,
&
asf_object_stream_properties_guid
)
)
else
if
(
CmpG
UID
(
&
guid
,
&
asf_object_stream_properties_guid
)
)
{
{
int
i_stream_id
;
int
i_stream_id
;
guid_t
stream_type
;
guid_t
stream_type
;
...
@@ -152,11 +137,11 @@ void asf_HeaderParse ( asf_header_t *hdr,
...
@@ -152,11 +137,11 @@ void asf_HeaderParse ( asf_header_t *hdr,
i_stream_id
=
var_buffer_get8
(
&
buffer
)
&
0x7f
;
i_stream_id
=
var_buffer_get8
(
&
buffer
)
&
0x7f
;
var_buffer_getmemory
(
&
buffer
,
NULL
,
i_size
-
24
-
32
-
16
-
1
);
var_buffer_getmemory
(
&
buffer
,
NULL
,
i_size
-
24
-
32
-
16
-
1
);
if
(
CmpG
uid
(
&
stream_type
,
&
asf_object_stream_type_video
)
)
if
(
CmpG
UID
(
&
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_STREAM_VIDEO
;
}
}
else
if
(
CmpG
uid
(
&
stream_type
,
&
asf_object_stream_type_audio
)
)
else
if
(
CmpG
UID
(
&
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_STREAM_AUDIO
;
}
}
...
@@ -165,7 +150,7 @@ void asf_HeaderParse ( asf_header_t *hdr,
...
@@ -165,7 +150,7 @@ void asf_HeaderParse ( asf_header_t *hdr,
hdr
->
stream
[
i_stream_id
].
i_cat
=
ASF_STREAM_UNKNOWN
;
hdr
->
stream
[
i_stream_id
].
i_cat
=
ASF_STREAM_UNKNOWN
;
}
}
}
}
else
if
(
CmpG
uid
(
&
guid
,
&
asf_object_bitrate_properties_guid
)
)
else
if
(
CmpG
UID
(
&
guid
,
&
asf_object_stream_bitrate_properties
)
)
{
{
int
i_count
;
int
i_count
;
uint8_t
i_stream_id
;
uint8_t
i_stream_id
;
...
...
modules/access/mms/asf.h
View file @
4d543634
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
#ifndef _ASF_H_
#ifndef _ASF_H_
#define _ASF_H_ 1
#define _ASF_H_ 1
#include "../../demux/asf/libasf_guid.h"
#define ASF_STREAM_VIDEO 0x0001
#define ASF_STREAM_VIDEO 0x0001
#define ASF_STREAM_AUDIO 0x0002
#define ASF_STREAM_AUDIO 0x0002
#define ASF_STREAM_UNKNOWN 0xffff
#define ASF_STREAM_UNKNOWN 0xffff
...
@@ -52,14 +54,6 @@ typedef struct
...
@@ -52,14 +54,6 @@ typedef struct
}
asf_header_t
;
}
asf_header_t
;
typedef
struct
guid_s
{
uint32_t
v1
;
/* le */
uint16_t
v2
;
/* le */
uint16_t
v3
;
/* le */
uint8_t
v4
[
8
];
}
guid_t
;
void
GenerateGuid
(
guid_t
*
);
void
GenerateGuid
(
guid_t
*
);
void
asf_HeaderParse
(
asf_header_t
*
,
uint8_t
*
,
int
);
void
asf_HeaderParse
(
asf_header_t
*
,
uint8_t
*
,
int
);
...
@@ -67,84 +61,4 @@ void asf_StreamSelect ( asf_header_t *,
...
@@ -67,84 +61,4 @@ void asf_StreamSelect ( asf_header_t *,
int
i_bitrate_max
,
bool
b_all
,
bool
b_audio
,
int
i_bitrate_max
,
bool
b_all
,
bool
b_audio
,
bool
b_video
);
bool
b_video
);
#define GUID_FMT "%8.8x-%4.4x-%4.4x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x"
#define GUID_PRINT( guid ) \
(guid).v1, \
(guid).v2, \
(guid).v3, \
(guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3], \
(guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
static
const
guid_t
asf_object_header_guid
=
{
0x75B22630
,
0x668E
,
0x11CF
,
{
0xA6
,
0xD9
,
0x00
,
0xAA
,
0x00
,
0x62
,
0xCE
,
0x6C
}
};
static
const
guid_t
asf_object_file_properties_guid
=
{
0x8cabdca1
,
0xa947
,
0x11cf
,
{
0x8e
,
0xe4
,
0x00
,
0xC0
,
0x0C
,
0x20
,
0x53
,
0x65
}
};
static
const
guid_t
asf_object_stream_properties_guid
=
{
0xB7DC0791
,
0xA9B7
,
0x11CF
,
{
0x8E
,
0xE6
,
0x00
,
0xC0
,
0x0C
,
0x20
,
0x53
,
0x65
}
};
static
const
guid_t
asf_object_stream_type_audio
=
{
0xF8699E40
,
0x5B4D
,
0x11CF
,
{
0xA8
,
0xFD
,
0x00
,
0x80
,
0x5F
,
0x5C
,
0x44
,
0x2B
}
};
static
const
guid_t
asf_object_stream_type_video
=
{
0xbc19efc0
,
0x5B4D
,
0x11CF
,
{
0xA8
,
0xFD
,
0x00
,
0x80
,
0x5F
,
0x5C
,
0x44
,
0x2B
}
};
static
const
guid_t
asf_object_bitrate_properties_guid
=
{
0x7BF875CE
,
0x468D
,
0x11D1
,
{
0x8D
,
0x82
,
0x00
,
0x60
,
0x97
,
0xC9
,
0xA2
,
0xB2
}
};
static
const
guid_t
asf_object_bitrate_mutual_exclusion_guid
=
{
0xD6E229DC
,
0x35DA
,
0x11D1
,
{
0x90
,
0x34
,
0x00
,
0xA0
,
0xC9
,
0x03
,
0x49
,
0xBE
}
};
static
const
guid_t
asf_object_extended_stream_properties_guid
=
{
0x14E6A5CB
,
0xC672
,
0x4332
,
{
0x83
,
0x99
,
0xA9
,
0x69
,
0x52
,
0x06
,
0x5B
,
0x5A
}
};
static
const
guid_t
asf_object_header_extension_guid
=
{
0x5FBF03B5
,
0xA92E
,
0x11CF
,
{
0x8E
,
0xE3
,
0x00
,
0xC0
,
0x0C
,
0x20
,
0x53
,
0x65
}
};
#endif
#endif
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