Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
Steve Lhomme
VLC
Commits
3924bed4
Commit
3924bed4
authored
Sep 14, 2016
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptive: add connection manager interface
parent
4000668d
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
94 additions
and
49 deletions
+94
-49
modules/demux/adaptive/PlaylistManager.cpp
modules/demux/adaptive/PlaylistManager.cpp
+1
-1
modules/demux/adaptive/PlaylistManager.h
modules/demux/adaptive/PlaylistManager.h
+3
-3
modules/demux/adaptive/SegmentTracker.cpp
modules/demux/adaptive/SegmentTracker.cpp
+2
-1
modules/demux/adaptive/SegmentTracker.hpp
modules/demux/adaptive/SegmentTracker.hpp
+2
-2
modules/demux/adaptive/Streams.cpp
modules/demux/adaptive/Streams.cpp
+1
-1
modules/demux/adaptive/Streams.hpp
modules/demux/adaptive/Streams.hpp
+4
-4
modules/demux/adaptive/http/Chunk.cpp
modules/demux/adaptive/http/Chunk.cpp
+4
-4
modules/demux/adaptive/http/Chunk.h
modules/demux/adaptive/http/Chunk.h
+5
-5
modules/demux/adaptive/http/HTTPConnectionManager.cpp
modules/demux/adaptive/http/HTTPConnectionManager.cpp
+33
-8
modules/demux/adaptive/http/HTTPConnectionManager.h
modules/demux/adaptive/http/HTTPConnectionManager.h
+27
-8
modules/demux/adaptive/playlist/Segment.cpp
modules/demux/adaptive/playlist/Segment.cpp
+2
-2
modules/demux/adaptive/playlist/Segment.h
modules/demux/adaptive/playlist/Segment.h
+2
-2
modules/demux/dash/DASHStream.cpp
modules/demux/dash/DASHStream.cpp
+1
-1
modules/demux/dash/DASHStream.hpp
modules/demux/dash/DASHStream.hpp
+1
-1
modules/demux/hls/HLSStreams.cpp
modules/demux/hls/HLSStreams.cpp
+1
-1
modules/demux/hls/HLSStreams.hpp
modules/demux/hls/HLSStreams.hpp
+1
-1
modules/demux/smooth/SmoothStream.cpp
modules/demux/smooth/SmoothStream.cpp
+1
-1
modules/demux/smooth/SmoothStream.hpp
modules/demux/smooth/SmoothStream.hpp
+1
-1
modules/demux/smooth/playlist/ForgedInitSegment.cpp
modules/demux/smooth/playlist/ForgedInitSegment.cpp
+1
-1
modules/demux/smooth/playlist/ForgedInitSegment.hpp
modules/demux/smooth/playlist/ForgedInitSegment.hpp
+1
-1
No files found.
modules/demux/adaptive/PlaylistManager.cpp
View file @
3924bed4
...
@@ -685,7 +685,7 @@ void PlaylistManager::updateControlsContentType()
...
@@ -685,7 +685,7 @@ void PlaylistManager::updateControlsContentType()
}
}
}
}
AbstractAdaptationLogic
*
PlaylistManager
::
createLogic
(
AbstractAdaptationLogic
::
LogicType
type
,
HTTP
ConnectionManager
*
conn
)
AbstractAdaptationLogic
*
PlaylistManager
::
createLogic
(
AbstractAdaptationLogic
::
LogicType
type
,
Abstract
ConnectionManager
*
conn
)
{
{
switch
(
type
)
switch
(
type
)
{
{
...
...
modules/demux/adaptive/PlaylistManager.h
View file @
3924bed4
...
@@ -36,7 +36,7 @@ namespace adaptive
...
@@ -36,7 +36,7 @@ namespace adaptive
namespace
http
namespace
http
{
{
class
HTTP
ConnectionManager
;
class
Abstract
ConnectionManager
;
}
}
using
namespace
playlist
;
using
namespace
playlist
;
...
@@ -89,9 +89,9 @@ namespace adaptive
...
@@ -89,9 +89,9 @@ namespace adaptive
/* local factories */
/* local factories */
virtual
AbstractAdaptationLogic
*
createLogic
(
AbstractAdaptationLogic
::
LogicType
,
virtual
AbstractAdaptationLogic
*
createLogic
(
AbstractAdaptationLogic
::
LogicType
,
HTTP
ConnectionManager
*
);
Abstract
ConnectionManager
*
);
HTTPConnectionManager
*
conManager
;
AbstractConnectionManager
*
conManager
;
AbstractAdaptationLogic
::
LogicType
logicType
;
AbstractAdaptationLogic
::
LogicType
logicType
;
AbstractAdaptationLogic
*
logic
;
AbstractAdaptationLogic
*
logic
;
AbstractPlaylist
*
playlist
;
AbstractPlaylist
*
playlist
;
...
...
modules/demux/adaptive/SegmentTracker.cpp
View file @
3924bed4
...
@@ -112,7 +112,8 @@ void SegmentTracker::reset()
...
@@ -112,7 +112,8 @@ void SegmentTracker::reset()
format
=
StreamFormat
::
UNSUPPORTED
;
format
=
StreamFormat
::
UNSUPPORTED
;
}
}
SegmentChunk
*
SegmentTracker
::
getNextChunk
(
bool
switch_allowed
,
HTTPConnectionManager
*
connManager
)
SegmentChunk
*
SegmentTracker
::
getNextChunk
(
bool
switch_allowed
,
AbstractConnectionManager
*
connManager
)
{
{
BaseRepresentation
*
rep
=
NULL
,
*
prevRep
=
NULL
;
BaseRepresentation
*
rep
=
NULL
,
*
prevRep
=
NULL
;
ISegment
*
segment
;
ISegment
*
segment
;
...
...
modules/demux/adaptive/SegmentTracker.hpp
View file @
3924bed4
...
@@ -29,7 +29,7 @@ namespace adaptive
...
@@ -29,7 +29,7 @@ namespace adaptive
{
{
namespace
http
namespace
http
{
{
class
HTTP
ConnectionManager
;
class
Abstract
ConnectionManager
;
}
}
namespace
logic
namespace
logic
...
@@ -94,7 +94,7 @@ namespace adaptive
...
@@ -94,7 +94,7 @@ namespace adaptive
StreamFormat
getCurrentFormat
()
const
;
StreamFormat
getCurrentFormat
()
const
;
bool
segmentsListReady
()
const
;
bool
segmentsListReady
()
const
;
void
reset
();
void
reset
();
SegmentChunk
*
getNextChunk
(
bool
,
HTTP
ConnectionManager
*
);
SegmentChunk
*
getNextChunk
(
bool
,
Abstract
ConnectionManager
*
);
bool
setPositionByTime
(
mtime_t
,
bool
,
bool
);
bool
setPositionByTime
(
mtime_t
,
bool
,
bool
);
void
setPositionByNumber
(
uint64_t
,
bool
);
void
setPositionByNumber
(
uint64_t
,
bool
);
mtime_t
getPlaybackTime
()
const
;
/* Current segment start time if selected */
mtime_t
getPlaybackTime
()
const
;
/* Current segment start time if selected */
...
...
modules/demux/adaptive/Streams.cpp
View file @
3924bed4
...
@@ -53,7 +53,7 @@ AbstractStream::AbstractStream(demux_t * demux_)
...
@@ -53,7 +53,7 @@ AbstractStream::AbstractStream(demux_t * demux_)
vlc_mutex_init
(
&
lock
);
vlc_mutex_init
(
&
lock
);
}
}
bool
AbstractStream
::
init
(
const
StreamFormat
&
format_
,
SegmentTracker
*
tracker
,
HTTP
ConnectionManager
*
conn
)
bool
AbstractStream
::
init
(
const
StreamFormat
&
format_
,
SegmentTracker
*
tracker
,
Abstract
ConnectionManager
*
conn
)
{
{
/* Don't even try if not supported or already init */
/* Don't even try if not supported or already init */
if
((
unsigned
)
format_
==
StreamFormat
::
UNSUPPORTED
||
demuxersource
)
if
((
unsigned
)
format_
==
StreamFormat
::
UNSUPPORTED
||
demuxersource
)
...
...
modules/demux/adaptive/Streams.hpp
View file @
3924bed4
...
@@ -38,7 +38,7 @@ namespace adaptive
...
@@ -38,7 +38,7 @@ namespace adaptive
namespace
http
namespace
http
{
{
class
HTTP
ConnectionManager
;
class
Abstract
ConnectionManager
;
}
}
namespace
playlist
namespace
playlist
...
@@ -56,7 +56,7 @@ namespace adaptive
...
@@ -56,7 +56,7 @@ namespace adaptive
public:
public:
AbstractStream
(
demux_t
*
);
AbstractStream
(
demux_t
*
);
virtual
~
AbstractStream
();
virtual
~
AbstractStream
();
bool
init
(
const
StreamFormat
&
,
SegmentTracker
*
,
HTTP
ConnectionManager
*
);
bool
init
(
const
StreamFormat
&
,
SegmentTracker
*
,
Abstract
ConnectionManager
*
);
void
setLanguage
(
const
std
::
string
&
);
void
setLanguage
(
const
std
::
string
&
);
void
setDescription
(
const
std
::
string
&
);
void
setDescription
(
const
std
::
string
&
);
...
@@ -109,7 +109,7 @@ namespace adaptive
...
@@ -109,7 +109,7 @@ namespace adaptive
demux_t
*
p_realdemux
;
demux_t
*
p_realdemux
;
StreamFormat
format
;
StreamFormat
format
;
HTTP
ConnectionManager
*
connManager
;
/* not owned */
Abstract
ConnectionManager
*
connManager
;
/* not owned */
SegmentTracker
*
segmentTracker
;
SegmentTracker
*
segmentTracker
;
SegmentChunk
*
currentChunk
;
SegmentChunk
*
currentChunk
;
...
@@ -131,7 +131,7 @@ namespace adaptive
...
@@ -131,7 +131,7 @@ namespace adaptive
public:
public:
virtual
~
AbstractStreamFactory
()
{}
virtual
~
AbstractStreamFactory
()
{}
virtual
AbstractStream
*
create
(
demux_t
*
,
const
StreamFormat
&
,
virtual
AbstractStream
*
create
(
demux_t
*
,
const
StreamFormat
&
,
SegmentTracker
*
,
HTTP
ConnectionManager
*
)
const
=
0
;
SegmentTracker
*
,
Abstract
ConnectionManager
*
)
const
=
0
;
};
};
}
}
#endif // STREAMS_HPP
#endif // STREAMS_HPP
modules/demux/adaptive/http/Chunk.cpp
View file @
3924bed4
...
@@ -116,7 +116,7 @@ block_t * AbstractChunk::read(size_t size)
...
@@ -116,7 +116,7 @@ block_t * AbstractChunk::read(size_t size)
return
doRead
(
size
,
false
);
return
doRead
(
size
,
false
);
}
}
HTTPChunkSource
::
HTTPChunkSource
(
const
std
::
string
&
url
,
HTTP
ConnectionManager
*
manager
)
:
HTTPChunkSource
::
HTTPChunkSource
(
const
std
::
string
&
url
,
Abstract
ConnectionManager
*
manager
)
:
AbstractChunkSource
(),
AbstractChunkSource
(),
connection
(
NULL
),
connection
(
NULL
),
connManager
(
manager
),
connManager
(
manager
),
...
@@ -231,7 +231,7 @@ block_t * HTTPChunkSource::readBlock()
...
@@ -231,7 +231,7 @@ block_t * HTTPChunkSource::readBlock()
return
read
(
HTTPChunkSource
::
CHUNK_SIZE
);
return
read
(
HTTPChunkSource
::
CHUNK_SIZE
);
}
}
HTTPChunkBufferedSource
::
HTTPChunkBufferedSource
(
const
std
::
string
&
url
,
HTTP
ConnectionManager
*
manager
)
:
HTTPChunkBufferedSource
::
HTTPChunkBufferedSource
(
const
std
::
string
&
url
,
Abstract
ConnectionManager
*
manager
)
:
HTTPChunkSource
(
url
,
manager
),
HTTPChunkSource
(
url
,
manager
),
p_head
(
NULL
),
p_head
(
NULL
),
pp_tail
(
&
p_head
),
pp_tail
(
&
p_head
),
...
@@ -257,7 +257,7 @@ HTTPChunkBufferedSource::~HTTPChunkBufferedSource()
...
@@ -257,7 +257,7 @@ HTTPChunkBufferedSource::~HTTPChunkBufferedSource()
buffered
=
0
;
buffered
=
0
;
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_unlock
(
&
lock
);
connManager
->
downloader
->
cancel
(
this
);
connManager
->
cancel
(
this
);
vlc_cond_destroy
(
&
avail
);
vlc_cond_destroy
(
&
avail
);
vlc_mutex_destroy
(
&
lock
);
vlc_mutex_destroy
(
&
lock
);
...
@@ -443,7 +443,7 @@ block_t * HTTPChunkBufferedSource::read(size_t readsize)
...
@@ -443,7 +443,7 @@ block_t * HTTPChunkBufferedSource::read(size_t readsize)
return
p_block
;
return
p_block
;
}
}
HTTPChunk
::
HTTPChunk
(
const
std
::
string
&
url
,
HTTP
ConnectionManager
*
manager
)
:
HTTPChunk
::
HTTPChunk
(
const
std
::
string
&
url
,
Abstract
ConnectionManager
*
manager
)
:
AbstractChunk
(
new
HTTPChunkSource
(
url
,
manager
))
AbstractChunk
(
new
HTTPChunkSource
(
url
,
manager
))
{
{
...
...
modules/demux/adaptive/http/Chunk.h
View file @
3924bed4
...
@@ -38,7 +38,7 @@ namespace adaptive
...
@@ -38,7 +38,7 @@ namespace adaptive
namespace
http
namespace
http
{
{
class
AbstractConnection
;
class
AbstractConnection
;
class
HTTP
ConnectionManager
;
class
Abstract
ConnectionManager
;
class
AbstractChunk
;
class
AbstractChunk
;
class
AbstractChunkSource
class
AbstractChunkSource
...
@@ -82,7 +82,7 @@ namespace adaptive
...
@@ -82,7 +82,7 @@ namespace adaptive
class
HTTPChunkSource
:
public
AbstractChunkSource
class
HTTPChunkSource
:
public
AbstractChunkSource
{
{
public:
public:
HTTPChunkSource
(
const
std
::
string
&
url
,
HTTP
ConnectionManager
*
);
HTTPChunkSource
(
const
std
::
string
&
url
,
Abstract
ConnectionManager
*
);
virtual
~
HTTPChunkSource
();
virtual
~
HTTPChunkSource
();
virtual
block_t
*
readBlock
();
/* impl */
virtual
block_t
*
readBlock
();
/* impl */
...
@@ -94,7 +94,7 @@ namespace adaptive
...
@@ -94,7 +94,7 @@ namespace adaptive
protected:
protected:
virtual
bool
prepare
();
virtual
bool
prepare
();
AbstractConnection
*
connection
;
AbstractConnection
*
connection
;
HTTP
ConnectionManager
*
connManager
;
Abstract
ConnectionManager
*
connManager
;
size_t
consumed
;
/* read pointer */
size_t
consumed
;
/* read pointer */
bool
prepared
;
bool
prepared
;
bool
eof
;
bool
eof
;
...
@@ -109,7 +109,7 @@ namespace adaptive
...
@@ -109,7 +109,7 @@ namespace adaptive
friend
class
Downloader
;
friend
class
Downloader
;
public:
public:
HTTPChunkBufferedSource
(
const
std
::
string
&
url
,
HTTP
ConnectionManager
*
);
HTTPChunkBufferedSource
(
const
std
::
string
&
url
,
Abstract
ConnectionManager
*
);
virtual
~
HTTPChunkBufferedSource
();
virtual
~
HTTPChunkBufferedSource
();
virtual
block_t
*
readBlock
();
/* reimpl */
virtual
block_t
*
readBlock
();
/* reimpl */
virtual
block_t
*
read
(
size_t
);
/* reimpl */
virtual
block_t
*
read
(
size_t
);
/* reimpl */
...
@@ -134,7 +134,7 @@ namespace adaptive
...
@@ -134,7 +134,7 @@ namespace adaptive
class
HTTPChunk
:
public
AbstractChunk
class
HTTPChunk
:
public
AbstractChunk
{
{
public:
public:
HTTPChunk
(
const
std
::
string
&
url
,
HTTP
ConnectionManager
*
);
HTTPChunk
(
const
std
::
string
&
url
,
Abstract
ConnectionManager
*
);
virtual
~
HTTPChunk
();
virtual
~
HTTPChunk
();
virtual
void
onDownload
(
block_t
**
)
{}
/* impl */
virtual
void
onDownload
(
block_t
**
)
{}
/* impl */
...
...
modules/demux/adaptive/http/HTTPConnectionManager.cpp
View file @
3924bed4
...
@@ -34,9 +34,31 @@
...
@@ -34,9 +34,31 @@
using
namespace
adaptive
::
http
;
using
namespace
adaptive
::
http
;
HTTPConnectionManager
::
HTTPConnectionManager
(
vlc_object_t
*
p_object_
,
ConnectionFactory
*
factory_
)
:
AbstractConnectionManager
::
AbstractConnectionManager
(
vlc_object_t
*
p_object_
)
p_object
(
p_object_
),
:
IDownloadRateObserver
()
rateObserver
(
NULL
)
{
p_object
=
p_object_
;
rateObserver
=
NULL
;
}
AbstractConnectionManager
::~
AbstractConnectionManager
()
{
}
void
AbstractConnectionManager
::
updateDownloadRate
(
size_t
size
,
mtime_t
time
)
{
if
(
rateObserver
)
rateObserver
->
updateDownloadRate
(
size
,
time
);
}
void
AbstractConnectionManager
::
setDownloadRateObserver
(
IDownloadRateObserver
*
obs
)
{
rateObserver
=
obs
;
}
HTTPConnectionManager
::
HTTPConnectionManager
(
vlc_object_t
*
p_object_
,
ConnectionFactory
*
factory_
)
:
AbstractConnectionManager
(
p_object_
)
{
{
vlc_mutex_init
(
&
lock
);
vlc_mutex_init
(
&
lock
);
downloader
=
new
(
std
::
nothrow
)
Downloader
();
downloader
=
new
(
std
::
nothrow
)
Downloader
();
...
@@ -116,13 +138,16 @@ AbstractConnection * HTTPConnectionManager::getConnection(ConnectionParams ¶
...
@@ -116,13 +138,16 @@ AbstractConnection * HTTPConnectionManager::getConnection(ConnectionParams ¶
return
conn
;
return
conn
;
}
}
void
HTTPConnectionManager
::
updateDownloadRate
(
size_t
size
,
mtime_t
tim
e
)
void
HTTPConnectionManager
::
start
(
AbstractChunkSource
*
sourc
e
)
{
{
if
(
rateObserver
)
HTTPChunkBufferedSource
*
src
=
dynamic_cast
<
HTTPChunkBufferedSource
*>
(
source
);
rateObserver
->
updateDownloadRate
(
size
,
time
);
if
(
src
)
downloader
->
schedule
(
src
);
}
}
void
HTTPConnectionManager
::
setDownloadRateObserver
(
IDownloadRateObserver
*
obs
)
void
HTTPConnectionManager
::
cancel
(
AbstractChunkSource
*
source
)
{
{
rateObserver
=
obs
;
HTTPChunkBufferedSource
*
src
=
dynamic_cast
<
HTTPChunkBufferedSource
*>
(
source
);
if
(
src
)
downloader
->
cancel
(
src
);
}
}
modules/demux/adaptive/http/HTTPConnectionManager.h
View file @
3924bed4
...
@@ -39,26 +39,45 @@ namespace adaptive
...
@@ -39,26 +39,45 @@ namespace adaptive
class
ConnectionFactory
;
class
ConnectionFactory
;
class
AbstractConnection
;
class
AbstractConnection
;
class
Downloader
;
class
Downloader
;
class
AbstractChunkSource
;
class
HTTPConnectionManager
:
public
IDownloadRateObserver
class
AbstractConnectionManager
:
public
IDownloadRateObserver
{
public:
AbstractConnectionManager
(
vlc_object_t
*
);
~
AbstractConnectionManager
();
virtual
void
closeAllConnections
()
=
0
;
virtual
AbstractConnection
*
getConnection
(
ConnectionParams
&
)
=
0
;
virtual
void
start
(
AbstractChunkSource
*
)
=
0
;
virtual
void
cancel
(
AbstractChunkSource
*
)
=
0
;
virtual
void
updateDownloadRate
(
size_t
,
mtime_t
);
/* impl */
void
setDownloadRateObserver
(
IDownloadRateObserver
*
);
protected:
vlc_object_t
*
p_object
;
private:
IDownloadRateObserver
*
rateObserver
;
};
class
HTTPConnectionManager
:
public
AbstractConnectionManager
{
{
public:
public:
HTTPConnectionManager
(
vlc_object_t
*
p_object
,
ConnectionFactory
*
=
NULL
);
HTTPConnectionManager
(
vlc_object_t
*
p_object
,
ConnectionFactory
*
=
NULL
);
virtual
~
HTTPConnectionManager
();
virtual
~
HTTPConnectionManager
();
v
oid
closeAllConnections
()
;
v
irtual
void
closeAllConnections
()
/* impl */
;
AbstractConnection
*
getConnection
(
ConnectionParams
&
)
;
virtual
AbstractConnection
*
getConnection
(
ConnectionParams
&
)
/* impl */
;
virtual
void
updateDownloadRate
(
size_t
,
mtime_t
);
/* reimpl */
virtual
void
start
(
AbstractChunkSource
*
)
/* impl */
;
void
setDownloadRateObserver
(
IDownloadRateObserver
*
);
virtual
void
cancel
(
AbstractChunkSource
*
)
/* impl */
;
Downloader
*
downloader
;
private:
private:
void
releaseAllConnections
();
void
releaseAllConnections
();
Downloader
*
downloader
;
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
std
::
vector
<
AbstractConnection
*>
connectionPool
;
std
::
vector
<
AbstractConnection
*>
connectionPool
;
vlc_object_t
*
p_object
;
IDownloadRateObserver
*
rateObserver
;
ConnectionFactory
*
factory
;
ConnectionFactory
*
factory
;
AbstractConnection
*
reuseConnection
(
ConnectionParams
&
);
AbstractConnection
*
reuseConnection
(
ConnectionParams
&
);
};
};
...
...
modules/demux/adaptive/playlist/Segment.cpp
View file @
3924bed4
...
@@ -66,7 +66,7 @@ void ISegment::onChunkDownload(block_t **, SegmentChunk *, BaseRepresentation *)
...
@@ -66,7 +66,7 @@ void ISegment::onChunkDownload(block_t **, SegmentChunk *, BaseRepresentation *)
}
}
SegmentChunk
*
ISegment
::
toChunk
(
size_t
index
,
BaseRepresentation
*
rep
,
HTTP
ConnectionManager
*
connManager
)
SegmentChunk
*
ISegment
::
toChunk
(
size_t
index
,
BaseRepresentation
*
rep
,
Abstract
ConnectionManager
*
connManager
)
{
{
const
std
::
string
url
=
getUrlSegment
().
toString
(
index
,
rep
);
const
std
::
string
url
=
getUrlSegment
().
toString
(
index
,
rep
);
HTTPChunkBufferedSource
*
source
=
new
(
std
::
nothrow
)
HTTPChunkBufferedSource
(
url
,
connManager
);
HTTPChunkBufferedSource
*
source
=
new
(
std
::
nothrow
)
HTTPChunkBufferedSource
(
url
,
connManager
);
...
@@ -78,7 +78,7 @@ SegmentChunk* ISegment::toChunk(size_t index, BaseRepresentation *rep, HTTPConne
...
@@ -78,7 +78,7 @@ SegmentChunk* ISegment::toChunk(size_t index, BaseRepresentation *rep, HTTPConne
SegmentChunk
*
chunk
=
new
(
std
::
nothrow
)
SegmentChunk
(
this
,
source
,
rep
);
SegmentChunk
*
chunk
=
new
(
std
::
nothrow
)
SegmentChunk
(
this
,
source
,
rep
);
if
(
chunk
)
if
(
chunk
)
{
{
connManager
->
downloader
->
schedule
(
source
);
connManager
->
start
(
source
);
return
chunk
;
return
chunk
;
}
}
else
else
...
...
modules/demux/adaptive/playlist/Segment.h
View file @
3924bed4
...
@@ -37,7 +37,7 @@ namespace adaptive
...
@@ -37,7 +37,7 @@ namespace adaptive
{
{
namespace
http
namespace
http
{
{
class
HTTP
ConnectionManager
;
class
Abstract
ConnectionManager
;
}
}
namespace
playlist
namespace
playlist
...
@@ -58,7 +58,7 @@ namespace adaptive
...
@@ -58,7 +58,7 @@ namespace adaptive
* That is basically true when using an Url, and false
* That is basically true when using an Url, and false
* when using an UrlTemplate
* when using an UrlTemplate
*/
*/
virtual
SegmentChunk
*
toChunk
(
size_t
,
BaseRepresentation
*
,
HTTP
ConnectionManager
*
);
virtual
SegmentChunk
*
toChunk
(
size_t
,
BaseRepresentation
*
,
Abstract
ConnectionManager
*
);
virtual
void
setByteRange
(
size_t
start
,
size_t
end
);
virtual
void
setByteRange
(
size_t
start
,
size_t
end
);
virtual
void
setSequenceNumber
(
uint64_t
);
virtual
void
setSequenceNumber
(
uint64_t
);
virtual
uint64_t
getSequenceNumber
()
const
;
virtual
uint64_t
getSequenceNumber
()
const
;
...
...
modules/demux/dash/DASHStream.cpp
View file @
3924bed4
...
@@ -72,7 +72,7 @@ AbstractDemuxer * DASHStream::createDemux(const StreamFormat &format)
...
@@ -72,7 +72,7 @@ AbstractDemuxer * DASHStream::createDemux(const StreamFormat &format)
}
}
AbstractStream
*
DASHStreamFactory
::
create
(
demux_t
*
realdemux
,
const
StreamFormat
&
format
,
AbstractStream
*
DASHStreamFactory
::
create
(
demux_t
*
realdemux
,
const
StreamFormat
&
format
,
SegmentTracker
*
tracker
,
HTTP
ConnectionManager
*
manager
)
const
SegmentTracker
*
tracker
,
Abstract
ConnectionManager
*
manager
)
const
{
{
AbstractStream
*
stream
=
new
(
std
::
nothrow
)
DASHStream
(
realdemux
);
AbstractStream
*
stream
=
new
(
std
::
nothrow
)
DASHStream
(
realdemux
);
if
(
stream
&&
!
stream
->
init
(
format
,
tracker
,
manager
))
if
(
stream
&&
!
stream
->
init
(
format
,
tracker
,
manager
))
...
...
modules/demux/dash/DASHStream.hpp
View file @
3924bed4
...
@@ -40,7 +40,7 @@ namespace dash
...
@@ -40,7 +40,7 @@ namespace dash
{
{
public:
public:
virtual
AbstractStream
*
create
(
demux_t
*
,
const
StreamFormat
&
,
virtual
AbstractStream
*
create
(
demux_t
*
,
const
StreamFormat
&
,
SegmentTracker
*
,
HTTP
ConnectionManager
*
)
const
;
SegmentTracker
*
,
Abstract
ConnectionManager
*
)
const
;
};
};
}
}
...
...
modules/demux/hls/HLSStreams.cpp
View file @
3924bed4
...
@@ -135,7 +135,7 @@ block_t * HLSStream::checkBlock(block_t *p_block, bool b_first)
...
@@ -135,7 +135,7 @@ block_t * HLSStream::checkBlock(block_t *p_block, bool b_first)
}
}
AbstractStream
*
HLSStreamFactory
::
create
(
demux_t
*
realdemux
,
const
StreamFormat
&
,
AbstractStream
*
HLSStreamFactory
::
create
(
demux_t
*
realdemux
,
const
StreamFormat
&
,
SegmentTracker
*
tracker
,
HTTP
ConnectionManager
*
manager
)
const
SegmentTracker
*
tracker
,
Abstract
ConnectionManager
*
manager
)
const
{
{
HLSStream
*
stream
=
new
(
std
::
nothrow
)
HLSStream
(
realdemux
);
HLSStream
*
stream
=
new
(
std
::
nothrow
)
HLSStream
(
realdemux
);
if
(
stream
&&
!
stream
->
init
(
StreamFormat
(
StreamFormat
::
UNKNOWN
),
tracker
,
manager
))
if
(
stream
&&
!
stream
->
init
(
StreamFormat
(
StreamFormat
::
UNKNOWN
),
tracker
,
manager
))
...
...
modules/demux/hls/HLSStreams.hpp
View file @
3924bed4
...
@@ -45,7 +45,7 @@ namespace hls
...
@@ -45,7 +45,7 @@ namespace hls
{
{
public:
public:
virtual
AbstractStream
*
create
(
demux_t
*
,
const
StreamFormat
&
,
virtual
AbstractStream
*
create
(
demux_t
*
,
const
StreamFormat
&
,
SegmentTracker
*
,
HTTP
ConnectionManager
*
)
const
;
SegmentTracker
*
,
Abstract
ConnectionManager
*
)
const
;
};
};
}
}
...
...
modules/demux/smooth/SmoothStream.cpp
View file @
3924bed4
...
@@ -61,7 +61,7 @@ block_t * SmoothStream::checkBlock(block_t *p_block, bool)
...
@@ -61,7 +61,7 @@ block_t * SmoothStream::checkBlock(block_t *p_block, bool)
}
}
AbstractStream
*
SmoothStreamFactory
::
create
(
demux_t
*
realdemux
,
const
StreamFormat
&
format
,
AbstractStream
*
SmoothStreamFactory
::
create
(
demux_t
*
realdemux
,
const
StreamFormat
&
format
,
SegmentTracker
*
tracker
,
HTTP
ConnectionManager
*
manager
)
const
SegmentTracker
*
tracker
,
Abstract
ConnectionManager
*
manager
)
const
{
{
SmoothStream
*
stream
=
new
(
std
::
nothrow
)
SmoothStream
(
realdemux
);
SmoothStream
*
stream
=
new
(
std
::
nothrow
)
SmoothStream
(
realdemux
);
if
(
stream
&&
!
stream
->
init
(
format
,
tracker
,
manager
))
if
(
stream
&&
!
stream
->
init
(
format
,
tracker
,
manager
))
...
...
modules/demux/smooth/SmoothStream.hpp
View file @
3924bed4
...
@@ -40,7 +40,7 @@ namespace smooth
...
@@ -40,7 +40,7 @@ namespace smooth
{
{
public:
public:
virtual
AbstractStream
*
create
(
demux_t
*
,
const
StreamFormat
&
,
virtual
AbstractStream
*
create
(
demux_t
*
,
const
StreamFormat
&
,
SegmentTracker
*
,
HTTP
ConnectionManager
*
)
const
;
SegmentTracker
*
,
Abstract
ConnectionManager
*
)
const
;
};
};
}
}
...
...
modules/demux/smooth/playlist/ForgedInitSegment.cpp
View file @
3924bed4
...
@@ -306,7 +306,7 @@ block_t * ForgedInitSegment::buildMoovBox()
...
@@ -306,7 +306,7 @@ block_t * ForgedInitSegment::buildMoovBox()
return
moov
;
return
moov
;
}
}
SegmentChunk
*
ForgedInitSegment
::
toChunk
(
size_t
,
BaseRepresentation
*
rep
,
HTTP
ConnectionManager
*
)
SegmentChunk
*
ForgedInitSegment
::
toChunk
(
size_t
,
BaseRepresentation
*
rep
,
Abstract
ConnectionManager
*
)
{
{
block_t
*
moov
=
buildMoovBox
();
block_t
*
moov
=
buildMoovBox
();
if
(
moov
)
if
(
moov
)
...
...
modules/demux/smooth/playlist/ForgedInitSegment.hpp
View file @
3924bed4
...
@@ -39,7 +39,7 @@ namespace smooth
...
@@ -39,7 +39,7 @@ namespace smooth
ForgedInitSegment
(
ICanonicalUrl
*
parent
,
const
std
::
string
&
,
ForgedInitSegment
(
ICanonicalUrl
*
parent
,
const
std
::
string
&
,
uint64_t
,
uint64_t
);
uint64_t
,
uint64_t
);
virtual
~
ForgedInitSegment
();
virtual
~
ForgedInitSegment
();
virtual
SegmentChunk
*
toChunk
(
size_t
,
BaseRepresentation
*
,
HTTP
ConnectionManager
*
);
/* reimpl */
virtual
SegmentChunk
*
toChunk
(
size_t
,
BaseRepresentation
*
,
Abstract
ConnectionManager
*
);
/* reimpl */
void
setWaveFormatEx
(
const
std
::
string
&
);
void
setWaveFormatEx
(
const
std
::
string
&
);
void
setCodecPrivateData
(
const
std
::
string
&
);
void
setCodecPrivateData
(
const
std
::
string
&
);
void
setChannels
(
uint16_t
);
void
setChannels
(
uint16_t
);
...
...
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