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
4c247f8a
Commit
4c247f8a
authored
Sep 27, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give input_DecoderNew the clock used.
No functionnal changes yet.
parent
b1d048d8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
15 deletions
+21
-15
include/vlc_input.h
include/vlc_input.h
+3
-1
modules/stream_out/display.c
modules/stream_out/display.c
+1
-1
src/input/decoder.c
src/input/decoder.c
+13
-8
src/input/es_out.c
src/input/es_out.c
+3
-3
src/input/input_clock.h
src/input/input_clock.h
+1
-2
No files found.
include/vlc_input.h
View file @
4c247f8a
...
...
@@ -542,7 +542,9 @@ static inline input_state_e input_GetState( input_thread_t * p_input )
input_Control
(
p_input
,
INPUT_GET_STATE
,
&
state
);
return
state
;
}
VLC_EXPORT
(
decoder_t
*
,
input_DecoderNew
,
(
input_thread_t
*
,
es_format_t
*
,
sout_instance_t
*
)
);
typedef
struct
input_clock_t
input_clock_t
;
VLC_EXPORT
(
decoder_t
*
,
input_DecoderNew
,
(
input_thread_t
*
,
es_format_t
*
,
input_clock_t
*
,
sout_instance_t
*
)
);
VLC_EXPORT
(
void
,
input_DecoderDelete
,
(
decoder_t
*
)
);
VLC_EXPORT
(
void
,
input_DecoderDecode
,(
decoder_t
*
,
block_t
*
)
);
...
...
modules/stream_out/display.c
View file @
4c247f8a
...
...
@@ -168,7 +168,7 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
}
}
id
->
p_dec
=
input_DecoderNew
(
p_sys
->
p_input
,
p_fmt
,
NULL
);
id
->
p_dec
=
input_DecoderNew
(
p_sys
->
p_input
,
p_fmt
,
NULL
,
NULL
);
if
(
id
->
p_dec
==
NULL
)
{
msg_Err
(
p_stream
,
"cannot create decoder for fcc=`%4.4s'"
,
...
...
src/input/decoder.c
View file @
4c247f8a
...
...
@@ -72,6 +72,7 @@ struct decoder_owner_sys_t
int64_t
i_preroll_end
;
input_thread_t
*
p_input
;
input_clock_t
*
p_clock
;
aout_instance_t
*
p_aout
;
aout_input_t
*
p_aout_input
;
...
...
@@ -149,7 +150,7 @@ mtime_t decoder_GetDisplayDate( decoder_t *p_dec, mtime_t i_ts )
* \return the spawned decoder object
*/
decoder_t
*
input_DecoderNew
(
input_thread_t
*
p_input
,
es_format_t
*
fmt
,
sout_instance_t
*
p_sout
)
es_format_t
*
fmt
,
input_clock_t
*
p_clock
,
sout_instance_t
*
p_sout
)
{
decoder_t
*
p_dec
=
NULL
;
vlc_value_t
val
;
...
...
@@ -193,6 +194,8 @@ decoder_t *input_DecoderNew( input_thread_t *p_input,
return
NULL
;
}
p_dec
->
p_owner
->
p_clock
=
p_clock
;
if
(
p_sout
&&
p_sout
==
p_input
->
p
->
p_sout
&&
p_input
->
p
->
input
.
b_can_pace_control
)
{
msg_Dbg
(
p_input
,
"stream out mode -> no decoder thread"
);
...
...
@@ -305,9 +308,10 @@ void input_DecoderDecode( decoder_t * p_dec, block_t *p_block )
}
else
{
if
(
p_dec
->
b_error
||
(
p_block
&&
p_block
->
i_buffer
<=
0
)
)
if
(
p_dec
->
b_error
||
(
p_block
&&
p_block
->
i_buffer
<=
0
)
)
{
if
(
p_block
)
block_Release
(
p_block
);
if
(
p_block
)
block_Release
(
p_block
);
}
else
{
...
...
@@ -339,8 +343,8 @@ void input_DecoderDiscontinuity( decoder_t * p_dec, bool b_flush )
bool
input_DecoderEmpty
(
decoder_t
*
p_dec
)
{
if
(
p_dec
->
p_owner
->
b_own_thread
&&
block_FifoCount
(
p_dec
->
p_owner
->
p_fifo
)
>
0
)
if
(
p_dec
->
p_owner
->
b_own_thread
&&
block_FifoCount
(
p_dec
->
p_owner
->
p_fifo
)
>
0
)
{
return
false
;
}
...
...
@@ -582,7 +586,7 @@ static void* DecoderThread( vlc_object_t *p_this )
{
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_this
;
block_t
*
p_block
;
int
canc
=
vlc_savecancel
();
int
canc
=
vlc_savecancel
();
/* The decoder's main loop */
while
(
!
p_dec
->
b_die
&&
!
p_dec
->
b_error
)
...
...
@@ -602,13 +606,14 @@ static void* DecoderThread( vlc_object_t *p_this )
{
/* Trash all received PES packets */
p_block
=
block_FifoGet
(
p_dec
->
p_owner
->
p_fifo
);
if
(
p_block
)
block_Release
(
p_block
);
if
(
p_block
)
block_Release
(
p_block
);
}
/* We do it here because of the dll loader that wants close() in the
* same thread than open()/decode() */
module_unneed
(
p_dec
,
p_dec
->
p_module
);
vlc_restorecancel
(
canc
);
vlc_restorecancel
(
canc
);
return
NULL
;
}
...
...
src/input/es_out.c
View file @
4c247f8a
...
...
@@ -444,7 +444,7 @@ int input_EsOutSetRecord( es_out_t *out, bool b_record )
if
(
!
p_es
->
p_dec
||
p_es
->
p_master
)
continue
;
p_es
->
p_dec_record
=
input_DecoderNew
(
p_input
,
&
p_es
->
fmt
,
p_sys
->
p_sout_record
);
p_es
->
p_dec_record
=
input_DecoderNew
(
p_input
,
&
p_es
->
fmt
,
p_
es
->
p_pgrm
->
p_clock
,
p_
sys
->
p_sout_record
);
}
}
else
...
...
@@ -1159,9 +1159,9 @@ static void EsCreateDecoder( es_out_t *out, es_out_id_t *p_es )
es_out_sys_t
*
p_sys
=
out
->
p_sys
;
input_thread_t
*
p_input
=
p_sys
->
p_input
;
p_es
->
p_dec
=
input_DecoderNew
(
p_input
,
&
p_es
->
fmt
,
p_input
->
p
->
p_sout
);
p_es
->
p_dec
=
input_DecoderNew
(
p_input
,
&
p_es
->
fmt
,
p_
es
->
p_pgrm
->
p_clock
,
p_
input
->
p
->
p_sout
);
if
(
p_es
->
p_dec
&&
!
p_es
->
p_master
&&
p_sys
->
p_sout_record
)
p_es
->
p_dec_record
=
input_DecoderNew
(
p_input
,
&
p_es
->
fmt
,
p_sys
->
p_sout_record
);
p_es
->
p_dec_record
=
input_DecoderNew
(
p_input
,
&
p_es
->
fmt
,
p_
es
->
p_pgrm
->
p_clock
,
p_
sys
->
p_sout_record
);
}
static
void
EsDestroyDecoder
(
es_out_t
*
out
,
es_out_id_t
*
p_es
)
{
...
...
src/input/input_clock.h
View file @
4c247f8a
...
...
@@ -31,13 +31,12 @@
#include <vlc_common.h>
/**
/**
@struct input_clock_t
* This structure is used to manage clock drift and reception jitters
*
* XXX input_clock_GetTS can be called from any threads. All others functions
* MUST be called from one and only one thread.
*/
typedef
struct
input_clock_t
input_clock_t
;
/**
* This function creates a new input_clock_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