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
dce9c498
Commit
dce9c498
authored
Nov 30, 2011
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Dec 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Representation: Return a usable bandwith value.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
b4d90eb2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
modules/stream_filter/dash/mpd/BasicCMManager.cpp
modules/stream_filter/dash/mpd/BasicCMManager.cpp
+2
-2
modules/stream_filter/dash/mpd/Representation.cpp
modules/stream_filter/dash/mpd/Representation.cpp
+5
-3
modules/stream_filter/dash/mpd/Representation.h
modules/stream_filter/dash/mpd/Representation.h
+6
-1
No files found.
modules/stream_filter/dash/mpd/BasicCMManager.cpp
View file @
dce9c498
...
...
@@ -80,7 +80,7 @@ Representation* BasicCMManager::getBestRepresentation (Period *period)
{
try
{
long
currentBitrate
=
atol
(
reps
.
at
(
j
)
->
getBandwidth
().
c_str
()
);
long
currentBitrate
=
reps
.
at
(
j
)
->
getBandwidth
(
);
if
(
currentBitrate
>
bitrate
)
{
bitrate
=
currentBitrate
;
...
...
@@ -119,7 +119,7 @@ Representation* BasicCMManager::getRepresentation (Period *period,
{
try
{
long
currentBitrate
=
atol
(
reps
.
at
(
j
)
->
getBandwidth
().
c_str
()
);
long
currentBitrate
=
reps
.
at
(
j
)
->
getBandwidth
(
);
long
dif
=
bitrate
-
currentBitrate
;
if
(
bestDif
==
-
1
)
...
...
modules/stream_filter/dash/mpd/Representation.cpp
View file @
dce9c498
...
...
@@ -25,6 +25,8 @@
# include "config.h"
#endif
#include <cstdlib>
#include "Representation.h"
using
namespace
dash
::
mpd
;
...
...
@@ -126,13 +128,13 @@ std::string Representation::getWidth () const throw(Attri
return
it
->
second
;
}
std
::
string
Representation
::
getBandwidth
()
const
throw
(
AttributeNotPresentException
)
int
Representation
::
getBandwidth
()
const
{
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
=
this
->
attributes
.
find
(
"bandwidth"
);
if
(
it
==
this
->
attributes
.
end
())
throw
AttributeNotPresentException
()
;
return
-
1
;
return
it
->
second
;
return
atoi
(
it
->
second
.
c_str
()
)
/
8
;
}
std
::
string
Representation
::
getNumberOfChannels
()
const
throw
(
AttributeNotPresentException
)
...
...
modules/stream_filter/dash/mpd/Representation.h
View file @
dce9c498
...
...
@@ -52,7 +52,12 @@ namespace dash
std
::
string
getLang
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getFrameRate
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getId
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getBandwidth
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
/*
* @return The bitrate required for this representation
* in Bytes per seconds.
* -1 if an error occurs.
*/
int
getBandwidth
()
const
;
std
::
string
getDependencyId
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getNumberOfChannels
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
std
::
string
getSamplingRate
()
const
throw
(
dash
::
exception
::
AttributeNotPresentException
);
...
...
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