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
63227deb
Commit
63227deb
authored
Aug 25, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ugly function casts in combined audio decoder/packetizer modules
parent
0dfcbe01
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
38 deletions
+25
-38
modules/codec/a52.c
modules/codec/a52.c
+4
-6
modules/codec/dts.c
modules/codec/dts.c
+4
-6
modules/codec/lpcm.c
modules/codec/lpcm.c
+4
-6
modules/codec/mpeg_audio.c
modules/codec/mpeg_audio.c
+4
-6
modules/codec/speex.c
modules/codec/speex.c
+5
-8
modules/codec/vorbis.c
modules/codec/vorbis.c
+4
-6
No files found.
modules/codec/a52.c
View file @
63227deb
...
...
@@ -98,7 +98,7 @@ enum {
/****************************************************************************
* Local prototypes
****************************************************************************/
static
void
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
block_t
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
uint8_t
*
GetOutBuffer
(
decoder_t
*
,
block_t
**
);
static
aout_buffer_t
*
GetAoutBuffer
(
decoder_t
*
);
...
...
@@ -150,11 +150,9 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
/* Set callback */
if
(
b_packetizer
)
p_dec
->
pf_packetize
=
(
block_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_packetize
=
DecodeBlock
;
else
p_dec
->
pf_decode_audio
=
(
aout_buffer_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_decode_audio
=
DecodeBlock
;
return
VLC_SUCCESS
;
}
...
...
@@ -176,7 +174,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
****************************************************************************
* This function is called just after the thread is launched.
****************************************************************************/
static
void
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
block_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
uint8_t
p_header
[
VLC_A52_HEADER_SIZE
];
...
...
modules/codec/dts.c
View file @
63227deb
...
...
@@ -105,7 +105,7 @@ enum {
* Local prototypes
****************************************************************************/
static
int
OpenCommon
(
vlc_object_t
*
,
bool
b_packetizer
);
static
void
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
block_t
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
inline
int
SyncCode
(
const
uint8_t
*
);
static
int
SyncInfo
(
const
uint8_t
*
,
bool
*
,
unsigned
int
*
,
unsigned
int
*
,
...
...
@@ -165,10 +165,8 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
p_dec
->
fmt_out
.
audio
.
i_rate
=
0
;
/* So end_date gets initialized */
/* Set callback */
p_dec
->
pf_decode_audio
=
(
aout_buffer_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_packetize
=
(
block_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_decode_audio
=
DecodeBlock
;
p_dec
->
pf_packetize
=
DecodeBlock
;
return
VLC_SUCCESS
;
}
...
...
@@ -176,7 +174,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
/****************************************************************************
* DecodeBlock: the whole thing
****************************************************************************/
static
void
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
block_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
uint8_t
p_header
[
DTS_HEADER_SIZE
];
...
...
modules/codec/lpcm.c
View file @
63227deb
...
...
@@ -162,7 +162,7 @@ typedef struct
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
void
*
DecodeFrame
(
decoder_t
*
,
block_t
**
);
static
block_t
*
DecodeFrame
(
decoder_t
*
,
block_t
**
);
/* */
static
int
VobHeader
(
unsigned
*
pi_rate
,
...
...
@@ -266,10 +266,8 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
}
/* Set callback */
p_dec
->
pf_decode_audio
=
(
aout_buffer_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeFrame
;
p_dec
->
pf_packetize
=
(
block_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeFrame
;
p_dec
->
pf_decode_audio
=
DecodeFrame
;
p_dec
->
pf_packetize
=
DecodeFrame
;
return
VLC_SUCCESS
;
}
...
...
@@ -287,7 +285,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
****************************************************************************
* Beware, this function must be fed with complete frames (PES packet).
*****************************************************************************/
static
void
*
DecodeFrame
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
block_t
*
DecodeFrame
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
block_t
*
p_block
;
...
...
modules/codec/mpeg_audio.c
View file @
63227deb
...
...
@@ -95,7 +95,7 @@ enum {
static
int
OpenDecoder
(
vlc_object_t
*
);
static
int
OpenPacketizer
(
vlc_object_t
*
);
static
void
CloseDecoder
(
vlc_object_t
*
);
static
void
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
block_t
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
uint8_t
*
GetOutBuffer
(
decoder_t
*
,
block_t
**
);
static
aout_buffer_t
*
GetAoutBuffer
(
decoder_t
*
);
...
...
@@ -160,10 +160,8 @@ static int Open( vlc_object_t *p_this )
p_dec
->
fmt_out
.
audio
.
i_rate
=
0
;
/* So end_date gets initialized */
/* Set callback */
p_dec
->
pf_decode_audio
=
(
aout_buffer_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_packetize
=
(
block_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_decode_audio
=
DecodeBlock
;
p_dec
->
pf_packetize
=
DecodeBlock
;
/* Start with the minimum size for a free bitrate frame */
p_sys
->
i_free_frame_size
=
MPGA_HEADER_SIZE
;
...
...
@@ -196,7 +194,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
****************************************************************************
* This function is called just after the thread is launched.
****************************************************************************/
static
void
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
block_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
uint8_t
p_header
[
MAD_BUFFER_GUARD
];
...
...
modules/codec/speex.c
View file @
63227deb
...
...
@@ -185,7 +185,7 @@ static const int pi_channels_maps[6] =
* Local prototypes
****************************************************************************/
static
void
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
block_t
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
aout_buffer_t
*
DecodeRtpSpeexPacket
(
decoder_t
*
,
block_t
**
);
static
int
ProcessHeaders
(
decoder_t
*
);
static
int
ProcessInitialHeader
(
decoder_t
*
,
ogg_packet
*
);
...
...
@@ -233,16 +233,13 @@ static int OpenDecoder( vlc_object_t *p_this )
{
msg_Dbg
(
p_dec
,
"Using RTP version of Speex decoder @ rate %d."
,
p_dec
->
fmt_in
.
audio
.
i_rate
);
p_dec
->
pf_decode_audio
=
(
aout_buffer_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeRtpSpeexPacket
;
p_dec
->
pf_decode_audio
=
DecodeRtpSpeexPacket
;
}
else
{
p_dec
->
pf_decode_audio
=
(
aout_buffer_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_decode_audio
=
DecodeBlock
;
}
p_dec
->
pf_packetize
=
(
block_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_packetize
=
DecodeBlock
;
p_sys
->
p_state
=
NULL
;
p_sys
->
p_header
=
NULL
;
...
...
@@ -271,7 +268,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
****************************************************************************
* This function must be fed with ogg packets.
****************************************************************************/
static
void
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
block_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
ogg_packet
oggpacket
;
...
...
modules/codec/vorbis.c
View file @
63227deb
...
...
@@ -141,7 +141,7 @@ static const uint32_t pi_3channels_in[] =
static
int
OpenDecoder
(
vlc_object_t
*
);
static
int
OpenPacketizer
(
vlc_object_t
*
);
static
void
CloseDecoder
(
vlc_object_t
*
);
static
void
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
block_t
*
DecodeBlock
(
decoder_t
*
,
block_t
**
);
static
int
ProcessHeaders
(
decoder_t
*
);
static
void
*
ProcessPacket
(
decoder_t
*
,
ogg_packet
*
,
block_t
**
);
...
...
@@ -261,10 +261,8 @@ static int OpenDecoder( vlc_object_t *p_this )
#endif
/* Set callbacks */
p_dec
->
pf_decode_audio
=
(
aout_buffer_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_packetize
=
(
block_t
*
(
*
)(
decoder_t
*
,
block_t
**
))
DecodeBlock
;
p_dec
->
pf_decode_audio
=
DecodeBlock
;
p_dec
->
pf_packetize
=
DecodeBlock
;
return
VLC_SUCCESS
;
}
...
...
@@ -289,7 +287,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
****************************************************************************
* This function must be fed with ogg packets.
****************************************************************************/
static
void
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
block_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
ogg_packet
oggpacket
;
...
...
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