Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
186e68fd
Commit
186e68fd
authored
Aug 17, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: moved Get(D/Q)WLE and Get(D/Q)WBE to include/vlc_common.h.
(Well, Get(D/Q)WBE are just #define to U16/32/64_AT.
parent
c8b4bd8b
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
60 additions
and
258 deletions
+60
-258
include/vlc_common.h
include/vlc_common.h
+27
-1
modules/access/mms/mms.h
modules/access/mms/mms.h
+1
-12
modules/access/mms/mmsh.c
modules/access/mms/mmsh.c
+3
-2
modules/access/mms/mmsh.h
modules/access/mms/mmsh.h
+2
-2
modules/access/v4l/v4l.c
modules/access/v4l/v4l.c
+1
-11
modules/codec/adpcm.c
modules/codec/adpcm.c
+1
-7
modules/codec/araw.c
modules/codec/araw.c
+1
-8
modules/codec/cinepak/cinepak.c
modules/codec/cinepak/cinepak.c
+1
-12
modules/codec/faad/decoder.c
modules/codec/faad/decoder.c
+1
-8
modules/codec/ffmpeg/ffmpeg.h
modules/codec/ffmpeg/ffmpeg.h
+1
-8
modules/codec/quicktime.c
modules/codec/quicktime.c
+1
-13
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+1
-11
modules/demux/asf/libasf.c
modules/demux/asf/libasf.c
+1
-19
modules/demux/au.c
modules/demux/au.c
+1
-7
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+1
-21
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+1
-21
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+1
-12
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+1
-31
modules/demux/mpeg/mpga.c
modules/demux/mpeg/mpga.c
+1
-7
modules/demux/ogg.c
modules/demux/ogg.c
+10
-26
modules/demux/rawdv.c
modules/demux/rawdv.c
+1
-7
modules/demux/wav.c
modules/demux/wav.c
+1
-12
No files found.
include/vlc_common.h
View file @
186e68fd
...
...
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.7
3 2003/08/14 20:02:55 zorglub
Exp $
* $Id: vlc_common.h,v 1.7
4 2003/08/17 23:02:51 fenrir
Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -457,6 +457,32 @@ static inline uint64_t U64_AT( void * _p )
|
((
uint64_t
)
p
[
4
]
<<
24
)
|
((
uint64_t
)
p
[
5
]
<<
16
)
|
((
uint64_t
)
p
[
6
]
<<
8
)
|
p
[
7
]
);
}
static
inline
uint16_t
GetWLE
(
void
*
_p
)
{
uint8_t
*
p
=
(
uint8_t
*
)
_p
;
return
(
((
uint16_t
)
p
[
1
]
<<
8
)
|
p
[
0
]
);
}
static
inline
uint32_t
GetDWLE
(
void
*
_p
)
{
uint8_t
*
p
=
(
uint8_t
*
)
_p
;
return
(
((
uint32_t
)
p
[
3
]
<<
24
)
|
((
uint32_t
)
p
[
2
]
<<
16
)
|
((
uint32_t
)
p
[
1
]
<<
8
)
|
p
[
0
]
);
}
static
inline
uint64_t
GetQWLE
(
void
*
_p
)
{
uint8_t
*
p
=
(
uint8_t
*
)
_p
;
return
(
((
uint64_t
)
p
[
7
]
<<
56
)
|
((
uint64_t
)
p
[
6
]
<<
48
)
|
((
uint64_t
)
p
[
5
]
<<
40
)
|
((
uint64_t
)
p
[
4
]
<<
32
)
|
((
uint64_t
)
p
[
3
]
<<
24
)
|
((
uint64_t
)
p
[
2
]
<<
16
)
|
((
uint64_t
)
p
[
1
]
<<
8
)
|
p
[
0
]
);
}
#define GetWBE( p ) U16_AT( p )
#define GetDWBE( p ) U32_AT( p )
#define GetQWBE( p ) U64_AT( p )
#if WORDS_BIGENDIAN
# define hton16(i) ( i )
# define hton32(i) ( i )
...
...
modules/access/mms/mms.h
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* mms.h: MMS access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mms.h,v 1.
9 2003/04/20 19:29:43
fenrir Exp $
* $Id: mms.h,v 1.
10 2003/08/17 23:02:51
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -35,17 +35,6 @@ void E_( MMSTUClose ) ( input_thread_t * );
int
E_
(
MMSHOpen
)
(
input_thread_t
*
);
void
E_
(
MMSHClose
)
(
input_thread_t
*
);
static
inline
uint16_t
GetWLE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
])
+
(
p_buff
[
1
]
<<
8
)
);
}
static
inline
uint32_t
GetDWLE
(
uint8_t
*
p_buff
)
{
return
(
p_buff
[
0
]
+
(
p_buff
[
1
]
<<
8
)
+
(
p_buff
[
2
]
<<
16
)
+
(
p_buff
[
3
]
<<
24
)
);
}
#define FREE( p ) if( p ) { free( p ); (p) = NULL; }
/* url: [/]host[:port][/path][@username[:password]] */
...
...
modules/access/mms/mmsh.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* mmsh.c:
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mmsh.c,v 1.
4 2003/07/31 23:44:49
fenrir Exp $
* $Id: mmsh.c,v 1.
5 2003/08/17 23:02:51
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -974,6 +974,7 @@ static http_field_t *http_field_find( http_field_t *p_field, char *psz_name )
return
NULL
;
}
#if 0
static char *http_field_get_value( http_answer_t *ans, char *psz_name )
{
http_field_t *p_field = ans->p_fields;
...
...
@@ -990,7 +991,7 @@ static char *http_field_get_value( http_answer_t *ans, char *psz_name )
return NULL;
}
#endif
static
int
chunk_parse
(
chunk_t
*
ck
,
uint8_t
*
p_data
,
int
i_data
)
...
...
modules/access/mms/mmsh.h
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* mmsh.h:
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mmsh.h,v 1.
2 2003/05/06 02:01:35
fenrir Exp $
* $Id: mmsh.h,v 1.
3 2003/08/17 23:02:51
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -100,7 +100,7 @@ typedef struct
static
http_answer_t
*
http_answer_parse
(
uint8_t
*
,
int
);
static
void
http_answer_free
(
http_answer_t
*
);
static
char
*
http_field_get_value
(
http_answer_t
*
,
char
*
);
/* static char *http_field_get_value ( http_answer_t *, char * ); */
static
http_field_t
*
http_field_find
(
http_field_t
*
,
char
*
);
static
int
mmsh_start
(
input_thread_t
*
,
access_sys_t
*
,
off_t
);
...
...
modules/access/v4l/v4l.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* v4l.c : Video4Linux input module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: v4l.c,v 1.
19 2003/07/24 22:05:16 sam
Exp $
* $Id: v4l.c,v 1.
20 2003/08/17 23:02:51 fenrir
Exp $
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
* Paul Forgey <paulf at aphrodite dot com>
...
...
@@ -197,16 +197,6 @@ static void SetQWBE( uint8_t *p, uint64_t qw )
SetDWBE
(
&
p
[
4
],
qw
&
0xffffffff
);
}
static
uint32_t
GetDWBE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
]
<<
24
)
+
(
p_buff
[
1
]
<<
16
)
+
(
p_buff
[
2
]
<<
8
)
+
p_buff
[
3
]
);
}
static
uint64_t
GetQWBE
(
uint8_t
*
p
)
{
return
(
(
(
uint64_t
)
GetDWBE
(
p
)
<<
32
)
|
(
uint64_t
)
GetDWBE
(
&
p
[
4
]
)
);
}
/*****************************************************************************
* Open: open device:
*****************************************************************************
...
...
modules/codec/adpcm.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* adpcm.c : adpcm variant audio decoder
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: adpcm.c,v 1.1
1 2003/05/22 20:56:07 hartman
Exp $
* $Id: adpcm.c,v 1.1
2 2003/08/17 23:02:51 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -216,12 +216,6 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
#define FREE( p ) if( p ) free( p ); p = NULL
#define GetWLE( p ) \
( *(uint8_t*)(p) + ( *((uint8_t*)(p)+1) << 8 ) )
#define GetDWLE( p ) \
( *(uint8_t*)(p) + ( *((uint8_t*)(p)+1) << 8 ) + \
( *((uint8_t*)(p)+2) << 16 ) + ( *((uint8_t*)(p)+3) << 24 ) )
/*****************************************************************************
* InitThread: initialize data before entering main loop
...
...
modules/codec/araw.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* araw.c: Pseudo audio decoder; for raw pcm data
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: araw.c,v 1.1
5 2003/05/17 20:30:31 gbazin
Exp $
* $Id: araw.c,v 1.1
6 2003/08/17 23:02:51 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -228,13 +228,6 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
#define FREE( p ) if( p ) free( p ); p = NULL
#define GetWLE( p ) \
( *(u8*)(p) + ( *((u8*)(p)+1) << 8 ) )
#define GetDWLE( p ) \
( *(u8*)(p) + ( *((u8*)(p)+1) << 8 ) + \
( *((u8*)(p)+2) << 16 ) + ( *((u8*)(p)+3) << 24 ) )
/*****************************************************************************
* InitThread: initialize data before entering main loop
...
...
modules/codec/cinepak/cinepak.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* cinepak.c: cinepak video decoder
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: cinepak.c,v 1.1
0 2003/02/27 13:19:44 gbazin
Exp $
* $Id: cinepak.c,v 1.1
1 2003/08/17 23:02:51 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -132,17 +132,6 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
* locales Functions
*****************************************************************************/
static
inline
u16
GetWBE
(
u8
*
p_buff
)
{
return
(
(
p_buff
[
0
]
<<
8
)
+
p_buff
[
1
]
);
}
static
inline
u32
GetDWBE
(
u8
*
p_buff
)
{
return
(
(
p_buff
[
0
]
<<
24
)
+
(
p_buff
[
1
]
<<
16
)
+
(
p_buff
[
2
]
<<
8
)
+
p_buff
[
3
]
);
}
#define GET2BYTES( p ) \
GetWBE( p ); p+= 2;
/* FIXME */
...
...
modules/codec/faad/decoder.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* decoder.c: AAC decoder using libfaad2
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: decoder.c,v 1.2
5 2003/06/22 08:49:1
1 fenrir Exp $
* $Id: decoder.c,v 1.2
6 2003/08/17 23:02:5
1 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -134,13 +134,6 @@ static unsigned int pi_channels_maps[7] =
};
#define FREE( p ) if( p != NULL ) free( p ); p = NULL
#define GetWLE( p ) \
( *(uint8_t*)(p) + ( *((uint8_t*)(p)+1) << 8 ) )
#define GetDWLE( p ) \
( *(uint8_t*)(p) + ( *((uint8_t*)(p)+1) << 8 ) + \
( *((uint8_t*)(p)+2) << 16 ) + ( *((uint8_t*)(p)+3) << 24 ) )
static
void
GetPESData
(
uint8_t
*
p_buf
,
int
i_max
,
pes_packet_t
*
p_pes
)
{
...
...
modules/codec/ffmpeg/ffmpeg.h
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* ffmpeg_vdec.h: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ffmpeg.h,v 1.2
3 2003/08/15 13:16:38
fenrir Exp $
* $Id: ffmpeg.h,v 1.2
4 2003/08/17 23:02:52
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -55,13 +55,6 @@ typedef struct generic_thread_s
# undef LIBAVCODEC_PP
#endif
#define GetWLE( p ) \
( *(u8*)(p) + ( *((u8*)(p)+1) << 8 ) )
#define GetDWLE( p ) \
( *(u8*)(p) + ( *((u8*)(p)+1) << 8 ) + \
( *((u8*)(p)+2) << 16 ) + ( *((u8*)(p)+3) << 24 ) )
#define FREE( p ) if( p ) free( p ); p = NULL
int
E_
(
GetPESData
)(
u8
*
p_buf
,
int
i_max
,
pes_packet_t
*
p_pes
);
...
...
modules/codec/quicktime.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* quicktime.c: a quicktime decoder that uses the QT library/dll
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: quicktime.c,v 1.1
0 2003/08/01 20:06:43 gbazin
Exp $
* $Id: quicktime.c,v 1.1
1 2003/08/17 23:02:51 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir at via.ecp.fr>
* Derk-Jan Hartman <thedj at users.sf.net>
...
...
@@ -231,18 +231,6 @@ static int pi_channels_maps[6] =
};
static
uint16_t
GetWBE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
]
<<
8
)
+
p_buff
[
1
]
);
}
static
uint32_t
GetDWBE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
]
<<
24
)
+
(
p_buff
[
1
]
<<
16
)
+
(
p_buff
[
2
]
<<
8
)
+
p_buff
[
3
]
);
}
static
int
GetPESData
(
uint8_t
*
p_buf
,
int
i_max
,
pes_packet_t
*
p_pes
)
{
int
i_copy
;
...
...
modules/demux/asf/asf.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* asf.c : ASFv01 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: asf.c,v 1.3
0 2003/08/01 00:16:37
fenrir Exp $
* $Id: asf.c,v 1.3
1 2003/08/17 23:02:52
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -51,16 +51,6 @@ vlc_module_begin();
add_shortcut
(
"asf"
);
vlc_module_end
();
static
uint16_t
GetWLE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
])
+
(
p_buff
[
1
]
<<
8
)
);
}
static
uint32_t
GetDWLE
(
uint8_t
*
p_buff
)
{
return
(
p_buff
[
0
]
+
(
p_buff
[
1
]
<<
8
)
+
(
p_buff
[
2
]
<<
16
)
+
(
p_buff
[
3
]
<<
24
)
);
}
/*****************************************************************************
* Activate: check file and initializes ASF structures
*****************************************************************************/
...
...
modules/demux/asf/libasf.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* libasf.c :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libasf.c,v 1.1
2 2003/03/14 00:24:08 sigmunau
Exp $
* $Id: libasf.c,v 1.1
3 2003/08/17 23:02:52 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -43,24 +43,6 @@
(guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3], \
(guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
/* Some functions to manipulate memory */
static
uint16_t
GetWLE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
])
+
(
p_buff
[
1
]
<<
8
)
);
}
static
uint32_t
GetDWLE
(
uint8_t
*
p_buff
)
{
return
(
p_buff
[
0
]
+
(
p_buff
[
1
]
<<
8
)
+
(
p_buff
[
2
]
<<
16
)
+
(
p_buff
[
3
]
<<
24
)
);
}
static
uint64_t
GetQWLE
(
uint8_t
*
p_buff
)
{
return
(
(
(
uint64_t
)
GetDWLE
(
p_buff
)
)
|
(
(
uint64_t
)
GetDWLE
(
p_buff
+
4
)
<<
32
)
);
}
void
GetGUID
(
guid_t
*
p_guid
,
uint8_t
*
p_data
)
{
p_guid
->
v1
=
GetDWLE
(
p_data
);
...
...
modules/demux/au.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* au.c : au file input module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: au.c,v 1.
3 2003/08/01 00:05:57
fenrir Exp $
* $Id: au.c,v 1.
4 2003/08/17 23:02:52
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -55,12 +55,6 @@ vlc_module_end();
static
int
DemuxPCM
(
input_thread_t
*
);
/* TODO static int DemuxADPCM ( input_thread_t * ); */
#define GetDWBE( p ) __GetDWBE( (uint8_t*)(p) )
static
inline
uint32_t
__GetDWBE
(
uint8_t
*
p
)
{
return
(
(
p
[
0
]
<<
24
)
+
(
p
[
1
]
<<
16
)
+
(
p
[
2
]
<<
8
)
+
p
[
3
]
);
}
enum
AuType_e
{
AU_UNKNOWN
=
0
,
...
...
modules/demux/avi/avi.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.5
3 2003/07/20 12:34:36 sigmunau
Exp $
* $Id: avi.c,v 1.5
4 2003/08/17 23:02:52 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -70,26 +70,6 @@ vlc_module_begin();
set_callbacks
(
AVIInit
,
__AVIEnd
);
vlc_module_end
();
/*****************************************************************************
* Some useful functions to manipulate memory
*****************************************************************************/
static
uint16_t
GetWLE
(
uint8_t
*
p_buff
)
{
return
(
uint16_t
)
p_buff
[
0
]
|
(
((
uint16_t
)
p_buff
[
1
])
<<
8
);
}
static
uint32_t
GetDWLE
(
uint8_t
*
p_buff
)
{
return
(
uint32_t
)
p_buff
[
0
]
|
(
((
uint32_t
)
p_buff
[
1
])
<<
8
)
|
(
((
uint32_t
)
p_buff
[
2
])
<<
16
)
|
(
((
uint32_t
)
p_buff
[
3
])
<<
24
);
}
static
uint32_t
GetDWBE
(
uint8_t
*
p_buff
)
{
return
(
uint32_t
)
p_buff
[
3
]
|
(
((
uint32_t
)
p_buff
[
2
])
<<
8
)
|
(
((
uint32_t
)
p_buff
[
1
])
<<
16
)
|
(
((
uint32_t
)
p_buff
[
0
])
<<
24
);
}
static
vlc_fourcc_t
GetFOURCC
(
byte_t
*
p_buff
)
{
return
VLC_FOURCC
(
p_buff
[
0
],
p_buff
[
1
],
p_buff
[
2
],
p_buff
[
3
]
);
...
...
modules/demux/avi/libavi.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* libavi.c :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libavi.c,v 1.2
1 2003/08/01 00:05:07 gbazin
Exp $
* $Id: libavi.c,v 1.2
2 2003/08/17 23:02:52 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -37,26 +37,6 @@
#define __EVEN( x ) ( (x)&0x01 ? (x)+1 : (x) )
/* Some functions to manipulate memory */
static
uint16_t
GetWLE
(
uint8_t
*
p_buff
)
{
return
(
uint16_t
)
p_buff
[
0
]
|
(
((
uint16_t
)
p_buff
[
1
])
<<
8
);
}
static
uint32_t
GetDWLE
(
uint8_t
*
p_buff
)
{
return
(
uint32_t
)
p_buff
[
0
]
|
(
((
uint32_t
)
p_buff
[
1
])
<<
8
)
|
(
((
uint32_t
)
p_buff
[
2
])
<<
16
)
|
(
((
uint32_t
)
p_buff
[
3
])
<<
24
);
}
static
uint64_t
GetQWLE
(
uint8_t
*
p
)
{
return
(
uint64_t
)
p
[
0
]
|
(
((
uint64_t
)
p
[
1
])
<<
8
)
|
(
((
uint64_t
)
p
[
2
])
<<
16
)
|
(
((
uint64_t
)
p
[
3
])
<<
24
)
|
(
((
uint64_t
)
p
[
4
])
<<
32
)
|
(
((
uint64_t
)
p
[
5
])
<<
40
)
|
(
((
uint64_t
)
p
[
6
])
<<
48
)
|
(
((
uint64_t
)
p
[
7
])
<<
56
);
}
static
vlc_fourcc_t
GetFOURCC
(
byte_t
*
p_buff
)
{
return
VLC_FOURCC
(
p_buff
[
0
],
p_buff
[
1
],
p_buff
[
2
],
p_buff
[
3
]
);
...
...
modules/demux/mkv.cpp
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* mkv.cpp : matroska demuxer
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mkv.cpp,v 1.2
0 2003/08/12 08:19:20 sam
Exp $
* $Id: mkv.cpp,v 1.2
1 2003/08/17 23:02:52 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -158,18 +158,7 @@ class EbmlParser
/*****************************************************************************
* Some functions to manipulate memory
*****************************************************************************/
#define GetWLE( p ) __GetWLE( (uint8_t*)p )
#define GetDWLE( p ) __GetDWLE( (uint8_t*)p )
#define GetFOURCC( p ) __GetFOURCC( (uint8_t*)p )
static
uint16_t
__GetWLE
(
uint8_t
*
p
)
{
return
(
uint16_t
)
p
[
0
]
|
(
((
uint16_t
)
p
[
1
])
<<
8
);
}
static
uint32_t
__GetDWLE
(
uint8_t
*
p
)
{
return
(
uint32_t
)
p
[
0
]
|
(
((
uint32_t
)
p
[
1
])
<<
8
)
|
(
((
uint32_t
)
p
[
2
])
<<
16
)
|
(
((
uint32_t
)
p
[
3
])
<<
24
);
}
static
vlc_fourcc_t
__GetFOURCC
(
uint8_t
*
p
)
{
return
VLC_FOURCC
(
p
[
0
],
p
[
1
],
p
[
2
],
p
[
3
]
);
...
...
modules/demux/mp4/libmp4.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* libmp4.c : LibMP4 library for mp4 module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libmp4.c,v 1.3
0 2003/08/17 20:45:50
fenrir Exp $
* $Id: libmp4.c,v 1.3
1 2003/08/17 23:02:52
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -122,41 +122,11 @@
*/
/* Some functions to manipulate memory */
static
uint16_t
GetWLE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
])
+
(
p_buff
[
1
]
<<
8
)
);
}
static
uint32_t
GetDWLE
(
uint8_t
*
p_buff
)
{
return
(
p_buff
[
0
]
+
(
p_buff
[
1
]
<<
8
)
+
(
p_buff
[
2
]
<<
16
)
+
(
p_buff
[
3
]
<<
24
)
);
}
static
uint16_t
GetWBE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
]
<<
8
)
+
p_buff
[
1
]
);
}
static
uint32_t
Get24bBE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
]
<<
16
)
+
(
p_buff
[
1
]
<<
8
)
+
p_buff
[
2
]
);
}
static
uint32_t
GetDWBE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
]
<<
24
)
+
(
p_buff
[
1
]
<<
16
)
+
(
p_buff
[
2
]
<<
8
)
+
p_buff
[
3
]
);
}
static
uint64_t
GetQWBE
(
uint8_t
*
p_buff
)
{
return
(
(
(
uint64_t
)
GetDWBE
(
p_buff
)
<<
32
)
|
(
(
uint64_t
)
GetDWBE
(
p_buff
+
4
)
)
);
}
static
void
GetUUID
(
UUID_t
*
p_uuid
,
uint8_t
*
p_buff
)
{
memcpy
(
p_uuid
,
...
...
modules/demux/mpeg/mpga.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* mpga.c : MPEG-I/II Audio input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mpga.c,v 1.
1 2003/08/01 00:37:06
fenrir Exp $
* $Id: mpga.c,v 1.
2 2003/08/17 23:02:52
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -64,12 +64,6 @@ struct demux_sys_t
es_descriptor_t
*
p_es
;
};
static
inline
uint32_t
GetDWBE
(
uint8_t
*
p
)
{
return
(
(
p
[
0
]
<<
24
)
|
(
p
[
1
]
<<
16
)
|
(
p
[
2
]
<<
8
)
|
(
p
[
3
]
)
);
}
static
int
HeaderCheck
(
uint32_t
h
)
{
if
(
(((
h
>>
20
)
&
0x0FFF
)
!=
0x0FFF
)
/* header sync */
...
...
modules/demux/ogg.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* ogg.c : ogg stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ogg.c,v 1.3
0 2003/08/09 19:49:13 gbazin
Exp $
* $Id: ogg.c,v 1.3
1 2003/08/17 23:02:52 fenrir
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -145,22 +145,6 @@ typedef struct stream_header
#define PACKET_LEN_BITS2 0x02
#define PACKET_IS_SYNCPOINT 0x08
/* Some functions to manipulate memory */
static
uint16_t
GetWLE
(
uint8_t
*
p_buff
)
{
return
(
(
p_buff
[
0
])
+
(
p_buff
[
1
]
<<
8
)
);
}
static
uint32_t
GetDWLE
(
uint8_t
*
p_buff
)
{
return
(
p_buff
[
0
]
+
(
p_buff
[
1
]
<<
8
)
+
(
p_buff
[
2
]
<<
16
)
+
(
p_buff
[
3
]
<<
24
)
);
}
static
uint64_t
GetQWLE
(
uint8_t
*
p_buff
)
{
return
(
GetDWLE
(
p_buff
)
+
(
((
uint64_t
)
GetDWLE
(
p_buff
+
4
))
<<
32
)
);
}
/*****************************************************************************
* Local prototypes
*****************************************************************************/
...
...
@@ -883,13 +867,13 @@ static int Ogg_FindLogicalStreams( input_thread_t *p_input, demux_sys_t *p_ogg)
(
char
*
)
&
p_stream
->
i_fourcc
);
p_stream
->
f_rate
=
10000000
.
0
/
GetQWLE
(
(
uint8_t
*
)
&
st
->
time_unit
);
GetQWLE
(
&
st
->
time_unit
);
p_stream
->
p_bih
->
biBitCount
=
GetWLE
(
(
uint8_t
*
)
&
st
->
bits_per_sample
);
GetWLE
(
&
st
->
bits_per_sample
);
p_stream
->
p_bih
->
biWidth
=
GetDWLE
(
(
uint8_t
*
)
&
st
->
sh
.
video
.
width
);
GetDWLE
(
&
st
->
sh
.
video
.
width
);
p_stream
->
p_bih
->
biHeight
=
GetDWLE
(
(
uint8_t
*
)
&
st
->
sh
.
video
.
height
);
GetDWLE
(
&
st
->
sh
.
video
.
height
);
p_stream
->
p_bih
->
biPlanes
=
1
;
p_stream
->
p_bih
->
biSizeImage
=
(
p_stream
->
p_bih
->
biBitCount
>>
3
)
*
...
...
@@ -945,16 +929,16 @@ static int Ogg_FindLogicalStreams( input_thread_t *p_input, demux_sys_t *p_ogg)
p_buffer
[
4
]
=
'\0'
;
p_stream
->
p_wf
->
wFormatTag
=
strtol
(
p_buffer
,
NULL
,
16
);
p_stream
->
p_wf
->
nChannels
=
GetWLE
(
(
uint8_t
*
)
&
st
->
sh
.
audio
.
channels
);
GetWLE
(
&
st
->
sh
.
audio
.
channels
);
p_stream
->
f_rate
=
p_stream
->
p_wf
->
nSamplesPerSec
=
GetQWLE
(
(
uint8_t
*
)
&
st
->
samples_per_unit
);
GetQWLE
(
&
st
->
samples_per_unit
);
p_stream
->
i_bitrate
=
p_stream
->
p_wf
->
nAvgBytesPerSec
=
GetDWLE
(
(
uint8_t
*
)
&
st
->
sh
.
audio
.
avgbytespersec
);
GetDWLE
(
&
st
->
sh
.
audio
.
avgbytespersec
);
p_stream
->
i_bitrate
*=
8
;
p_stream
->
p_wf
->
nBlockAlign
=
GetWLE
(
(
uint8_t
*
)
&
st
->
sh
.
audio
.
blockalign
);
GetWLE
(
&
st
->
sh
.
audio
.
blockalign
);
p_stream
->
p_wf
->
wBitsPerSample
=
GetWLE
(
(
uint8_t
*
)
&
st
->
bits_per_sample
);
GetWLE
(
&
st
->
bits_per_sample
);
p_stream
->
p_wf
->
cbSize
=
0
;
switch
(
p_stream
->
p_wf
->
wFormatTag
)
...
...
modules/demux/rawdv.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* rawdv.c : raw dv input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: rawdv.c,v 1.
8 2003/05/05 22:23:34 gbazin
Exp $
* $Id: rawdv.c,v 1.
9 2003/08/17 23:02:52 fenrir
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -102,12 +102,6 @@ static int Activate ( vlc_object_t * );
static
void
Deactivate
(
vlc_object_t
*
);
static
int
Demux
(
input_thread_t
*
);
static
uint32_t
GetDWBE
(
uint8_t
*
p_buff
)
{
return
(
uint32_t
)
p_buff
[
3
]
|
(
((
uint32_t
)
p_buff
[
2
])
<<
8
)
|
(
((
uint32_t
)
p_buff
[
1
])
<<
16
)
|
(
((
uint32_t
)
p_buff
[
0
])
<<
24
);
}
/*****************************************************************************
* Module descriptor
*****************************************************************************/
...
...
modules/demux/wav.c
View file @
186e68fd
...
...
@@ -2,7 +2,7 @@
* wav.c : wav file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: wav.c,v 1.
2 2003/08/01 00:40:05
fenrir Exp $
* $Id: wav.c,v 1.
3 2003/08/17 23:02:52
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -72,17 +72,6 @@ struct demux_sys_t
*****************************************************************************/
#define __EVEN( x ) ( ( (x)%2 != 0 ) ? ((x)+1) : (x) )
#define GetWLE( p ) __GetWLE( (uint8_t*)(p) )
static
inline
uint32_t
__GetWLE
(
uint8_t
*
p
)
{
return
(
p
[
0
]
+
(
p
[
1
]
<<
8
)
);
}
#define GetDWLE( p ) __GetDWLE( (uint8_t*)(p) )
static
inline
uint32_t
__GetDWLE
(
uint8_t
*
p
)
{
return
(
p
[
0
]
+
(
p
[
1
]
<<
8
)
+
(
p
[
2
]
<<
16
)
+
(
p
[
3
]
<<
24
)
);
}
static
int
ChunkFind
(
input_thread_t
*
,
char
*
,
unsigned
int
*
);
static
void
FrameInfo_IMA_ADPCM
(
input_thread_t
*
,
unsigned
int
*
,
mtime_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