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
6278f6d6
Commit
6278f6d6
authored
Nov 15, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* asf: added support for "extended stream properties". I HATE BROKEN DESIGNED FORMAT.
parent
16e9cb81
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
753 additions
and
74 deletions
+753
-74
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+5
-0
modules/demux/asf/libasf.c
modules/demux/asf/libasf.c
+613
-45
modules/demux/asf/libasf.h
modules/demux/asf/libasf.h
+135
-29
No files found.
modules/demux/asf/asf.c
View file @
6278f6d6
...
...
@@ -34,6 +34,11 @@
#include "codecs.h"
/* BITMAPINFOHEADER, WAVEFORMATEX */
#include "libasf.h"
/* TODO
* - add support for the newly added object: language, bitrate,
* extended stream properties.
*/
/*****************************************************************************
* Module descriptor
*****************************************************************************/
...
...
modules/demux/asf/libasf.c
View file @
6278f6d6
This diff is collapsed.
Click to expand it.
modules/demux/asf/libasf.h
View file @
6278f6d6
...
...
@@ -32,18 +32,23 @@ typedef struct guid_s
uint8_t
v4
[
8
];
}
guid_t
;
#define ASF_OBJECT_TYPE_NULL 0x0000
#define ASF_OBJECT_TYPE_ROOT 0x0001
#define ASF_OBJECT_TYPE_HEADER 0x0002
#define ASF_OBJECT_TYPE_DATA 0x0003
#define ASF_OBJECT_TYPE_INDEX 0x0004
#define ASF_OBJECT_TYPE_FILE_PROPERTIES 0x0005
#define ASF_OBJECT_TYPE_STREAM_PROPERTIES 0x0006
#define ASF_OBJECT_TYPE_HEADER_EXTENSION 0x0007
#define ASF_OBJECT_TYPE_CODEC_LIST 0x0008
#define ASF_OBJECT_TYPE_MARKER 0x0009
#define ASF_OBJECT_TYPE_CONTENT_DESCRIPTION 0x000a
#define ASF_OBJECT_TYPE_METADATA 0x000b
enum
{
ASF_OBJECT_NULL
=
0
,
ASF_OBJECT_ROOT
,
ASF_OBJECT_HEADER
,
ASF_OBJECT_DATA
,
ASF_OBJECT_INDEX
,
ASF_OBJECT_FILE_PROPERTIES
,
ASF_OBJECT_STREAM_PROPERTIES
,
ASF_OBJECT_HEADER_EXTENSION
,
ASF_OBJECT_CODEC_LIST
,
ASF_OBJECT_MARKER
,
ASF_OBJECT_CONTENT_DESCRIPTION
,
ASF_OBJECT_METADATA
,
ASF_OBJECT_PADDING
,
ASF_OBJECT_OTHER
,
};
static
const
guid_t
asf_object_null_guid
=
{
...
...
@@ -92,6 +97,28 @@ static const guid_t asf_object_stream_type_video =
static
const
guid_t
asf_object_stream_type_command
=
{
0x59DACFC0
,
0x59E6
,
0x11D0
,
{
0xA3
,
0xAC
,
0x00
,
0xA0
,
0xC9
,
0x03
,
0x48
,
0xF6
}};
/* TODO */
static
const
guid_t
asf_object_stream_bitrate_properties
=
{
0x7BF875CE
,
0x468D
,
0x11D1
,
{
0x8D
,
0x82
,
0x00
,
0x60
,
0x97
,
0xC9
,
0xA2
,
0xB2
}};
static
const
guid_t
asf_object_language_list
=
{
0x7C4346A9
,
0xEFE0
,
0x4BFC
,
{
0xB2
,
0x29
,
0x39
,
0x3E
,
0xDE
,
0x41
,
0x5C
,
0x85
}};
static
const
guid_t
asf_object_extended_stream_properties
=
{
0x14E6A5CB
,
0xC672
,
0x4332
,
{
0x83
,
0x99
,
0xA9
,
0x69
,
0x52
,
0x06
,
0x5B
,
0x5A
}};
static
const
guid_t
asf_object_advanced_mutual_exclusion
=
{
0xA08649CF
,
0x4775
,
0x4670
,
{
0x8A
,
0x16
,
0x6E
,
0x35
,
0x35
,
0x75
,
0x66
,
0xCD
}};
static
const
guid_t
asf_object_padding
=
{
0x1806D474
,
0xCADF
,
0x4509
,
{
0xA4
,
0xBA
,
0x9A
,
0xAB
,
0xCB
,
0x96
,
0xAA
,
0xE8
}};
static
const
guid_t
asf_object_stream_prioritization
=
{
0xD4FED15B
,
0x88D3
,
0x454F
,
{
0x81
,
0xF0
,
0xED
,
0x5C
,
0x45
,
0x99
,
0x9E
,
0x24
}};
static
const
guid_t
asf_object_extended_content_description
=
{
0xD2D0A440
,
0xE307
,
0x11D2
,
{
0x97
,
0xF0
,
0x00
,
0xA0
,
0xC9
,
0x5E
,
0xA8
,
0x50
}};
#define ASF_OBJECT_COMMON \
int i_type; \
guid_t i_object_id; \
...
...
@@ -102,13 +129,13 @@ static const guid_t asf_object_stream_type_command =
union asf_object_u *p_last; \
union asf_object_u *p_next;
typedef
struct
asf_object_common_s
typedef
struct
{
ASF_OBJECT_COMMON
}
asf_object_common_t
;
typedef
struct
asf_index_entry_s
typedef
struct
{
uint32_t
i_packet_number
;
uint16_t
i_packet_count
;
...
...
@@ -120,7 +147,7 @@ typedef struct asf_index_entry_s
****************************************************************************/
/* This is the first header find in a asf file
* It's the only object that have subobject */
typedef
struct
asf_object_header_s
typedef
struct
{
ASF_OBJECT_COMMON
uint32_t
i_sub_object_count
;
...
...
@@ -129,7 +156,7 @@ typedef struct asf_object_header_s
}
asf_object_header_t
;
typedef
struct
asf_object_data_s
typedef
struct
{
ASF_OBJECT_COMMON
guid_t
i_file_id
;
...
...
@@ -139,7 +166,7 @@ typedef struct asf_object_data_s
}
asf_object_data_t
;
typedef
struct
asf_object_index_s
typedef
struct
{
ASF_OBJECT_COMMON
guid_t
i_file_id
;
...
...
@@ -157,7 +184,7 @@ typedef struct asf_object_index_s
#define ASF_FILE_PROPERTIES_BROADCAST 0x01
#define ASF_FILE_PROPERTIES_SEEKABLE 0x02
typedef
struct
asf_object_file_properties_s
typedef
struct
{
ASF_OBJECT_COMMON
...
...
@@ -176,7 +203,7 @@ typedef struct asf_object_file_properties_s
}
asf_object_file_properties_t
;
#define ASF_STREAM_PROPERTIES_ENCRYPTED 0x8000
typedef
struct
asf_object_stream_properties_s
typedef
struct
{
ASF_OBJECT_COMMON
...
...
@@ -193,7 +220,7 @@ typedef struct asf_object_stream_properties_s
uint8_t
*
p_error_correction_data
;
}
asf_object_stream_properties_t
;
typedef
struct
asf_object_header_extension_s
typedef
struct
{
ASF_OBJECT_COMMON
...
...
@@ -211,7 +238,7 @@ typedef struct asf_object_header_extension_s
#define ASF_METADATA_TYPE_QWORD 0x0004
#define ASF_METADATA_TYPE_WORD 0x0005
typedef
struct
asf_metadata_record_s
typedef
struct
{
uint16_t
i_stream
;
uint16_t
i_type
;
...
...
@@ -223,7 +250,7 @@ typedef struct asf_metadata_record_s
}
asf_metadata_record_t
;
typedef
struct
asf_object_metadata_s
typedef
struct
{
ASF_OBJECT_COMMON
...
...
@@ -232,7 +259,7 @@ typedef struct asf_object_metadata_s
}
asf_object_metadata_t
;
typedef
struct
asf_objec_content_description_s
typedef
struct
{
ASF_OBJECT_COMMON
...
...
@@ -244,7 +271,7 @@ typedef struct asf_objec_content_description_s
}
asf_object_content_description_t
;
typedef
struct
string16_s
typedef
struct
{
uint16_t
i_length
;
uint16_t
*
i_char
;
...
...
@@ -255,7 +282,7 @@ typedef struct string16_s
#define ASF_CODEC_TYPE_AUDIO 0x0002
#define ASF_CODEC_TYPE_UNKNOW 0xffff
typedef
struct
asf_codec_entry_s
typedef
struct
{
uint16_t
i_type
;
char
*
psz_name
;
...
...
@@ -265,7 +292,7 @@ typedef struct asf_codec_entry_s
uint8_t
*
p_information
;
}
asf_codec_entry_t
;
typedef
struct
asf_object_codec_list_s
typedef
struct
{
ASF_OBJECT_COMMON
guid_t
i_reserved
;
...
...
@@ -274,7 +301,7 @@ typedef struct asf_object_codec_list_s
}
asf_object_codec_list_t
;
typedef
struct
asf_marker_s
typedef
struct
{
uint64_t
i_offset
;
uint64_t
i_presentation_time
;
...
...
@@ -286,7 +313,7 @@ typedef struct asf_marker_s
}
asf_marker_t
;
typedef
struct
asf_object_marker_s
typedef
struct
{
ASF_OBJECT_COMMON
guid_t
i_reserved1
;
...
...
@@ -297,10 +324,86 @@ typedef struct asf_object_marker_s
}
asf_object_marker_t
;
typedef
struct
{
ASF_OBJECT_COMMON
int
i_language
;
char
**
ppsz_language
;
}
asf_object_language_list_t
;
typedef
struct
{
ASF_OBJECT_COMMON
int
i_bitrate
;
struct
{
int
i_stream_number
;
uint32_t
i_avg_bitrate
;
}
bitrate
[
128
];
}
asf_object_stream_bitrate_properties_t
;
typedef
struct
{
ASF_OBJECT_COMMON
int64_t
i_start_time
;
int64_t
i_end_time
;
int32_t
i_data_bitrate
;
int32_t
i_buffer_size
;
int32_t
i_initial_buffer_fullness
;
int32_t
i_alternate_data_bitrate
;
int32_t
i_alternate_buffer_size
;
int32_t
i_alternate_initial_buffer_fullness
;
int32_t
i_maximum_object_size
;
int32_t
i_flags
;
int16_t
i_stream_number
;
int16_t
i_language_index
;
int64_t
i_average_time_per_frame
;
int
i_stream_name_count
;
int
i_payload_extention_system_count
;
int
*
pi_stream_name_language
;
char
**
ppsz_stream_name
;
asf_object_stream_properties_t
*
p_sp
;
}
asf_object_extended_stream_properties_t
;
typedef
struct
{
ASF_OBJECT_COMMON
guid_t
type
;
int16_t
i_stream_number_count
;
int16_t
*
pi_stream_number
;
}
asf_object_advanced_mutual_exclusion_t
;
typedef
struct
{
ASF_OBJECT_COMMON
int
i_priority_count
;
int
*
pi_priority_flag
;
int
*
pi_priority_stream_number
;
}
asf_object_stream_prioritization_t
;
typedef
struct
{
ASF_OBJECT_COMMON
int
i_count
;
char
**
ppsz_name
;
char
**
ppsz_value
;
}
asf_object_extended_content_description_t
;
/****************************************************************************
* Special Root Object
****************************************************************************/
typedef
struct
asf_object_root_s
typedef
struct
{
ASF_OBJECT_COMMON
...
...
@@ -333,6 +436,9 @@ typedef union asf_object_u
asf_object_metadata_t
metadata
;
asf_object_codec_list_t
codec_list
;
asf_object_marker_t
marker
;
asf_object_language_list_t
lang
;
asf_object_stream_bitrate_properties_t
stream_bitrate
;
asf_object_extended_stream_properties_t
ext_stream
;
}
asf_object_t
;
...
...
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