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
a90c1374
Commit
a90c1374
authored
Jan 05, 2012
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Jan 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Handle relative URL
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
bc77d458
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
modules/stream_filter/dash/mpd/BasicCMParser.cpp
modules/stream_filter/dash/mpd/BasicCMParser.cpp
+16
-3
modules/stream_filter/dash/mpd/BasicCMParser.h
modules/stream_filter/dash/mpd/BasicCMParser.h
+1
-0
No files found.
modules/stream_filter/dash/mpd/BasicCMParser.cpp
View file @
a90c1374
...
...
@@ -42,11 +42,19 @@ using namespace dash::xml;
BasicCMParser
::
BasicCMParser
(
Node
*
root
,
stream_t
*
p_stream
)
:
root
(
root
),
mpd
(
NULL
)
mpd
(
NULL
),
p_stream
(
p_stream
)
{
this
->
url
=
p_stream
->
psz_access
;
this
->
url
+=
"://"
;
//Only append without the mpd file.
std
::
string
path
=
p_stream
->
psz_path
;
size_t
it
=
path
.
find_last_of
(
'/'
,
path
.
length
()
-
1
);
if
(
it
!=
std
::
string
::
npos
)
this
->
url
.
append
(
path
,
0
,
it
);
else
this
->
url
+=
p_stream
->
psz_path
;
this
->
url
+=
'/'
;
}
BasicCMParser
::~
BasicCMParser
()
...
...
@@ -374,7 +382,12 @@ bool BasicCMParser::parseSegment(Segment *seg, const std::map<std::string, std::
//FIXME: When not present, the sourceUrl attribute should be computed
//using BaseURL and the range attribute.
if
(
it
!=
attr
.
end
()
)
seg
->
setSourceUrl
(
it
->
second
);
{
std
::
string
url
=
it
->
second
;
if
(
url
.
find
(
this
->
p_stream
->
psz_access
)
!=
0
)
//Relative url
url
=
this
->
url
+
url
;
seg
->
setSourceUrl
(
url
);
}
return
true
;
}
...
...
modules/stream_filter/dash/mpd/BasicCMParser.h
View file @
a90c1374
...
...
@@ -80,6 +80,7 @@ namespace dash
dash
::
xml
::
Node
*
root
;
MPD
*
mpd
;
std
::
string
url
;
stream_t
*
p_stream
;
};
}
}
...
...
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