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
22fca623
Commit
22fca623
authored
Aug 17, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: A little clean up.
parent
b75c3a7a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
209 additions
and
271 deletions
+209
-271
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+187
-210
modules/demux/asf/asf.h
modules/demux/asf/asf.h
+1
-2
modules/demux/asf/libasf.c
modules/demux/asf/libasf.c
+18
-20
modules/demux/asf/libasf.h
modules/demux/asf/libasf.h
+3
-39
No files found.
modules/demux/asf/asf.c
View file @
22fca623
This diff is collapsed.
Click to expand it.
modules/demux/asf/asf.h
View file @
22fca623
...
...
@@ -2,7 +2,7 @@
* asf.h : ASFv01 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: asf.h,v 1.
3 2003/02/01 01:21:04
fenrir Exp $
* $Id: asf.h,v 1.
4 2003/08/17 23:42:37
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -34,7 +34,6 @@ typedef struct asf_stream_s
struct
demux_sys_t
{
mtime_t
i_pcr
;
// 1/90000 s
mtime_t
i_time
;
// µs
asf_object_root_t
root
;
...
...
modules/demux/asf/libasf.c
View file @
22fca623
...
...
@@ -2,7 +2,7 @@
* libasf.c :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libasf.c,v 1.1
3 2003/08/17 23:02:52
fenrir Exp $
* $Id: libasf.c,v 1.1
4 2003/08/17 23:42:37
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -21,13 +21,11 @@
*****************************************************************************/
#include <stdlib.h>
/* malloc(), free() */
#include <string.h>
/* strdup() */
#include <errno.h>
#include <sys/types.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
#include "codecs.h"
/* BITMAPINFOHEADER, WAVEFORMATEX */
#include "libasf.h"
#define ASF_DEBUG 1
...
...
@@ -43,7 +41,7 @@
(guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3], \
(guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
void
GetGUID
(
guid_t
*
p_guid
,
uint8_t
*
p_data
)
void
ASF_
GetGUID
(
guid_t
*
p_guid
,
uint8_t
*
p_data
)
{
p_guid
->
v1
=
GetDWLE
(
p_data
);
p_guid
->
v2
=
GetWLE
(
p_data
+
4
);
...
...
@@ -51,7 +49,7 @@ void GetGUID( guid_t *p_guid, uint8_t *p_data )
memcpy
(
p_guid
->
v4
,
p_data
+
8
,
8
);
}
int
CmpGUID
(
const
guid_t
*
p_guid1
,
const
guid_t
*
p_guid2
)
int
ASF_
CmpGUID
(
const
guid_t
*
p_guid1
,
const
guid_t
*
p_guid2
)
{
if
(
(
p_guid1
->
v1
!=
p_guid2
->
v1
)
||
(
p_guid1
->
v2
!=
p_guid2
->
v2
)
||
(
p_guid1
->
v3
!=
p_guid2
->
v3
)
||
...
...
@@ -184,7 +182,7 @@ int ASF_ReadObjectCommon( input_thread_t *p_input,
{
return
(
0
);
}
GetGUID
(
&
p_common
->
i_object_id
,
p_peek
);
ASF_
GetGUID
(
&
p_common
->
i_object_id
,
p_peek
);
p_common
->
i_object_size
=
GetQWLE
(
p_peek
+
16
);
p_common
->
i_object_pos
=
ASF_TellAbsolute
(
p_input
);
p_common
->
p_next
=
NULL
;
...
...
@@ -300,7 +298,7 @@ int ASF_ReadObject_Data( input_thread_t *p_input,
{
return
(
0
);
}
GetGUID
(
&
p_data
->
i_file_id
,
p_peek
+
24
);
ASF_
GetGUID
(
&
p_data
->
i_file_id
,
p_peek
+
24
);
p_data
->
i_total_data_packets
=
GetQWLE
(
p_peek
+
40
);
p_data
->
i_reserved
=
GetWLE
(
p_peek
+
48
);
#ifdef ASF_DEBUG
...
...
@@ -325,7 +323,7 @@ int ASF_ReadObject_Index( input_thread_t *p_input,
{
return
(
0
);
}
GetGUID
(
&
p_index
->
i_file_id
,
p_peek
+
24
);
ASF_
GetGUID
(
&
p_index
->
i_file_id
,
p_peek
+
24
);
p_index
->
i_index_entry_time_interval
=
GetQWLE
(
p_peek
+
40
);
p_index
->
i_max_packet_count
=
GetDWLE
(
p_peek
+
48
);
p_index
->
i_index_entry_count
=
GetDWLE
(
p_peek
+
52
);
...
...
@@ -362,7 +360,7 @@ int ASF_ReadObject_file_properties( input_thread_t *p_input,
{
return
(
0
);
}
GetGUID
(
&
p_fp
->
i_file_id
,
p_peek
+
24
);
ASF_
GetGUID
(
&
p_fp
->
i_file_id
,
p_peek
+
24
);
p_fp
->
i_file_size
=
GetQWLE
(
p_peek
+
40
);
p_fp
->
i_creation_date
=
GetQWLE
(
p_peek
+
48
);
p_fp
->
i_data_packets_count
=
GetQWLE
(
p_peek
+
56
);
...
...
@@ -407,7 +405,7 @@ int ASF_ReadObject_header_extention( input_thread_t *p_input,
{
return
(
0
);
}
GetGUID
(
&
p_he
->
i_reserved1
,
p_peek
+
24
);
ASF_
GetGUID
(
&
p_he
->
i_reserved1
,
p_peek
+
24
);
p_he
->
i_reserved2
=
GetWLE
(
p_peek
+
40
);
p_he
->
i_header_extention_size
=
GetDWLE
(
p_peek
+
42
);
if
(
p_he
->
i_header_extention_size
)
...
...
@@ -450,8 +448,8 @@ int ASF_ReadObject_stream_properties( input_thread_t *p_input,
{
return
(
0
);
}
GetGUID
(
&
p_sp
->
i_stream_type
,
p_peek
+
24
);
GetGUID
(
&
p_sp
->
i_error_correction_type
,
p_peek
+
40
);
ASF_
GetGUID
(
&
p_sp
->
i_stream_type
,
p_peek
+
24
);
ASF_
GetGUID
(
&
p_sp
->
i_error_correction_type
,
p_peek
+
40
);
p_sp
->
i_time_offset
=
GetQWLE
(
p_peek
+
56
);
p_sp
->
i_type_specific_data_length
=
GetDWLE
(
p_peek
+
64
);
p_sp
->
i_error_correction_data_length
=
GetDWLE
(
p_peek
+
68
);
...
...
@@ -524,7 +522,7 @@ int ASF_ReadObject_codec_list( input_thread_t *p_input,
return
(
0
);
}
GetGUID
(
&
p_cl
->
i_reserved
,
p_peek
+
24
);
ASF_
GetGUID
(
&
p_cl
->
i_reserved
,
p_peek
+
24
);
p_cl
->
i_codec_entries_count
=
GetWLE
(
p_peek
+
40
);
if
(
p_cl
->
i_codec_entries_count
>
0
)
{
...
...
@@ -757,9 +755,9 @@ int ASF_ReadObject( input_thread_t *p_input,
/* find this object */
for
(
i_index
=
0
;
;
i_index
++
)
{
if
(
CmpGUID
(
ASF_Object_Function
[
i_index
].
p_id
,
if
(
ASF_
CmpGUID
(
ASF_Object_Function
[
i_index
].
p_id
,
&
p_obj
->
common
.
i_object_id
)
||
CmpGUID
(
ASF_Object_Function
[
i_index
].
p_id
,
ASF_
CmpGUID
(
ASF_Object_Function
[
i_index
].
p_id
,
&
asf_object_null_guid
)
)
{
break
;
...
...
@@ -822,9 +820,9 @@ void ASF_FreeObject( input_thread_t *p_input,
/* find this object */
for
(
i_index
=
0
;
;
i_index
++
)
{
if
(
CmpGUID
(
ASF_Object_Function
[
i_index
].
p_id
,
if
(
ASF_
CmpGUID
(
ASF_Object_Function
[
i_index
].
p_id
,
&
p_obj
->
common
.
i_object_id
)
||
CmpGUID
(
ASF_Object_Function
[
i_index
].
p_id
,
ASF_
CmpGUID
(
ASF_Object_Function
[
i_index
].
p_id
,
&
asf_object_null_guid
)
)
{
break
;
...
...
@@ -945,7 +943,7 @@ int __ASF_CountObject( asf_object_t *p_obj, const guid_t *p_guid )
p_child
=
p_obj
->
common
.
p_first
;
while
(
p_child
)
{
if
(
CmpGUID
(
&
p_child
->
common
.
i_object_id
,
p_guid
)
)
if
(
ASF_
CmpGUID
(
&
p_child
->
common
.
i_object_id
,
p_guid
)
)
{
i_count
++
;
}
...
...
@@ -962,7 +960,7 @@ void *__ASF_FindObject( asf_object_t *p_obj, const guid_t *p_guid, int i_number
while
(
p_child
)
{
if
(
CmpGUID
(
&
p_child
->
common
.
i_object_id
,
p_guid
)
)
if
(
ASF_
CmpGUID
(
&
p_child
->
common
.
i_object_id
,
p_guid
)
)
{
if
(
i_number
==
0
)
{
...
...
modules/demux/asf/libasf.h
View file @
22fca623
...
...
@@ -2,7 +2,7 @@
* libasf.h :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libasf.h,v 1.
5 2002/12/06 16:34:06 sam
Exp $
* $Id: libasf.h,v 1.
6 2003/08/17 23:42:37 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -20,7 +20,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include "codecs.h"
/* BITMAPINFOHEADER, WAVEFORMATEX */
/*****************************************************************************
* Structure needed for decoder
...
...
@@ -153,24 +152,6 @@ static const guid_t asf_object_stream_type_command =
{
0xA3
,
0xAC
,
0x00
,
0xA0
,
0xC9
,
0x03
,
0x48
,
0xF6
}
};
#if 0
static const guid_t asf_object_
{
};
#endif
#if 0
typedef struct asf_packet_s
{
int i_stream_number;
int i_payload_size;
u8 *p_payload_data;
} asf_packet_t;
#endif
#define ASF_OBJECT_COMMON \
int i_type; \
guid_t i_object_id; \
...
...
@@ -334,14 +315,6 @@ typedef struct asf_object_codec_list_s
}
asf_object_codec_list_t
;
#if 0
typedef struct asf_object_script_command_s
{
ASF_OBJECT_COMMON
} asf_object_script_command_t;
#endif
typedef
struct
asf_marker_s
{
uint64_t
i_offset
;
...
...
@@ -351,7 +324,6 @@ typedef struct asf_marker_s
uint32_t
i_flags
;
uint32_t
i_marker_description_length
;
uint8_t
*
i_marker_description
;
/* u8 padding */
}
asf_marker_t
;
...
...
@@ -366,14 +338,6 @@ typedef struct asf_object_marker_s
}
asf_object_marker_t
;
#if 0
typedef struct asf_object__s
{
ASF_OBJECT_COMMON
} asf_object__t;
#endif
typedef
union
asf_object_u
{
asf_object_common_t
common
;
...
...
@@ -395,8 +359,8 @@ int ASF_SeekAbsolute( input_thread_t *p_input, off_t i_pos);
int
ASF_ReadData
(
input_thread_t
*
p_input
,
uint8_t
*
p_buff
,
int
i_size
);
int
ASF_SkipBytes
(
input_thread_t
*
p_input
,
int
i_count
);
void
GetGUID
(
guid_t
*
p_guid
,
uint8_t
*
p_data
);
int
CmpGUID
(
const
guid_t
*
p_guid1
,
const
guid_t
*
p_guid2
);
void
ASF_
GetGUID
(
guid_t
*
p_guid
,
uint8_t
*
p_data
);
int
ASF_
CmpGUID
(
const
guid_t
*
p_guid1
,
const
guid_t
*
p_guid2
);
int
ASF_ReadObjectCommon
(
input_thread_t
*
p_input
,
asf_object_t
*
p_obj
);
...
...
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