Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
82a8e3f2
Commit
82a8e3f2
authored
Nov 17, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter: dash: update profiles
parent
4f091cf0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
78 additions
and
38 deletions
+78
-38
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
+4
-3
modules/stream_filter/dash/mpd/MPD.cpp
modules/stream_filter/dash/mpd/MPD.cpp
+3
-3
modules/stream_filter/dash/mpd/MPD.h
modules/stream_filter/dash/mpd/MPD.h
+3
-3
modules/stream_filter/dash/mpd/MPDFactory.cpp
modules/stream_filter/dash/mpd/MPDFactory.cpp
+2
-2
modules/stream_filter/dash/mpd/MPDFactory.h
modules/stream_filter/dash/mpd/MPDFactory.h
+1
-1
modules/stream_filter/dash/mpd/Profile.cpp
modules/stream_filter/dash/mpd/Profile.cpp
+48
-18
modules/stream_filter/dash/mpd/Profile.hpp
modules/stream_filter/dash/mpd/Profile.hpp
+9
-1
modules/stream_filter/dash/xml/DOMParser.cpp
modules/stream_filter/dash/xml/DOMParser.cpp
+7
-6
modules/stream_filter/dash/xml/DOMParser.h
modules/stream_filter/dash/xml/DOMParser.h
+1
-1
No files found.
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
View file @
82a8e3f2
...
...
@@ -175,9 +175,10 @@ void IsoffMainParser::print ()
{
if
(
mpd
)
{
msg_Dbg
(
p_stream
,
"MPD profile=%d mediaPresentationDuration=%ld minBufferTime=%ld"
,
mpd
->
getProfile
(),
mpd
->
getDuration
(),
mpd
->
getMinBufferTime
());
msg_Dbg
(
p_stream
,
"MPD profile=%s mediaPresentationDuration=%ld minBufferTime=%ld"
,
static_cast
<
std
::
string
>
(
mpd
->
getProfile
()).
c_str
(),
mpd
->
getDuration
(),
mpd
->
getMinBufferTime
());
std
::
vector
<
BaseUrl
*>::
const_iterator
h
;
for
(
h
=
mpd
->
getBaseUrls
().
begin
();
h
!=
mpd
->
getBaseUrls
().
end
();
h
++
)
msg_Dbg
(
p_stream
,
"BaseUrl=%s"
,
(
*
h
)
->
getUrl
().
c_str
());
...
...
modules/stream_filter/dash/mpd/MPD.cpp
View file @
82a8e3f2
...
...
@@ -158,12 +158,12 @@ void MPD::setAvailabilityEndTime(time_t time)
this
->
availabilityEndTime
=
time
;
}
Profile
::
Name
MPD
::
getProfile
()
const
Profile
MPD
::
getProfile
()
const
{
return
this
->
profile
;
return
profile
;
}
void
MPD
::
setProfile
(
Profile
::
Name
profile
)
void
MPD
::
setProfile
(
Profile
profile
)
{
this
->
profile
=
profile
;
}
modules/stream_filter/dash/mpd/MPD.h
View file @
82a8e3f2
...
...
@@ -44,8 +44,8 @@ namespace dash
MPD
();
virtual
~
MPD
();
Profile
::
Name
getProfile
()
const
;
void
setProfile
(
Profile
::
Name
profile
);
Profile
getProfile
()
const
;
void
setProfile
(
Profile
profile
);
bool
isLive
()
const
;
void
setLive
(
bool
live
);
time_t
getAvailabilityStartTime
()
const
;
...
...
@@ -69,7 +69,7 @@ namespace dash
void
setProgramInformation
(
ProgramInformation
*
progInfo
);
private:
Profile
::
Name
profile
;
Profile
profile
;
bool
live
;
time_t
availabilityStartTime
;
time_t
availabilityEndTime
;
...
...
modules/stream_filter/dash/mpd/MPDFactory.cpp
View file @
82a8e3f2
...
...
@@ -31,9 +31,9 @@
using
namespace
dash
::
xml
;
using
namespace
dash
::
mpd
;
MPD
*
MPDFactory
::
create
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
,
Profile
::
Name
profile
)
MPD
*
MPDFactory
::
create
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
,
Profile
profile
)
{
switch
(
profile
)
switch
(
profile
)
{
case
dash
:
:
mpd
::
Profile
::
Full
:
case
dash
:
:
mpd
::
Profile
::
ISOOnDemand
:
...
...
modules/stream_filter/dash/mpd/MPDFactory.h
View file @
82a8e3f2
...
...
@@ -36,7 +36,7 @@ namespace dash
class
MPDFactory
{
public:
static
MPD
*
create
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
,
Profile
::
Name
profile
);
static
MPD
*
create
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
,
Profile
profile
);
private:
static
MPD
*
createBasicCMMPD
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
);
...
...
modules/stream_filter/dash/mpd/Profile.cpp
View file @
82a8e3f2
...
...
@@ -25,26 +25,36 @@
using
namespace
dash
::
mpd
;
Profile
::
Name
Profile
::
getNameByURN
(
std
::
string
urn
)
struct
{
struct
{
const
Name
name
;
const
char
*
urn
;
}
urnmap
[]
=
{
{
Full
,
"urn:mpeg:dash:profile:full:2011"
},
{
ISOOnDemand
,
"urn:mpeg:dash:profile:isoff-on-demand:2011"
},
{
ISOOnDemand
,
"urn:mpeg:mpegB:profile:dash:isoff-basic-on-demand:cm"
},
{
ISOOnDemand
,
"urn:mpeg:dash:profile:isoff-ondemand:2011"
},
{
ISOMain
,
"urn:mpeg:dash:profile:isoff-main:2011"
},
{
ISOLive
,
"urn:mpeg:dash:profile:isoff-live:2011"
},
{
MPEG2TSMain
,
"urn:mpeg:dash:profile:mp2t-main:2011"
},
{
MPEG2TSSimple
,
"urn:mpeg:dash:profile:mp2t-simple:2011"
},
{
Unknown
,
""
},
};
const
Profile
::
Name
name
;
const
char
*
urn
;
}
const
urnmap
[]
=
{
{
Profile
::
Full
,
"urn:mpeg:dash:profile:full:2011"
},
{
Profile
::
ISOOnDemand
,
"urn:mpeg:dash:profile:isoff-on-demand:2011"
},
{
Profile
::
ISOOnDemand
,
"urn:mpeg:mpegB:profile:dash:isoff-basic-on-demand:cm"
},
{
Profile
::
ISOOnDemand
,
"urn:mpeg:dash:profile:isoff-ondemand:2011"
},
{
Profile
::
ISOMain
,
"urn:mpeg:dash:profile:isoff-main:2011"
},
{
Profile
::
ISOLive
,
"urn:mpeg:dash:profile:isoff-live:2011"
},
{
Profile
::
MPEG2TSMain
,
"urn:mpeg:dash:profile:mp2t-main:2011"
},
{
Profile
::
MPEG2TSSimple
,
"urn:mpeg:dash:profile:mp2t-simple:2011"
},
{
Profile
::
Unknown
,
""
},
};
Profile
::
Profile
(
Name
name
)
{
type
=
name
;
}
Profile
::
Profile
(
const
std
::
string
&
urn
)
{
type
=
getNameByURN
(
urn
);
}
Profile
::
Name
Profile
::
getNameByURN
(
const
std
::
string
&
urn
)
const
{
for
(
int
i
=
0
;
urnmap
[
i
].
name
!=
Unknown
;
i
++
)
{
if
(
urn
==
urnmap
[
i
].
urn
)
...
...
@@ -52,3 +62,23 @@ Profile::Name Profile::getNameByURN(std::string urn)
}
return
Unknown
;
}
Profile
::
operator
Profile
::
Name
()
{
return
type
;
}
Profile
::
operator
std
::
string
()
{
for
(
int
i
=
0
;
urnmap
[
i
].
name
!=
Unknown
;
i
++
)
{
if
(
urnmap
[
i
].
name
==
type
)
return
std
::
string
(
urnmap
[
i
].
urn
);
}
return
std
::
string
();
}
bool
Profile
::
operator
==
(
Profile
&
profile
)
const
{
return
profile
.
type
==
type
;
}
modules/stream_filter/dash/mpd/Profile.hpp
View file @
82a8e3f2
...
...
@@ -39,7 +39,15 @@ namespace dash
MPEG2TSMain
,
MPEG2TSSimple
,
};
static
Name
getNameByURN
(
std
::
string
urn
);
Profile
(
Name
);
Profile
(
const
std
::
string
&
);
bool
operator
==
(
Profile
&
)
const
;
operator
Profile
::
Name
();
operator
std
::
string
();
private:
Name
getNameByURN
(
const
std
::
string
&
)
const
;
Name
type
;
};
}
}
...
...
modules/stream_filter/dash/xml/DOMParser.cpp
View file @
82a8e3f2
...
...
@@ -161,14 +161,15 @@ bool DOMParser::isDash (stream_t *stream)
}
return
false
;
}
Profile
::
Name
DOMParser
::
getProfile
()
Profile
DOMParser
::
getProfile
()
const
{
if
(
this
->
root
==
NULL
)
return
dash
::
mpd
::
Profile
::
Unknown
;
return
Profile
(
Profile
::
Unknown
)
;
std
::
string
profile
=
this
->
root
->
getAttributeValue
(
"profiles"
);
if
(
profile
.
length
()
==
0
)
profile
=
this
->
root
->
getAttributeValue
(
"profile"
);
//The standard spells it the both ways...
std
::
string
urn
=
this
->
root
->
getAttributeValue
(
"profiles"
);
if
(
urn
.
length
()
==
0
)
urn
=
this
->
root
->
getAttributeValue
(
"profile"
);
//The standard spells it the both ways...
return
dash
::
mpd
::
Profile
::
getNameByURN
(
profile
);
return
Profile
(
urn
);
}
modules/stream_filter/dash/xml/DOMParser.h
View file @
82a8e3f2
...
...
@@ -46,7 +46,7 @@ namespace dash
Node
*
getRootNode
();
void
print
();
static
bool
isDash
(
stream_t
*
stream
);
mpd
::
Profile
::
Name
getProfile
()
;
mpd
::
Profile
getProfile
()
const
;
private:
Node
*
root
;
...
...
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