Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
52e96be7
Commit
52e96be7
authored
Jan 26, 2012
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Adding an helper to compute a segment size
Conflicts: modules/stream_filter/dash/mpd/Segment.h
parent
7a14bb56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
modules/stream_filter/dash/mpd/Segment.cpp
modules/stream_filter/dash/mpd/Segment.cpp
+13
-0
modules/stream_filter/dash/mpd/Segment.h
modules/stream_filter/dash/mpd/Segment.h
+2
-0
No files found.
modules/stream_filter/dash/mpd/Segment.cpp
View file @
52e96be7
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
#endif
#endif
#include "Segment.h"
#include "Segment.h"
#include "Representation.h"
#include <cassert>
using
namespace
dash
::
mpd
;
using
namespace
dash
::
mpd
;
using
namespace
dash
::
http
;
using
namespace
dash
::
http
;
...
@@ -35,6 +38,11 @@ Segment::Segment(const Representation *parent) :
...
@@ -35,6 +38,11 @@ Segment::Segment(const Representation *parent) :
endByte
(
-
1
),
endByte
(
-
1
),
parentRepresentation
(
parent
)
parentRepresentation
(
parent
)
{
{
assert
(
parent
!=
NULL
);
if
(
parent
->
getSegmentInfo
()
!=
NULL
&&
parent
->
getSegmentInfo
()
->
getDuration
()
>=
0
)
this
->
size
=
parent
->
getBandwidth
()
*
parent
->
getSegmentInfo
()
->
getDuration
();
else
this
->
size
=
-
1
;
}
}
std
::
string
Segment
::
getSourceUrl
()
const
std
::
string
Segment
::
getSourceUrl
()
const
...
@@ -112,3 +120,8 @@ const Representation *Segment::getParentRepresentation() const
...
@@ -112,3 +120,8 @@ const Representation *Segment::getParentRepresentation() const
{
{
return
this
->
parentRepresentation
;
return
this
->
parentRepresentation
;
}
}
int
Segment
::
getSize
()
const
{
return
this
->
size
;
}
modules/stream_filter/dash/mpd/Segment.h
View file @
52e96be7
...
@@ -57,6 +57,7 @@ namespace dash
...
@@ -57,6 +57,7 @@ namespace dash
virtual
int
getEndByte
()
const
;
virtual
int
getEndByte
()
const
;
virtual
dash
::
http
::
Chunk
*
toChunk
();
virtual
dash
::
http
::
Chunk
*
toChunk
();
const
Representation
*
getParentRepresentation
()
const
;
const
Representation
*
getParentRepresentation
()
const
;
virtual
int
getSize
()
const
;
protected:
protected:
std
::
string
sourceUrl
;
std
::
string
sourceUrl
;
...
@@ -64,6 +65,7 @@ namespace dash
...
@@ -64,6 +65,7 @@ namespace dash
int
startByte
;
int
startByte
;
int
endByte
;
int
endByte
;
const
Representation
*
parentRepresentation
;
const
Representation
*
parentRepresentation
;
int
size
;
};
};
}
}
}
}
...
...
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