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
b59e03d0
Commit
b59e03d0
authored
Nov 23, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter: dash: add segment chunk class
parent
8ee98d1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
7 deletions
+28
-7
modules/stream_filter/dash/http/Chunk.h
modules/stream_filter/dash/http/Chunk.h
+2
-2
modules/stream_filter/dash/mpd/Segment.cpp
modules/stream_filter/dash/mpd/Segment.cpp
+14
-3
modules/stream_filter/dash/mpd/Segment.h
modules/stream_filter/dash/mpd/Segment.h
+12
-2
No files found.
modules/stream_filter/dash/http/Chunk.h
View file @
b59e03d0
...
...
@@ -72,7 +72,7 @@ namespace dash
void
setBitrate
(
uint64_t
bitrate
);
int
getBitrate
();
virtual
void
onDownload
()
{}
virtual
void
onDownload
(
void
*
,
size_t
)
{}
private:
std
::
string
url
;
...
...
@@ -84,7 +84,7 @@ namespace dash
int
bitrate
;
int
port
;
bool
isHostname
;
size_t
length
;
uint64_t
length
;
uint64_t
bytesRead
;
IHTTPConnection
*
connection
;
};
...
...
modules/stream_filter/dash/mpd/Segment.cpp
View file @
b59e03d0
...
...
@@ -41,9 +41,9 @@ ISegment::ISegment(const ICanonicalUrl *parent):
}
dash
::
http
::
Chunk
*
ISegment
::
toChunk
()
const
dash
::
http
::
Chunk
*
ISegment
::
toChunk
()
{
Chunk
*
chunk
=
new
Chunk
(
);
Chunk
*
chunk
=
new
SegmentChunk
(
this
);
if
(
!
chunk
)
return
NULL
;
...
...
@@ -78,6 +78,17 @@ std::string ISegment::toString() const
return
std
::
string
(
" Segment url="
).
append
(
getUrlSegment
());
}
ISegment
::
SegmentChunk
::
SegmentChunk
(
ISegment
*
segment_
)
:
Chunk
()
{
segment
=
segment_
;
}
void
ISegment
::
SegmentChunk
::
onDownload
(
void
*
,
size_t
)
{
}
Segment
::
Segment
(
Representation
*
parent
,
bool
isinit
,
bool
tosplit
)
:
ISegment
(
parent
),
parentRepresentation
(
parent
),
...
...
@@ -122,7 +133,7 @@ std::string Segment::getUrlSegment() const
return
ret
;
}
dash
::
http
::
Chunk
*
Segment
::
toChunk
()
const
dash
::
http
::
Chunk
*
Segment
::
toChunk
()
{
Chunk
*
chunk
=
ISegment
::
toChunk
();
if
(
chunk
)
...
...
modules/stream_filter/dash/mpd/Segment.h
View file @
b59e03d0
...
...
@@ -51,7 +51,7 @@ namespace dash
*/
virtual
bool
isSingleShot
()
const
;
virtual
void
done
();
virtual
dash
::
http
::
Chunk
*
toChunk
()
const
;
virtual
dash
::
http
::
Chunk
*
toChunk
();
virtual
void
setByteRange
(
size_t
start
,
size_t
end
);
virtual
std
::
vector
<
ISegment
*>
subSegments
()
=
0
;
virtual
std
::
string
toString
()
const
;
...
...
@@ -60,6 +60,16 @@ namespace dash
protected:
size_t
startByte
;
size_t
endByte
;
class
SegmentChunk
:
public
dash
::
http
::
Chunk
{
public:
SegmentChunk
(
ISegment
*
segment
);
virtual
void
onDownload
(
void
*
,
size_t
);
private:
ISegment
*
segment
;
};
};
class
Segment
:
public
ISegment
...
...
@@ -70,7 +80,7 @@ namespace dash
virtual
void
setSourceUrl
(
const
std
::
string
&
url
);
virtual
bool
needsSplit
()
const
;
virtual
std
::
string
getUrlSegment
()
const
;
/* impl */
virtual
dash
::
http
::
Chunk
*
toChunk
()
const
;
virtual
dash
::
http
::
Chunk
*
toChunk
();
virtual
std
::
vector
<
ISegment
*>
subSegments
();
virtual
std
::
string
toString
()
const
;
virtual
Representation
*
getRepresentation
()
const
;
...
...
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