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
1d7b91d6
Commit
1d7b91d6
authored
Mar 06, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: implemented sout asynch support. (ie sout will try to work at
the maximum speed if the output can control the pace)
parent
cb50d64a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
8 deletions
+58
-8
src/input/input.c
src/input/input.c
+18
-3
src/input/input_clock.c
src/input/input_clock.c
+9
-3
src/input/input_dec.c
src/input/input_dec.c
+29
-1
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+2
-1
No files found.
src/input/input.c
View file @
1d7b91d6
...
...
@@ -88,9 +88,9 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent, char *psz_uri,
char
**
ppsz_options
,
int
i_options
)
{
input_thread_t
*
p_input
;
/* thread descriptor */
vlc_value_t
val
;
int
i
;
input_thread_t
*
p_input
;
/* thread descriptor */
vlc_value_t
val
;
int
i
;
/* Allocate descriptor */
p_input
=
vlc_object_create
(
p_parent
,
VLC_OBJECT_INPUT
);
...
...
@@ -178,6 +178,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent, char *psz_uri,
/* Initialize thread properties */
p_input
->
b_eof
=
0
;
p_input
->
b_out_pace_control
=
VLC_FALSE
;
p_input
->
p_sys
=
NULL
;
/* Set target */
...
...
@@ -1022,6 +1023,20 @@ static int InitThread( input_thread_t * p_input )
p_sub_toselect
->
p_es
,
VLC_TRUE
);
}
if
(
p_input
->
stream
.
p_sout
)
{
if
(
p_input
->
stream
.
p_sout
->
i_out_pace_nocontrol
>
0
)
{
p_input
->
b_out_pace_control
=
VLC_FALSE
;
}
else
{
p_input
->
b_out_pace_control
=
VLC_TRUE
;
}
msg_Dbg
(
p_input
,
"starting in %s mode"
,
p_input
->
b_out_pace_control
?
"asynch"
:
"synch"
);
}
return
VLC_SUCCESS
;
}
...
...
src/input/input_clock.c
View file @
1d7b91d6
...
...
@@ -2,7 +2,7 @@
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
* $Id
: input_clock.c,v 1.45 2004/01/06 12:02:06 zorglub Exp
$
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -248,7 +248,10 @@ void input_ClockManageRef( input_thread_t * p_input,
&&
p_input
->
stream
.
p_selected_program
==
p_pgrm
)
{
p_pgrm
->
last_cr
=
i_clock
;
mwait
(
ClockToSysdate
(
p_input
,
p_pgrm
,
i_clock
)
);
if
(
!
p_input
->
b_out_pace_control
)
{
mwait
(
ClockToSysdate
(
p_input
,
p_pgrm
,
i_clock
)
);
}
}
else
{
...
...
@@ -280,7 +283,10 @@ void input_ClockManageRef( input_thread_t * p_input,
/* Wait a while before delivering the packets to the decoder.
* In case of multiple programs, we arbitrarily follow the
* clock of the selected program. */
mwait
(
ClockToSysdate
(
p_input
,
p_pgrm
,
i_clock
)
);
if
(
!
p_input
->
b_out_pace_control
)
{
mwait
(
ClockToSysdate
(
p_input
,
p_pgrm
,
i_clock
)
);
}
/* Now take into account interface changes. */
input_ClockManageControl
(
p_input
,
p_pgrm
,
i_clock
);
...
...
src/input/input_dec.c
View file @
1d7b91d6
...
...
@@ -2,7 +2,7 @@
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
* $Id
: input_dec.c,v 1.94 2004/03/03 20:39:53 gbazin Exp
$
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -61,6 +61,8 @@ struct decoder_owner_sys_t
{
vlc_bool_t
b_own_thread
;
input_thread_t
*
p_input
;
aout_instance_t
*
p_aout
;
aout_input_t
*
p_aout_input
;
...
...
@@ -279,6 +281,15 @@ void input_DecodeBlock( decoder_t * p_dec, block_t *p_block )
if
(
p_dec
->
p_owner
->
b_own_thread
)
{
block_FifoPut
(
p_dec
->
p_owner
->
p_fifo
,
p_block
);
if
(
p_dec
->
p_owner
->
p_input
->
b_out_pace_control
)
{
/* FIXME !!!!! */
while
(
p_dec
->
p_owner
->
p_fifo
->
i_depth
>
10
)
{
msleep
(
1000
);
}
}
}
else
{
...
...
@@ -462,12 +473,15 @@ static decoder_t * CreateDecoder( input_thread_t * p_input,
return
NULL
;
}
p_dec
->
p_owner
->
b_own_thread
=
VLC_TRUE
;
p_dec
->
p_owner
->
p_input
=
p_input
;
p_dec
->
p_owner
->
p_aout
=
NULL
;
p_dec
->
p_owner
->
p_aout_input
=
NULL
;
p_dec
->
p_owner
->
p_vout
=
NULL
;
p_dec
->
p_owner
->
p_sout
=
p_input
->
stream
.
p_sout
;
p_dec
->
p_owner
->
p_sout_input
=
NULL
;
p_dec
->
p_owner
->
p_es_descriptor
=
p_es
;
/* decoder fifo */
if
(
(
p_dec
->
p_owner
->
p_fifo
=
block_FifoNew
(
p_dec
)
)
==
NULL
)
{
...
...
@@ -619,6 +633,20 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
p_sout_block
=
p_next
;
}
/* For now it's enough, as only sout inpact on this flag */
if
(
p_dec
->
p_owner
->
p_sout
->
i_out_pace_nocontrol
>
0
&&
p_dec
->
p_owner
->
p_input
->
b_out_pace_control
)
{
msg_Dbg
(
p_dec
,
"switching to synch mode"
);
p_dec
->
p_owner
->
p_input
->
b_out_pace_control
=
VLC_FALSE
;
}
else
if
(
p_dec
->
p_owner
->
p_sout
->
i_out_pace_nocontrol
<=
0
&&
!
p_dec
->
p_owner
->
p_input
->
b_out_pace_control
)
{
msg_Dbg
(
p_dec
,
"switching to asynch mode"
);
p_dec
->
p_owner
->
p_input
->
b_out_pace_control
=
VLC_TRUE
;
}
}
}
else
if
(
p_dec
->
fmt_in
.
i_cat
==
AUDIO_ES
)
...
...
src/stream_output/stream_output.c
View file @
1d7b91d6
...
...
@@ -2,7 +2,7 @@
* stream_output.c : stream output module
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id
: stream_output.c,v 1.41 2004/03/03 20:39:53 gbazin Exp
$
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -119,6 +119,7 @@ sout_instance_t * __sout_NewInstance ( vlc_object_t *p_parent,
p_sout
->
psz_sout
=
strdup
(
psz_dest
);
p_sout
->
i_preheader
=
0
;
p_sout
->
i_padding
=
0
;
p_sout
->
i_out_pace_nocontrol
=
0
;
p_sout
->
p_sys
=
NULL
;
vlc_mutex_init
(
p_sout
,
&
p_sout
->
lock
);
...
...
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