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
a3195dae
Commit
a3195dae
authored
Jun 10, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: fix scheme handling in segments
parent
77c4f92c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
19 deletions
+25
-19
modules/demux/adaptative/playlist/Segment.cpp
modules/demux/adaptative/playlist/Segment.cpp
+12
-5
modules/demux/adaptative/playlist/Segment.h
modules/demux/adaptative/playlist/Segment.h
+1
-1
modules/demux/adaptative/playlist/SegmentTemplate.cpp
modules/demux/adaptative/playlist/SegmentTemplate.cpp
+5
-12
modules/demux/adaptative/playlist/SegmentTemplate.h
modules/demux/adaptative/playlist/SegmentTemplate.h
+1
-1
modules/demux/adaptative/playlist/Url.cpp
modules/demux/adaptative/playlist/Url.cpp
+5
-0
modules/demux/adaptative/playlist/Url.hpp
modules/demux/adaptative/playlist/Url.hpp
+1
-0
No files found.
modules/demux/adaptative/playlist/Segment.cpp
View file @
a3195dae
...
@@ -182,7 +182,7 @@ Segment::~Segment()
...
@@ -182,7 +182,7 @@ Segment::~Segment()
void
Segment
::
setSourceUrl
(
const
std
::
string
&
url
)
void
Segment
::
setSourceUrl
(
const
std
::
string
&
url
)
{
{
if
(
url
.
empty
()
==
false
)
if
(
url
.
empty
()
==
false
)
this
->
sourceUrl
=
url
;
this
->
sourceUrl
=
Url
(
url
)
;
}
}
void
Segment
::
debug
(
vlc_object_t
*
obj
,
int
indent
)
const
void
Segment
::
debug
(
vlc_object_t
*
obj
,
int
indent
)
const
...
@@ -204,10 +204,17 @@ void Segment::debug(vlc_object_t *obj, int indent) const
...
@@ -204,10 +204,17 @@ void Segment::debug(vlc_object_t *obj, int indent) const
Url
Segment
::
getUrlSegment
()
const
Url
Segment
::
getUrlSegment
()
const
{
{
Url
ret
=
getParentUrlSegment
();
if
(
sourceUrl
.
hasScheme
())
if
(
!
sourceUrl
.
empty
())
{
ret
.
append
(
sourceUrl
);
return
sourceUrl
;
return
ret
;
}
else
{
Url
ret
=
getParentUrlSegment
();
if
(
!
sourceUrl
.
empty
())
ret
.
append
(
sourceUrl
);
return
ret
;
}
}
}
Chunk
*
Segment
::
toChunk
(
size_t
index
,
BaseRepresentation
*
ctxrep
)
Chunk
*
Segment
::
toChunk
(
size_t
index
,
BaseRepresentation
*
ctxrep
)
...
...
modules/demux/adaptative/playlist/Segment.h
View file @
a3195dae
...
@@ -104,7 +104,7 @@ namespace adaptative
...
@@ -104,7 +104,7 @@ namespace adaptative
protected:
protected:
std
::
vector
<
SubSegment
*>
subsegments
;
std
::
vector
<
SubSegment
*>
subsegments
;
std
::
string
sourceUrl
;
Url
sourceUrl
;
int
size
;
int
size
;
};
};
...
...
modules/demux/adaptative/playlist/SegmentTemplate.cpp
View file @
a3195dae
...
@@ -35,18 +35,6 @@ BaseSegmentTemplate::BaseSegmentTemplate( ICanonicalUrl *parent ) :
...
@@ -35,18 +35,6 @@ BaseSegmentTemplate::BaseSegmentTemplate( ICanonicalUrl *parent ) :
{
{
}
}
Url
BaseSegmentTemplate
::
getUrlSegment
()
const
{
Url
ret
=
getParentUrlSegment
();
if
(
!
sourceUrl
.
empty
())
{
ret
.
append
(
Url
::
Component
(
sourceUrl
,
dynamic_cast
<
const
MediaSegmentTemplate
*>
(
this
))
/* casts to NULL if != */
);
}
return
ret
;
}
MediaSegmentTemplate
::
MediaSegmentTemplate
(
SegmentInformation
*
parent
)
:
MediaSegmentTemplate
::
MediaSegmentTemplate
(
SegmentInformation
*
parent
)
:
BaseSegmentTemplate
(
parent
),
Timelineable
(),
TimescaleAble
(
parent
)
BaseSegmentTemplate
(
parent
),
Timelineable
(),
TimescaleAble
(
parent
)
...
@@ -67,6 +55,11 @@ void MediaSegmentTemplate::mergeWith(MediaSegmentTemplate *updated, mtime_t prun
...
@@ -67,6 +55,11 @@ void MediaSegmentTemplate::mergeWith(MediaSegmentTemplate *updated, mtime_t prun
}
}
}
}
void
MediaSegmentTemplate
::
setSourceUrl
(
const
std
::
string
&
url
)
{
sourceUrl
=
Url
(
Url
::
Component
(
url
,
this
));
}
InitSegmentTemplate
::
InitSegmentTemplate
(
ICanonicalUrl
*
parent
)
:
InitSegmentTemplate
::
InitSegmentTemplate
(
ICanonicalUrl
*
parent
)
:
BaseSegmentTemplate
(
parent
)
BaseSegmentTemplate
(
parent
)
{
{
...
...
modules/demux/adaptative/playlist/SegmentTemplate.h
View file @
a3195dae
...
@@ -40,7 +40,6 @@ namespace adaptative
...
@@ -40,7 +40,6 @@ namespace adaptative
{
{
public:
public:
BaseSegmentTemplate
(
ICanonicalUrl
*
=
NULL
);
BaseSegmentTemplate
(
ICanonicalUrl
*
=
NULL
);
virtual
Url
getUrlSegment
()
const
;
/* reimpl */
};
};
class
MediaSegmentTemplate
:
public
BaseSegmentTemplate
,
class
MediaSegmentTemplate
:
public
BaseSegmentTemplate
,
...
@@ -50,6 +49,7 @@ namespace adaptative
...
@@ -50,6 +49,7 @@ namespace adaptative
{
{
public:
public:
MediaSegmentTemplate
(
SegmentInformation
*
=
NULL
);
MediaSegmentTemplate
(
SegmentInformation
*
=
NULL
);
virtual
void
setSourceUrl
(
const
std
::
string
&
url
);
/* reimpl */
void
mergeWith
(
MediaSegmentTemplate
*
,
mtime_t
);
void
mergeWith
(
MediaSegmentTemplate
*
,
mtime_t
);
Property
<
size_t
>
startNumber
;
Property
<
size_t
>
startNumber
;
};
};
...
...
modules/demux/adaptative/playlist/Url.cpp
View file @
a3195dae
...
@@ -45,6 +45,11 @@ bool Url::hasScheme() const
...
@@ -45,6 +45,11 @@ bool Url::hasScheme() const
return
components
[
0
].
b_scheme
;
return
components
[
0
].
b_scheme
;
}
}
bool
Url
::
empty
()
const
{
return
components
.
empty
();
}
Url
&
Url
::
prepend
(
const
Component
&
comp
)
Url
&
Url
::
prepend
(
const
Component
&
comp
)
{
{
components
.
insert
(
components
.
begin
(),
comp
);
components
.
insert
(
components
.
begin
(),
comp
);
...
...
modules/demux/adaptative/playlist/Url.hpp
View file @
a3195dae
...
@@ -57,6 +57,7 @@ namespace adaptative
...
@@ -57,6 +57,7 @@ namespace adaptative
Url
(
const
Component
&
);
Url
(
const
Component
&
);
explicit
Url
(
const
std
::
string
&
);
explicit
Url
(
const
std
::
string
&
);
bool
hasScheme
()
const
;
bool
hasScheme
()
const
;
bool
empty
()
const
;
Url
&
prepend
(
const
Component
&
);
Url
&
prepend
(
const
Component
&
);
Url
&
append
(
const
Component
&
);
Url
&
append
(
const
Component
&
);
Url
&
append
(
const
Url
&
);
Url
&
append
(
const
Url
&
);
...
...
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