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
bfdc2b60
Commit
bfdc2b60
authored
Jul 05, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: rework stream format setup
parent
98332157
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
336 additions
and
81 deletions
+336
-81
modules/demux/Makefile.am
modules/demux/Makefile.am
+5
-1
modules/demux/adaptative/PlaylistManager.cpp
modules/demux/adaptative/PlaylistManager.cpp
+6
-6
modules/demux/adaptative/PlaylistManager.h
modules/demux/adaptative/PlaylistManager.h
+4
-1
modules/demux/adaptative/StreamFormat.cpp
modules/demux/adaptative/StreamFormat.cpp
+42
-0
modules/demux/adaptative/StreamFormat.hpp
modules/demux/adaptative/StreamFormat.hpp
+42
-0
modules/demux/adaptative/Streams.cpp
modules/demux/adaptative/Streams.cpp
+35
-44
modules/demux/adaptative/Streams.hpp
modules/demux/adaptative/Streams.hpp
+7
-12
modules/demux/adaptative/StreamsType.hpp
modules/demux/adaptative/StreamsType.hpp
+0
-7
modules/demux/adaptative/playlist/BaseAdaptationSet.cpp
modules/demux/adaptative/playlist/BaseAdaptationSet.cpp
+3
-5
modules/demux/adaptative/playlist/BaseAdaptationSet.h
modules/demux/adaptative/playlist/BaseAdaptationSet.h
+2
-1
modules/demux/adaptative/playlist/BaseRepresentation.cpp
modules/demux/adaptative/playlist/BaseRepresentation.cpp
+6
-0
modules/demux/adaptative/playlist/BaseRepresentation.h
modules/demux/adaptative/playlist/BaseRepresentation.h
+2
-0
modules/demux/dash/DASHManager.cpp
modules/demux/dash/DASHManager.cpp
+18
-1
modules/demux/dash/DASHManager.h
modules/demux/dash/DASHManager.h
+7
-0
modules/demux/dash/DASHStreamFormat.hpp
modules/demux/dash/DASHStreamFormat.hpp
+54
-0
modules/demux/dash/dash.cpp
modules/demux/dash/dash.cpp
+1
-0
modules/demux/dash/mpd/AdaptationSet.cpp
modules/demux/dash/mpd/AdaptationSet.cpp
+17
-0
modules/demux/dash/mpd/AdaptationSet.h
modules/demux/dash/mpd/AdaptationSet.h
+3
-0
modules/demux/dash/mpd/Representation.cpp
modules/demux/dash/mpd/Representation.cpp
+9
-0
modules/demux/dash/mpd/Representation.h
modules/demux/dash/mpd/Representation.h
+2
-0
modules/demux/hls/HLSManager.cpp
modules/demux/hls/HLSManager.cpp
+15
-1
modules/demux/hls/HLSManager.hpp
modules/demux/hls/HLSManager.hpp
+7
-0
modules/demux/hls/HLSStreamFormat.hpp
modules/demux/hls/HLSStreamFormat.hpp
+38
-0
modules/demux/hls/hls.cpp
modules/demux/hls/hls.cpp
+1
-0
modules/demux/hls/playlist/Parser.cpp
modules/demux/hls/playlist/Parser.cpp
+0
-2
modules/demux/hls/playlist/Representation.cpp
modules/demux/hls/playlist/Representation.cpp
+7
-0
modules/demux/hls/playlist/Representation.hpp
modules/demux/hls/playlist/Representation.hpp
+3
-0
No files found.
modules/demux/Makefile.am
View file @
bfdc2b60
...
@@ -298,6 +298,8 @@ adaptative_SOURCES = \
...
@@ -298,6 +298,8 @@ adaptative_SOURCES = \
demux/adaptative/PlaylistManager.h
\
demux/adaptative/PlaylistManager.h
\
demux/adaptative/SegmentTracker.cpp
\
demux/adaptative/SegmentTracker.cpp
\
demux/adaptative/SegmentTracker.hpp
\
demux/adaptative/SegmentTracker.hpp
\
demux/adaptative/StreamFormat.cpp
\
demux/adaptative/StreamFormat.hpp
\
demux/adaptative/Streams.cpp
\
demux/adaptative/Streams.cpp
\
demux/adaptative/Streams.hpp
\
demux/adaptative/Streams.hpp
\
demux/adaptative/StreamsType.hpp
\
demux/adaptative/StreamsType.hpp
\
...
@@ -343,7 +345,8 @@ libdash_plugin_la_SOURCES = \
...
@@ -343,7 +345,8 @@ libdash_plugin_la_SOURCES = \
demux/dash/dash.cpp
\
demux/dash/dash.cpp
\
demux/dash/dash.hpp
\
demux/dash/dash.hpp
\
demux/dash/DASHManager.cpp
\
demux/dash/DASHManager.cpp
\
demux/dash/DASHManager.h
demux/dash/DASHManager.h
\
demux/dash/DASHStreamFormat.hpp
libdash_plugin_la_SOURCES
+=
$(adaptative_SOURCES)
libdash_plugin_la_SOURCES
+=
$(adaptative_SOURCES)
libdash_plugin_la_SOURCES
+=
demux/mp4/libmp4.c demux/mp4/libmp4.h
libdash_plugin_la_SOURCES
+=
demux/mp4/libmp4.c demux/mp4/libmp4.h
...
@@ -368,6 +371,7 @@ libhls_plugin_la_SOURCES = \
...
@@ -368,6 +371,7 @@ libhls_plugin_la_SOURCES = \
demux/hls/playlist/Tags.cpp
\
demux/hls/playlist/Tags.cpp
\
demux/hls/HLSManager.hpp
\
demux/hls/HLSManager.hpp
\
demux/hls/HLSManager.cpp
\
demux/hls/HLSManager.cpp
\
demux/hls/HLSStreamFormat.hpp
\
demux/hls/hls.cpp
\
demux/hls/hls.cpp
\
demux/hls/hls.hpp
demux/hls/hls.hpp
...
...
modules/demux/adaptative/PlaylistManager.cpp
View file @
bfdc2b60
...
@@ -41,12 +41,13 @@ using namespace adaptative::logic;
...
@@ -41,12 +41,13 @@ using namespace adaptative::logic;
using
namespace
adaptative
;
using
namespace
adaptative
;
PlaylistManager
::
PlaylistManager
(
AbstractPlaylist
*
pl
,
PlaylistManager
::
PlaylistManager
(
AbstractPlaylist
*
pl
,
AbstractStreamOutputFactory
*
factory
,
AbstractAdaptationLogic
::
LogicType
type
,
AbstractAdaptationLogic
::
LogicType
type
,
stream_t
*
stream
)
:
stream_t
*
stream
)
:
conManager
(
NULL
),
conManager
(
NULL
),
logicType
(
type
),
logicType
(
type
),
playlist
(
pl
),
playlist
(
pl
),
streamOutputFactory
(
NULL
),
streamOutputFactory
(
factory
),
stream
(
stream
),
stream
(
stream
),
nextPlaylistupdate
(
0
)
nextPlaylistupdate
(
0
)
{
{
...
@@ -57,6 +58,7 @@ PlaylistManager::PlaylistManager( AbstractPlaylist *pl,
...
@@ -57,6 +58,7 @@ PlaylistManager::PlaylistManager( AbstractPlaylist *pl,
PlaylistManager
::~
PlaylistManager
()
PlaylistManager
::~
PlaylistManager
()
{
{
delete
conManager
;
delete
conManager
;
delete
streamOutputFactory
;
for
(
int
i
=
0
;
i
<
StreamTypeCount
;
i
++
)
for
(
int
i
=
0
;
i
<
StreamTypeCount
;
i
++
)
delete
streams
[
i
];
delete
streams
[
i
];
}
}
...
@@ -73,7 +75,7 @@ bool PlaylistManager::start(demux_t *demux)
...
@@ -73,7 +75,7 @@ bool PlaylistManager::start(demux_t *demux)
const
BaseAdaptationSet
*
set
=
period
->
getAdaptationSet
(
type
);
const
BaseAdaptationSet
*
set
=
period
->
getAdaptationSet
(
type
);
if
(
set
)
if
(
set
)
{
{
streams
[
type
]
=
new
(
std
::
nothrow
)
Stream
(
set
->
getMimeType
());
streams
[
type
]
=
new
(
std
::
nothrow
)
Stream
(
type
,
set
->
getStreamFormat
());
if
(
!
streams
[
type
])
if
(
!
streams
[
type
])
continue
;
continue
;
AbstractAdaptationLogic
*
logic
=
createLogic
(
logicType
);
AbstractAdaptationLogic
*
logic
=
createLogic
(
logicType
);
...
@@ -85,13 +87,11 @@ bool PlaylistManager::start(demux_t *demux)
...
@@ -85,13 +87,11 @@ bool PlaylistManager::start(demux_t *demux)
}
}
SegmentTracker
*
tracker
=
new
(
std
::
nothrow
)
SegmentTracker
(
logic
,
playlist
);
SegmentTracker
*
tracker
=
new
(
std
::
nothrow
)
SegmentTracker
(
logic
,
playlist
);
DefaultStreamOutputFactory
defaultfactory
;
try
try
{
{
if
(
!
tracker
)
if
(
!
tracker
||
!
streamOutputFactory
)
throw
VLC_ENOMEM
;
throw
VLC_ENOMEM
;
streams
[
type
]
->
create
(
demux
,
logic
,
tracker
,
streams
[
type
]
->
create
(
demux
,
logic
,
tracker
,
streamOutputFactory
);
(
streamOutputFactory
)
?
*
streamOutputFactory
:
defaultfactory
);
}
catch
(
int
)
{
}
catch
(
int
)
{
delete
streams
[
type
];
delete
streams
[
type
];
delete
logic
;
delete
logic
;
...
...
modules/demux/adaptative/PlaylistManager.h
View file @
bfdc2b60
...
@@ -42,12 +42,15 @@ namespace adaptative
...
@@ -42,12 +42,15 @@ namespace adaptative
using
namespace
http
;
using
namespace
http
;
class
AbstractStreamFactory
;
class
AbstractStreamFactory
;
class
AbstractStreamOutputFactory
;
class
PlaylistManager
class
PlaylistManager
{
{
public:
public:
PlaylistManager
(
AbstractPlaylist
*
,
PlaylistManager
(
AbstractPlaylist
*
,
AbstractAdaptationLogic
::
LogicType
type
,
stream_t
*
stream
);
AbstractStreamOutputFactory
*
,
AbstractAdaptationLogic
::
LogicType
type
,
stream_t
*
stream
);
virtual
~
PlaylistManager
();
virtual
~
PlaylistManager
();
bool
start
(
demux_t
*
);
bool
start
(
demux_t
*
);
...
...
modules/demux/adaptative/StreamFormat.cpp
0 → 100644
View file @
bfdc2b60
/*
* StreamFormat.cpp
*****************************************************************************
* Copyright (C) 2015 - VideoLAN authors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "StreamFormat.hpp"
using
namespace
adaptative
;
StreamFormat
::
operator
unsigned
()
const
{
return
formatid
;
}
StreamFormat
::
StreamFormat
(
int
formatid_
)
{
formatid
=
formatid_
;
}
StreamFormat
::~
StreamFormat
()
{
}
bool
StreamFormat
::
operator
==
(
const
StreamFormat
&
other
)
const
{
return
formatid
==
other
.
formatid
;
}
modules/demux/adaptative/StreamFormat.hpp
0 → 100644
View file @
bfdc2b60
/*
* StreamFormat.hpp
*****************************************************************************
* Copyright (C) 2015 - VideoLAN authors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef STREAMFORMAT_HPP
#define STREAMFORMAT_HPP
namespace
adaptative
{
class
StreamFormat
{
public:
static
const
unsigned
UNSUPPORTED
=
0
;
StreamFormat
(
int
=
UNSUPPORTED
);
~
StreamFormat
();
operator
unsigned
()
const
;
bool
operator
==
(
const
StreamFormat
&
)
const
;
private:
unsigned
formatid
;
};
}
#endif // STREAMFORMAT_HPP
modules/demux/adaptative/Streams.cpp
View file @
bfdc2b60
...
@@ -31,17 +31,12 @@ using namespace adaptative;
...
@@ -31,17 +31,12 @@ using namespace adaptative;
using
namespace
adaptative
::
http
;
using
namespace
adaptative
::
http
;
using
namespace
adaptative
::
logic
;
using
namespace
adaptative
::
logic
;
Stream
::
Stream
(
const
std
::
string
&
mime
)
Stream
::
Stream
(
const
StreamType
type
,
const
StreamFormat
&
format
)
{
init
(
mimeToType
(
mime
),
mimeToFormat
(
mime
));
}
Stream
::
Stream
(
const
StreamType
type
,
const
StreamFormat
format
)
{
{
init
(
type
,
format
);
init
(
type
,
format
);
}
}
void
Stream
::
init
(
const
StreamType
type_
,
const
StreamFormat
format_
)
void
Stream
::
init
(
const
StreamType
type_
,
const
StreamFormat
&
format_
)
{
{
type
=
type_
;
type
=
type_
;
format
=
format_
;
format
=
format_
;
...
@@ -74,29 +69,26 @@ StreamType Stream::mimeToType(const std::string &mime)
...
@@ -74,29 +69,26 @@ StreamType Stream::mimeToType(const std::string &mime)
return
mimetype
;
return
mimetype
;
}
}
StreamFormat
Stream
::
mimeToFormat
(
const
std
::
string
&
mime
)
{
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
=
StreamFormat
::
MP4
;
else
if
(
tail
==
"mp2t"
)
format
=
StreamFormat
::
MPEG2TS
;
}
return
format
;
}
void
Stream
::
create
(
demux_t
*
demux
,
AbstractAdaptationLogic
*
logic
,
void
Stream
::
create
(
demux_t
*
demux
,
AbstractAdaptationLogic
*
logic
,
SegmentTracker
*
tracker
,
AbstractStreamOutputFactory
&
factory
)
SegmentTracker
*
tracker
,
const
AbstractStreamOutputFactory
*
factory
)
{
{
output
=
factory
.
create
(
demux
,
format
);
updateFormat
(
demux
,
format
,
factory
);
adaptationLogic
=
logic
;
adaptationLogic
=
logic
;
segmentTracker
=
tracker
;
segmentTracker
=
tracker
;
}
}
void
Stream
::
updateFormat
(
demux_t
*
demux
,
StreamFormat
&
newformat
,
const
AbstractStreamOutputFactory
*
factory
)
{
if
(
format
==
newformat
&&
output
)
return
;
delete
output
;
format
=
newformat
;
output
=
factory
->
create
(
demux
,
format
);
if
(
!
output
)
throw
VLC_EGENERIC
;
}
bool
Stream
::
isEOF
()
const
bool
Stream
::
isEOF
()
const
{
{
return
false
;
return
false
;
...
@@ -104,21 +96,29 @@ bool Stream::isEOF() const
...
@@ -104,21 +96,29 @@ bool Stream::isEOF() const
mtime_t
Stream
::
getPCR
()
const
mtime_t
Stream
::
getPCR
()
const
{
{
if
(
!
output
)
return
0
;
return
output
->
getPCR
();
return
output
->
getPCR
();
}
}
mtime_t
Stream
::
getFirstDTS
()
const
mtime_t
Stream
::
getFirstDTS
()
const
{
{
if
(
!
output
)
return
0
;
return
output
->
getFirstDTS
();
return
output
->
getFirstDTS
();
}
}
int
Stream
::
getGroup
()
const
int
Stream
::
getGroup
()
const
{
{
if
(
!
output
)
return
0
;
return
output
->
getGroup
();
return
output
->
getGroup
();
}
}
int
Stream
::
esCount
()
const
int
Stream
::
esCount
()
const
{
{
if
(
!
output
)
return
0
;
return
output
->
esCount
();
return
output
->
esCount
();
}
}
...
@@ -129,7 +129,7 @@ bool Stream::operator ==(const Stream &stream) const
...
@@ -129,7 +129,7 @@ bool Stream::operator ==(const Stream &stream) const
Chunk
*
Stream
::
getChunk
()
Chunk
*
Stream
::
getChunk
()
{
{
if
(
currentChunk
==
NULL
)
if
(
currentChunk
==
NULL
&&
output
)
{
{
currentChunk
=
segmentTracker
->
getNextChunk
(
type
,
output
->
switchAllowed
());
currentChunk
=
segmentTracker
->
getNextChunk
(
type
,
output
->
switchAllowed
());
if
(
currentChunk
==
NULL
)
if
(
currentChunk
==
NULL
)
...
@@ -145,6 +145,9 @@ bool Stream::seekAble() const
...
@@ -145,6 +145,9 @@ bool Stream::seekAble() const
Stream
::
status
Stream
::
demux
(
HTTPConnectionManager
*
connManager
,
mtime_t
nz_deadline
,
bool
send
)
Stream
::
status
Stream
::
demux
(
HTTPConnectionManager
*
connManager
,
mtime_t
nz_deadline
,
bool
send
)
{
{
if
(
!
output
)
return
Stream
::
status_eof
;
if
(
nz_deadline
+
VLC_TS_0
>
output
->
getPCR
())
/* not already demuxed */
if
(
nz_deadline
+
VLC_TS_0
>
output
->
getPCR
())
/* not already demuxed */
{
{
/* need to read, demuxer still buffering, ... */
/* need to read, demuxer still buffering, ... */
...
@@ -225,13 +228,19 @@ size_t Stream::read(HTTPConnectionManager *connManager)
...
@@ -225,13 +228,19 @@ size_t Stream::read(HTTPConnectionManager *connManager)
readsize
=
block
->
i_buffer
;
readsize
=
block
->
i_buffer
;
if
(
output
)
output
->
pushBlock
(
block
);
output
->
pushBlock
(
block
);
else
block_Release
(
block
);
return
readsize
;
return
readsize
;
}
}
bool
Stream
::
setPosition
(
mtime_t
time
,
bool
tryonly
)
bool
Stream
::
setPosition
(
mtime_t
time
,
bool
tryonly
)
{
{
if
(
!
output
)
return
false
;
bool
ret
=
segmentTracker
->
setPosition
(
time
,
output
->
reinitsOnSeek
(),
tryonly
);
bool
ret
=
segmentTracker
->
setPosition
(
time
,
output
->
reinitsOnSeek
(),
tryonly
);
if
(
!
tryonly
&&
ret
)
if
(
!
tryonly
&&
ret
)
{
{
...
@@ -623,21 +632,3 @@ void BaseStreamOutput::esOutDestroy(es_out_t *fakees)
...
@@ -623,21 +632,3 @@ void BaseStreamOutput::esOutDestroy(es_out_t *fakees)
me
->
realdemux
->
out
->
pf_destroy
(
me
->
realdemux
->
out
);
me
->
realdemux
->
out
->
pf_destroy
(
me
->
realdemux
->
out
);
}
}
/* !Static callbacks */
/* !Static callbacks */
AbstractStreamOutput
*
DefaultStreamOutputFactory
::
create
(
demux_t
*
demux
,
int
format
)
const
{
switch
(
format
)
{
case
StreamFormat
:
:
MP4
:
return
new
BaseStreamOutput
(
demux
,
"mp4"
);
case
StreamFormat
:
:
MPEG2TS
:
return
new
BaseStreamOutput
(
demux
,
"ts"
);
default:
throw
VLC_EBADVAR
;
break
;
}
return
NULL
;
}
modules/demux/adaptative/Streams.hpp
View file @
bfdc2b60
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_es.h>
#include <vlc_es.h>
#include "StreamsType.hpp"
#include "StreamsType.hpp"
#include "StreamFormat.hpp"
namespace
adaptative
namespace
adaptative
{
{
...
@@ -55,14 +56,13 @@ namespace adaptative
...
@@ -55,14 +56,13 @@ namespace adaptative
class
Stream
class
Stream
{
{
public:
public:
Stream
(
const
std
::
string
&
mime
);
Stream
(
const
StreamType
,
const
StreamFormat
&
);
Stream
(
const
StreamType
,
const
StreamFormat
);
~
Stream
();
~
Stream
();
bool
operator
==
(
const
Stream
&
)
const
;
bool
operator
==
(
const
Stream
&
)
const
;
static
StreamType
mimeToType
(
const
std
::
string
&
mime
);
static
StreamType
mimeToType
(
const
std
::
string
&
mime
);
static
StreamFormat
mimeToFormat
(
const
std
::
string
&
mime
);
void
create
(
demux_t
*
,
AbstractAdaptationLogic
*
,
void
create
(
demux_t
*
,
AbstractAdaptationLogic
*
,
SegmentTracker
*
,
AbstractStreamOutputFactory
&
);
SegmentTracker
*
,
const
AbstractStreamOutputFactory
*
);
void
updateFormat
(
demux_t
*
,
StreamFormat
&
,
const
AbstractStreamOutputFactory
*
);
bool
isEOF
()
const
;
bool
isEOF
()
const
;
mtime_t
getPCR
()
const
;
mtime_t
getPCR
()
const
;
mtime_t
getFirstDTS
()
const
;
mtime_t
getFirstDTS
()
const
;
...
@@ -77,7 +77,7 @@ namespace adaptative
...
@@ -77,7 +77,7 @@ namespace adaptative
private:
private:
Chunk
*
getChunk
();
Chunk
*
getChunk
();
void
init
(
const
StreamType
,
const
StreamFormat
);
void
init
(
const
StreamType
,
const
StreamFormat
&
);
size_t
read
(
HTTPConnectionManager
*
);
size_t
read
(
HTTPConnectionManager
*
);
StreamType
type
;
StreamType
type
;
StreamFormat
format
;
StreamFormat
format
;
...
@@ -114,13 +114,8 @@ namespace adaptative
...
@@ -114,13 +114,8 @@ namespace adaptative
class
AbstractStreamOutputFactory
class
AbstractStreamOutputFactory
{
{
public:
public:
virtual
AbstractStreamOutput
*
create
(
demux_t
*
,
int
streamType
)
const
=
0
;
virtual
~
AbstractStreamOutputFactory
()
{}
};
virtual
AbstractStreamOutput
*
create
(
demux_t
*
,
const
StreamFormat
&
)
const
=
0
;
class
DefaultStreamOutputFactory
:
public
AbstractStreamOutputFactory
{
public:
virtual
AbstractStreamOutput
*
create
(
demux_t
*
,
int
streamType
)
const
;
};
};
class
BaseStreamOutput
:
public
AbstractStreamOutput
class
BaseStreamOutput
:
public
AbstractStreamOutput
...
...
modules/demux/adaptative/StreamsType.hpp
View file @
bfdc2b60
...
@@ -31,13 +31,6 @@ namespace adaptative
...
@@ -31,13 +31,6 @@ namespace adaptative
APPLICATION
APPLICATION
};
};
enum
StreamFormat
{
UNSUPPORTED
=
0
,
MP4
,
MPEG2TS
};
static
const
int
StreamTypeCount
=
APPLICATION
+
1
;
static
const
int
StreamTypeCount
=
APPLICATION
+
1
;
}
}
...
...
modules/demux/adaptative/playlist/BaseAdaptationSet.cpp
View file @
bfdc2b60
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include "SegmentTemplate.h"
#include "SegmentTemplate.h"
#include "BasePeriod.h"
#include "BasePeriod.h"
using
namespace
adaptative
;
using
namespace
adaptative
::
playlist
;
using
namespace
adaptative
::
playlist
;
BaseAdaptationSet
::
BaseAdaptationSet
(
BasePeriod
*
period
)
:
BaseAdaptationSet
::
BaseAdaptationSet
(
BasePeriod
*
period
)
:
...
@@ -50,12 +51,9 @@ BaseAdaptationSet::~BaseAdaptationSet ()
...
@@ -50,12 +51,9 @@ BaseAdaptationSet::~BaseAdaptationSet ()
childs
.
clear
();
childs
.
clear
();
}
}
const
std
::
string
&
BaseAdaptationSet
::
getMimeType
()
const
StreamFormat
BaseAdaptationSet
::
getStreamFormat
()
const
{
{
if
(
mimeType
.
empty
()
&&
!
representations
.
empty
())
return
StreamFormat
();
return
representations
.
front
()
->
getMimeType
();
else
return
mimeType
;
}
}
std
::
vector
<
BaseRepresentation
*>&
BaseAdaptationSet
::
getRepresentations
()
std
::
vector
<
BaseRepresentation
*>&
BaseAdaptationSet
::
getRepresentations
()
...
...
modules/demux/adaptative/playlist/BaseAdaptationSet.h
View file @
bfdc2b60
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "CommonAttributesElements.h"
#include "CommonAttributesElements.h"
#include "SegmentInformation.hpp"
#include "SegmentInformation.hpp"
#include "../StreamFormat.hpp"
namespace
adaptative
namespace
adaptative
{
{
...
@@ -45,7 +46,7 @@ namespace adaptative
...
@@ -45,7 +46,7 @@ namespace adaptative
BaseAdaptationSet
(
BasePeriod
*
);
BaseAdaptationSet
(
BasePeriod
*
);
virtual
~
BaseAdaptationSet
();
virtual
~
BaseAdaptationSet
();
virtual
const
std
::
string
&
getMimeType
()
const
;
/*reimpl*/
virtual
StreamFormat
getStreamFormat
()
const
;
/*reimpl*/
std
::
vector
<
BaseRepresentation
*>&
getRepresentations
();
std
::
vector
<
BaseRepresentation
*>&
getRepresentations
();
void
setSwitchPolicy
(
bool
value
);
void
setSwitchPolicy
(
bool
value
);
bool
getBitstreamSwitching
()
const
;
bool
getBitstreamSwitching
()
const
;
...
...
modules/demux/adaptative/playlist/BaseRepresentation.cpp
View file @
bfdc2b60
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "BaseAdaptationSet.h"
#include "BaseAdaptationSet.h"
#include "SegmentTemplate.h"
#include "SegmentTemplate.h"
using
namespace
adaptative
;
using
namespace
adaptative
::
playlist
;
using
namespace
adaptative
::
playlist
;
BaseRepresentation
::
BaseRepresentation
(
BaseAdaptationSet
*
set
)
:
BaseRepresentation
::
BaseRepresentation
(
BaseAdaptationSet
*
set
)
:
...
@@ -44,6 +45,11 @@ BaseRepresentation::~BaseRepresentation ()
...
@@ -44,6 +45,11 @@ BaseRepresentation::~BaseRepresentation ()
{
{
}
}
StreamFormat
BaseRepresentation
::
getStreamFormat
()
const
{
return
StreamFormat
();
}
uint64_t
BaseRepresentation
::
getBandwidth
()
const
uint64_t
BaseRepresentation
::
getBandwidth
()
const
{
{
return
bandwidth
;
return
bandwidth
;
...
...
modules/demux/adaptative/playlist/BaseRepresentation.h
View file @
bfdc2b60
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "CommonAttributesElements.h"
#include "CommonAttributesElements.h"
#include "SegmentInformation.hpp"
#include "SegmentInformation.hpp"
#include "../StreamFormat.hpp"
namespace
adaptative
namespace
adaptative
{
{
...
@@ -46,6 +47,7 @@ namespace adaptative
...
@@ -46,6 +47,7 @@ namespace adaptative
BaseRepresentation
(
BaseAdaptationSet
*
);
BaseRepresentation
(
BaseAdaptationSet
*
);
virtual
~
BaseRepresentation
();
virtual
~
BaseRepresentation
();
virtual
StreamFormat
getStreamFormat
()
const
;
/*
/*
* @return The bitrate required for this representation
* @return The bitrate required for this representation
* in bits per seconds.
* in bits per seconds.
...
...
modules/demux/dash/DASHManager.cpp
View file @
bfdc2b60
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include <inttypes.h>
#include <inttypes.h>
#include "DASHManager.h"
#include "DASHManager.h"
#include "DASHStreamFormat.hpp"
#include "mpd/MPDFactory.h"
#include "mpd/MPDFactory.h"
#include "xml/DOMParser.h"
#include "xml/DOMParser.h"
#include "../adaptative/logic/RateBasedAdaptationLogic.h"
#include "../adaptative/logic/RateBasedAdaptationLogic.h"
...
@@ -42,9 +43,25 @@ using namespace dash;
...
@@ -42,9 +43,25 @@ using namespace dash;
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
using
namespace
adaptative
::
logic
;
using
namespace
adaptative
::
logic
;
AbstractStreamOutput
*
DASHStreamOutputFactory
::
create
(
demux_t
*
demux
,
const
StreamFormat
&
format
)
const
{
unsigned
fmt
=
format
;
switch
(
fmt
)
{
case
DASHStreamFormat
:
:
MP4
:
return
new
BaseStreamOutput
(
demux
,
"mp4"
);
case
DASHStreamFormat
:
:
MPEG2TS
:
return
new
BaseStreamOutput
(
demux
,
"ts"
);
}
return
NULL
;
}
DASHManager
::
DASHManager
(
MPD
*
mpd
,
DASHManager
::
DASHManager
(
MPD
*
mpd
,
AbstractStreamOutputFactory
*
factory
,
AbstractAdaptationLogic
::
LogicType
type
,
stream_t
*
stream
)
:
AbstractAdaptationLogic
::
LogicType
type
,
stream_t
*
stream
)
:
PlaylistManager
(
mpd
,
type
,
stream
)
PlaylistManager
(
mpd
,
factory
,
type
,
stream
)
{
{
}
}
...
...
modules/demux/dash/DASHManager.h
View file @
bfdc2b60
...
@@ -33,10 +33,17 @@ namespace dash
...
@@ -33,10 +33,17 @@ namespace dash
{
{
using
namespace
adaptative
;
using
namespace
adaptative
;
class
DASHStreamOutputFactory
:
public
AbstractStreamOutputFactory
{
public:
virtual
AbstractStreamOutput
*
create
(
demux_t
*
,
const
StreamFormat
&
)
const
;
};
class
DASHManager
:
public
PlaylistManager
class
DASHManager
:
public
PlaylistManager
{
{
public:
public:
DASHManager
(
mpd
::
MPD
*
mpd
,
DASHManager
(
mpd
::
MPD
*
mpd
,
AbstractStreamOutputFactory
*
,
logic
::
AbstractAdaptationLogic
::
LogicType
type
,
logic
::
AbstractAdaptationLogic
::
LogicType
type
,
stream_t
*
stream
);
stream_t
*
stream
);
virtual
~
DASHManager
();
virtual
~
DASHManager
();
...
...
modules/demux/dash/DASHStreamFormat.hpp
0 → 100644
View file @
bfdc2b60
/*
* DASHStreamFormat.hpp
*****************************************************************************
* Copyright (C) 2015 - VideoLAN authors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef DASHSTREAMFORMAT_HPP
#define DASHSTREAMFORMAT_HPP
#include "../adaptative/StreamFormat.hpp"
#include <string>
namespace
dash
{
using
namespace
adaptative
;
class
DASHStreamFormat
:
public
StreamFormat
{
public:
static
const
unsigned
MPEG2TS
=
StreamFormat
::
UNSUPPORTED
+
1
;
static
const
unsigned
MP4
=
StreamFormat
::
UNSUPPORTED
+
2
;
static
StreamFormat
mimeToFormat
(
const
std
::
string
&
mime
)
{
std
::
string
::
size_type
pos
=
mime
.
find
(
"/"
);
if
(
pos
!=
std
::
string
::
npos
)
{
std
::
string
tail
=
mime
.
substr
(
pos
+
1
);
if
(
tail
==
"mp4"
)
return
StreamFormat
(
DASHStreamFormat
::
MP4
);
else
if
(
tail
==
"mp2t"
)
return
StreamFormat
(
DASHStreamFormat
::
MPEG2TS
);
}
return
StreamFormat
();
}
};
}
#endif // DASHSTREAMFORMAT_HPP
modules/demux/dash/dash.cpp
View file @
bfdc2b60
...
@@ -141,6 +141,7 @@ static int Open(vlc_object_t *p_obj)
...
@@ -141,6 +141,7 @@ static int Open(vlc_object_t *p_obj)
p_sys
->
p_mpd
=
mpd
;
p_sys
->
p_mpd
=
mpd
;
int
logic
=
var_InheritInteger
(
p_obj
,
"dash-logic"
);
int
logic
=
var_InheritInteger
(
p_obj
,
"dash-logic"
);
DASHManager
*
p_dashManager
=
new
DASHManager
(
p_sys
->
p_mpd
,
DASHManager
*
p_dashManager
=
new
DASHManager
(
p_sys
->
p_mpd
,
new
(
std
::
nothrow
)
DASHStreamOutputFactory
,
static_cast
<
AbstractAdaptationLogic
::
LogicType
>
(
logic
),
static_cast
<
AbstractAdaptationLogic
::
LogicType
>
(
logic
),
p_demux
->
s
);
p_demux
->
s
);
...
...
modules/demux/dash/mpd/AdaptationSet.cpp
View file @
bfdc2b60
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "AdaptationSet.h"
#include "AdaptationSet.h"
#include "Representation.h"
#include "Representation.h"
#include "Period.h"
#include "Period.h"
#include "../DASHStreamFormat.hpp"
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
...
@@ -39,6 +40,22 @@ AdaptationSet::~AdaptationSet()
...
@@ -39,6 +40,22 @@ AdaptationSet::~AdaptationSet()
{
{
}
}
StreamFormat
AdaptationSet
::
getStreamFormat
()
const
{
if
(
!
getMimeType
().
empty
())
{
return
DASHStreamFormat
::
mimeToFormat
(
getMimeType
());
}
else
if
(
!
representations
.
empty
())
{
return
representations
.
front
()
->
getStreamFormat
();
}
else
{
return
StreamFormat
();
}
}
bool
AdaptationSet
::
getSubsegmentAlignmentFlag
()
const
bool
AdaptationSet
::
getSubsegmentAlignmentFlag
()
const
{
{
return
subsegmentAlignmentFlag
;
return
subsegmentAlignmentFlag
;
...
...
modules/demux/dash/mpd/AdaptationSet.h
View file @
bfdc2b60
...
@@ -39,6 +39,8 @@ namespace dash
...
@@ -39,6 +39,8 @@ namespace dash
class
Period
;
class
Period
;
class
Representation
;
class
Representation
;
using
namespace
adaptative
;
class
AdaptationSet
:
public
adaptative
::
playlist
::
BaseAdaptationSet
,
class
AdaptationSet
:
public
adaptative
::
playlist
::
BaseAdaptationSet
,
public
DASHCommonAttributesElements
public
DASHCommonAttributesElements
{
{
...
@@ -46,6 +48,7 @@ namespace dash
...
@@ -46,6 +48,7 @@ namespace dash
AdaptationSet
(
Period
*
);
AdaptationSet
(
Period
*
);
virtual
~
AdaptationSet
();
virtual
~
AdaptationSet
();
virtual
StreamFormat
getStreamFormat
()
const
;
/* reimpl */
bool
getSubsegmentAlignmentFlag
()
const
;
bool
getSubsegmentAlignmentFlag
()
const
;
void
setSubsegmentAlignmentFlag
(
bool
alignment
);
void
setSubsegmentAlignmentFlag
(
bool
alignment
);
const
Representation
*
getRepresentationById
(
const
std
::
string
&
id
)
const
;
const
Representation
*
getRepresentationById
(
const
std
::
string
&
id
)
const
;
...
...
modules/demux/dash/mpd/Representation.cpp
View file @
bfdc2b60
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include "TrickModeType.h"
#include "TrickModeType.h"
#include "../adaptative/playlist/SegmentTemplate.h"
#include "../adaptative/playlist/SegmentTemplate.h"
#include "../adaptative/playlist/SegmentTimeline.h"
#include "../adaptative/playlist/SegmentTimeline.h"
#include "../DASHStreamFormat.hpp"
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
...
@@ -48,6 +49,14 @@ Representation::~Representation ()
...
@@ -48,6 +49,14 @@ Representation::~Representation ()
delete
(
this
->
trickModeType
);
delete
(
this
->
trickModeType
);
}
}
StreamFormat
Representation
::
getStreamFormat
()
const
{
if
(
getMimeType
().
empty
())
return
DASHStreamFormat
::
mimeToFormat
(
adaptationSet
->
getMimeType
());
else
return
DASHStreamFormat
::
mimeToFormat
(
getMimeType
());
}
TrickModeType
*
Representation
::
getTrickModeType
()
const
TrickModeType
*
Representation
::
getTrickModeType
()
const
{
{
return
this
->
trickModeType
;
return
this
->
trickModeType
;
...
...
modules/demux/dash/mpd/Representation.h
View file @
bfdc2b60
...
@@ -37,6 +37,7 @@ namespace dash
...
@@ -37,6 +37,7 @@ namespace dash
class
TrickModeType
;
class
TrickModeType
;
class
MPD
;
class
MPD
;
using
namespace
adaptative
;
using
namespace
adaptative
::
playlist
;
using
namespace
adaptative
::
playlist
;
class
Representation
:
public
BaseRepresentation
,
class
Representation
:
public
BaseRepresentation
,
...
@@ -47,6 +48,7 @@ namespace dash
...
@@ -47,6 +48,7 @@ namespace dash
Representation
(
AdaptationSet
*
);
Representation
(
AdaptationSet
*
);
virtual
~
Representation
();
virtual
~
Representation
();
virtual
StreamFormat
getStreamFormat
()
const
;
/* reimpl */
int
getQualityRanking
()
const
;
int
getQualityRanking
()
const
;
void
setQualityRanking
(
int
qualityRanking
);
void
setQualityRanking
(
int
qualityRanking
);
const
std
::
list
<
const
Representation
*>&
getDependencies
()
const
;
const
std
::
list
<
const
Representation
*>&
getDependencies
()
const
;
...
...
modules/demux/hls/HLSManager.cpp
View file @
bfdc2b60
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#endif
#endif
#include "HLSManager.hpp"
#include "HLSManager.hpp"
#include "HLSStreamFormat.hpp"
#include "../adaptative/logic/RateBasedAdaptationLogic.h"
#include "../adaptative/logic/RateBasedAdaptationLogic.h"
#include "../adaptative/tools/Retrieve.hpp"
#include "../adaptative/tools/Retrieve.hpp"
#include "playlist/Parser.hpp"
#include "playlist/Parser.hpp"
...
@@ -34,9 +35,22 @@ using namespace adaptative::logic;
...
@@ -34,9 +35,22 @@ using namespace adaptative::logic;
using
namespace
hls
;
using
namespace
hls
;
using
namespace
hls
::
playlist
;
using
namespace
hls
::
playlist
;
AbstractStreamOutput
*
HLSStreamOutputFactory
::
create
(
demux_t
*
demux
,
const
StreamFormat
&
format
)
const
{
unsigned
fmt
=
format
;
switch
(
fmt
)
{
default:
case
HLSStreamFormat
:
:
MPEG2TS
:
return
new
BaseStreamOutput
(
demux
,
"ts"
);
}
return
NULL
;
}
HLSManager
::
HLSManager
(
M3U8
*
playlist
,
HLSManager
::
HLSManager
(
M3U8
*
playlist
,
AbstractStreamOutputFactory
*
factory
,
AbstractAdaptationLogic
::
LogicType
type
,
stream_t
*
stream
)
:
AbstractAdaptationLogic
::
LogicType
type
,
stream_t
*
stream
)
:
PlaylistManager
(
playlist
,
type
,
stream
)
PlaylistManager
(
playlist
,
factory
,
type
,
stream
)
{
{
}
}
...
...
modules/demux/hls/HLSManager.hpp
View file @
bfdc2b60
...
@@ -28,10 +28,17 @@ namespace hls
...
@@ -28,10 +28,17 @@ namespace hls
{
{
using
namespace
adaptative
;
using
namespace
adaptative
;
class
HLSStreamOutputFactory
:
public
AbstractStreamOutputFactory
{
public:
virtual
AbstractStreamOutput
*
create
(
demux_t
*
,
const
StreamFormat
&
)
const
;
};
class
HLSManager
:
public
PlaylistManager
class
HLSManager
:
public
PlaylistManager
{
{
public:
public:
HLSManager
(
playlist
::
M3U8
*
,
HLSManager
(
playlist
::
M3U8
*
,
AbstractStreamOutputFactory
*
,
logic
::
AbstractAdaptationLogic
::
LogicType
type
,
logic
::
AbstractAdaptationLogic
::
LogicType
type
,
stream_t
*
stream
);
stream_t
*
stream
);
virtual
~
HLSManager
();
virtual
~
HLSManager
();
...
...
modules/demux/hls/HLSStreamFormat.hpp
0 → 100644
View file @
bfdc2b60
/*
* HLSStreamFormat.hpp
*****************************************************************************
* Copyright (C) 2015 - VideoLAN authors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef HLSSTREAMFORMAT_HPP
#define HLSSTREAMFORMAT_HPP
#include "../adaptative/StreamFormat.hpp"
#include <string>
namespace
hls
{
using
namespace
adaptative
;
class
HLSStreamFormat
:
public
StreamFormat
{
public:
static
const
unsigned
MPEG2TS
=
StreamFormat
::
UNSUPPORTED
+
1
;
};
}
#endif // HLSSTREAMFORMAT_HPP
modules/demux/hls/hls.cpp
View file @
bfdc2b60
...
@@ -178,6 +178,7 @@ static int Open(vlc_object_t *p_obj)
...
@@ -178,6 +178,7 @@ static int Open(vlc_object_t *p_obj)
HLSManager
*
p_manager
=
HLSManager
*
p_manager
=
new
(
std
::
nothrow
)
HLSManager
(
p_sys
->
p_playlist
,
new
(
std
::
nothrow
)
HLSManager
(
p_sys
->
p_playlist
,
new
(
std
::
nothrow
)
HLSStreamOutputFactory
,
static_cast
<
AbstractAdaptationLogic
::
LogicType
>
(
logic
),
static_cast
<
AbstractAdaptationLogic
::
LogicType
>
(
logic
),
p_demux
->
s
);
p_demux
->
s
);
...
...
modules/demux/hls/playlist/Parser.cpp
View file @
bfdc2b60
...
@@ -113,8 +113,6 @@ void Parser::parseRepresentation(BaseAdaptationSet *adaptSet, const AttributesTa
...
@@ -113,8 +113,6 @@ void Parser::parseRepresentation(BaseAdaptationSet *adaptSet, const AttributesTa
Representation
*
rep
=
new
(
std
::
nothrow
)
Representation
(
adaptSet
);
Representation
*
rep
=
new
(
std
::
nothrow
)
Representation
(
adaptSet
);
if
(
rep
)
if
(
rep
)
{
{
rep
->
setMimeType
(
"video/mp2t"
);
if
(
uriAttr
)
if
(
uriAttr
)
{
{
size_t
pos
=
uriAttr
->
value
.
find_last_of
(
'/'
);
size_t
pos
=
uriAttr
->
value
.
find_last_of
(
'/'
);
...
...
modules/demux/hls/playlist/Representation.cpp
View file @
bfdc2b60
...
@@ -28,7 +28,9 @@
...
@@ -28,7 +28,9 @@
#include "../adaptative/playlist/BasePeriod.h"
#include "../adaptative/playlist/BasePeriod.h"
#include "../adaptative/playlist/BaseAdaptationSet.h"
#include "../adaptative/playlist/BaseAdaptationSet.h"
#include "../adaptative/playlist/SegmentList.h"
#include "../adaptative/playlist/SegmentList.h"
#include "../HLSStreamFormat.hpp"
using
namespace
hls
;
using
namespace
hls
::
playlist
;
using
namespace
hls
::
playlist
;
Representation
::
Representation
(
BaseAdaptationSet
*
set
)
:
Representation
::
Representation
(
BaseAdaptationSet
*
set
)
:
...
@@ -41,6 +43,11 @@ Representation::~Representation ()
...
@@ -41,6 +43,11 @@ Representation::~Representation ()
{
{
}
}
StreamFormat
Representation
::
getStreamFormat
()
const
{
return
StreamFormat
(
HLSStreamFormat
::
MPEG2TS
);
}
bool
Representation
::
isLive
()
const
bool
Representation
::
isLive
()
const
{
{
return
b_live
;
return
b_live
;
...
...
modules/demux/hls/playlist/Representation.hpp
View file @
bfdc2b60
...
@@ -30,6 +30,7 @@ namespace hls
...
@@ -30,6 +30,7 @@ namespace hls
{
{
class
M3U8
;
class
M3U8
;
using
namespace
adaptative
;
using
namespace
adaptative
::
playlist
;
using
namespace
adaptative
::
playlist
;
class
Representation
:
public
BaseRepresentation
class
Representation
:
public
BaseRepresentation
...
@@ -39,6 +40,8 @@ namespace hls
...
@@ -39,6 +40,8 @@ namespace hls
public:
public:
Representation
(
BaseAdaptationSet
*
);
Representation
(
BaseAdaptationSet
*
);
virtual
~
Representation
();
virtual
~
Representation
();
virtual
StreamFormat
getStreamFormat
()
const
;
/* reimpl */
void
localMergeWithPlaylist
(
M3U8
*
,
mtime_t
);
void
localMergeWithPlaylist
(
M3U8
*
,
mtime_t
);
bool
isLive
()
const
;
bool
isLive
()
const
;
virtual
void
mergeWith
(
SegmentInformation
*
,
mtime_t
);
/* reimpl */
virtual
void
mergeWith
(
SegmentInformation
*
,
mtime_t
);
/* reimpl */
...
...
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