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
08b864b7
Commit
08b864b7
authored
May 10, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: remove confusing namespace
parent
da6b5aac
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
166 additions
and
170 deletions
+166
-170
modules/demux/adaptative/PlaylistManager.cpp
modules/demux/adaptative/PlaylistManager.cpp
+17
-17
modules/demux/adaptative/PlaylistManager.h
modules/demux/adaptative/PlaylistManager.h
+2
-2
modules/demux/adaptative/SegmentTracker.cpp
modules/demux/adaptative/SegmentTracker.cpp
+1
-1
modules/demux/adaptative/SegmentTracker.hpp
modules/demux/adaptative/SegmentTracker.hpp
+1
-1
modules/demux/adaptative/Streams.cpp
modules/demux/adaptative/Streams.cpp
+15
-17
modules/demux/adaptative/Streams.hpp
modules/demux/adaptative/Streams.hpp
+89
-90
modules/demux/adaptative/StreamsType.hpp
modules/demux/adaptative/StreamsType.hpp
+15
-16
modules/demux/adaptative/logic/AbstractAdaptationLogic.h
modules/demux/adaptative/logic/AbstractAdaptationLogic.h
+1
-1
modules/demux/adaptative/logic/AlwaysBestAdaptationLogic.cpp
modules/demux/adaptative/logic/AlwaysBestAdaptationLogic.cpp
+1
-1
modules/demux/adaptative/logic/AlwaysBestAdaptationLogic.h
modules/demux/adaptative/logic/AlwaysBestAdaptationLogic.h
+1
-1
modules/demux/adaptative/logic/AlwaysLowestAdaptationLogic.cpp
...es/demux/adaptative/logic/AlwaysLowestAdaptationLogic.cpp
+1
-1
modules/demux/adaptative/logic/AlwaysLowestAdaptationLogic.hpp
...es/demux/adaptative/logic/AlwaysLowestAdaptationLogic.hpp
+1
-1
modules/demux/adaptative/logic/RateBasedAdaptationLogic.cpp
modules/demux/adaptative/logic/RateBasedAdaptationLogic.cpp
+2
-2
modules/demux/adaptative/logic/RateBasedAdaptationLogic.h
modules/demux/adaptative/logic/RateBasedAdaptationLogic.h
+2
-2
modules/demux/adaptative/logic/Representationselectors.cpp
modules/demux/adaptative/logic/Representationselectors.cpp
+3
-3
modules/demux/adaptative/logic/Representationselectors.hpp
modules/demux/adaptative/logic/Representationselectors.hpp
+3
-3
modules/demux/adaptative/playlist/BasePeriod.cpp
modules/demux/adaptative/playlist/BasePeriod.cpp
+4
-4
modules/demux/adaptative/playlist/BasePeriod.h
modules/demux/adaptative/playlist/BasePeriod.h
+2
-2
modules/demux/dash/DASHManager.cpp
modules/demux/dash/DASHManager.cpp
+1
-1
modules/demux/dash/dash.cpp
modules/demux/dash/dash.cpp
+4
-4
No files found.
modules/demux/adaptative/PlaylistManager.cpp
View file @
08b864b7
...
...
@@ -53,14 +53,14 @@ PlaylistManager::PlaylistManager( AbstractPlaylist *pl,
stream
(
stream
),
nextPlaylistupdate
(
0
)
{
for
(
int
i
=
0
;
i
<
Stream
s
::
c
ount
;
i
++
)
for
(
int
i
=
0
;
i
<
Stream
TypeC
ount
;
i
++
)
streams
[
i
]
=
NULL
;
}
PlaylistManager
::~
PlaylistManager
()
{
delete
conManager
;
for
(
int
i
=
0
;
i
<
Stream
s
::
c
ount
;
i
++
)
for
(
int
i
=
0
;
i
<
Stream
TypeC
ount
;
i
++
)
delete
streams
[
i
];
}
...
...
@@ -70,13 +70,13 @@ bool PlaylistManager::start(demux_t *demux)
if
(
!
period
)
return
false
;
for
(
int
i
=
0
;
i
<
Stream
s
::
c
ount
;
i
++
)
for
(
int
i
=
0
;
i
<
Stream
TypeC
ount
;
i
++
)
{
Stream
s
::
Type
type
=
static_cast
<
Streams
::
Type
>
(
i
);
Stream
Type
type
=
static_cast
<
Stream
Type
>
(
i
);
const
BaseAdaptationSet
*
set
=
period
->
getAdaptationSet
(
type
);
if
(
set
)
{
streams
[
type
]
=
new
(
std
::
nothrow
)
Stream
s
::
Stream
(
set
->
getMimeType
());
streams
[
type
]
=
new
(
std
::
nothrow
)
Stream
(
set
->
getMimeType
());
if
(
!
streams
[
type
])
continue
;
AbstractAdaptationLogic
*
logic
=
createLogic
(
logicType
);
...
...
@@ -112,22 +112,22 @@ bool PlaylistManager::start(demux_t *demux)
return
true
;
}
Stream
s
::
Stream
::
status
PlaylistManager
::
demux
(
mtime_t
nzdeadline
)
Stream
::
status
PlaylistManager
::
demux
(
mtime_t
nzdeadline
)
{
Stream
s
::
Stream
::
status
i_return
=
Streams
::
Stream
::
status_demuxed
;
Stream
::
status
i_return
=
Stream
::
status_demuxed
;
for
(
int
type
=
0
;
type
<
Stream
s
::
c
ount
;
type
++
)
for
(
int
type
=
0
;
type
<
Stream
TypeC
ount
;
type
++
)
{
if
(
!
streams
[
type
])
continue
;
Stream
s
::
Stream
::
status
i_ret
=
Stream
::
status
i_ret
=
streams
[
type
]
->
demux
(
conManager
,
nzdeadline
);
if
(
i_ret
<
Stream
s
::
Stream
::
status_eof
)
if
(
i_ret
<
Stream
::
status_eof
)
return
i_ret
;
else
if
(
i_ret
==
Stream
s
::
Stream
::
status_buffering
)
i_return
=
Stream
s
::
Stream
::
status_buffering
;
else
if
(
i_ret
==
Stream
::
status_buffering
)
i_return
=
Stream
::
status_buffering
;
}
return
i_return
;
...
...
@@ -136,7 +136,7 @@ Streams::Stream::status PlaylistManager::demux(mtime_t nzdeadline)
mtime_t
PlaylistManager
::
getPCR
()
const
{
mtime_t
pcr
=
VLC_TS_INVALID
;
for
(
int
type
=
0
;
type
<
Stream
s
::
c
ount
;
type
++
)
for
(
int
type
=
0
;
type
<
Stream
TypeC
ount
;
type
++
)
{
if
(
!
streams
[
type
])
continue
;
...
...
@@ -148,7 +148,7 @@ mtime_t PlaylistManager::getPCR() const
int
PlaylistManager
::
getGroup
()
const
{
for
(
int
type
=
0
;
type
<
Stream
s
::
c
ount
;
type
++
)
for
(
int
type
=
0
;
type
<
Stream
TypeC
ount
;
type
++
)
{
if
(
!
streams
[
type
])
continue
;
...
...
@@ -160,7 +160,7 @@ int PlaylistManager::getGroup() const
int
PlaylistManager
::
esCount
()
const
{
int
es
=
0
;
for
(
int
type
=
0
;
type
<
Stream
s
::
c
ount
;
type
++
)
for
(
int
type
=
0
;
type
<
Stream
TypeC
ount
;
type
++
)
{
if
(
!
streams
[
type
])
continue
;
...
...
@@ -183,7 +183,7 @@ bool PlaylistManager::setPosition(mtime_t time)
for
(
int
real
=
0
;
real
<
2
;
real
++
)
{
/* Always probe if we can seek first */
for
(
int
type
=
0
;
type
<
Stream
s
::
c
ount
;
type
++
)
for
(
int
type
=
0
;
type
<
Stream
TypeC
ount
;
type
++
)
{
if
(
!
streams
[
type
])
continue
;
...
...
@@ -200,7 +200,7 @@ bool PlaylistManager::seekAble() const
if
(
playlist
->
isLive
())
return
false
;
for
(
int
type
=
0
;
type
<
Stream
s
::
c
ount
;
type
++
)
for
(
int
type
=
0
;
type
<
Stream
TypeC
ount
;
type
++
)
{
if
(
!
streams
[
type
])
continue
;
...
...
modules/demux/adaptative/PlaylistManager.h
View file @
08b864b7
...
...
@@ -50,7 +50,7 @@ namespace adaptative
bool
start
(
demux_t
*
);
Stream
s
::
Stream
::
status
demux
(
mtime_t
);
Stream
::
status
demux
(
mtime_t
);
mtime_t
getDuration
()
const
;
mtime_t
getPCR
()
const
;
int
getGroup
()
const
;
...
...
@@ -66,7 +66,7 @@ namespace adaptative
AbstractAdaptationLogic
::
LogicType
logicType
;
AbstractPlaylist
*
playlist
;
stream_t
*
stream
;
Stream
s
::
Stream
*
streams
[
Streams
::
c
ount
];
Stream
*
streams
[
StreamTypeC
ount
];
mtime_t
nextPlaylistupdate
;
};
...
...
modules/demux/adaptative/SegmentTracker.cpp
View file @
08b864b7
...
...
@@ -53,7 +53,7 @@ void SegmentTracker::resetCounter()
prevRepresentation
=
NULL
;
}
Chunk
*
SegmentTracker
::
getNextChunk
(
Stream
s
::
Type
type
)
Chunk
*
SegmentTracker
::
getNextChunk
(
StreamType
type
)
{
BaseRepresentation
*
rep
;
ISegment
*
segment
;
...
...
modules/demux/adaptative/SegmentTracker.hpp
View file @
08b864b7
...
...
@@ -58,7 +58,7 @@ namespace adaptative
void
setAdaptationLogic
(
AbstractAdaptationLogic
*
);
void
resetCounter
();
Chunk
*
getNextChunk
(
Stream
s
::
Type
);
Chunk
*
getNextChunk
(
StreamType
);
bool
setPosition
(
mtime_t
,
bool
);
mtime_t
getSegmentStart
()
const
;
...
...
modules/demux/adaptative/Streams.cpp
View file @
08b864b7
...
...
@@ -28,23 +28,21 @@
#include <vlc_stream.h>
#include <vlc_demux.h>
using
namespace
adaptative
::
Streams
;
using
namespace
adaptative
;
using
namespace
adaptative
::
http
;
using
namespace
adaptative
::
logic
;
using
namespace
adaptative
::
Streams
;
Stream
::
Stream
(
const
std
::
string
&
mime
)
{
init
(
mimeToType
(
mime
),
mimeToFormat
(
mime
));
}
Stream
::
Stream
(
const
Type
type
,
const
Format
format
)
Stream
::
Stream
(
const
StreamType
type
,
const
Stream
Format
format
)
{
init
(
type
,
format
);
}
void
Stream
::
init
(
const
Type
type_
,
const
Format
format_
)
void
Stream
::
init
(
const
StreamType
type_
,
const
Stream
Format
format_
)
{
type
=
type_
;
format
=
format_
;
...
...
@@ -63,31 +61,31 @@ Stream::~Stream()
delete
segmentTracker
;
}
Type
Stream
::
mimeToType
(
const
std
::
string
&
mime
)
Stream
Type
Stream
::
mimeToType
(
const
std
::
string
&
mime
)
{
Type
mimetype
;
Stream
Type
mimetype
;
if
(
!
mime
.
compare
(
0
,
6
,
"video/"
))
mimetype
=
Stream
s
::
VIDEO
;
mimetype
=
Stream
Type
::
VIDEO
;
else
if
(
!
mime
.
compare
(
0
,
6
,
"audio/"
))
mimetype
=
Stream
s
::
AUDIO
;
mimetype
=
Stream
Type
::
AUDIO
;
else
if
(
!
mime
.
compare
(
0
,
12
,
"application/"
))
mimetype
=
Stream
s
::
APPLICATION
;
mimetype
=
Stream
Type
::
APPLICATION
;
else
/* unknown of unsupported */
mimetype
=
Stream
s
::
UNKNOWN
;
mimetype
=
Stream
Type
::
UNKNOWN
;
return
mimetype
;
}
Format
Stream
::
mimeToFormat
(
const
std
::
string
&
mime
)
Stream
Format
Stream
::
mimeToFormat
(
const
std
::
string
&
mime
)
{
Format
format
=
Streams
::
UNSUPPORTED
;
StreamFormat
format
=
StreamFormat
::
UNSUPPORTED
;
std
::
string
::
size_type
pos
=
mime
.
find
(
"/"
);
if
(
pos
!=
std
::
string
::
npos
)
{
std
::
string
tail
=
mime
.
substr
(
pos
+
1
);
if
(
tail
==
"mp4"
)
format
=
Stream
s
::
MP4
;
format
=
Stream
Format
::
MP4
;
else
if
(
tail
==
"mp2t"
)
format
=
Stream
s
::
MPEG2TS
;
format
=
Stream
Format
::
MPEG2TS
;
}
return
format
;
}
...
...
@@ -96,10 +94,10 @@ void Stream::create(demux_t *demux, AbstractAdaptationLogic *logic, SegmentTrack
{
switch
(
format
)
{
case
adaptative
:
:
Streams
::
MP4
:
case
StreamFormat
:
:
MP4
:
output
=
new
MP4StreamOutput
(
demux
);
break
;
case
adaptative
:
:
Streams
::
MPEG2TS
:
case
StreamFormat
:
:
MPEG2TS
:
output
=
new
MPEG2TSStreamOutput
(
demux
);
break
;
default:
...
...
modules/demux/adaptative/Streams.hpp
View file @
08b864b7
...
...
@@ -44,8 +44,7 @@ namespace adaptative
class
AbstractAdaptationLogic
;
}
namespace
Streams
{
class
AbstractStreamOutput
;
using
namespace
http
;
...
...
@@ -55,11 +54,11 @@ namespace adaptative
{
public:
Stream
(
const
std
::
string
&
mime
);
Stream
(
const
Type
,
const
Format
);
Stream
(
const
StreamType
,
const
Stream
Format
);
~
Stream
();
bool
operator
==
(
const
Stream
&
)
const
;
static
Type
mimeToType
(
const
std
::
string
&
mime
);
static
Format
mimeToFormat
(
const
std
::
string
&
mime
);
static
Stream
Type
mimeToType
(
const
std
::
string
&
mime
);
static
Stream
Format
mimeToFormat
(
const
std
::
string
&
mime
);
void
create
(
demux_t
*
,
AbstractAdaptationLogic
*
,
SegmentTracker
*
);
bool
isEOF
()
const
;
mtime_t
getPCR
()
const
;
...
...
@@ -73,10 +72,10 @@ namespace adaptative
private:
Chunk
*
getChunk
();
void
init
(
const
Type
,
const
Format
);
void
init
(
const
StreamType
,
const
Stream
Format
);
size_t
read
(
HTTPConnectionManager
*
);
Type
type
;
Format
format
;
Stream
Type
type
;
Stream
Format
format
;
AbstractStreamOutput
*
output
;
AbstractAdaptationLogic
*
adaptationLogic
;
SegmentTracker
*
segmentTracker
;
...
...
@@ -140,6 +139,6 @@ namespace adaptative
MPEG2TSStreamOutput
(
demux_t
*
);
virtual
~
MPEG2TSStreamOutput
(){}
};
}
}
#endif // STREAMS_HPP
modules/demux/adaptative/StreamsType.hpp
View file @
08b864b7
...
...
@@ -22,9 +22,8 @@
namespace
adaptative
{
namespace
Streams
{
enum
Type
enum
StreamType
{
UNKNOWN
=
0
,
VIDEO
,
...
...
@@ -32,15 +31,15 @@ namespace adaptative
APPLICATION
};
enum
Format
enum
Stream
Format
{
UNSUPPORTED
=
0
,
MP4
,
MPEG2TS
};
static
const
int
c
ount
=
APPLICATION
+
1
;
}
static
const
int
StreamTypeC
ount
=
APPLICATION
+
1
;
}
#endif
modules/demux/adaptative/logic/AbstractAdaptationLogic.h
View file @
08b864b7
...
...
@@ -46,7 +46,7 @@ namespace adaptative
AbstractAdaptationLogic
();
virtual
~
AbstractAdaptationLogic
();
virtual
BaseRepresentation
*
getCurrentRepresentation
(
Stream
s
::
Type
,
BasePeriod
*
)
const
=
0
;
virtual
BaseRepresentation
*
getCurrentRepresentation
(
StreamType
,
BasePeriod
*
)
const
=
0
;
virtual
void
updateDownloadRate
(
size_t
,
mtime_t
);
enum
LogicType
...
...
modules/demux/adaptative/logic/AlwaysBestAdaptationLogic.cpp
View file @
08b864b7
...
...
@@ -36,7 +36,7 @@ AlwaysBestAdaptationLogic::AlwaysBestAdaptationLogic () :
{
}
BaseRepresentation
*
AlwaysBestAdaptationLogic
::
getCurrentRepresentation
(
Stream
s
::
Type
type
,
BasePeriod
*
period
)
const
BaseRepresentation
*
AlwaysBestAdaptationLogic
::
getCurrentRepresentation
(
StreamType
type
,
BasePeriod
*
period
)
const
{
RepresentationSelector
selector
;
return
selector
.
select
(
period
,
type
);
...
...
modules/demux/adaptative/logic/AlwaysBestAdaptationLogic.h
View file @
08b864b7
...
...
@@ -36,7 +36,7 @@ namespace adaptative
public:
AlwaysBestAdaptationLogic
();
virtual
BaseRepresentation
*
getCurrentRepresentation
(
Stream
s
::
Type
,
BasePeriod
*
)
const
;
virtual
BaseRepresentation
*
getCurrentRepresentation
(
StreamType
,
BasePeriod
*
)
const
;
};
}
}
...
...
modules/demux/adaptative/logic/AlwaysLowestAdaptationLogic.cpp
View file @
08b864b7
...
...
@@ -28,7 +28,7 @@ AlwaysLowestAdaptationLogic::AlwaysLowestAdaptationLogic():
{
}
BaseRepresentation
*
AlwaysLowestAdaptationLogic
::
getCurrentRepresentation
(
Stream
s
::
Type
type
,
BasePeriod
*
period
)
const
BaseRepresentation
*
AlwaysLowestAdaptationLogic
::
getCurrentRepresentation
(
StreamType
type
,
BasePeriod
*
period
)
const
{
RepresentationSelector
selector
;
return
selector
.
select
(
period
,
type
,
0
);
...
...
modules/demux/adaptative/logic/AlwaysLowestAdaptationLogic.hpp
View file @
08b864b7
...
...
@@ -31,7 +31,7 @@ namespace adaptative
public:
AlwaysLowestAdaptationLogic
();
virtual
BaseRepresentation
*
getCurrentRepresentation
(
Stream
s
::
Type
,
BasePeriod
*
)
const
;
virtual
BaseRepresentation
*
getCurrentRepresentation
(
StreamType
,
BasePeriod
*
)
const
;
};
}
}
...
...
modules/demux/adaptative/logic/RateBasedAdaptationLogic.cpp
View file @
08b864b7
...
...
@@ -42,7 +42,7 @@ RateBasedAdaptationLogic::RateBasedAdaptationLogic (int w, int h) :
height
=
h
;
}
BaseRepresentation
*
RateBasedAdaptationLogic
::
getCurrentRepresentation
(
Stream
s
::
Type
type
,
BasePeriod
*
period
)
const
BaseRepresentation
*
RateBasedAdaptationLogic
::
getCurrentRepresentation
(
StreamType
type
,
BasePeriod
*
period
)
const
{
if
(
period
==
NULL
)
return
NULL
;
...
...
@@ -82,7 +82,7 @@ FixedRateAdaptationLogic::FixedRateAdaptationLogic(size_t bps) :
currentBps
=
bps
;
}
BaseRepresentation
*
FixedRateAdaptationLogic
::
getCurrentRepresentation
(
Stream
s
::
Type
type
,
BasePeriod
*
period
)
const
BaseRepresentation
*
FixedRateAdaptationLogic
::
getCurrentRepresentation
(
StreamType
type
,
BasePeriod
*
period
)
const
{
if
(
period
==
NULL
)
return
NULL
;
...
...
modules/demux/adaptative/logic/RateBasedAdaptationLogic.h
View file @
08b864b7
...
...
@@ -39,7 +39,7 @@ namespace adaptative
public:
RateBasedAdaptationLogic
(
int
,
int
);
BaseRepresentation
*
getCurrentRepresentation
(
Stream
s
::
Type
,
BasePeriod
*
)
const
;
BaseRepresentation
*
getCurrentRepresentation
(
StreamType
,
BasePeriod
*
)
const
;
virtual
void
updateDownloadRate
(
size_t
,
mtime_t
);
private:
...
...
@@ -55,7 +55,7 @@ namespace adaptative
public:
FixedRateAdaptationLogic
(
size_t
);
BaseRepresentation
*
getCurrentRepresentation
(
Stream
s
::
Type
,
BasePeriod
*
)
const
;
BaseRepresentation
*
getCurrentRepresentation
(
StreamType
,
BasePeriod
*
)
const
;
private:
size_t
currentBps
;
...
...
modules/demux/adaptative/logic/Representationselectors.cpp
View file @
08b864b7
...
...
@@ -29,11 +29,11 @@ RepresentationSelector::RepresentationSelector()
{
}
BaseRepresentation
*
RepresentationSelector
::
select
(
BasePeriod
*
period
,
Stream
s
::
Type
type
)
const
BaseRepresentation
*
RepresentationSelector
::
select
(
BasePeriod
*
period
,
StreamType
type
)
const
{
return
select
(
period
,
type
,
std
::
numeric_limits
<
uint64_t
>::
max
());
}
BaseRepresentation
*
RepresentationSelector
::
select
(
BasePeriod
*
period
,
Stream
s
::
Type
type
,
uint64_t
bitrate
)
const
BaseRepresentation
*
RepresentationSelector
::
select
(
BasePeriod
*
period
,
StreamType
type
,
uint64_t
bitrate
)
const
{
if
(
period
==
NULL
)
return
NULL
;
...
...
@@ -56,7 +56,7 @@ BaseRepresentation * RepresentationSelector::select(BasePeriod *period, Streams:
return
best
;
}
BaseRepresentation
*
RepresentationSelector
::
select
(
BasePeriod
*
period
,
Stream
s
::
Type
type
,
uint64_t
bitrate
,
BaseRepresentation
*
RepresentationSelector
::
select
(
BasePeriod
*
period
,
StreamType
type
,
uint64_t
bitrate
,
int
width
,
int
height
)
const
{
if
(
period
==
NULL
)
...
...
modules/demux/adaptative/logic/Representationselectors.hpp
View file @
08b864b7
...
...
@@ -40,9 +40,9 @@ namespace adaptative
public:
RepresentationSelector
();
virtual
~
RepresentationSelector
()
{}
virtual
BaseRepresentation
*
select
(
BasePeriod
*
period
,
Stream
s
::
Type
)
const
;
virtual
BaseRepresentation
*
select
(
BasePeriod
*
period
,
Stream
s
::
Type
,
uint64_t
bitrate
)
const
;
virtual
BaseRepresentation
*
select
(
BasePeriod
*
period
,
Stream
s
::
Type
,
uint64_t
bitrate
,
virtual
BaseRepresentation
*
select
(
BasePeriod
*
period
,
StreamType
)
const
;
virtual
BaseRepresentation
*
select
(
BasePeriod
*
period
,
StreamType
,
uint64_t
bitrate
)
const
;
virtual
BaseRepresentation
*
select
(
BasePeriod
*
period
,
StreamType
,
uint64_t
bitrate
,
int
width
,
int
height
)
const
;
protected:
virtual
BaseRepresentation
*
select
(
std
::
vector
<
BaseRepresentation
*>&
reps
,
...
...
modules/demux/adaptative/playlist/BasePeriod.cpp
View file @
08b864b7
...
...
@@ -55,13 +55,13 @@ const std::vector<BaseAdaptationSet*>& BasePeriod::getAdaptationSets() const
return
adaptationSets
;
}
const
std
::
vector
<
BaseAdaptationSet
*>
BasePeriod
::
getAdaptationSets
(
Stream
s
::
Type
type
)
const
const
std
::
vector
<
BaseAdaptationSet
*>
BasePeriod
::
getAdaptationSets
(
StreamType
type
)
const
{
std
::
vector
<
BaseAdaptationSet
*>
list
;
std
::
vector
<
BaseAdaptationSet
*>::
const_iterator
it
;
for
(
it
=
adaptationSets
.
begin
();
it
!=
adaptationSets
.
end
();
++
it
)
{
if
(
Stream
s
::
Stream
::
mimeToType
((
*
it
)
->
getMimeType
())
==
type
)
if
(
Stream
::
mimeToType
((
*
it
)
->
getMimeType
())
==
type
)
list
.
push_back
(
*
it
);
}
return
list
;
...
...
@@ -76,12 +76,12 @@ void BasePeriod::addAdaptationSet(BaseAdaptationSet *adaptationSet)
}
}
BaseAdaptationSet
*
BasePeriod
::
getAdaptationSet
(
Stream
s
::
Type
type
)
const
BaseAdaptationSet
*
BasePeriod
::
getAdaptationSet
(
StreamType
type
)
const
{
std
::
vector
<
BaseAdaptationSet
*>::
const_iterator
it
;
for
(
it
=
adaptationSets
.
begin
();
it
!=
adaptationSets
.
end
();
++
it
)
{
if
(
Stream
s
::
Stream
::
mimeToType
((
*
it
)
->
getMimeType
())
==
type
)
if
(
Stream
::
mimeToType
((
*
it
)
->
getMimeType
())
==
type
)
return
*
it
;
}
return
NULL
;
...
...
modules/demux/adaptative/playlist/BasePeriod.h
View file @
08b864b7
...
...
@@ -43,8 +43,8 @@ namespace adaptative
virtual
~
BasePeriod
();
const
std
::
vector
<
BaseAdaptationSet
*>&
getAdaptationSets
()
const
;
const
std
::
vector
<
BaseAdaptationSet
*>
getAdaptationSets
(
Stream
s
::
Type
)
const
;
BaseAdaptationSet
*
getAdaptationSet
(
Stream
s
::
Type
)
const
;
const
std
::
vector
<
BaseAdaptationSet
*>
getAdaptationSets
(
StreamType
)
const
;
BaseAdaptationSet
*
getAdaptationSet
(
StreamType
)
const
;
void
addAdaptationSet
(
BaseAdaptationSet
*
AdaptationSet
);
std
::
vector
<
std
::
string
>
toString
(
int
=
0
)
const
;
...
...
modules/demux/dash/DASHManager.cpp
View file @
08b864b7
...
...
@@ -84,7 +84,7 @@ bool DASHManager::updatePlaylist()
}
mtime_t
minsegmentTime
=
0
;
for
(
int
type
=
0
;
type
<
Stream
s
::
c
ount
;
type
++
)
for
(
int
type
=
0
;
type
<
Stream
TypeC
ount
;
type
++
)
{
if
(
!
streams
[
type
])
continue
;
...
...
modules/demux/dash/dash.cpp
View file @
08b864b7
...
...
@@ -183,15 +183,15 @@ static int Demux(demux_t *p_demux)
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
Stream
s
::
Stream
::
status
status
=
Stream
::
status
status
=
p_sys
->
p_dashManager
->
demux
(
p_sys
->
i_nzpcr
+
DEMUX_INCREMENT
);
switch
(
status
)
{
case
Stream
s
:
:
Stream
::
status_eof
:
case
Stream
:
:
status_eof
:
return
VLC_DEMUXER_EOF
;
case
Stream
s
:
:
Stream
::
status_buffering
:
case
Stream
:
:
status_buffering
:
break
;
case
Stream
s
:
:
Stream
::
status_demuxed
:
case
Stream
:
:
status_demuxed
:
p_sys
->
i_nzpcr
+=
DEMUX_INCREMENT
;
int
group
=
p_sys
->
p_dashManager
->
getGroup
();
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_GROUP_PCR
,
group
,
VLC_TS_0
+
p_sys
->
i_nzpcr
);
...
...
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