Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
30e4a13f
Commit
30e4a13f
authored
Aug 28, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ASF: cleaning
Trailing spaces, guid names consistency with MMS module, calloc, enum
parent
82756986
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
26 deletions
+27
-26
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+5
-6
modules/demux/asf/libasf.c
modules/demux/asf/libasf.c
+4
-12
modules/demux/asf/libasf.h
modules/demux/asf/libasf.h
+18
-8
No files found.
modules/demux/asf/asf.c
View file @
30e4a13f
...
...
@@ -53,10 +53,10 @@ static void Close ( vlc_object_t * );
vlc_module_begin
()
set_category
(
CAT_INPUT
)
set_subcategory
(
SUBCAT_INPUT_DEMUX
)
set_description
(
N_
(
"ASF
v1.0
demuxer"
)
)
set_description
(
N_
(
"ASF
/WMV
demuxer"
)
)
set_capability
(
"demux"
,
200
)
set_callbacks
(
Open
,
Close
)
add_shortcut
(
"asf"
)
add_shortcut
(
"asf"
,
"wmv"
)
vlc_module_end
()
...
...
@@ -126,8 +126,7 @@ static int Open( vlc_object_t * p_this )
/* Set p_demux fields */
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
memset
(
p_sys
,
0
,
sizeof
(
demux_sys_t
)
);
p_demux
->
p_sys
=
p_sys
=
calloc
(
1
,
sizeof
(
demux_sys_t
)
);
/* Load the headers */
if
(
DemuxInit
(
p_demux
)
)
...
...
@@ -811,12 +810,12 @@ static int DemuxInit( demux_t *p_demux )
if
(
p_hdr_ext
)
{
int
i_ext_stream
=
ASF_CountObject
(
p_hdr_ext
,
&
asf_object_extended_stream_properties
);
&
asf_object_extended_stream_properties
_guid
);
for
(
int
i
=
0
;
i
<
i_ext_stream
;
i
++
)
{
asf_object_t
*
p_tmp
=
ASF_FindObject
(
p_hdr_ext
,
&
asf_object_extended_stream_properties
,
i
);
&
asf_object_extended_stream_properties
_guid
,
i
);
if
(
p_tmp
->
ext_stream
.
i_stream_number
==
p_sp
->
i_stream_number
)
{
p_esp
=
&
p_tmp
->
ext_stream
;
...
...
modules/demux/asf/libasf.c
View file @
30e4a13f
...
...
@@ -32,14 +32,6 @@
#define ASF_DEBUG 1
#define GUID_FMT "0x%x-0x%x-0x%x-0x%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]
/* Helpers:
* They ensure that invalid reads will not create problems.
* They are expansion safe
...
...
@@ -1274,7 +1266,7 @@ static const struct
{
&
asf_object_stream_bitrate_properties
,
ASF_OBJECT_OTHER
,
ASF_ReadObject_stream_bitrate_properties
,
ASF_FreeObject_stream_bitrate_properties
},
{
&
asf_object_extended_stream_properties
,
ASF_OBJECT_OTHER
,
{
&
asf_object_extended_stream_properties
_guid
,
ASF_OBJECT_OTHER
,
ASF_ReadObject_extended_stream_properties
,
ASF_FreeObject_extended_stream_properties
},
{
&
asf_object_advanced_mutual_exclusion
,
ASF_OBJECT_OTHER
,
...
...
@@ -1435,7 +1427,7 @@ static const struct
{
&
asf_object_language_list
,
"Language List"
},
{
&
asf_object_stream_bitrate_properties
,
"Stream Bitrate Properties"
},
{
&
asf_object_padding
,
"Padding"
},
{
&
asf_object_extended_stream_properties
,
"Extended Stream Properties"
},
{
&
asf_object_extended_stream_properties
_guid
,
"Extended Stream Properties"
},
{
&
asf_object_advanced_mutual_exclusion
,
"Advanced Mutual Exclusion"
},
{
&
asf_object_stream_prioritization
,
"Stream Prioritization"
},
{
&
asf_object_extended_content_description
,
"Extended content description"
},
...
...
@@ -1568,12 +1560,12 @@ asf_object_root_t *ASF_ReadObjectRoot( stream_t *s, int b_seekable )
&
asf_object_metadata_guid
,
0
);
/* Special case for broken designed file format :( */
i_ext_stream
=
ASF_CountObject
(
p_hdr_ext
,
&
asf_object_extended_stream_properties
);
&
asf_object_extended_stream_properties
_guid
);
for
(
i
=
0
;
i
<
i_ext_stream
;
i
++
)
{
asf_object_t
*
p_esp
=
ASF_FindObject
(
p_hdr_ext
,
&
asf_object_extended_stream_properties
,
i
);
&
asf_object_extended_stream_properties
_guid
,
i
);
if
(
p_esp
->
ext_stream
.
p_sp
)
{
asf_object_t
*
p_sp
=
...
...
modules/demux/asf/libasf.h
View file @
30e4a13f
...
...
@@ -2,7 +2,7 @@
* libasf.h :
*****************************************************************************
* Copyright © 2001-2004, 2011 the VideoLAN team
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -32,6 +32,14 @@ typedef struct guid_s
uint8_t
v4
[
8
];
}
guid_t
;
#define GUID_FMT "0x%x-0x%x-0x%x-0x%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]
enum
{
ASF_OBJECT_NULL
=
0
,
...
...
@@ -150,7 +158,7 @@ static const guid_t asf_object_padding =
{
0x1806D474
,
0xCADF
,
0x4509
,
{
0xA4
,
0xBA
,
0x9A
,
0xAB
,
0xCB
,
0x96
,
0xAA
,
0xE8
}};
// header extension
static
const
guid_t
asf_object_extended_stream_properties
=
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_group_mutual_exclusion_guid
=
...
...
@@ -300,12 +308,14 @@ typedef struct
}
asf_object_header_extension_t
;
#define ASF_METADATA_TYPE_STRING 0x0000
#define ASF_METADATA_TYPE_BYTE 0x0001
#define ASF_METADATA_TYPE_BOOL 0x0002
#define ASF_METADATA_TYPE_DWORD 0x0003
#define ASF_METADATA_TYPE_QWORD 0x0004
#define ASF_METADATA_TYPE_WORD 0x0005
enum
{
ASF_METADATA_TYPE_STRING
,
ASF_METADATA_TYPE_BYTE
,
ASF_METADATA_TYPE_BOOL
,
ASF_METADATA_TYPE_DWORD
,
ASF_METADATA_TYPE_QWORD
,
ASF_METADATA_TYPE_WORD
,
};
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