Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
51de8359
Commit
51de8359
authored
May 21, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-enable total sample test for seek-watermarking.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
746685eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
TODO
src/TODO
+0
-1
wmadd.cc
src/wmadd.cc
+11
-11
No files found.
src/TODO
View file @
51de8359
...
@@ -5,5 +5,4 @@ videowmark:
...
@@ -5,5 +5,4 @@ videowmark:
opus length ffprobe -show_format phil.mkv
opus length ffprobe -show_format phil.mkv
video-streaming:
video-streaming:
- total sample test should be reenabled
- clang
- clang
src/wmadd.cc
View file @
51de8359
...
@@ -687,11 +687,12 @@ add_stream_watermark (AudioInputStream *in_stream, AudioOutputStream *out_stream
...
@@ -687,11 +687,12 @@ add_stream_watermark (AudioInputStream *in_stream, AudioOutputStream *out_stream
size_t
total_input_frames
=
0
;
size_t
total_input_frames
=
0
;
size_t
total_output_frames
=
0
;
size_t
total_output_frames
=
0
;
size_t
zero_frames_in
=
zero_frames
;
size_t
zero_frames_out
=
zero_frames
;
size_t
zero_frames_out
=
zero_frames
;
Error
err
;
Error
err
;
if
(
zero_frames
>=
Params
::
frame_size
)
if
(
zero_frames
_in
>=
Params
::
frame_size
)
{
{
const
size_t
skip_frames
=
zero_frames
-
zero_frames
%
Params
::
frame_size
;
const
size_t
skip_frames
=
zero_frames
_in
-
zero_frames_in
%
Params
::
frame_size
;
total_input_frames
+=
skip_frames
;
total_input_frames
+=
skip_frames
;
size_t
out
=
wm_resampler
.
skip
(
skip_frames
);
size_t
out
=
wm_resampler
.
skip
(
skip_frames
);
...
@@ -703,15 +704,15 @@ add_stream_watermark (AudioInputStream *in_stream, AudioOutputStream *out_stream
...
@@ -703,15 +704,15 @@ add_stream_watermark (AudioInputStream *in_stream, AudioOutputStream *out_stream
zero_frames_out
-=
out
;
zero_frames_out
-=
out
;
total_output_frames
+=
out
;
total_output_frames
+=
out
;
zero_frames
-=
skip_frames
;
zero_frames
_in
-=
skip_frames
;
}
}
while
(
true
)
while
(
true
)
{
{
if
(
zero_frames
>
0
)
if
(
zero_frames
_in
>
0
)
{
{
err
=
in_stream
->
read_frames
(
samples
,
Params
::
frame_size
-
zero_frames
);
err
=
in_stream
->
read_frames
(
samples
,
Params
::
frame_size
-
zero_frames
_in
);
samples
.
insert
(
samples
.
begin
(),
zero_frames
*
n_channels
,
0
);
samples
.
insert
(
samples
.
begin
(),
zero_frames
_in
*
n_channels
,
0
);
zero_frames
=
0
;
zero_frames
_in
=
0
;
}
}
else
else
{
{
...
@@ -775,16 +776,15 @@ add_stream_watermark (AudioInputStream *in_stream, AudioOutputStream *out_stream
...
@@ -775,16 +776,15 @@ add_stream_watermark (AudioInputStream *in_stream, AudioOutputStream *out_stream
}
}
total_output_frames
+=
samples
.
size
()
/
n_channels
;
total_output_frames
+=
samples
.
size
()
/
n_channels
;
}
}
#if 0
if
(
in_stream
->
n_frames
()
!=
AudioInputStream
::
N_FRAMES_UNKNOWN
)
if
(
in_stream
->
n_frames
()
!=
AudioInputStream
::
N_FRAMES_UNKNOWN
)
{
{
if (total_output_frames != in_stream->n_frames())
const
size_t
expect_frames
=
in_stream
->
n_frames
()
+
zero_frames
;
if
(
total_output_frames
!=
expect_frames
)
{
{
error ("audiowmark: error: input frames (%zd) != output frames (%zd)\n",
in_stream->n_frames()
, total_output_frames);
error
(
"audiowmark: error: input frames (%zd) != output frames (%zd)
\n
"
,
expect_frames
,
total_output_frames
);
return
1
;
return
1
;
}
}
}
}
#endif
err
=
out_stream
->
close
();
err
=
out_stream
->
close
();
if
(
err
)
if
(
err
)
...
...
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