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
e7a13d6b
Commit
e7a13d6b
authored
Feb 01, 2012
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Adding a getter for current representation
parent
ec59c3fb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
0 deletions
+18
-0
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
...filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
+8
-0
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.h
...m_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.h
+2
-0
modules/stream_filter/dash/adaptationlogic/IAdaptationLogic.h
...les/stream_filter/dash/adaptationlogic/IAdaptationLogic.h
+2
-0
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
..._filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
+5
-0
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.h
...am_filter/dash/adaptationlogic/RateBasedAdaptationLogic.h
+1
-0
No files found.
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.cpp
View file @
e7a13d6b
...
@@ -63,6 +63,14 @@ Chunk* AlwaysBestAdaptationLogic::getNextChunk() throw(EOFException)
...
@@ -63,6 +63,14 @@ Chunk* AlwaysBestAdaptationLogic::getNextChunk() throw(EOFException)
}
}
return
NULL
;
return
NULL
;
}
}
const
Representation
*
AlwaysBestAdaptationLogic
::
getCurrentRepresentation
()
const
{
if
(
this
->
count
<
this
->
schedule
.
size
()
)
return
this
->
schedule
.
at
(
this
->
count
)
->
getParentRepresentation
();
return
NULL
;
}
void
AlwaysBestAdaptationLogic
::
initSchedule
()
void
AlwaysBestAdaptationLogic
::
initSchedule
()
{
{
if
(
this
->
mpdManager
!=
NULL
)
if
(
this
->
mpdManager
!=
NULL
)
...
...
modules/stream_filter/dash/adaptationlogic/AlwaysBestAdaptationLogic.h
View file @
e7a13d6b
...
@@ -46,11 +46,13 @@ namespace dash
...
@@ -46,11 +46,13 @@ namespace dash
virtual
~
AlwaysBestAdaptationLogic
();
virtual
~
AlwaysBestAdaptationLogic
();
dash
::
http
::
Chunk
*
getNextChunk
()
throw
(
dash
::
exception
::
EOFException
);
dash
::
http
::
Chunk
*
getNextChunk
()
throw
(
dash
::
exception
::
EOFException
);
const
mpd
::
Representation
*
getCurrentRepresentation
()
const
;
private:
private:
std
::
vector
<
mpd
::
Segment
*>
schedule
;
std
::
vector
<
mpd
::
Segment
*>
schedule
;
dash
::
mpd
::
IMPDManager
*
mpdManager
;
dash
::
mpd
::
IMPDManager
*
mpdManager
;
size_t
count
;
size_t
count
;
dash
::
mpd
::
Representation
*
bestRepresentation
;
void
initSchedule
();
void
initSchedule
();
};
};
...
...
modules/stream_filter/dash/adaptationlogic/IAdaptationLogic.h
View file @
e7a13d6b
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <http/Chunk.h>
#include <http/Chunk.h>
#include <adaptationlogic/IDownloadRateObserver.h>
#include <adaptationlogic/IDownloadRateObserver.h>
#include <exceptions/EOFException.h>
#include <exceptions/EOFException.h>
#include "mpd/Representation.h"
namespace
dash
namespace
dash
{
{
...
@@ -46,6 +47,7 @@ namespace dash
...
@@ -46,6 +47,7 @@ namespace dash
};
};
virtual
dash
::
http
::
Chunk
*
getNextChunk
()
throw
(
dash
::
exception
::
EOFException
)
=
0
;
virtual
dash
::
http
::
Chunk
*
getNextChunk
()
throw
(
dash
::
exception
::
EOFException
)
=
0
;
virtual
const
dash
::
mpd
::
Representation
*
getCurrentRepresentation
()
const
=
0
;
/**
/**
* \return The average bitrate in Bytes per second.
* \return The average bitrate in Bytes per second.
*/
*/
...
...
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.cpp
View file @
e7a13d6b
...
@@ -77,3 +77,8 @@ Chunk* RateBasedAdaptationLogic::getNextChunk() throw(EOFException)
...
@@ -77,3 +77,8 @@ Chunk* RateBasedAdaptationLogic::getNextChunk() throw(EOFException)
}
}
return
NULL
;
return
NULL
;
}
}
const
Representation
*
RateBasedAdaptationLogic
::
getCurrentRepresentation
()
const
{
return
this
->
mpdManager
->
getRepresentation
(
this
->
currentPeriod
,
this
->
getBpsAvg
()
);
}
modules/stream_filter/dash/adaptationlogic/RateBasedAdaptationLogic.h
View file @
e7a13d6b
...
@@ -42,6 +42,7 @@ namespace dash
...
@@ -42,6 +42,7 @@ namespace dash
RateBasedAdaptationLogic
(
dash
::
mpd
::
IMPDManager
*
mpdManager
);
RateBasedAdaptationLogic
(
dash
::
mpd
::
IMPDManager
*
mpdManager
);
dash
::
http
::
Chunk
*
getNextChunk
()
throw
(
dash
::
exception
::
EOFException
);
dash
::
http
::
Chunk
*
getNextChunk
()
throw
(
dash
::
exception
::
EOFException
);
const
dash
::
mpd
::
Representation
*
getCurrentRepresentation
()
const
;
private:
private:
dash
::
mpd
::
IMPDManager
*
mpdManager
;
dash
::
mpd
::
IMPDManager
*
mpdManager
;
...
...
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