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
9df6750e
Commit
9df6750e
authored
Dec 01, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter: dash: drop MPGManager{Factory,}
Was useless proxy for periods
parent
737a297d
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
66 additions
and
275 deletions
+66
-275
modules/stream_filter/Makefile.am
modules/stream_filter/Makefile.am
+0
-4
modules/stream_filter/dash/DASHManager.cpp
modules/stream_filter/dash/DASHManager.cpp
+1
-8
modules/stream_filter/dash/DASHManager.h
modules/stream_filter/dash/DASHManager.h
+0
-3
modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp
...m_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp
+2
-2
modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.h
...eam_filter/dash/adaptationlogic/AbstractAdaptationLogic.h
+2
-3
modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.cpp
...am_filter/dash/adaptationlogic/AdaptationLogicFactory.cpp
+4
-4
modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.h
...ream_filter/dash/adaptationlogic/AdaptationLogicFactory.h
+1
-2
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
...filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
+4
-4
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.h
...m_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.h
+1
-2
modules/stream_filter/dash/adaptationlogic/AlwaysLowestAdaptationLogic.cpp
...lter/dash/adaptationlogic/AlwaysLowestAdaptationLogic.cpp
+4
-4
modules/stream_filter/dash/adaptationlogic/AlwaysLowestAdaptationLogic.hpp
...lter/dash/adaptationlogic/AlwaysLowestAdaptationLogic.hpp
+1
-1
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
..._filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
+6
-6
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.h
...am_filter/dash/adaptationlogic/RateBasedAdaptationLogic.h
+1
-2
modules/stream_filter/dash/mpd/BasicCMParser.cpp
modules/stream_filter/dash/mpd/BasicCMParser.cpp
+2
-2
modules/stream_filter/dash/mpd/BasicCMParser.h
modules/stream_filter/dash/mpd/BasicCMParser.h
+1
-1
modules/stream_filter/dash/mpd/IMPDParser.h
modules/stream_filter/dash/mpd/IMPDParser.h
+1
-1
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
+2
-2
modules/stream_filter/dash/mpd/IsoffMainParser.h
modules/stream_filter/dash/mpd/IsoffMainParser.h
+1
-1
modules/stream_filter/dash/mpd/MPD.cpp
modules/stream_filter/dash/mpd/MPD.cpp
+25
-7
modules/stream_filter/dash/mpd/MPD.h
modules/stream_filter/dash/mpd/MPD.h
+5
-3
modules/stream_filter/dash/mpd/MPDFactory.cpp
modules/stream_filter/dash/mpd/MPDFactory.cpp
+1
-4
modules/stream_filter/dash/mpd/MPDManager.cpp
modules/stream_filter/dash/mpd/MPDManager.cpp
+0
-71
modules/stream_filter/dash/mpd/MPDManager.hpp
modules/stream_filter/dash/mpd/MPDManager.hpp
+0
-52
modules/stream_filter/dash/mpd/MPDManagerFactory.cpp
modules/stream_filter/dash/mpd/MPDManagerFactory.cpp
+0
-43
modules/stream_filter/dash/mpd/MPDManagerFactory.h
modules/stream_filter/dash/mpd/MPDManagerFactory.h
+0
-42
modules/stream_filter/dash/xml/DOMParser.h
modules/stream_filter/dash/xml/DOMParser.h
+1
-1
No files found.
modules/stream_filter/Makefile.am
View file @
9df6750e
...
@@ -45,8 +45,6 @@ libdash_plugin_la_SOURCES = \
...
@@ -45,8 +45,6 @@ libdash_plugin_la_SOURCES = \
stream_filter/dash/mpd/CommonAttributesElements.h
\
stream_filter/dash/mpd/CommonAttributesElements.h
\
stream_filter/dash/mpd/ContentDescription.cpp
\
stream_filter/dash/mpd/ContentDescription.cpp
\
stream_filter/dash/mpd/ContentDescription.h
\
stream_filter/dash/mpd/ContentDescription.h
\
stream_filter/dash/mpd/MPDManager.hpp
\
stream_filter/dash/mpd/MPDManager.cpp
\
stream_filter/dash/mpd/ICanonicalUrl.hpp
\
stream_filter/dash/mpd/ICanonicalUrl.hpp
\
stream_filter/dash/mpd/IMPDParser.cpp
\
stream_filter/dash/mpd/IMPDParser.cpp
\
stream_filter/dash/mpd/IMPDParser.h
\
stream_filter/dash/mpd/IMPDParser.h
\
...
@@ -56,8 +54,6 @@ libdash_plugin_la_SOURCES = \
...
@@ -56,8 +54,6 @@ libdash_plugin_la_SOURCES = \
stream_filter/dash/mpd/MPD.h
\
stream_filter/dash/mpd/MPD.h
\
stream_filter/dash/mpd/MPDFactory.cpp
\
stream_filter/dash/mpd/MPDFactory.cpp
\
stream_filter/dash/mpd/MPDFactory.h
\
stream_filter/dash/mpd/MPDFactory.h
\
stream_filter/dash/mpd/MPDManagerFactory.cpp
\
stream_filter/dash/mpd/MPDManagerFactory.h
\
stream_filter/dash/mpd/Period.cpp
\
stream_filter/dash/mpd/Period.cpp
\
stream_filter/dash/mpd/Period.h
\
stream_filter/dash/mpd/Period.h
\
stream_filter/dash/mpd/Profile.cpp
\
stream_filter/dash/mpd/Profile.cpp
\
...
...
modules/stream_filter/dash/DASHManager.cpp
View file @
9df6750e
...
@@ -39,7 +39,6 @@ DASHManager::DASHManager ( MPD *mpd,
...
@@ -39,7 +39,6 @@ DASHManager::DASHManager ( MPD *mpd,
conManager
(
NULL
),
conManager
(
NULL
),
adaptationLogic
(
NULL
),
adaptationLogic
(
NULL
),
logicType
(
type
),
logicType
(
type
),
mpdManager
(
NULL
),
mpd
(
mpd
),
mpd
(
mpd
),
stream
(
stream
),
stream
(
stream
),
downloader
(
NULL
),
downloader
(
NULL
),
...
@@ -52,17 +51,11 @@ DASHManager::~DASHManager ()
...
@@ -52,17 +51,11 @@ DASHManager::~DASHManager ()
delete
this
->
buffer
;
delete
this
->
buffer
;
delete
this
->
conManager
;
delete
this
->
conManager
;
delete
this
->
adaptationLogic
;
delete
this
->
adaptationLogic
;
delete
this
->
mpdManager
;
}
}
bool
DASHManager
::
start
()
bool
DASHManager
::
start
()
{
{
this
->
mpdManager
=
mpd
::
MPDManagerFactory
::
create
(
mpd
);
adaptationLogic
=
AdaptationLogicFactory
::
create
(
logicType
,
mpd
);
if
(
this
->
mpdManager
==
NULL
)
return
false
;
adaptationLogic
=
AdaptationLogicFactory
::
create
(
logicType
,
mpdManager
);
if
(
this
->
adaptationLogic
==
NULL
)
if
(
this
->
adaptationLogic
==
NULL
)
return
false
;
return
false
;
...
...
modules/stream_filter/dash/DASHManager.h
View file @
9df6750e
...
@@ -29,8 +29,6 @@
...
@@ -29,8 +29,6 @@
#include "xml/Node.h"
#include "xml/Node.h"
#include "adaptationlogic/IAdaptationLogic.h"
#include "adaptationlogic/IAdaptationLogic.h"
#include "adaptationlogic/AdaptationLogicFactory.h"
#include "adaptationlogic/AdaptationLogicFactory.h"
#include "mpd/MPDManager.hpp"
#include "mpd/MPDManagerFactory.h"
#include "buffer/BlockBuffer.h"
#include "buffer/BlockBuffer.h"
#include "DASHDownloader.h"
#include "DASHDownloader.h"
#include "mpd/MPD.h"
#include "mpd/MPD.h"
...
@@ -55,7 +53,6 @@ namespace dash
...
@@ -55,7 +53,6 @@ namespace dash
http
::
HTTPConnectionManager
*
conManager
;
http
::
HTTPConnectionManager
*
conManager
;
logic
::
IAdaptationLogic
*
adaptationLogic
;
logic
::
IAdaptationLogic
*
adaptationLogic
;
logic
::
IAdaptationLogic
::
LogicType
logicType
;
logic
::
IAdaptationLogic
::
LogicType
logicType
;
mpd
::
MPDManager
*
mpdManager
;
mpd
::
MPD
*
mpd
;
mpd
::
MPD
*
mpd
;
stream_t
*
stream
;
stream_t
*
stream
;
DASHDownloader
*
downloader
;
DASHDownloader
*
downloader
;
...
...
modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp
View file @
9df6750e
...
@@ -31,8 +31,8 @@ using namespace dash::logic;
...
@@ -31,8 +31,8 @@ using namespace dash::logic;
using
namespace
dash
::
xml
;
using
namespace
dash
::
xml
;
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
AbstractAdaptationLogic
::
AbstractAdaptationLogic
(
MPD
Manager
*
mpdManager
)
:
AbstractAdaptationLogic
::
AbstractAdaptationLogic
(
MPD
*
mpd_
)
:
mpd
Manager
(
mpdManager
),
mpd
(
mpd_
),
bpsAvg
(
0
),
bpsAvg
(
0
),
bpsLastChunk
(
0
),
bpsLastChunk
(
0
),
bufferedMicroSec
(
0
),
bufferedMicroSec
(
0
),
...
...
modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.h
View file @
9df6750e
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "xml/Node.h"
#include "xml/Node.h"
#include "http/Chunk.h"
#include "http/Chunk.h"
#include "mpd/MPD.h"
#include "mpd/MPD.h"
#include "mpd/MPDManager.hpp"
#include "mpd/Period.h"
#include "mpd/Period.h"
#include "mpd/Representation.h"
#include "mpd/Representation.h"
#include "mpd/Segment.h"
#include "mpd/Segment.h"
...
@@ -43,7 +42,7 @@ namespace dash
...
@@ -43,7 +42,7 @@ namespace dash
class
AbstractAdaptationLogic
:
public
IAdaptationLogic
class
AbstractAdaptationLogic
:
public
IAdaptationLogic
{
{
public:
public:
AbstractAdaptationLogic
(
dash
::
mpd
::
MPDManager
*
mpdManager
);
AbstractAdaptationLogic
(
mpd
::
MPD
*
mpd
);
virtual
~
AbstractAdaptationLogic
();
virtual
~
AbstractAdaptationLogic
();
virtual
void
downloadRateChanged
(
uint64_t
bpsAvg
,
uint64_t
bpsLastChunk
);
virtual
void
downloadRateChanged
(
uint64_t
bpsAvg
,
uint64_t
bpsLastChunk
);
...
@@ -54,7 +53,7 @@ namespace dash
...
@@ -54,7 +53,7 @@ namespace dash
int
getBufferPercent
()
const
;
int
getBufferPercent
()
const
;
protected:
protected:
dash
::
mpd
::
MPD
Manager
*
mpdManager
;
dash
::
mpd
::
MPD
*
mpd
;
private:
private:
int
bpsAvg
;
int
bpsAvg
;
...
...
modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.cpp
View file @
9df6750e
...
@@ -35,13 +35,13 @@ using namespace dash::xml;
...
@@ -35,13 +35,13 @@ using namespace dash::xml;
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
IAdaptationLogic
*
AdaptationLogicFactory
::
create
(
IAdaptationLogic
::
LogicType
logic
,
IAdaptationLogic
*
AdaptationLogicFactory
::
create
(
IAdaptationLogic
::
LogicType
logic
,
MPDManager
*
mpdManager
)
MPD
*
mpd
)
{
{
switch
(
logic
)
switch
(
logic
)
{
{
case
IAdaptationLogic
:
:
AlwaysBest
:
return
new
AlwaysBestAdaptationLogic
(
mpd
Manager
);
case
IAdaptationLogic
:
:
AlwaysBest
:
return
new
AlwaysBestAdaptationLogic
(
mpd
);
case
IAdaptationLogic
:
:
RateBased
:
return
new
RateBasedAdaptationLogic
(
mpd
Manager
);
case
IAdaptationLogic
:
:
RateBased
:
return
new
RateBasedAdaptationLogic
(
mpd
);
case
IAdaptationLogic
:
:
AlwaysLowest
:
return
new
AlwaysLowestAdaptationLogic
(
mpd
Manager
);
case
IAdaptationLogic
:
:
AlwaysLowest
:
return
new
AlwaysLowestAdaptationLogic
(
mpd
);
case
IAdaptationLogic
:
:
Default
:
case
IAdaptationLogic
:
:
Default
:
default:
default:
return
NULL
;
return
NULL
;
...
...
modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.h
View file @
9df6750e
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include "adaptationlogic/IAdaptationLogic.h"
#include "adaptationlogic/IAdaptationLogic.h"
#include "xml/Node.h"
#include "xml/Node.h"
#include "mpd/MPDManager.hpp"
struct
stream_t
;
struct
stream_t
;
...
@@ -38,7 +37,7 @@ namespace dash
...
@@ -38,7 +37,7 @@ namespace dash
class
AdaptationLogicFactory
class
AdaptationLogicFactory
{
{
public:
public:
static
IAdaptationLogic
*
create
(
IAdaptationLogic
::
LogicType
logic
,
dash
::
mpd
::
MPDManager
*
mpdManager
);
static
IAdaptationLogic
*
create
(
IAdaptationLogic
::
LogicType
logic
,
mpd
::
MPD
*
mpd
);
};
};
}
}
}
}
...
...
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
View file @
9df6750e
...
@@ -32,8 +32,8 @@ using namespace dash::xml;
...
@@ -32,8 +32,8 @@ using namespace dash::xml;
using
namespace
dash
::
http
;
using
namespace
dash
::
http
;
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
AlwaysBestAdaptationLogic
::
AlwaysBestAdaptationLogic
(
MPD
Manager
*
mpdManager
)
:
AlwaysBestAdaptationLogic
::
AlwaysBestAdaptationLogic
(
MPD
*
mpd
)
:
AbstractAdaptationLogic
(
mpd
Manager
)
AbstractAdaptationLogic
(
mpd
)
{
{
initSchedule
();
initSchedule
();
}
}
...
@@ -64,9 +64,9 @@ const Representation *AlwaysBestAdaptationLogic::getCurrentRepresentation(Stream
...
@@ -64,9 +64,9 @@ const Representation *AlwaysBestAdaptationLogic::getCurrentRepresentation(Stream
void
AlwaysBestAdaptationLogic
::
initSchedule
()
void
AlwaysBestAdaptationLogic
::
initSchedule
()
{
{
if
(
mpd
Manager
)
if
(
mpd
)
{
{
std
::
vector
<
Period
*>
periods
=
mpd
Manager
->
getPeriods
();
std
::
vector
<
Period
*>
periods
=
mpd
->
getPeriods
();
if
(
periods
.
empty
())
if
(
periods
.
empty
())
return
;
return
;
RepresentationSelector
selector
;
RepresentationSelector
selector
;
...
...
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.h
View file @
9df6750e
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "Representationselectors.hpp"
#include "Representationselectors.hpp"
#include "http/Chunk.h"
#include "http/Chunk.h"
#include "xml/Node.h"
#include "xml/Node.h"
#include "mpd/MPDManager.hpp"
#include "mpd/Period.h"
#include "mpd/Period.h"
#include "mpd/Segment.h"
#include "mpd/Segment.h"
#include "Streams.hpp"
#include "Streams.hpp"
...
@@ -42,7 +41,7 @@ namespace dash
...
@@ -42,7 +41,7 @@ namespace dash
class
AlwaysBestAdaptationLogic
:
public
AbstractAdaptationLogic
class
AlwaysBestAdaptationLogic
:
public
AbstractAdaptationLogic
{
{
public:
public:
AlwaysBestAdaptationLogic
(
dash
::
mpd
::
MPDManager
*
mpdManager
);
AlwaysBestAdaptationLogic
(
mpd
::
MPD
*
mpd
);
virtual
~
AlwaysBestAdaptationLogic
();
virtual
~
AlwaysBestAdaptationLogic
();
virtual
dash
::
http
::
Chunk
*
getNextChunk
(
Streams
::
Type
);
virtual
dash
::
http
::
Chunk
*
getNextChunk
(
Streams
::
Type
);
...
...
modules/stream_filter/dash/adaptationlogic/AlwaysLowestAdaptationLogic.cpp
View file @
9df6750e
...
@@ -24,9 +24,9 @@ using namespace dash::logic;
...
@@ -24,9 +24,9 @@ using namespace dash::logic;
using
namespace
dash
::
http
;
using
namespace
dash
::
http
;
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
AlwaysLowestAdaptationLogic
::
AlwaysLowestAdaptationLogic
(
dash
::
mpd
::
MPDManager
*
mpdManager
)
:
AlwaysLowestAdaptationLogic
::
AlwaysLowestAdaptationLogic
(
mpd
::
MPD
*
mpd
)
:
AbstractAdaptationLogic
(
mpd
Manager
),
AbstractAdaptationLogic
(
mpd
),
currentPeriod
(
mpd
Manager
->
getFirstPeriod
()),
currentPeriod
(
mpd
->
getFirstPeriod
()),
count
(
0
)
count
(
0
)
{
{
}
}
...
@@ -43,7 +43,7 @@ Chunk* AlwaysLowestAdaptationLogic::getNextChunk(Streams::Type type)
...
@@ -43,7 +43,7 @@ Chunk* AlwaysLowestAdaptationLogic::getNextChunk(Streams::Type type)
std
::
vector
<
ISegment
*>
segments
=
rep
->
getSegments
();
std
::
vector
<
ISegment
*>
segments
=
rep
->
getSegments
();
if
(
count
==
segments
.
size
()
)
if
(
count
==
segments
.
size
()
)
{
{
currentPeriod
=
mpd
Manager
->
getNextPeriod
(
currentPeriod
);
currentPeriod
=
mpd
->
getNextPeriod
(
currentPeriod
);
count
=
0
;
count
=
0
;
return
getNextChunk
(
type
);
return
getNextChunk
(
type
);
}
}
...
...
modules/stream_filter/dash/adaptationlogic/AlwaysLowestAdaptationLogic.hpp
View file @
9df6750e
...
@@ -29,7 +29,7 @@ namespace dash
...
@@ -29,7 +29,7 @@ namespace dash
class
AlwaysLowestAdaptationLogic
:
public
AbstractAdaptationLogic
class
AlwaysLowestAdaptationLogic
:
public
AbstractAdaptationLogic
{
{
public:
public:
AlwaysLowestAdaptationLogic
(
dash
::
mpd
::
MPDManager
*
mpdManager
);
AlwaysLowestAdaptationLogic
(
mpd
::
MPD
*
mpd
);
virtual
dash
::
http
::
Chunk
*
getNextChunk
(
Streams
::
Type
);
virtual
dash
::
http
::
Chunk
*
getNextChunk
(
Streams
::
Type
);
virtual
const
dash
::
mpd
::
Representation
*
getCurrentRepresentation
(
Streams
::
Type
)
const
;
virtual
const
dash
::
mpd
::
Representation
*
getCurrentRepresentation
(
Streams
::
Type
)
const
;
...
...
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
View file @
9df6750e
...
@@ -36,13 +36,13 @@ using namespace dash::xml;
...
@@ -36,13 +36,13 @@ using namespace dash::xml;
using
namespace
dash
::
http
;
using
namespace
dash
::
http
;
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
RateBasedAdaptationLogic
::
RateBasedAdaptationLogic
(
MPD
Manager
*
mpdManager
)
:
RateBasedAdaptationLogic
::
RateBasedAdaptationLogic
(
MPD
*
mpd
)
:
AbstractAdaptationLogic
(
mpd
Manager
),
AbstractAdaptationLogic
(
mpd
),
count
(
0
),
count
(
0
),
currentPeriod
(
mpd
Manager
->
getFirstPeriod
())
currentPeriod
(
mpd
->
getFirstPeriod
())
{
{
width
=
var_InheritInteger
(
mpd
Manager
->
getMPD
()
->
getVLCObject
(),
"dash-prefwidth"
);
width
=
var_InheritInteger
(
mpd
->
getVLCObject
(),
"dash-prefwidth"
);
height
=
var_InheritInteger
(
mpd
Manager
->
getMPD
()
->
getVLCObject
(),
"dash-prefheight"
);
height
=
var_InheritInteger
(
mpd
->
getVLCObject
(),
"dash-prefheight"
);
}
}
Chunk
*
RateBasedAdaptationLogic
::
getNextChunk
(
Streams
::
Type
type
)
Chunk
*
RateBasedAdaptationLogic
::
getNextChunk
(
Streams
::
Type
type
)
...
@@ -58,7 +58,7 @@ Chunk* RateBasedAdaptationLogic::getNextChunk(Streams::Type type)
...
@@ -58,7 +58,7 @@ Chunk* RateBasedAdaptationLogic::getNextChunk(Streams::Type type)
if
(
this
->
count
==
segments
.
size
()
)
if
(
this
->
count
==
segments
.
size
()
)
{
{
this
->
currentPeriod
=
this
->
mpdManager
->
getNextPeriod
(
this
->
currentPeriod
);
currentPeriod
=
mpd
->
getNextPeriod
(
currentPeriod
);
this
->
count
=
0
;
this
->
count
=
0
;
return
getNextChunk
(
type
);
return
getNextChunk
(
type
);
}
}
...
...
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.h
View file @
9df6750e
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include "adaptationlogic/AbstractAdaptationLogic.h"
#include "adaptationlogic/AbstractAdaptationLogic.h"
#include "xml/Node.h"
#include "xml/Node.h"
#include "mpd/MPDManager.hpp"
#include "http/Chunk.h"
#include "http/Chunk.h"
#define MINBUFFER 30
#define MINBUFFER 30
...
@@ -39,7 +38,7 @@ namespace dash
...
@@ -39,7 +38,7 @@ namespace dash
class
RateBasedAdaptationLogic
:
public
AbstractAdaptationLogic
class
RateBasedAdaptationLogic
:
public
AbstractAdaptationLogic
{
{
public:
public:
RateBasedAdaptationLogic
(
dash
::
mpd
::
MPDManager
*
mpdManager
);
RateBasedAdaptationLogic
(
mpd
::
MPD
*
mpd
);
virtual
dash
::
http
::
Chunk
*
getNextChunk
(
Streams
::
Type
);
virtual
dash
::
http
::
Chunk
*
getNextChunk
(
Streams
::
Type
);
const
dash
::
mpd
::
Representation
*
getCurrentRepresentation
(
Streams
::
Type
)
const
;
const
dash
::
mpd
::
Representation
*
getCurrentRepresentation
(
Streams
::
Type
)
const
;
...
...
modules/stream_filter/dash/mpd/BasicCMParser.cpp
View file @
9df6750e
...
@@ -60,10 +60,10 @@ BasicCMParser::~BasicCMParser ()
...
@@ -60,10 +60,10 @@ BasicCMParser::~BasicCMParser ()
{
{
}
}
bool
BasicCMParser
::
parse
()
bool
BasicCMParser
::
parse
(
Profile
profile
)
{
{
const
std
::
map
<
std
::
string
,
std
::
string
>
attr
=
this
->
root
->
getAttributes
();
const
std
::
map
<
std
::
string
,
std
::
string
>
attr
=
this
->
root
->
getAttributes
();
this
->
mpd
=
new
MPD
(
p_stream
);
mpd
=
new
MPD
(
p_stream
,
profile
);
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
;
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
;
it
=
attr
.
find
(
"mediaPresentationDuration"
);
it
=
attr
.
find
(
"mediaPresentationDuration"
);
...
...
modules/stream_filter/dash/mpd/BasicCMParser.h
View file @
9df6750e
...
@@ -44,7 +44,7 @@ namespace dash
...
@@ -44,7 +44,7 @@ namespace dash
BasicCMParser
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
);
BasicCMParser
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
);
virtual
~
BasicCMParser
();
virtual
~
BasicCMParser
();
bool
parse
();
bool
parse
(
Profile
profile
);
private:
private:
void
handleDependencyId
(
Representation
*
rep
,
const
AdaptationSet
*
adaptationSet
,
const
std
::
string
&
dependencyId
);
void
handleDependencyId
(
Representation
*
rep
,
const
AdaptationSet
*
adaptationSet
,
const
std
::
string
&
dependencyId
);
...
...
modules/stream_filter/dash/mpd/IMPDParser.h
View file @
9df6750e
...
@@ -43,7 +43,7 @@ namespace dash
...
@@ -43,7 +43,7 @@ namespace dash
public:
public:
IMPDParser
(
dash
::
xml
::
Node
*
,
MPD
*
,
stream_t
*
,
Representation
*
);
IMPDParser
(
dash
::
xml
::
Node
*
,
MPD
*
,
stream_t
*
,
Representation
*
);
virtual
~
IMPDParser
(){}
virtual
~
IMPDParser
(){}
virtual
bool
parse
()
=
0
;
virtual
bool
parse
(
Profile
profile
)
=
0
;
virtual
MPD
*
getMPD
();
virtual
MPD
*
getMPD
();
virtual
void
setMPDBaseUrl
(
dash
::
xml
::
Node
*
root
);
virtual
void
setMPDBaseUrl
(
dash
::
xml
::
Node
*
root
);
virtual
void
setAdaptationSets
(
dash
::
xml
::
Node
*
periodNode
,
Period
*
period
)
=
0
;
virtual
void
setAdaptationSets
(
dash
::
xml
::
Node
*
periodNode
,
Period
*
period
)
=
0
;
...
...
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
View file @
9df6750e
...
@@ -43,9 +43,9 @@ IsoffMainParser::~IsoffMainParser ()
...
@@ -43,9 +43,9 @@ IsoffMainParser::~IsoffMainParser ()
{
{
}
}
bool
IsoffMainParser
::
parse
()
bool
IsoffMainParser
::
parse
(
Profile
profile
)
{
{
mpd
=
new
MPD
(
p_stream
);
mpd
=
new
MPD
(
p_stream
,
profile
);
setMPDAttributes
();
setMPDAttributes
();
setMPDBaseUrl
(
root
);
setMPDBaseUrl
(
root
);
setPeriods
(
root
);
setPeriods
(
root
);
...
...
modules/stream_filter/dash/mpd/IsoffMainParser.h
View file @
9df6750e
...
@@ -46,7 +46,7 @@ namespace dash
...
@@ -46,7 +46,7 @@ namespace dash
IsoffMainParser
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
);
IsoffMainParser
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
);
virtual
~
IsoffMainParser
();
virtual
~
IsoffMainParser
();
bool
parse
();
bool
parse
(
Profile
profile
);
void
print
();
void
print
();
private:
private:
...
...
modules/stream_filter/dash/mpd/MPD.cpp
View file @
9df6750e
...
@@ -31,10 +31,10 @@
...
@@ -31,10 +31,10 @@
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
MPD
::
MPD
(
stream_t
*
stream_
)
:
MPD
::
MPD
(
stream_t
*
stream_
,
Profile
profile_
)
:
ICanonicalUrl
(),
ICanonicalUrl
(),
stream
(
stream_
),
stream
(
stream_
),
profile
(
dash
::
mpd
::
Profile
::
Unknown
),
profile
(
profile_
),
live
(
false
),
live
(
false
),
availabilityStartTime
(
-
1
),
availabilityStartTime
(
-
1
),
availabilityEndTime
(
-
1
),
availabilityEndTime
(
-
1
),
...
@@ -161,11 +161,6 @@ Profile MPD::getProfile() const
...
@@ -161,11 +161,6 @@ Profile MPD::getProfile() const
return
profile
;
return
profile
;
}
}
void
MPD
::
setProfile
(
Profile
profile
)
{
this
->
profile
=
profile
;
}
std
::
string
MPD
::
getUrlSegment
()
const
std
::
string
MPD
::
getUrlSegment
()
const
{
{
if
(
!
baseUrls
.
empty
())
if
(
!
baseUrls
.
empty
())
...
@@ -178,3 +173,26 @@ vlc_object_t * MPD::getVLCObject() const
...
@@ -178,3 +173,26 @@ vlc_object_t * MPD::getVLCObject() const
{
{
return
VLC_OBJECT
(
stream
);
return
VLC_OBJECT
(
stream
);
}
}
Period
*
MPD
::
getFirstPeriod
()
const
{
std
::
vector
<
Period
*>
periods
=
getPeriods
();
if
(
!
periods
.
empty
()
)
return
periods
.
front
();
else
return
NULL
;
}
Period
*
MPD
::
getNextPeriod
(
Period
*
period
)
{
std
::
vector
<
Period
*>
periods
=
getPeriods
();
for
(
size_t
i
=
0
;
i
<
periods
.
size
();
i
++
)
{
if
(
periods
.
at
(
i
)
==
period
&&
(
i
+
1
)
<
periods
.
size
())
return
periods
.
at
(
i
+
1
);
}
return
NULL
;
}
modules/stream_filter/dash/mpd/MPD.h
View file @
9df6750e
...
@@ -42,11 +42,10 @@ namespace dash
...
@@ -42,11 +42,10 @@ namespace dash
class
MPD
:
public
ICanonicalUrl
class
MPD
:
public
ICanonicalUrl
{
{
public:
public:
MPD
(
stream_t
*
);
MPD
(
stream_t
*
,
Profile
);
virtual
~
MPD
();
virtual
~
MPD
();
Profile
getProfile
()
const
;
Profile
getProfile
()
const
;
void
setProfile
(
Profile
profile
);
bool
isLive
()
const
;
bool
isLive
()
const
;
void
setLive
(
bool
live
);
void
setLive
(
bool
live
);
time_t
getAvailabilityStartTime
()
const
;
time_t
getAvailabilityStartTime
()
const
;
...
@@ -61,7 +60,6 @@ namespace dash
...
@@ -61,7 +60,6 @@ namespace dash
void
setMinBufferTime
(
time_t
time
);
void
setMinBufferTime
(
time_t
time
);
time_t
getTimeShiftBufferDepth
()
const
;
time_t
getTimeShiftBufferDepth
()
const
;
void
setTimeShiftBufferDepth
(
time_t
depth
);
void
setTimeShiftBufferDepth
(
time_t
depth
);
const
std
::
vector
<
Period
*>&
getPeriods
()
const
;
const
ProgramInformation
*
getProgramInformation
()
const
;
const
ProgramInformation
*
getProgramInformation
()
const
;
void
addPeriod
(
Period
*
period
);
void
addPeriod
(
Period
*
period
);
...
@@ -71,6 +69,10 @@ namespace dash
...
@@ -71,6 +69,10 @@ namespace dash
virtual
std
::
string
getUrlSegment
()
const
;
/* impl */
virtual
std
::
string
getUrlSegment
()
const
;
/* impl */
vlc_object_t
*
getVLCObject
()
const
;
vlc_object_t
*
getVLCObject
()
const
;
virtual
const
std
::
vector
<
Period
*>&
getPeriods
()
const
;
virtual
Period
*
getFirstPeriod
()
const
;
virtual
Period
*
getNextPeriod
(
Period
*
period
);
private:
private:
stream_t
*
stream
;
stream_t
*
stream
;
Profile
profile
;
Profile
profile
;
...
...
modules/stream_filter/dash/mpd/MPDFactory.cpp
View file @
9df6750e
...
@@ -51,13 +51,10 @@ MPD* MPDFactory::create (dash::xml::Node *root, stream_t *p_stream,
...
@@ -51,13 +51,10 @@ MPD* MPDFactory::create (dash::xml::Node *root, stream_t *p_stream,
return
NULL
;
return
NULL
;
MPD
*
mpd
=
NULL
;
MPD
*
mpd
=
NULL
;
if
(
parser
->
parse
())
if
(
parser
->
parse
(
profile
))
mpd
=
parser
->
getMPD
();
mpd
=
parser
->
getMPD
();
delete
parser
;
delete
parser
;
if
(
mpd
)
mpd
->
setProfile
(
profile
);
return
mpd
;
return
mpd
;
}
}
modules/stream_filter/dash/mpd/MPDManager.cpp
deleted
100644 → 0
View file @
737a297d
/*
* MPDManager.cpp
*****************************************************************************
* Copyright (C) 2014 - 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.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "MPDManager.hpp"
#include <limits>
using
namespace
dash
::
mpd
;
MPDManager
::
MPDManager
(
MPD
*
mpd_
)
:
mpd
(
mpd_
)
{
}
MPDManager
::~
MPDManager
()
{
delete
mpd
;
}
const
std
::
vector
<
Period
*>&
MPDManager
::
getPeriods
()
const
{
return
mpd
->
getPeriods
();
}
Period
*
MPDManager
::
getFirstPeriod
()
const
{
std
::
vector
<
Period
*>
periods
=
getPeriods
();
if
(
!
periods
.
empty
()
)
return
periods
.
front
();
else
return
NULL
;
}
Period
*
MPDManager
::
getNextPeriod
(
Period
*
period
)
{
std
::
vector
<
Period
*>
periods
=
getPeriods
();
for
(
size_t
i
=
0
;
i
<
periods
.
size
();
i
++
)
{
if
(
periods
.
at
(
i
)
==
period
&&
(
i
+
1
)
<
periods
.
size
())
return
periods
.
at
(
i
+
1
);
}
return
NULL
;
}
const
MPD
*
MPDManager
::
getMPD
()
const
{
return
mpd
;
}
modules/stream_filter/dash/mpd/MPDManager.hpp
deleted
100644 → 0
View file @
737a297d
/*
* MPDManager.hpp
*****************************************************************************
* Copyright (C) 2010 - 2011 Klagenfurt University
*
* Created on: Aug 10, 2010
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
*
* 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 MPDMANAGER_H_
#define MPDMANAGER_H_
#include "mpd/MPD.h"
#include "mpd/Period.h"
#include "mpd/Representation.h"
namespace
dash
{
namespace
mpd
{
class
MPDManager
{
public:
MPDManager
(
MPD
*
mpd
);
virtual
~
MPDManager
();
virtual
const
std
::
vector
<
Period
*>&
getPeriods
()
const
;
virtual
Period
*
getFirstPeriod
()
const
;
virtual
Period
*
getNextPeriod
(
Period
*
period
);
virtual
const
MPD
*
getMPD
()
const
;
protected:
MPD
*
mpd
;
};
}
}
#endif
/* MPDMANAGER_H_ */
modules/stream_filter/dash/mpd/MPDManagerFactory.cpp
deleted
100644 → 0
View file @
737a297d
/*
* MPDManagerFactory.cpp
*****************************************************************************
* Copyright (C) 2010 - 2011 Klagenfurt University
*
* Created on: Apr 20, 2011
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
*
* 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.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "mpd/MPDManagerFactory.h"
using
namespace
dash
::
mpd
;
MPDManager
*
MPDManagerFactory
::
create
(
MPD
*
mpd
)
{
switch
(
mpd
->
getProfile
()
)
{
case
mpd
:
:
Profile
::
ISOOnDemand
:
case
mpd
:
:
Profile
::
Full
:
case
mpd
:
:
Profile
::
ISOMain
:
return
new
MPDManager
(
mpd
);
default:
return
NULL
;
}
}
modules/stream_filter/dash/mpd/MPDManagerFactory.h
deleted
100644 → 0
View file @
737a297d
/*
* MPDManagerFactory.h
*****************************************************************************
* Copyright (C) 2010 - 2011 Klagenfurt University
*
* Created on: Apr 20, 2011
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
*
* 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 MPDMANAGERFACTORY_H_
#define MPDMANAGERFACTORY_H_
#include "mpd/MPDManager.hpp"
namespace
dash
{
namespace
mpd
{
class
MPDManagerFactory
{
public:
static
MPDManager
*
create
(
MPD
*
mpd
);
};
}
}
#endif
/* MPDMANAGERFACTORY_H_ */
modules/stream_filter/dash/xml/DOMParser.h
View file @
9df6750e
...
@@ -31,8 +31,8 @@
...
@@ -31,8 +31,8 @@
#include <vlc_common.h>
#include <vlc_common.h>
#include "mpd/MPDManager.hpp"
#include "xml/Node.h"
#include "xml/Node.h"
#include "mpd/Profile.hpp"
namespace
dash
namespace
dash
{
{
...
...
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