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
77987aba
Commit
77987aba
authored
Jun 29, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support "-" as filename for hls-mark, to use stdin as input.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
88c5fbba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
mpegts.cc
src/mpegts.cc
+16
-4
mpegts.hh
src/mpegts.hh
+1
-0
No files found.
src/mpegts.cc
View file @
77987aba
...
...
@@ -275,11 +275,23 @@ TSReader::parse_header (Header& header, vector<unsigned char>& data)
Error
TSReader
::
load
(
const
string
&
inname
)
{
FILE
*
infile
=
fopen
(
inname
.
c_str
(),
"r"
);
ScopedFile
infile_s
(
infile
);
if
(
!
infile
)
return
Error
(
string_printf
(
"error opening input .ts '%s'"
,
inname
.
c_str
()));
if
(
inname
==
"-"
)
{
return
load
(
stdin
);
}
else
{
FILE
*
infile
=
fopen
(
inname
.
c_str
(),
"r"
);
ScopedFile
infile_s
(
infile
);
if
(
!
infile
)
return
Error
(
string_printf
(
"error opening input .ts '%s'"
,
inname
.
c_str
()));
return
load
(
infile
);
}
}
Error
TSReader
::
load
(
FILE
*
infile
)
{
vector
<
unsigned
char
>
awmk_stream
;
Header
header
;
bool
header_valid
=
false
;
...
...
src/mpegts.hh
View file @
77987aba
...
...
@@ -34,6 +34,7 @@ private:
};
std
::
vector
<
Entry
>
m_entries
;
bool
parse_header
(
Header
&
header
,
std
::
vector
<
unsigned
char
>&
data
);
Error
load
(
FILE
*
infile
);
public
:
Error
load
(
const
std
::
string
&
inname
);
const
std
::
vector
<
Entry
>&
entries
();
...
...
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