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
bca45819
Commit
bca45819
authored
Sep 28, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for no clock in decoder (sout display).
parent
f6cc8a39
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
src/input/decoder.c
src/input/decoder.c
+22
-2
No files found.
src/input/decoder.c
View file @
bca45819
...
@@ -139,13 +139,18 @@ int decoder_GetInputAttachments( decoder_t *p_dec,
...
@@ -139,13 +139,18 @@ int decoder_GetInputAttachments( decoder_t *p_dec,
mtime_t
decoder_GetDisplayDate
(
decoder_t
*
p_dec
,
mtime_t
i_ts
)
mtime_t
decoder_GetDisplayDate
(
decoder_t
*
p_dec
,
mtime_t
i_ts
)
{
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
assert
(
!
p_owner
->
p_clock
);
return
input_clock_GetTS
(
p_owner
->
p_clock
,
p_owner
->
p_input
->
i_pts_delay
,
i_ts
);
return
input_clock_GetTS
(
p_owner
->
p_clock
,
p_owner
->
p_input
->
i_pts_delay
,
i_ts
);
}
}
/* decoder_GetDisplayRate:
/* decoder_GetDisplayRate:
*/
*/
int
decoder_GetDisplayRate
(
decoder_t
*
p_dec
)
int
decoder_GetDisplayRate
(
decoder_t
*
p_dec
)
{
{
return
input_clock_GetRate
(
p_dec
->
p_owner
->
p_clock
);
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
assert
(
!
p_owner
->
p_clock
);
return
input_clock_GetRate
(
p_owner
->
p_clock
);
}
}
/**
/**
...
@@ -652,6 +657,8 @@ static void DecoderSoutBufferFixTs( block_t *p_block,
...
@@ -652,6 +657,8 @@ static void DecoderSoutBufferFixTs( block_t *p_block,
input_clock_t
*
p_clock
,
mtime_t
i_ts_delay
,
input_clock_t
*
p_clock
,
mtime_t
i_ts_delay
,
bool
b_teletext
)
bool
b_teletext
)
{
{
assert
(
p_clock
);
p_block
->
i_rate
=
input_clock_GetRate
(
p_clock
);
p_block
->
i_rate
=
input_clock_GetRate
(
p_clock
);
if
(
p_block
->
i_dts
>
0
)
if
(
p_block
->
i_dts
>
0
)
...
@@ -670,6 +677,10 @@ static void DecoderSoutBufferFixTs( block_t *p_block,
...
@@ -670,6 +677,10 @@ static void DecoderSoutBufferFixTs( block_t *p_block,
static
void
DecoderAoutBufferFixTs
(
aout_buffer_t
*
p_buffer
,
static
void
DecoderAoutBufferFixTs
(
aout_buffer_t
*
p_buffer
,
input_clock_t
*
p_clock
,
mtime_t
i_ts_delay
)
input_clock_t
*
p_clock
,
mtime_t
i_ts_delay
)
{
{
/* sout display module does not set clock */
if
(
!
p_clock
)
return
;
if
(
p_buffer
->
start_date
)
if
(
p_buffer
->
start_date
)
p_buffer
->
start_date
=
input_clock_GetTS
(
p_clock
,
i_ts_delay
,
p_buffer
->
start_date
);
p_buffer
->
start_date
=
input_clock_GetTS
(
p_clock
,
i_ts_delay
,
p_buffer
->
start_date
);
...
@@ -679,6 +690,10 @@ static void DecoderAoutBufferFixTs( aout_buffer_t *p_buffer,
...
@@ -679,6 +690,10 @@ static void DecoderAoutBufferFixTs( aout_buffer_t *p_buffer,
static
void
DecoderVoutBufferFixTs
(
picture_t
*
p_picture
,
static
void
DecoderVoutBufferFixTs
(
picture_t
*
p_picture
,
input_clock_t
*
p_clock
,
mtime_t
i_ts_delay
)
input_clock_t
*
p_clock
,
mtime_t
i_ts_delay
)
{
{
/* sout display module does not set clock */
if
(
!
p_clock
)
return
;
if
(
p_picture
->
date
)
if
(
p_picture
->
date
)
p_picture
->
date
=
input_clock_GetTS
(
p_clock
,
i_ts_delay
,
p_picture
->
date
);
p_picture
->
date
=
input_clock_GetTS
(
p_clock
,
i_ts_delay
,
p_picture
->
date
);
}
}
...
@@ -688,6 +703,10 @@ static void DecoderSpuBufferFixTs( subpicture_t *p_subpic,
...
@@ -688,6 +703,10 @@ static void DecoderSpuBufferFixTs( subpicture_t *p_subpic,
{
{
bool
b_ephemere
=
p_subpic
->
i_start
==
p_subpic
->
i_stop
;
bool
b_ephemere
=
p_subpic
->
i_start
==
p_subpic
->
i_stop
;
/* sout display module does not set clock */
if
(
!
p_clock
)
return
;
if
(
p_subpic
->
i_start
)
if
(
p_subpic
->
i_start
)
p_subpic
->
i_start
=
input_clock_GetTS
(
p_clock
,
i_ts_delay
,
p_subpic
->
i_start
);
p_subpic
->
i_start
=
input_clock_GetTS
(
p_clock
,
i_ts_delay
,
p_subpic
->
i_start
);
...
@@ -738,7 +757,8 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
...
@@ -738,7 +757,8 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
p_dec
->
p_owner
->
i_preroll_end
=
-
1
;
p_dec
->
p_owner
->
i_preroll_end
=
-
1
;
}
}
const
int
i_rate
=
input_clock_GetRate
(
p_clock
);
const
int
i_rate
=
p_clock
?
input_clock_GetRate
(
p_clock
)
:
p_block
->
i_rate
;
DecoderAoutBufferFixTs
(
p_aout_buf
,
p_clock
,
p_input
->
i_pts_delay
);
DecoderAoutBufferFixTs
(
p_aout_buf
,
p_clock
,
p_input
->
i_pts_delay
);
if
(
i_rate
>=
INPUT_RATE_DEFAULT
/
AOUT_MAX_INPUT_RATE
&&
if
(
i_rate
>=
INPUT_RATE_DEFAULT
/
AOUT_MAX_INPUT_RATE
&&
i_rate
<=
INPUT_RATE_DEFAULT
*
AOUT_MAX_INPUT_RATE
)
i_rate
<=
INPUT_RATE_DEFAULT
*
AOUT_MAX_INPUT_RATE
)
...
...
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