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
c9a16c71
Commit
c9a16c71
authored
Sep 11, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: make decoder callbacks static
parent
c779bd78
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
15 deletions
+14
-15
modules/codec/avcodec/audio.c
modules/codec/avcodec/audio.c
+3
-1
modules/codec/avcodec/avcodec.c
modules/codec/avcodec/avcodec.c
+5
-8
modules/codec/avcodec/avcodec.h
modules/codec/avcodec/avcodec.h
+0
-4
modules/codec/avcodec/subtitle.c
modules/codec/avcodec/subtitle.c
+3
-1
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+3
-1
No files found.
modules/codec/avcodec/audio.c
View file @
c9a16c71
...
...
@@ -69,6 +69,7 @@ struct decoder_sys_t
#define BLOCK_FLAG_PRIVATE_REALLOCATED (1 << BLOCK_FLAG_PRIVATE_SHIFT)
static
void
SetupOutputFormat
(
decoder_t
*
p_dec
,
bool
b_trust
);
static
block_t
*
DecodeAudio
(
decoder_t
*
,
block_t
**
);
static
void
InitDecoderConfig
(
decoder_t
*
p_dec
,
AVCodecContext
*
p_context
)
{
...
...
@@ -286,13 +287,14 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
else
if
(
p_dec
->
fmt_in
.
audio
.
i_rate
)
date_Init
(
&
p_sys
->
end_date
,
p_dec
->
fmt_in
.
audio
.
i_rate
,
1
);
p_dec
->
pf_decode_audio
=
DecodeAudio
;
return
VLC_SUCCESS
;
}
/*****************************************************************************
* DecodeAudio: Called to decode one frame
*****************************************************************************/
block_t
*
DecodeAudio
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
block_t
*
DecodeAudio
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
AVCodecContext
*
ctx
=
p_sys
->
p_context
;
...
...
modules/codec/avcodec/avcodec.c
View file @
c9a16c71
...
...
@@ -299,22 +299,19 @@ static int OpenDecoder( vlc_object_t *p_this )
switch
(
i_cat
)
{
case
VIDEO_ES
:
p_dec
->
pf_decode_video
=
DecodeVideo
;
i_result
=
InitVideoDec
(
p_dec
,
p_context
,
p_codec
,
i_result
=
InitVideoDec
(
p_dec
,
p_context
,
p_codec
,
i_codec_id
,
psz_namecodec
);
break
;
case
AUDIO_ES
:
p_dec
->
pf_decode_audio
=
DecodeAudio
;
i_result
=
InitAudioDec
(
p_dec
,
p_context
,
p_codec
,
i_result
=
InitAudioDec
(
p_dec
,
p_context
,
p_codec
,
i_codec_id
,
psz_namecodec
);
break
;
case
SPU_ES
:
p_dec
->
pf_decode_sub
=
DecodeSubtitle
;
i_result
=
InitSubtitleDec
(
p_dec
,
p_context
,
p_codec
,
i_codec_id
,
psz_namecodec
);
break
;
default:
i_result
=
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
if
(
i_result
==
VLC_SUCCESS
)
...
...
modules/codec/avcodec/avcodec.h
View file @
c9a16c71
...
...
@@ -31,10 +31,6 @@ int GetVlcFourcc( unsigned i_ffmpeg_codec, int *pi_cat,
vlc_fourcc_t
*
pi_fourcc
,
const
char
**
ppsz_name
);
vlc_fourcc_t
GetVlcAudioFormat
(
int
i_sample_fmt
);
picture_t
*
DecodeVideo
(
decoder_t
*
,
block_t
**
);
block_t
*
DecodeAudio
(
decoder_t
*
,
block_t
**
);
subpicture_t
*
DecodeSubtitle
(
decoder_t
*
p_dec
,
block_t
**
);
/* Video encoder module */
int
OpenEncoder
(
vlc_object_t
*
);
void
CloseEncoder
(
vlc_object_t
*
);
...
...
modules/codec/avcodec/subtitle.c
View file @
c9a16c71
...
...
@@ -44,6 +44,7 @@ struct decoder_sys_t {
static
subpicture_t
*
ConvertSubtitle
(
decoder_t
*
,
AVSubtitle
*
,
mtime_t
pts
,
AVCodecContext
*
avctx
);
static
subpicture_t
*
DecodeSubtitle
(
decoder_t
*
,
block_t
**
);
/**
* Initialize subtitle decoder
...
...
@@ -110,6 +111,7 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
/* */
msg_Dbg
(
dec
,
"libavcodec codec (%s) started"
,
namecodec
);
dec
->
fmt_out
.
i_cat
=
SPU_ES
;
dec
->
pf_decode_sub
=
DecodeSubtitle
;
return
VLC_SUCCESS
;
}
...
...
@@ -117,7 +119,7 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
/**
* Decode one subtitle
*/
subpicture_t
*
DecodeSubtitle
(
decoder_t
*
dec
,
block_t
**
block_ptr
)
s
tatic
s
ubpicture_t
*
DecodeSubtitle
(
decoder_t
*
dec
,
block_t
**
block_ptr
)
{
decoder_sys_t
*
sys
=
dec
->
p_sys
;
...
...
modules/codec/avcodec/video.c
View file @
c9a16c71
...
...
@@ -106,6 +106,7 @@ static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * );
#endif
static
enum
PixelFormat
ffmpeg_GetFormat
(
AVCodecContext
*
,
const
enum
PixelFormat
*
);
static
picture_t
*
DecodeVideo
(
decoder_t
*
,
block_t
**
);
static
uint32_t
ffmpeg_CodecTag
(
vlc_fourcc_t
fcc
)
{
...
...
@@ -459,13 +460,14 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
return
VLC_EGENERIC
;
}
p_dec
->
pf_decode_video
=
DecodeVideo
;
return
VLC_SUCCESS
;
}
/*****************************************************************************
* DecodeVideo: Called to decode one or more frames
*****************************************************************************/
picture_t
*
DecodeVideo
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
picture_t
*
DecodeVideo
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
AVCodecContext
*
p_context
=
p_sys
->
p_context
;
...
...
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