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
Martin Finkel
VLC
Commits
08b864b7
Commit
08b864b7
authored
May 10, 2015
by
François Cartegnie
🤞
Browse files
demux: adaptative: remove confusing namespace
parent
da6b5aac
Changes
20
Hide whitespace changes
Inline
Side-by-side
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
<
Stream
s
::
Type
>
(
i
);
StreamType
type
=
static_cast
<
StreamType
>
(
i
);
const
BaseAdaptationSet
*
set
=
period
->
getAdaptationSet
(
type
);
if
(
set
)
{
streams
[
type
]
=
new
(
std
::
nothrow
)
Streams
::
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
;
}
Streams
::
Stream
::
status
PlaylistManager
::
demux
(
mtime_t
nzdeadline
)
Stream
::
status
PlaylistManager
::
demux
(
mtime_t
nzdeadline
)
{
Streams
::
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
;
Streams
::
Stream
::
status
i_ret
=
Stream
::
status
i_ret
=
streams
[
type
]
->
demux
(
conManager
,
nzdeadline
);
if
(
i_ret
<
Streams
::
Stream
::
status_eof
)
if
(
i_ret
<
Stream
::
status_eof
)
return
i_ret
;
else
if
(
i_ret
==
Streams
::
Stream
::
status_buffering
)
i_return
=
Streams
::
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
*
);
Streams
::
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
[
Stream
s
::
c
ount
];
Stream
*
streams
[
Stream
TypeC
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
Stream
Type
type
,
const
Stream
Format
format
)
{
init
(
type
,
format
);
}
void
Stream
::
init
(
const
Type
type_
,
const
Format
format_
)
void
Stream
::
init
(
const
Stream
Type
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
=
Stream
s
::
UNSUPPORTED
;
Stream
Format
format
=
Stream
Format
::
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,102 +44,101 @@ namespace adaptative
class
AbstractAdaptationLogic
;
}
namespace
Streams
{
class
AbstractStreamOutput
;
using
namespace
http
;
using
namespace
logic
;
class
AbstractStreamOutput
;
class
Stream
{
public:
Stream
(
const
std
::
string
&
mime
);
Stream
(
const
Type
,
const
Format
);
~
Stream
();
bool
operator
==
(
const
Stream
&
)
const
;
static
Type
mimeToType
(
const
std
::
string
&
mime
);
static
Format
mimeToFormat
(
const
std
::
string
&
mime
);
void
create
(
demux_t
*
,
AbstractAdaptationLogic
*
,
SegmentTracker
*
);
bool
isEOF
()
const
;
mtime_t
getPCR
()
const
;
int
getGroup
()
const
;
int
esCount
()
const
;
bool
seekAble
()
const
;
typedef
enum
{
status_eof
,
status_buffering
,
status_demuxed
}
status
;
status
demux
(
HTTPConnectionManager
*
,
mtime_t
);
bool
setPosition
(
mtime_t
,
bool
);
mtime_t
getPosition
()
const
;
private:
Chunk
*
getChunk
();
void
init
(
const
Type
,
const
Format
);
size_t
read
(
HTTPConnectionManager
*
);
Type
type
;
Format
format
;
AbstractStreamOutput
*
output
;
AbstractAdaptationLogic
*
adaptationLogic
;
SegmentTracker
*
segmentTracker
;
http
::
Chunk
*
currentChunk
;
bool
eof
;
};
using
namespace
http
;
using
namespace
logic
;
class
AbstractStreamOutput
class
Stream
{
public:
Stream
(
const
std
::
string
&
mime
);
Stream
(
const
StreamType
,
const
StreamFormat
);
~
Stream
();
bool
operator
==
(
const
Stream
&
)
const
;
static
StreamType
mimeToType
(
const
std
::
string
&
mime
);
static
StreamFormat
mimeToFormat
(
const
std
::
string
&
mime
);
void
create
(
demux_t
*
,
AbstractAdaptationLogic
*
,
SegmentTracker
*
);
bool
isEOF
()
const
;
mtime_t
getPCR
()
const
;
int
getGroup
()
const
;
int
esCount
()
const
;
bool
seekAble
()
const
;
typedef
enum
{
status_eof
,
status_buffering
,
status_demuxed
}
status
;
status
demux
(
HTTPConnectionManager
*
,
mtime_t
);
bool
setPosition
(
mtime_t
,
bool
);
mtime_t
getPosition
()
const
;
private:
Chunk
*
getChunk
();
void
init
(
const
StreamType
,
const
StreamFormat
);
size_t
read
(
HTTPConnectionManager
*
);
StreamType
type
;
StreamFormat
format
;
AbstractStreamOutput
*
output
;
AbstractAdaptationLogic
*
adaptationLogic
;
SegmentTracker
*
segmentTracker
;
http
::
Chunk
*
currentChunk
;
bool
eof
;
};
class
AbstractStreamOutput
{
public:
AbstractStreamOutput
(
demux_t
*
);
virtual
~
AbstractStreamOutput
();
virtual
void
pushBlock
(
block_t
*
);
mtime_t
getPCR
()
const
;
int
getGroup
()
const
;
int
esCount
()
const
;
bool
seekAble
()
const
;
void
setPosition
(
mtime_t
);
void
sendToDecoder
(
mtime_t
);
protected:
mtime_t
pcr
;
int
group
;
es_out_t
*
fakeesout
;
/* to intercept/proxy what is sent from demuxstream */
stream_t
*
demuxstream
;
bool
seekable
;
private:
demux_t
*
realdemux
;
static
es_out_id_t
*
esOutAdd
(
es_out_t
*
,
const
es_format_t
*
);
static
int
esOutSend
(
es_out_t
*
,
es_out_id_t
*
,
block_t
*
);
static
void
esOutDel
(
es_out_t
*
,
es_out_id_t
*
);
static
int
esOutControl
(
es_out_t
*
,
int
,
va_list
);
static
void
esOutDestroy
(
es_out_t
*
);
class
Demuxed
{
public:
AbstractStreamOutput
(
demux_t
*
);
virtual
~
AbstractStreamOutput
();
virtual
void
pushBlock
(
block_t
*
);
mtime_t
getPCR
()
const
;
int
getGroup
()
const
;
int
esCount
()
const
;
bool
seekAble
()
const
;
void
setPosition
(
mtime_t
);
void
sendToDecoder
(
mtime_t
);
protected:
mtime_t
pcr
;
int
group
;
es_out_t
*
fakeesout
;
/* to intercept/proxy what is sent from demuxstream */
stream_t
*
demuxstream
;
bool
seekable
;
private:
demux_t
*
realdemux
;
static
es_out_id_t
*
esOutAdd
(
es_out_t
*
,
const
es_format_t
*
);
static
int
esOutSend
(
es_out_t
*
,
es_out_id_t
*
,
block_t
*
);
static
void
esOutDel
(
es_out_t
*
,
es_out_id_t
*
);
static
int
esOutControl
(
es_out_t
*
,
int
,
va_list
);
static
void
esOutDestroy
(
es_out_t
*
);
class
Demuxed
{
friend
class
AbstractStreamOutput
;
Demuxed
();
~
Demuxed
();
void
drop
();
es_out_id_t
*
es_id
;
block_t
*
p_queue
;
block_t
**
pp_queue_last
;
};
std
::
list
<
Demuxed
*>
queues
;
vlc_mutex_t
lock
;
friend
class
AbstractStreamOutput
;
Demuxed
();
~
Demuxed
();
void
drop
();
es_out_id_t
*
es_id
;
block_t
*
p_queue
;
block_t
**
pp_queue_last
;
};
std
::
list
<
Demuxed
*>
queues
;
vlc_mutex_t
lock
;
};
class
MP4StreamOutput
:
public
AbstractStreamOutput
{
public:
MP4StreamOutput
(
demux_t
*
);
virtual
~
MP4StreamOutput
(){}
};
class
MP4StreamOutput
:
public
AbstractStreamOutput
{
public:
MP4StreamOutput
(
demux_t
*
);
virtual
~
MP4StreamOutput
(){}
};
class
MPEG2TSStreamOutput
:
public
AbstractStreamOutput
{
public:
MPEG2TSStreamOutput
(
demux_t
*
);
virtual
~
MPEG2TSStreamOutput
(){}
};
class
MPEG2TSStreamOutput
:
public
AbstractStreamOutput
{
public:
MPEG2TSStreamOutput
(
demux_t
*
);
virtual
~
MPEG2TSStreamOutput
(){}
};
}
}
#endif // STREAMS_HPP
modules/demux/adaptative/StreamsType.hpp
View file @
08b864b7
...
...
@@ -22,25 +22,24 @@
namespace
adaptative
{
namespace
Streams
enum
StreamType
{
UNKNOWN
=
0
,
VIDEO
,
AUDIO
,
APPLICATION
};
enum
StreamFormat
{
enum
Type
{
UNKNOWN
=
0
,
VIDEO
,
AUDIO
,
APPLICATION
};
UNSUPPORTED
=
0
,
MP4
,
MPEG2TS
};
enum
Format
{
UNSUPPORTED
=
0
,
MP4
,
MPEG2TS
};
static
const
int
StreamTypeCount
=
APPLICATION
+
1
;
static
const
int
count
=
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
)