Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GSoC2018
ePirat
vlc
Commits
0df4762f
Commit
0df4762f
authored
May 16, 2018
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dec: move all callbacks handling in vlc_codec.h
parent
3a8ae5e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
47 deletions
+34
-47
include/vlc_codec.h
include/vlc_codec.h
+34
-4
src/input/decoder.c
src/input/decoder.c
+0
-39
src/libvlccore.sym
src/libvlccore.sym
+0
-4
No files found.
include/vlc_codec.h
View file @
0df4762f
...
...
@@ -385,27 +385,57 @@ VLC_API block_t * decoder_NewAudioBuffer( decoder_t *, int i_nb_samples ) VLC_US
* buffer. You have to release it using subpicture_Delete() or by returning
* it to the caller as a decoder_QueueSub parameter.
*/
VLC_API
subpicture_t
*
decoder_NewSubpicture
(
decoder_t
*
,
const
subpicture_updater_t
*
)
VLC_USED
;
VLC_USED
static
inline
subpicture_t
*
decoder_NewSubpicture
(
decoder_t
*
dec
,
const
subpicture_updater_t
*
p_dyn
)
{
subpicture_t
*
p_subpicture
=
dec
->
pf_spu_buffer_new
(
dec
,
p_dyn
);
if
(
!
p_subpicture
)
msg_Warn
(
dec
,
"can't get output subpicture"
);
return
p_subpicture
;
}
/**
* This function gives all input attachments at once.
*
* You MUST release the returned values
*/
VLC_API
int
decoder_GetInputAttachments
(
decoder_t
*
,
input_attachment_t
***
ppp_attachment
,
int
*
pi_attachment
);
static
inline
int
decoder_GetInputAttachments
(
decoder_t
*
dec
,
input_attachment_t
***
ppp_attachment
,
int
*
pi_attachment
)
{
if
(
!
dec
->
pf_get_attachments
)
return
VLC_EGENERIC
;
return
dec
->
pf_get_attachments
(
dec
,
ppp_attachment
,
pi_attachment
);
}
/**
* This function converts a decoder timestamp into a display date comparable
* to mdate().
* You MUST use it *only* for gathering statistics about speed.
*/
VLC_API
mtime_t
decoder_GetDisplayDate
(
decoder_t
*
,
mtime_t
)
VLC_USED
;
VLC_USED
static
inline
mtime_t
decoder_GetDisplayDate
(
decoder_t
*
dec
,
mtime_t
i_ts
)
{
if
(
!
dec
->
pf_get_display_date
)
return
VLC_TS_INVALID
;
return
dec
->
pf_get_display_date
(
dec
,
i_ts
);
}
/**
* This function returns the current input rate.
* You MUST use it *only* for gathering statistics about speed.
*/
VLC_API
int
decoder_GetDisplayRate
(
decoder_t
*
)
VLC_USED
;
VLC_USED
static
inline
int
decoder_GetDisplayRate
(
decoder_t
*
dec
)
{
if
(
!
dec
->
pf_get_display_rate
)
return
1000
/* XXX: INPUT_RATE_DEFAULT */
;
return
dec
->
pf_get_display_rate
(
dec
);
}
/** @} */
/** @} */
...
...
src/input/decoder.c
View file @
0df4762f
...
...
@@ -665,15 +665,6 @@ block_t *decoder_NewAudioBuffer( decoder_t *dec, int samples )
return
block
;
}
subpicture_t
*
decoder_NewSubpicture
(
decoder_t
*
p_decoder
,
const
subpicture_updater_t
*
p_dyn
)
{
subpicture_t
*
p_subpicture
=
p_decoder
->
pf_spu_buffer_new
(
p_decoder
,
p_dyn
);
if
(
!
p_subpicture
)
msg_Warn
(
p_decoder
,
"can't get output subpicture"
);
return
p_subpicture
;
}
static
void
RequestReload
(
decoder_t
*
p_dec
)
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
...
...
@@ -682,36 +673,6 @@ static void RequestReload( decoder_t * p_dec )
atomic_compare_exchange_strong
(
&
p_owner
->
reload
,
&
expected
,
RELOAD_DECODER
);
}
/* decoder_GetInputAttachments:
*/
int
decoder_GetInputAttachments
(
decoder_t
*
p_dec
,
input_attachment_t
***
ppp_attachment
,
int
*
pi_attachment
)
{
if
(
!
p_dec
->
pf_get_attachments
)
return
VLC_EGENERIC
;
return
p_dec
->
pf_get_attachments
(
p_dec
,
ppp_attachment
,
pi_attachment
);
}
/* decoder_GetDisplayDate:
*/
mtime_t
decoder_GetDisplayDate
(
decoder_t
*
p_dec
,
mtime_t
i_ts
)
{
if
(
!
p_dec
->
pf_get_display_date
)
return
VLC_TS_INVALID
;
return
p_dec
->
pf_get_display_date
(
p_dec
,
i_ts
);
}
/* decoder_GetDisplayRate:
*/
int
decoder_GetDisplayRate
(
decoder_t
*
p_dec
)
{
if
(
!
p_dec
->
pf_get_display_rate
)
return
INPUT_RATE_DEFAULT
;
return
p_dec
->
pf_get_display_rate
(
p_dec
);
}
void
decoder_AbortPictures
(
decoder_t
*
p_dec
,
bool
b_abort
)
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
...
...
src/libvlccore.sym
View file @
0df4762f
...
...
@@ -72,11 +72,7 @@ date_Decrement
date_Increment
date_Init
decoder_AbortPictures
decoder_GetDisplayDate
decoder_GetDisplayRate
decoder_GetInputAttachments
decoder_NewAudioBuffer
decoder_NewSubpicture
demux_PacketizerDestroy
demux_PacketizerNew
demux_New
...
...
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