Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
0c7e60bf
Commit
0c7e60bf
authored
Sep 23, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block_t.i_samples -> block_t.i_nb_samples (as aout_buffer_t)
parent
0fbc8087
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
67 additions
and
66 deletions
+67
-66
include/vlc_block.h
include/vlc_block.h
+2
-2
modules/audio_filter/channel_mixer/headphone.c
modules/audio_filter/channel_mixer/headphone.c
+6
-6
modules/audio_filter/channel_mixer/mono.c
modules/audio_filter/channel_mixer/mono.c
+7
-6
modules/audio_filter/channel_mixer/simple.c
modules/audio_filter/channel_mixer/simple.c
+6
-6
modules/audio_filter/converter/a52tofloat32.c
modules/audio_filter/converter/a52tofloat32.c
+6
-6
modules/audio_filter/converter/dtstofloat32.c
modules/audio_filter/converter/dtstofloat32.c
+6
-6
modules/audio_filter/converter/mpgatofixed32.c
modules/audio_filter/converter/mpgatofixed32.c
+6
-6
modules/audio_filter/format.c
modules/audio_filter/format.c
+8
-8
modules/audio_filter/resampler/bandlimited.c
modules/audio_filter/resampler/bandlimited.c
+6
-6
modules/audio_filter/resampler/linear.c
modules/audio_filter/resampler/linear.c
+6
-6
modules/codec/shine/shine_mod.c
modules/codec/shine/shine_mod.c
+1
-1
modules/stream_out/smem.c
modules/stream_out/smem.c
+1
-1
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+3
-3
src/input/es_out_timeshift.c
src/input/es_out_timeshift.c
+1
-1
src/misc/block.c
src/misc/block.c
+2
-2
No files found.
include/vlc_block.h
View file @
0c7e60bf
...
...
@@ -102,7 +102,7 @@ struct block_t
mtime_t
i_dts
;
mtime_t
i_length
;
int
i
_samples
;
/* Used for audio */
unsigned
i_nb
_samples
;
/* Used for audio */
int
i_rate
;
size_t
i_buffer
;
...
...
@@ -146,7 +146,7 @@ static inline block_t *block_Duplicate( block_t *p_block )
p_dup
->
i_flags
=
p_block
->
i_flags
;
p_dup
->
i_length
=
p_block
->
i_length
;
p_dup
->
i_rate
=
p_block
->
i_rate
;
p_dup
->
i_
samples
=
p_block
->
i
_samples
;
p_dup
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
memcpy
(
p_dup
->
p_buffer
,
p_block
->
p_buffer
,
p_block
->
i_buffer
);
return
p_dup
;
...
...
modules/audio_filter/channel_mixer/headphone.c
View file @
0c7e60bf
...
...
@@ -643,14 +643,14 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
block_t
*
p_out
;
int
i_out_size
;
if
(
!
p_block
||
!
p_block
->
i_samples
)
if
(
!
p_block
||
!
p_block
->
i_
nb_
samples
)
{
if
(
p_block
)
block_Release
(
p_block
);
return
NULL
;
}
i_out_size
=
p_block
->
i_samples
*
i_out_size
=
p_block
->
i_
nb_
samples
*
p_filter
->
fmt_out
.
audio
.
i_bitspersample
/
8
*
aout_FormatNbChannels
(
&
(
p_filter
->
fmt_out
.
audio
)
);
...
...
@@ -662,7 +662,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
return
NULL
;
}
p_out
->
i_
samples
=
p_block
->
i
_samples
;
p_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_out
->
i_dts
=
p_block
->
i_dts
;
p_out
->
i_pts
=
p_block
->
i_pts
;
p_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -676,15 +676,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_samples
;
in_buf
.
i_nb_samples
=
p_block
->
i_
nb_
samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_samples
;
out_buf
.
i_nb_samples
=
p_out
->
i_
nb_
samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
p_out
->
i_buffer
=
out_buf
.
i_nb_bytes
;
p_out
->
i_samples
=
out_buf
.
i_nb_samples
;
p_out
->
i_
nb_
samples
=
out_buf
.
i_nb_samples
;
block_Release
(
p_block
);
return
p_out
;
...
...
modules/audio_filter/channel_mixer/mono.c
View file @
0c7e60bf
...
...
@@ -459,14 +459,14 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
unsigned
int
i_samples
;
int
i_out_size
;
if
(
!
p_block
||
!
p_block
->
i_samples
)
if
(
!
p_block
||
!
p_block
->
i_
nb_
samples
)
{
if
(
p_block
)
block_Release
(
p_block
);
return
NULL
;
}
i_out_size
=
p_block
->
i_samples
*
p_filter
->
p_sys
->
i_bitspersample
/
8
*
i_out_size
=
p_block
->
i_
nb_
samples
*
p_filter
->
p_sys
->
i_bitspersample
/
8
*
aout_FormatNbChannels
(
&
(
p_filter
->
fmt_out
.
audio
)
);
p_out
=
p_filter
->
pf_audio_buffer_new
(
p_filter
,
i_out_size
);
...
...
@@ -476,7 +476,8 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
block_Release
(
p_block
);
return
NULL
;
}
p_out
->
i_samples
=
(
p_block
->
i_samples
/
p_filter
->
p_sys
->
i_nb_channels
)
*
p_out
->
i_nb_samples
=
(
p_block
->
i_nb_samples
/
p_filter
->
p_sys
->
i_nb_channels
)
*
aout_FormatNbChannels
(
&
(
p_filter
->
fmt_out
.
audio
)
);
p_out
->
i_dts
=
p_block
->
i_dts
;
p_out
->
i_pts
=
p_block
->
i_pts
;
...
...
@@ -490,7 +491,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_samples
;
in_buf
.
i_nb_samples
=
p_block
->
i_
nb_
samples
;
#if 0
unsigned int i_in_size = in_buf.i_nb_samples * (p_filter->p_sys->i_bitspersample/8) *
...
...
@@ -504,7 +505,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_samples
;
out_buf
.
i_nb_samples
=
p_out
->
i_
nb_
samples
;
memset
(
p_out
->
p_buffer
,
0
,
i_out_size
);
if
(
p_filter
->
p_sys
->
b_downmix
)
...
...
@@ -518,7 +519,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
}
p_out
->
i_buffer
=
out_buf
.
i_nb_bytes
;
p_out
->
i_samples
=
out_buf
.
i_nb_samples
;
p_out
->
i_
nb_
samples
=
out_buf
.
i_nb_samples
;
block_Release
(
p_block
);
return
p_out
;
...
...
modules/audio_filter/channel_mixer/simple.c
View file @
0c7e60bf
...
...
@@ -281,14 +281,14 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
block_t
*
p_out
;
int
i_out_size
;
if
(
!
p_block
||
!
p_block
->
i_samples
)
if
(
!
p_block
||
!
p_block
->
i_
nb_
samples
)
{
if
(
p_block
)
block_Release
(
p_block
);
return
NULL
;
}
i_out_size
=
p_block
->
i_samples
*
i_out_size
=
p_block
->
i_
nb_
samples
*
p_filter
->
fmt_out
.
audio
.
i_bitspersample
*
p_filter
->
fmt_out
.
audio
.
i_channels
/
8
;
...
...
@@ -300,7 +300,7 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
return
NULL
;
}
p_out
->
i_
samples
=
p_block
->
i
_samples
;
p_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_out
->
i_dts
=
p_block
->
i_dts
;
p_out
->
i_pts
=
p_block
->
i_pts
;
p_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -313,17 +313,17 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_samples
;
in_buf
.
i_nb_samples
=
p_block
->
i_
nb_
samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_samples
;
out_buf
.
i_nb_samples
=
p_out
->
i_
nb_
samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
block_Release
(
p_block
);
p_out
->
i_buffer
=
out_buf
.
i_nb_bytes
;
p_out
->
i_samples
=
out_buf
.
i_nb_samples
;
p_out
->
i_
nb_
samples
=
out_buf
.
i_nb_samples
;
return
p_out
;
}
...
...
modules/audio_filter/converter/a52tofloat32.c
View file @
0c7e60bf
...
...
@@ -463,14 +463,14 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
block_t
*
p_out
;
int
i_out_size
;
if
(
!
p_block
||
!
p_block
->
i_samples
)
if
(
!
p_block
||
!
p_block
->
i_
nb_
samples
)
{
if
(
p_block
)
block_Release
(
p_block
);
return
NULL
;
}
i_out_size
=
p_block
->
i_samples
*
i_out_size
=
p_block
->
i_
nb_
samples
*
p_filter
->
fmt_out
.
audio
.
i_bitspersample
*
p_filter
->
fmt_out
.
audio
.
i_channels
/
8
;
...
...
@@ -482,7 +482,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
return
NULL
;
}
p_out
->
i_
samples
=
p_block
->
i
_samples
;
p_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_out
->
i_dts
=
p_block
->
i_dts
;
p_out
->
i_pts
=
p_block
->
i_pts
;
p_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -495,15 +495,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_samples
;
in_buf
.
i_nb_samples
=
p_block
->
i_
nb_
samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_samples
;
out_buf
.
i_nb_samples
=
p_out
->
i_
nb_
samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
p_out
->
i_buffer
=
out_buf
.
i_nb_bytes
;
p_out
->
i_samples
=
out_buf
.
i_nb_samples
;
p_out
->
i_
nb_
samples
=
out_buf
.
i_nb_samples
;
block_Release
(
p_block
);
...
...
modules/audio_filter/converter/dtstofloat32.c
View file @
0c7e60bf
...
...
@@ -428,14 +428,14 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
block_t
*
p_out
;
int
i_out_size
;
if
(
!
p_block
||
!
p_block
->
i_samples
)
if
(
!
p_block
||
!
p_block
->
i_
nb_
samples
)
{
if
(
p_block
)
block_Release
(
p_block
);
return
NULL
;
}
i_out_size
=
p_block
->
i_samples
*
i_out_size
=
p_block
->
i_
nb_
samples
*
p_filter
->
fmt_out
.
audio
.
i_bitspersample
*
p_filter
->
fmt_out
.
audio
.
i_channels
/
8
;
...
...
@@ -447,7 +447,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
return
NULL
;
}
p_out
->
i_
samples
=
p_block
->
i
_samples
;
p_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_out
->
i_dts
=
p_block
->
i_dts
;
p_out
->
i_pts
=
p_block
->
i_pts
;
p_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -460,15 +460,15 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_samples
;
in_buf
.
i_nb_samples
=
p_block
->
i_
nb_
samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_samples
;
out_buf
.
i_nb_samples
=
p_out
->
i_
nb_
samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
p_out
->
i_buffer
=
out_buf
.
i_nb_bytes
;
p_out
->
i_samples
=
out_buf
.
i_nb_samples
;
p_out
->
i_
nb_
samples
=
out_buf
.
i_nb_samples
;
block_Release
(
p_block
);
...
...
modules/audio_filter/converter/mpgatofixed32.c
View file @
0c7e60bf
...
...
@@ -364,14 +364,14 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
block_t
*
p_out
;
int
i_out_size
;
if
(
!
p_block
||
!
p_block
->
i_samples
)
if
(
!
p_block
||
!
p_block
->
i_
nb_
samples
)
{
if
(
p_block
)
block_Release
(
p_block
);
return
NULL
;
}
i_out_size
=
p_block
->
i_samples
*
i_out_size
=
p_block
->
i_
nb_
samples
*
p_filter
->
fmt_out
.
audio
.
i_bitspersample
*
p_filter
->
fmt_out
.
audio
.
i_channels
/
8
;
...
...
@@ -383,7 +383,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
return
NULL
;
}
p_out
->
i_
samples
=
p_block
->
i
_samples
;
p_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_out
->
i_dts
=
p_block
->
i_dts
;
p_out
->
i_pts
=
p_block
->
i_pts
;
p_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -397,17 +397,17 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
b_discontinuity
=
false
;
in_buf
.
i_nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_samples
;
in_buf
.
i_nb_samples
=
p_block
->
i_
nb_
samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_samples
;
out_buf
.
i_nb_samples
=
p_out
->
i_
nb_
samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
block_Release
(
p_block
);
p_out
->
i_buffer
=
out_buf
.
i_nb_bytes
;
p_out
->
i_samples
=
out_buf
.
i_nb_samples
;
p_out
->
i_
nb_
samples
=
out_buf
.
i_nb_samples
;
return
p_out
;
}
modules/audio_filter/format.c
View file @
0c7e60bf
...
...
@@ -341,7 +341,7 @@ static block_t *S24toFloat32( filter_t *p_filter, block_t *p_block )
p_in
+=
3
;
p_out
++
;
}
p_block_out
->
i_
samples
=
p_block
->
i
_samples
;
p_block_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_block_out
->
i_dts
=
p_block
->
i_dts
;
p_block_out
->
i_pts
=
p_block
->
i_pts
;
p_block_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -410,7 +410,7 @@ static block_t *S16toFloat32( filter_t *p_filter, block_t *p_block )
p_in
++
;
p_out
++
;
}
p_block_out
->
i_
samples
=
p_block
->
i
_samples
;
p_block_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_block_out
->
i_dts
=
p_block
->
i_dts
;
p_block_out
->
i_pts
=
p_block
->
i_pts
;
p_block_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -443,7 +443,7 @@ static block_t *U16toFloat32( filter_t *p_filter, block_t *p_block )
*
p_out
++
=
(
float
)(
*
p_in
++
-
32768
)
/
32768
.
0
;
}
p_block_out
->
i_
samples
=
p_block
->
i
_samples
;
p_block_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_block_out
->
i_dts
=
p_block
->
i_dts
;
p_block_out
->
i_pts
=
p_block
->
i_pts
;
p_block_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -483,7 +483,7 @@ static block_t *S16toS24( filter_t *p_filter, block_t *p_block )
#endif
}
p_block_out
->
i_
samples
=
p_block
->
i
_samples
;
p_block_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_block_out
->
i_dts
=
p_block
->
i_dts
;
p_block_out
->
i_pts
=
p_block
->
i_pts
;
p_block_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -618,7 +618,7 @@ static block_t *S8toU16( filter_t *p_filter, block_t *p_block )
for
(
i
=
p_block
->
i_buffer
;
i
--
;
)
*
p_out
++
=
((
*
p_in
++
)
+
128
)
<<
8
;
p_block_out
->
i_
samples
=
p_block
->
i
_samples
;
p_block_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_block_out
->
i_dts
=
p_block
->
i_dts
;
p_block_out
->
i_pts
=
p_block
->
i_pts
;
p_block_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -649,7 +649,7 @@ static block_t *U8toS16( filter_t *p_filter, block_t *p_block )
for
(
i
=
p_block
->
i_buffer
;
i
--
;
)
*
p_out
++
=
((
*
p_in
++
)
-
128
)
<<
8
;
p_block_out
->
i_
samples
=
p_block
->
i
_samples
;
p_block_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_block_out
->
i_dts
=
p_block
->
i_dts
;
p_block_out
->
i_pts
=
p_block
->
i_pts
;
p_block_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -681,7 +681,7 @@ static block_t *S8toS16( filter_t *p_filter, block_t *p_block )
for
(
i
=
p_block
->
i_buffer
;
i
--
;
)
*
p_out
++
=
(
*
p_in
++
)
<<
8
;
p_block_out
->
i_
samples
=
p_block
->
i
_samples
;
p_block_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_block_out
->
i_dts
=
p_block
->
i_dts
;
p_block_out
->
i_pts
=
p_block
->
i_pts
;
p_block_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -712,7 +712,7 @@ static block_t *U8toU16( filter_t *p_filter, block_t *p_block )
for
(
i
=
p_block
->
i_buffer
;
i
--
;
)
*
p_out
++
=
(
*
p_in
++
)
<<
8
;
p_block_out
->
i_
samples
=
p_block
->
i
_samples
;
p_block_out
->
i_
nb_samples
=
p_block
->
i_nb
_samples
;
p_block_out
->
i_dts
=
p_block
->
i_dts
;
p_block_out
->
i_pts
=
p_block
->
i_pts
;
p_block_out
->
i_length
=
p_block
->
i_length
;
...
...
modules/audio_filter/resampler/bandlimited.c
View file @
0c7e60bf
...
...
@@ -547,7 +547,7 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
int
i_out_size
;
int
i_bytes_per_frame
;
if
(
!
p_block
||
!
p_block
->
i_samples
)
if
(
!
p_block
||
!
p_block
->
i_
nb_
samples
)
{
if
(
p_block
)
block_Release
(
p_block
);
...
...
@@ -557,7 +557,7 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
i_bytes_per_frame
=
p_filter
->
fmt_out
.
audio
.
i_channels
*
p_filter
->
fmt_out
.
audio
.
i_bitspersample
/
8
;
i_out_size
=
i_bytes_per_frame
*
(
1
+
(
p_block
->
i_samples
*
i_out_size
=
i_bytes_per_frame
*
(
1
+
(
p_block
->
i_
nb_
samples
*
p_filter
->
fmt_out
.
audio
.
i_rate
/
p_filter
->
fmt_in
.
audio
.
i_rate
)
)
+
p_filter
->
p_sys
->
i_buf_size
;
...
...
@@ -570,7 +570,7 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
return
NULL
;
}
p_out
->
i_samples
=
i_out_size
/
i_bytes_per_frame
;
p_out
->
i_
nb_
samples
=
i_out_size
/
i_bytes_per_frame
;
p_out
->
i_dts
=
p_block
->
i_dts
;
p_out
->
i_pts
=
p_block
->
i_pts
;
p_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -587,17 +587,17 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_nb_bytes
=
in_buf
.
i_size
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_samples
;
in_buf
.
i_nb_samples
=
p_block
->
i_
nb_
samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_nb_bytes
=
out_buf
.
i_size
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_samples
;
out_buf
.
i_nb_samples
=
p_out
->
i_
nb_
samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
block_Release
(
p_block
);
p_out
->
i_buffer
=
out_buf
.
i_nb_bytes
;
p_out
->
i_samples
=
out_buf
.
i_nb_samples
;
p_out
->
i_
nb_
samples
=
out_buf
.
i_nb_samples
;
return
p_out
;
}
...
...
modules/audio_filter/resampler/linear.c
View file @
0c7e60bf
...
...
@@ -304,7 +304,7 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
int
i_out_size
;
int
i_bytes_per_frame
;
if
(
!
p_block
||
!
p_block
->
i_samples
)
if
(
!
p_block
||
!
p_block
->
i_
nb_
samples
)
{
if
(
p_block
)
block_Release
(
p_block
);
...
...
@@ -314,7 +314,7 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
i_bytes_per_frame
=
p_filter
->
fmt_out
.
audio
.
i_channels
*
p_filter
->
fmt_out
.
audio
.
i_bitspersample
/
8
;
i_out_size
=
i_bytes_per_frame
*
(
1
+
(
p_block
->
i_samples
*
i_out_size
=
i_bytes_per_frame
*
(
1
+
(
p_block
->
i_
nb_
samples
*
p_filter
->
fmt_out
.
audio
.
i_rate
/
p_filter
->
fmt_in
.
audio
.
i_rate
));
p_out
=
p_filter
->
pf_audio_buffer_new
(
p_filter
,
i_out_size
);
...
...
@@ -325,7 +325,7 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
return
NULL
;
}
p_out
->
i_samples
=
i_out_size
/
i_bytes_per_frame
;
p_out
->
i_
nb_
samples
=
i_out_size
/
i_bytes_per_frame
;
p_out
->
i_dts
=
p_block
->
i_dts
;
p_out
->
i_pts
=
p_block
->
i_pts
;
p_out
->
i_length
=
p_block
->
i_length
;
...
...
@@ -337,17 +337,17 @@ static block_t *Resample( filter_t *p_filter, block_t *p_block )
in_buf
.
p_buffer
=
p_block
->
p_buffer
;
in_buf
.
i_nb_bytes
=
p_block
->
i_buffer
;
in_buf
.
i_nb_samples
=
p_block
->
i_samples
;
in_buf
.
i_nb_samples
=
p_block
->
i_
nb_
samples
;
out_buf
.
p_buffer
=
p_out
->
p_buffer
;
out_buf
.
i_nb_bytes
=
p_out
->
i_buffer
;
out_buf
.
i_nb_samples
=
p_out
->
i_samples
;
out_buf
.
i_nb_samples
=
p_out
->
i_
nb_
samples
;
DoWork
(
(
aout_instance_t
*
)
p_filter
,
&
aout_filter
,
&
in_buf
,
&
out_buf
);
block_Release
(
p_block
);
p_out
->
i_buffer
=
out_buf
.
i_nb_bytes
;
p_out
->
i_samples
=
out_buf
.
i_nb_samples
;
p_out
->
i_
nb_
samples
=
out_buf
.
i_nb_samples
;
return
p_out
;
}
modules/codec/shine/shine_mod.c
View file @
0c7e60bf
...
...
@@ -216,7 +216,7 @@ static block_t *EncodeFrame( encoder_t *p_enc, aout_buffer_t *p_block )
start_date
+=
p_mp3_block
->
i_length
;
p_mp3_block
->
i_dts
=
p_mp3_block
->
i_pts
=
start_date
;
p_mp3_block
->
i_samples
=
SAMP_PER_FRAME1
;
p_mp3_block
->
i_
nb_
samples
=
SAMP_PER_FRAME1
;
block_ChainAppend
(
&
p_chain
,
p_mp3_block
);
...
...
modules/stream_out/smem.c
View file @
0c7e60bf
...
...
@@ -368,7 +368,7 @@ static int SendAudio( sout_stream_t *p_stream, sout_stream_id_t *id,
vlc_memcpy
(
p_pcm_buffer
,
p_buffer
->
p_buffer
,
i_size
);
/* Calling the postrender callback to tell the user his buffer is ready */
p_sys
->
pf_audio_postrender_callback
(
id
->
p_data
,
p_pcm_buffer
,
id
->
format
->
audio
.
i_channels
,
id
->
format
->
audio
.
i_rate
,
p_buffer
->
i_samples
,
id
->
format
->
audio
.
i_channels
,
id
->
format
->
audio
.
i_rate
,
p_buffer
->
i_
nb_
samples
,
id
->
format
->
audio
.
i_bitspersample
,
i_size
,
p_buffer
->
i_pts
);
block_ChainRelease
(
p_buffer
);
return
VLC_SUCCESS
;
...
...
modules/stream_out/transcode.c
View file @
0c7e60bf
...
...
@@ -1314,7 +1314,7 @@ static int transcode_audio_process( sout_stream_t *p_stream,
p_audio_buf
->
i_pts
;
p_audio_block
->
i_length
=
p_audio_buf
->
end_date
-
p_audio_buf
->
i_pts
;
p_audio_block
->
i_samples
=
p_audio_buf
->
i_nb_samples
;
p_audio_block
->
i_
nb_
samples
=
p_audio_buf
->
i_nb_samples
;
/* Run filter chain */
if
(
id
->
p_uf_chain
)
...
...
@@ -1328,7 +1328,7 @@ static int transcode_audio_process( sout_stream_t *p_stream,
p_audio_buf
->
p_buffer
=
p_audio_block
->
p_buffer
;
p_audio_buf
->
i_nb_bytes
=
p_audio_block
->
i_buffer
;
p_audio_buf
->
i_nb_samples
=
p_audio_block
->
i_samples
;
p_audio_buf
->
i_nb_samples
=
p_audio_block
->
i_
nb_
samples
;
p_audio_buf
->
i_pts
=
p_audio_block
->
i_dts
;
p_audio_buf
->
end_date
=
p_audio_block
->
i_dts
+
p_audio_block
->
i_length
;
...
...
@@ -1374,7 +1374,7 @@ static aout_buffer_t *audio_new_buffer( decoder_t *p_dec, int i_samples )
p_buffer
->
p_buffer
=
p_block
->
p_buffer
;
p_buffer
->
i_size
=
p_buffer
->
i_nb_bytes
=
p_block
->
i_buffer
;
p_buffer
->
i_nb_samples
=
i_samples
;
p_block
->
i_samples
=
i_samples
;
p_block
->
i_
nb_
samples
=
i_samples
;
return
p_buffer
;
}
...
...
src/input/es_out_timeshift.c
View file @
0c7e60bf
...
...
@@ -1173,7 +1173,7 @@ static void TsStoragePopCmd( ts_storage_t *p_storage, ts_cmd_t *p_cmd, bool b_fl
p_block
->
i_flags
=
block
.
i_flags
;
p_block
->
i_length
=
block
.
i_length
;
p_block
->
i_rate
=
block
.
i_rate
;
p_block
->
i_
samples
=
block
.
i
_samples
;
p_block
->
i_
nb_samples
=
block
.
i_nb
_samples
;
p_block
->
i_buffer
=
fread
(
p_block
->
p_buffer
,
1
,
block
.
i_buffer
,
p_storage
->
p_filer
);
}
p_cmd
->
send
.
p_block
=
p_block
;
...
...
src/misc/block.c
View file @
0c7e60bf
...
...
@@ -65,7 +65,7 @@ void block_Init( block_t *restrict b, void *buf, size_t size )
b
->
i_dts
=
VLC_TS_INVALID
;
b
->
i_length
=
0
;
b
->
i_rate
=
0
;
b
->
i_samples
=
0
;
b
->
i_
nb_
samples
=
0
;
b
->
p_buffer
=
buf
;
b
->
i_buffer
=
size
;
#ifndef NDEBUG
...
...
@@ -86,7 +86,7 @@ static void BlockMetaCopy( block_t *restrict out, const block_t *in )
out
->
i_flags
=
in
->
i_flags
;
out
->
i_length
=
in
->
i_length
;
out
->
i_rate
=
in
->
i_rate
;
out
->
i_
samples
=
in
->
i
_samples
;
out
->
i_
nb_samples
=
in
->
i_nb
_samples
;
}
/* Memory alignment */
...
...
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