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
8f189696
Commit
8f189696
authored
Jun 26, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store HLS context audio using flac compression.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
076e3e1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
testhls.cc
src/testhls.cc
+5
-4
No files found.
src/testhls.cc
View file @
8f189696
...
...
@@ -183,11 +183,12 @@ hls_embed_context (const string& in_dir, const string& out_dir, const string& fi
audio_master_data
.
samples
().
begin
()
+
end_point
*
audio_master_data
.
n_channels
());
WavData
out_wav_data
(
out_signal
,
audio_master_data
.
n_channels
(),
audio_master_data
.
sample_rate
(),
audio_master_data
.
bit_depth
());
err
=
out_wav_data
.
save
(
out_dir
+
"/"
+
segment
.
name
+
".wav"
);
err
=
xsystem
(
"flac "
+
out_dir
+
"/"
+
segment
.
name
+
".wav"
);
/* store everything we need in a mpegts file */
TSWriter
writer
;
writer
.
append_file
(
"full.
wav"
,
out_dir
+
"/"
+
segment
.
name
+
".wav
"
);
writer
.
append_file
(
"full.
flac"
,
out_dir
+
"/"
+
segment
.
name
+
".flac
"
);
writer
.
append_vars
(
"vars"
,
segment
.
vars
);
writer
.
process
(
in_dir
+
"/"
+
segment
.
name
,
out_dir
+
"/"
+
segment
.
name
);
...
...
@@ -311,15 +312,15 @@ hls_mark (const string& infile, const string& outfile, const string& bits)
info
(
"hls_elapsed_load %f
\n
"
,
(
get_time
()
-
start_time
)
*
1000
/* ms */
);
double
start_time1
=
get_time
();
const
TSReader
::
Entry
*
full_
wav
=
reader
.
find
(
"full.wav
"
);
if
(
!
full_
wav
)
const
TSReader
::
Entry
*
full_
flac
=
reader
.
find
(
"full.flac
"
);
if
(
!
full_
flac
)
{
error
(
"hls_mark: no embedded context found in %s
\n
"
,
infile
.
c_str
());
return
1
;
}
SFInputStream
in_stream
;
err
=
in_stream
.
open
(
&
full_
wav
->
data
);
err
=
in_stream
.
open
(
&
full_
flac
->
data
);
if
(
err
)
{
error
(
"hls_mark: %s
\n
"
,
err
.
message
());
...
...
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