Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
7dd2f154
Commit
7dd2f154
authored
Sep 14, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the new block_Fifo functions
parent
c06a120a
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
32 additions
and
29 deletions
+32
-29
modules/access_filter/timeshift.c
modules/access_filter/timeshift.c
+4
-4
modules/access_output/udp.c
modules/access_output/udp.c
+2
-2
modules/codec/ffmpeg/mux.c
modules/codec/ffmpeg/mux.c
+2
-2
modules/mux/asf.c
modules/mux/asf.c
+1
-1
modules/mux/avi.c
modules/mux/avi.c
+2
-2
modules/mux/dummy.c
modules/mux/dummy.c
+1
-1
modules/mux/mp4.c
modules/mux/mp4.c
+2
-2
modules/mux/mpeg/ps.c
modules/mux/mpeg/ps.c
+1
-1
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+3
-3
modules/mux/mpjpeg.c
modules/mux/mpjpeg.c
+1
-1
modules/mux/ogg.c
modules/mux/ogg.c
+4
-3
modules/mux/wav.c
modules/mux/wav.c
+1
-1
src/input/decoder.c
src/input/decoder.c
+6
-5
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+2
-1
No files found.
modules/access_filter/timeshift.c
View file @
7dd2f154
...
...
@@ -298,7 +298,7 @@ static void Thread( access_t *p_access )
/* Write block */
if
(
!
p_sys
->
p_write_list
&&
!
p_sys
->
p_read_list
&&
p_sys
->
p_fifo
->
i_size
<
TIMESHIFT_FIFO_MAX
)
block_FifoSize
(
p_sys
->
p_fifo
)
<
TIMESHIFT_FIFO_MAX
)
{
/* If there isn't too much timeshifted data,
* write directly to FIFO */
...
...
@@ -310,7 +310,7 @@ static void Thread( access_t *p_access )
block_Release
(
p_block
);
/* Read from file to fill up the fifo */
while
(
p_sys
->
p_fifo
->
i_size
<
TIMESHIFT_FIFO_MIN
&&
while
(
block_FifoSize
(
p_sys
->
p_fifo
)
<
TIMESHIFT_FIFO_MIN
&&
!
p_access
->
b_die
)
{
p_block
=
ReadBlockFromFile
(
p_access
);
...
...
@@ -323,10 +323,10 @@ static void Thread( access_t *p_access )
msg_Dbg
(
p_access
,
"timeshift: no more input data"
);
while
(
!
p_access
->
b_die
&&
(
p_sys
->
p_read_list
||
p_sys
->
p_fifo
->
i_size
)
)
(
p_sys
->
p_read_list
||
block_FifoSize
(
p_sys
->
p_fifo
)
)
)
{
/* Read from file to fill up the fifo */
while
(
p_sys
->
p_fifo
->
i_size
<
TIMESHIFT_FIFO_MIN
&&
while
(
block_FifoSize
(
p_sys
->
p_fifo
)
<
TIMESHIFT_FIFO_MIN
&&
!
p_access
->
b_die
&&
p_sys
->
p_read_list
)
{
p_block
=
ReadBlockFromFile
(
p_access
);
...
...
modules/access_output/udp.c
View file @
7dd2f154
...
...
@@ -431,13 +431,13 @@ static block_t *NewUDPPacket( sout_access_out_t *p_access, mtime_t i_dts)
sout_access_out_sys_t
*
p_sys
=
p_access
->
p_sys
;
block_t
*
p_buffer
;
while
(
p_sys
->
p_thread
->
p_empty_blocks
->
i_depth
>
MAX_EMPTY_BLOCKS
)
while
(
block_FifoCount
(
p_sys
->
p_thread
->
p_empty_blocks
)
>
MAX_EMPTY_BLOCKS
)
{
p_buffer
=
block_FifoGet
(
p_sys
->
p_thread
->
p_empty_blocks
);
block_Release
(
p_buffer
);
}
if
(
p_sys
->
p_thread
->
p_empty_blocks
->
i_depth
==
0
)
if
(
block_FifoCount
(
p_sys
->
p_thread
->
p_empty_blocks
)
==
0
)
{
p_buffer
=
block_New
(
p_access
->
p_sout
,
p_sys
->
i_mtu
);
}
...
...
modules/codec/ffmpeg/mux.c
View file @
7dd2f154
...
...
@@ -305,9 +305,9 @@ static int MuxGetStream( sout_mux_t *p_mux, int *pi_stream, mtime_t *pi_dts )
/* We don't really need to have anything in the SPU fifo */
if
(
p_mux
->
pp_inputs
[
i
]
->
p_fmt
->
i_cat
==
SPU_ES
&&
p_fifo
->
i_depth
==
0
)
continue
;
block_FifoCount
(
p_fifo
)
==
0
)
continue
;
if
(
p_fifo
->
i_depth
)
if
(
block_FifoCount
(
p_fifo
)
)
{
block_t
*
p_buf
;
...
...
modules/mux/asf.c
View file @
7dd2f154
...
...
@@ -647,7 +647,7 @@ static int MuxGetStream( sout_mux_t *p_mux, int *pi_stream, mtime_t *pi_dts )
sout_input_t
*
p_input
=
p_mux
->
pp_inputs
[
i
];
block_t
*
p_data
;
if
(
p_input
->
p_fifo
->
i_depth
<=
0
)
if
(
block_FifoCount
(
p_input
->
p_fifo
)
<=
0
)
{
if
(
p_input
->
p_fmt
->
i_cat
==
AUDIO_ES
||
p_input
->
p_fmt
->
i_cat
==
VIDEO_ES
)
...
...
modules/mux/avi.c
View file @
7dd2f154
...
...
@@ -424,14 +424,14 @@ static int Mux ( sout_mux_t *p_mux )
p_stream
=
&
p_sys
->
stream
[
i_stream
];
p_fifo
=
p_mux
->
pp_inputs
[
i
]
->
p_fifo
;
i_count
=
p_fifo
->
i_depth
;
i_count
=
block_FifoCount
(
p_fifo
)
;
while
(
i_count
>
1
)
{
avi_idx1_entry_t
*
p_idx
;
block_t
*
p_data
;
p_data
=
block_FifoGet
(
p_fifo
);
if
(
p_fifo
->
i_depth
>
0
)
if
(
block_FifoCount
(
p_fifo
)
>
0
)
{
block_t
*
p_next
=
block_FifoShow
(
p_fifo
);
p_data
->
i_length
=
p_next
->
i_dts
-
p_data
->
i_dts
;
...
...
modules/mux/dummy.c
View file @
7dd2f154
...
...
@@ -155,7 +155,7 @@ static int Mux( sout_mux_t *p_mux )
}
p_fifo
=
p_mux
->
pp_inputs
[
i
]
->
p_fifo
;
i_count
=
p_fifo
->
i_depth
;
i_count
=
block_FifoCount
(
p_fifo
)
;
while
(
i_count
>
0
)
{
block_t
*
p_data
=
block_FifoGet
(
p_fifo
);
...
...
modules/mux/mp4.c
View file @
7dd2f154
...
...
@@ -455,7 +455,7 @@ static int MuxGetStream( sout_mux_t *p_mux, int *pi_stream, mtime_t *pi_dts )
block_fifo_t
*
p_fifo
=
p_mux
->
pp_inputs
[
i
]
->
p_fifo
;
block_t
*
p_buf
;
if
(
p_fifo
->
i_depth
<=
1
)
if
(
Block_FifoCount
(
p_fifo
)
<=
1
)
{
if
(
p_mux
->
pp_inputs
[
i
]
->
p_fmt
->
i_cat
!=
SPU_ES
)
{
...
...
@@ -521,7 +521,7 @@ again:
if
(
p_stream
->
fmt
.
i_cat
!=
SPU_ES
)
{
/* Fix length of the sample */
if
(
p_input
->
p_fifo
->
i_depth
>
0
)
if
(
block_FifoCount
(
p_input
->
p_fifo
)
>
0
)
{
block_t
*
p_next
=
block_FifoShow
(
p_input
->
p_fifo
);
int64_t
i_diff
=
p_next
->
i_dts
-
p_data
->
i_dts
;
...
...
modules/mux/mpeg/ps.c
View file @
7dd2f154
...
...
@@ -814,7 +814,7 @@ static int MuxGetStream( sout_mux_t *p_mux, int *pi_stream, mtime_t *pi_dts )
sout_input_t
*
p_input
=
p_mux
->
pp_inputs
[
i
];
block_t
*
p_data
;
if
(
p_input
->
p_fifo
->
i_depth
<=
0
)
if
(
block_FifoCount
(
p_input
->
p_fifo
)
<=
0
)
{
if
(
p_input
->
p_fmt
->
i_cat
==
AUDIO_ES
||
p_input
->
p_fmt
->
i_cat
==
VIDEO_ES
)
...
...
modules/mux/mpeg/ts.c
View file @
7dd2f154
...
...
@@ -1342,7 +1342,7 @@ static int Mux( sout_mux_t *p_mux )
p_pcr_stream
->
i_pes_dts
+
p_pcr_stream
->
i_pes_length
)
{
/* Need more data */
if
(
p_input
->
p_fifo
->
i_depth
<=
1
)
if
(
block_FifoCount
(
p_input
->
p_fifo
)
<=
1
)
{
if
(
p_input
->
p_fmt
->
i_cat
==
AUDIO_ES
||
p_input
->
p_fmt
->
i_cat
==
VIDEO_ES
)
...
...
@@ -1350,7 +1350,7 @@ static int Mux( sout_mux_t *p_mux )
/* We need more data */
return
VLC_SUCCESS
;
}
else
if
(
p_input
->
p_fifo
->
i_depth
<=
0
)
else
if
(
block_FifoCount
(
p_input
->
p_fifo
)
<=
0
)
{
/* spu, only one packet is needed */
continue
;
...
...
@@ -1388,7 +1388,7 @@ static int Mux( sout_mux_t *p_mux )
else
p_data
=
FixPES
(
p_mux
,
p_input
->
p_fifo
);
if
(
p_input
->
p_fifo
->
i_depth
>
0
&&
if
(
block_FifoCount
(
p_input
->
p_fifo
)
>
0
&&
p_input
->
p_fmt
->
i_cat
!=
SPU_ES
)
{
block_t
*
p_next
=
block_FifoShow
(
p_input
->
p_fifo
);
...
...
modules/mux/mpjpeg.c
View file @
7dd2f154
...
...
@@ -209,7 +209,7 @@ static int Mux( sout_mux_t *p_mux )
if
(
!
p_mux
->
i_nb_inputs
)
return
VLC_SUCCESS
;
p_fifo
=
p_mux
->
pp_inputs
[
0
]
->
p_fifo
;
i_count
=
p_fifo
->
i_depth
;
i_count
=
block_FifoCount
(
p_fifo
)
;
while
(
i_count
>
0
)
{
block_t
*
p_length
=
block_New
(
p_mux
,
25
);
...
...
modules/mux/ogg.c
View file @
7dd2f154
...
...
@@ -143,9 +143,9 @@ static int MuxGetStream( sout_mux_t *p_mux, int *pi_stream, mtime_t *pi_dts )
/* We don't really need to have anything in the SPU fifo */
if
(
p_mux
->
pp_inputs
[
i
]
->
p_fmt
->
i_cat
==
SPU_ES
&&
p_fifo
->
i_depth
==
0
)
continue
;
block_FifoCount
(
p_fifo
)
==
0
)
continue
;
if
(
p_fifo
->
i_depth
)
if
(
block_FifoCount
(
p_fifo
)
)
{
block_t
*
p_buf
;
...
...
@@ -493,7 +493,8 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
if
(
!
p_stream
->
b_new
)
{
while
(
p_input
->
p_fifo
->
i_depth
)
MuxBlock
(
p_mux
,
p_input
);
while
(
block_FifoCount
(
p_input
->
p_fifo
)
)
MuxBlock
(
p_mux
,
p_input
);
}
if
(
!
p_stream
->
b_new
&&
...
...
modules/mux/wav.c
View file @
7dd2f154
...
...
@@ -285,7 +285,7 @@ static int Mux( sout_mux_t *p_mux )
p_sys
->
b_header
=
VLC_FALSE
;
p_input
=
p_mux
->
pp_inputs
[
0
];
while
(
p_input
->
p_fifo
->
i_depth
>
0
)
while
(
block_FifoCount
(
p_input
->
p_fifo
)
>
0
)
{
block_t
*
p_block
=
block_FifoGet
(
p_input
->
p_fifo
);
p_sys
->
i_data
+=
p_block
->
i_buffer
;
...
...
src/input/decoder.c
View file @
7dd2f154
...
...
@@ -252,12 +252,12 @@ void input_DecoderDecode( decoder_t * p_dec, block_t *p_block )
{
/* FIXME !!!!! */
while
(
!
p_dec
->
b_die
&&
!
p_dec
->
b_error
&&
p_dec
->
p_owner
->
p_fifo
->
i_depth
>
10
)
block_FifoCount
(
p_dec
->
p_owner
->
p_fifo
)
>
10
)
{
msleep
(
1000
);
}
}
else
if
(
p_dec
->
p_owner
->
p_fifo
->
i_size
>
50000000
/* 50 MB */
)
else
if
(
block_FifoSize
(
p_dec
->
p_owner
->
p_fifo
)
>
50000000
/* 50 MB */
)
{
/* FIXME: ideally we would check the time amount of data
* in the fifo instead of its size. */
...
...
@@ -302,7 +302,8 @@ void input_DecoderDiscontinuity( decoder_t * p_dec, vlc_bool_t b_flush )
vlc_bool_t
input_DecoderEmpty
(
decoder_t
*
p_dec
)
{
if
(
p_dec
->
p_owner
->
b_own_thread
&&
p_dec
->
p_owner
->
p_fifo
->
i_depth
>
0
)
if
(
p_dec
->
p_owner
->
b_own_thread
&&
block_FifoCount
(
p_dec
->
p_owner
->
p_fifo
)
>
0
)
{
return
VLC_FALSE
;
}
...
...
@@ -789,9 +790,9 @@ static int DecoderDecode( decoder_t *p_dec, block_t *p_block )
*/
static
void
DeleteDecoder
(
decoder_t
*
p_dec
)
{
msg_Dbg
(
p_dec
,
"killing decoder fourcc `%4.4s', %
d
PES in FIFO"
,
msg_Dbg
(
p_dec
,
"killing decoder fourcc `%4.4s', %
u
PES in FIFO"
,
(
char
*
)
&
p_dec
->
fmt_in
.
i_codec
,
p_dec
->
p_owner
->
p_fifo
->
i_depth
);
(
unsigned
)
block_FifoCount
(
p_dec
->
p_owner
->
p_fifo
)
);
/* Free all packets still in the decoder fifo. */
block_FifoEmpty
(
p_dec
->
p_owner
->
p_fifo
);
...
...
src/stream_output/stream_output.c
View file @
7dd2f154
...
...
@@ -503,7 +503,8 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
int
i_index
;
if
(
p_mux
->
b_waiting_stream
&&
p_input
->
p_fifo
->
i_depth
>
0
)
if
(
p_mux
->
b_waiting_stream
&&
block_FifoCount
(
p_input
->
p_fifo
)
>
0
)
{
/* We stop waiting, and call the muxer for taking care of the data
* before we remove this es */
...
...
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