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
7fa3fa11
Commit
7fa3fa11
authored
Jul 31, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: add default ID to AdaptationSet/Representation
parent
508d7a81
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
2 deletions
+27
-2
modules/demux/adaptative/playlist/BaseAdaptationSet.cpp
modules/demux/adaptative/playlist/BaseAdaptationSet.cpp
+14
-1
modules/demux/adaptative/playlist/BaseAdaptationSet.h
modules/demux/adaptative/playlist/BaseAdaptationSet.h
+2
-0
modules/demux/adaptative/playlist/BaseRepresentation.cpp
modules/demux/adaptative/playlist/BaseRepresentation.cpp
+3
-1
modules/demux/adaptative/playlist/CommonAttributesElements.cpp
...es/demux/adaptative/playlist/CommonAttributesElements.cpp
+5
-0
modules/demux/adaptative/playlist/CommonAttributesElements.h
modules/demux/adaptative/playlist/CommonAttributesElements.h
+3
-0
No files found.
modules/demux/adaptative/playlist/BaseAdaptationSet.cpp
View file @
7fa3fa11
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include "SegmentTemplate.h"
#include "SegmentTemplate.h"
#include "BasePeriod.h"
#include "BasePeriod.h"
#include "ID.hpp"
using
namespace
adaptative
;
using
namespace
adaptative
;
using
namespace
adaptative
::
playlist
;
using
namespace
adaptative
::
playlist
;
...
@@ -61,6 +62,17 @@ std::vector<BaseRepresentation*>& BaseAdaptationSet::getRepresentations()
...
@@ -61,6 +62,17 @@ std::vector<BaseRepresentation*>& BaseAdaptationSet::getRepresentations()
return
representations
;
return
representations
;
}
}
BaseRepresentation
*
BaseAdaptationSet
::
getRepresentationByID
(
const
ID
&
id
)
{
std
::
vector
<
BaseRepresentation
*>::
const_iterator
it
;
for
(
it
=
representations
.
begin
();
it
!=
representations
.
end
();
++
it
)
{
if
((
*
it
)
->
getID
()
==
id
)
return
*
it
;
}
return
NULL
;
}
void
BaseAdaptationSet
::
addRepresentation
(
BaseRepresentation
*
rep
)
void
BaseAdaptationSet
::
addRepresentation
(
BaseRepresentation
*
rep
)
{
{
representations
.
push_back
(
rep
);
representations
.
push_back
(
rep
);
...
@@ -80,7 +92,8 @@ bool BaseAdaptationSet::getBitstreamSwitching () const
...
@@ -80,7 +92,8 @@ bool BaseAdaptationSet::getBitstreamSwitching () const
void
BaseAdaptationSet
::
debug
(
vlc_object_t
*
obj
,
int
indent
)
const
void
BaseAdaptationSet
::
debug
(
vlc_object_t
*
obj
,
int
indent
)
const
{
{
std
::
string
text
(
indent
,
' '
);
std
::
string
text
(
indent
,
' '
);
text
.
append
(
"BaseAdaptationSet"
);
text
.
append
(
"BaseAdaptationSet "
);
text
.
append
(
id
.
str
());
msg_Dbg
(
obj
,
"%s"
,
text
.
c_str
());
msg_Dbg
(
obj
,
"%s"
,
text
.
c_str
());
std
::
vector
<
BaseRepresentation
*>::
const_iterator
k
;
std
::
vector
<
BaseRepresentation
*>::
const_iterator
k
;
for
(
k
=
representations
.
begin
();
k
!=
representations
.
end
();
++
k
)
for
(
k
=
representations
.
begin
();
k
!=
representations
.
end
();
++
k
)
...
...
modules/demux/adaptative/playlist/BaseAdaptationSet.h
View file @
7fa3fa11
...
@@ -38,6 +38,7 @@ namespace adaptative
...
@@ -38,6 +38,7 @@ namespace adaptative
{
{
class
BaseRepresentation
;
class
BaseRepresentation
;
class
BasePeriod
;
class
BasePeriod
;
class
ID
;
class
BaseAdaptationSet
:
public
CommonAttributesElements
,
class
BaseAdaptationSet
:
public
CommonAttributesElements
,
public
SegmentInformation
public
SegmentInformation
...
@@ -48,6 +49,7 @@ namespace adaptative
...
@@ -48,6 +49,7 @@ namespace adaptative
virtual
StreamFormat
getStreamFormat
()
const
;
/*reimpl*/
virtual
StreamFormat
getStreamFormat
()
const
;
/*reimpl*/
std
::
vector
<
BaseRepresentation
*>&
getRepresentations
();
std
::
vector
<
BaseRepresentation
*>&
getRepresentations
();
BaseRepresentation
*
getRepresentationByID
(
const
ID
&
);
void
setSwitchPolicy
(
bool
value
);
void
setSwitchPolicy
(
bool
value
);
bool
getBitstreamSwitching
()
const
;
bool
getBitstreamSwitching
()
const
;
void
addRepresentation
(
BaseRepresentation
*
rep
);
void
addRepresentation
(
BaseRepresentation
*
rep
);
...
...
modules/demux/adaptative/playlist/BaseRepresentation.cpp
View file @
7fa3fa11
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "BaseRepresentation.h"
#include "BaseRepresentation.h"
#include "BaseAdaptationSet.h"
#include "BaseAdaptationSet.h"
#include "SegmentTemplate.h"
#include "SegmentTemplate.h"
#include "ID.hpp"
using
namespace
adaptative
;
using
namespace
adaptative
;
using
namespace
adaptative
::
playlist
;
using
namespace
adaptative
::
playlist
;
...
@@ -73,7 +74,8 @@ void BaseRepresentation::addCodec(const std::string &codec)
...
@@ -73,7 +74,8 @@ void BaseRepresentation::addCodec(const std::string &codec)
void
BaseRepresentation
::
debug
(
vlc_object_t
*
obj
,
int
indent
)
const
void
BaseRepresentation
::
debug
(
vlc_object_t
*
obj
,
int
indent
)
const
{
{
std
::
string
text
(
indent
,
' '
);
std
::
string
text
(
indent
,
' '
);
text
.
append
(
"Representation"
);
text
.
append
(
"Representation "
);
text
.
append
(
id
.
str
());
msg_Dbg
(
obj
,
"%s"
,
text
.
c_str
());
msg_Dbg
(
obj
,
"%s"
,
text
.
c_str
());
std
::
vector
<
ISegment
*>
list
;
std
::
vector
<
ISegment
*>
list
;
getAllSegments
(
list
);
getAllSegments
(
list
);
...
...
modules/demux/adaptative/playlist/CommonAttributesElements.cpp
View file @
7fa3fa11
...
@@ -84,3 +84,8 @@ void CommonAttributesElements::addLang( const std::string &lang )
...
@@ -84,3 +84,8 @@ void CommonAttributesElements::addLang( const std::string &lang )
if
(
lang
.
empty
()
==
false
)
if
(
lang
.
empty
()
==
false
)
this
->
lang
.
push_back
(
lang
);
this
->
lang
.
push_back
(
lang
);
}
}
const
ID
&
CommonAttributesElements
::
getID
()
const
{
return
id
;
}
modules/demux/adaptative/playlist/CommonAttributesElements.h
View file @
7fa3fa11
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <list>
#include <list>
#include <string>
#include <string>
#include "ID.hpp"
namespace
adaptative
namespace
adaptative
{
{
...
@@ -44,12 +45,14 @@ namespace adaptative
...
@@ -44,12 +45,14 @@ namespace adaptative
void
setHeight
(
int
height
);
void
setHeight
(
int
height
);
const
std
::
list
<
std
::
string
>&
getLang
()
const
;
const
std
::
list
<
std
::
string
>&
getLang
()
const
;
void
addLang
(
const
std
::
string
&
lang
);
void
addLang
(
const
std
::
string
&
lang
);
const
ID
&
getID
()
const
;
protected:
protected:
std
::
string
mimeType
;
std
::
string
mimeType
;
int
width
;
int
width
;
int
height
;
int
height
;
std
::
list
<
std
::
string
>
lang
;
std
::
list
<
std
::
string
>
lang
;
ID
id
;
};
};
}
}
}
}
...
...
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