Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
e78f7139
Commit
e78f7139
authored
Dec 19, 2014
by
François Cartegnie
🤞
Browse files
demux: dash: add IsoTime helper
parent
6ead2bae
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
View file @
e78f7139
...
...
@@ -65,11 +65,11 @@ void IsoffMainParser::setMPDAttributes ()
it
=
attr
.
find
(
"mediaPresentationDuration"
);
if
(
it
!=
attr
.
end
())
this
->
mpd
->
setDuration
(
str_duration
(
it
->
second
.
c_str
()
));
this
->
mpd
->
setDuration
(
IsoTime
(
it
->
second
));
it
=
attr
.
find
(
"minBufferTime"
);
if
(
it
!=
attr
.
end
())
this
->
mpd
->
setMinBufferTime
(
str_duration
(
it
->
second
.
c_str
()
));
this
->
mpd
->
setMinBufferTime
(
IsoTime
(
it
->
second
));
it
=
attr
.
find
(
"type"
);
if
(
it
!=
attr
.
end
())
...
...
@@ -344,3 +344,13 @@ void IsoffMainParser::print ()
}
}
}
IsoTime
::
IsoTime
(
const
std
::
string
&
str
)
{
time
=
str_duration
(
str
.
c_str
());
}
IsoTime
::
operator
mtime_t
()
const
{
return
time
;
}
modules/stream_filter/dash/mpd/IsoffMainParser.h
View file @
e78f7139
...
...
@@ -60,6 +60,16 @@ namespace dash
size_t
parseSegmentList
(
dash
::
xml
::
Node
*
,
SegmentInformation
*
);
size_t
parseSegmentTemplate
(
dash
::
xml
::
Node
*
,
SegmentInformation
*
);
};
class
IsoTime
{
public:
IsoTime
(
const
std
::
string
&
);
operator
mtime_t
()
const
;
private:
mtime_t
time
;
};
}
}
...
...
Write
Preview
Supports
Markdown
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