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
e34927d3
Commit
e34927d3
authored
Oct 26, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved out a few defines from vlc_config.h
parent
c502ce6e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
34 deletions
+37
-34
include/vlc_config.h
include/vlc_config.h
+0
-24
src/input/decoder.c
src/input/decoder.c
+17
-8
src/input/demux.c
src/input/demux.c
+2
-2
src/video_output/video_output.c
src/video_output/video_output.c
+14
-0
src/video_output/vout_internal.h
src/video_output/vout_internal.h
+4
-0
No files found.
include/vlc_config.h
View file @
e34927d3
...
...
@@ -164,30 +164,6 @@
* Time settings
*/
/* Time during which the thread will sleep if it has nothing to
* display (in micro-seconds) */
#define VOUT_IDLE_SLEEP ((int)(0.020*CLOCK_FREQ))
/* Maximum lap of time allowed between the beginning of rendering and
* display. If, compared to the current date, the next image is too
* late, the thread will perform an idle loop. This time should be
* at least VOUT_IDLE_SLEEP plus the time required to render a few
* images, to avoid trashing of decoded images */
#define VOUT_DISPLAY_DELAY ((int)(0.200*CLOCK_FREQ))
/* Pictures which are VOUT_BOGUS_DELAY or more in advance probably have
* a bogus PTS and won't be displayed */
#define VOUT_BOGUS_DELAY ((mtime_t)(DEFAULT_PTS_DELAY * 30))
/* Delay (in microseconds) before an idle screen is displayed */
#define VOUT_IDLE_DELAY (5*CLOCK_FREQ)
/* Number of pictures required to computes the FPS rate */
#define VOUT_FPS_SAMPLES 20
/* Better be in advance when awakening than late... */
#define VOUT_MWAIT_TOLERANCE ((mtime_t)(0.020*CLOCK_FREQ))
/* Time to sleep when waiting for a buffer (from vout or the video fifo).
* It should be approximately the time needed to perform a complete picture
* loop. Since it only happens when the video heap is full, it does not need
...
...
src/input/decoder.c
View file @
e34927d3
...
...
@@ -158,6 +158,14 @@ struct decoder_owner_sys_t
#define DECODER_MAX_BUFFERING_AUDIO_DURATION (AOUT_MAX_PREPARE_TIME)
#define DECODER_MAX_BUFFERING_VIDEO_DURATION (1*CLOCK_FREQ)
/* Pictures which are DECODER_BOGUS_VIDEO_DELAY or more in advance probably have
* a bogus PTS and won't be displayed */
#define DECODER_BOGUS_VIDEO_DELAY ((mtime_t)(DEFAULT_PTS_DELAY * 30))
/* */
#define DECODER_SPU_VOUT_WAIT_DURATION ((int)(0.200*CLOCK_FREQ))
/*****************************************************************************
* Public functions
*****************************************************************************/
...
...
@@ -796,7 +804,7 @@ static void *DecoderThread( vlc_object_t *p_this )
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
/* The decoder's main loop */
for
(;;
)
for
(
;;
)
{
block_t
*
p_block
=
block_FifoGet
(
p_owner
->
p_fifo
);
/* Make sure there is no cancellation point other than this one^^.
...
...
@@ -1321,7 +1329,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
vlc_mutex_unlock
(
&
p_owner
->
lock
);
/* */
const
mtime_t
i_max_date
=
mdate
()
+
i_delay
+
VOUT_BOGUS
_DELAY
;
const
mtime_t
i_max_date
=
mdate
()
+
i_delay
+
DECODER_BOGUS_VIDEO
_DELAY
;
if
(
!
p_picture
->
b_force
&&
(
p_picture
->
date
<=
0
||
p_picture
->
date
>=
i_max_date
)
)
b_reject
=
true
;
...
...
@@ -1801,7 +1809,7 @@ static int DecoderProcess( decoder_t *p_dec, block_t *p_block )
return
VLC_SUCCESS
;
}
int
canc
=
vlc_savecancel
();
int
canc
=
vlc_savecancel
();
#ifdef ENABLE_SOUT
if
(
p_dec
->
i_object_type
==
VLC_OBJECT_PACKETIZER
)
{
...
...
@@ -1853,7 +1861,7 @@ static int DecoderProcess( decoder_t *p_dec, block_t *p_block )
DecoderSignalFlushed
(
p_dec
);
}
vlc_restorecancel
(
canc
);
vlc_restorecancel
(
canc
);
return
p_dec
->
b_error
?
VLC_EGENERIC
:
VLC_SUCCESS
;
}
...
...
@@ -1980,10 +1988,11 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
p_owner
->
audio
=
p_dec
->
fmt_out
.
audio
;
memcpy
(
&
format
,
&
p_owner
->
audio
,
sizeof
(
audio_sample_format_t
)
);
if
(
i_force_dolby
&&
(
format
.
i_original_channels
&
AOUT_CHAN_PHYSMASK
)
==
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
)
)
if
(
i_force_dolby
&&
(
format
.
i_original_channels
&
AOUT_CHAN_PHYSMASK
)
==
(
AOUT_CHAN_LEFT
|
AOUT_CHAN_RIGHT
)
)
{
if
(
i_force_dolby
==
1
)
if
(
i_force_dolby
==
1
)
{
format
.
i_original_channels
=
format
.
i_original_channels
|
AOUT_CHAN_DOLBYSTEREO
;
...
...
@@ -2192,7 +2201,7 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec )
if
(
p_vout
)
break
;
msleep
(
VOUT_DISPLAY_DELAY
);
msleep
(
DECODER_SPU_VOUT_WAIT_DURATION
);
}
if
(
!
p_vout
)
...
...
src/input/demux.c
View file @
e34927d3
...
...
@@ -543,7 +543,7 @@ static void* DStreamThread( vlc_object_t* p_this )
stream_t
*
s
=
(
stream_t
*
)
p_this
;
d_stream_sys_t
*
p_sys
=
(
d_stream_sys_t
*
)
s
->
p_sys
;
demux_t
*
p_demux
;
int
canc
=
vlc_savecancel
();
int
canc
=
vlc_savecancel
();
/* Create the demuxer */
if
(
!
(
p_demux
=
demux_New
(
s
,
""
,
p_sys
->
psz_name
,
""
,
s
,
p_sys
->
out
,
...
...
@@ -560,7 +560,7 @@ static void* DStreamThread( vlc_object_t* p_this )
if
(
p_demux
->
pf_demux
(
p_demux
)
<=
0
)
break
;
}
vlc_restorecancel
(
canc
);
vlc_restorecancel
(
canc
);
vlc_object_kill
(
p_demux
);
return
NULL
;
}
...
...
src/video_output/video_output.c
View file @
e34927d3
...
...
@@ -92,6 +92,20 @@ int vout_Snapshot( vout_thread_t *, picture_t * );
/* Display media title in OSD */
static
void
DisplayTitleOnOSD
(
vout_thread_t
*
p_vout
);
/* Time during which the thread will sleep if it has nothing to
* display (in micro-seconds) */
#define VOUT_IDLE_SLEEP ((int)(0.020*CLOCK_FREQ))
/* Maximum lap of time allowed between the beginning of rendering and
* display. If, compared to the current date, the next image is too
* late, the thread will perform an idle loop. This time should be
* at least VOUT_IDLE_SLEEP plus the time required to render a few
* images, to avoid trashing of decoded images */
#define VOUT_DISPLAY_DELAY ((int)(0.200*CLOCK_FREQ))
/* Better be in advance when awakening than late... */
#define VOUT_MWAIT_TOLERANCE ((mtime_t)(0.020*CLOCK_FREQ))
/*****************************************************************************
* Video Filter2 functions
*****************************************************************************/
...
...
src/video_output/vout_internal.h
View file @
e34927d3
...
...
@@ -32,6 +32,10 @@
#include "vout_control.h"
/* Number of pictures required to computes the FPS rate */
#define VOUT_FPS_SAMPLES 20
/* */
struct
vout_thread_sys_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