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
b78ea64b
Commit
b78ea64b
authored
Jul 26, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adptative: unbreak playlist urls
parent
1965d962
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
10 deletions
+23
-10
modules/demux/adaptative/adaptative.cpp
modules/demux/adaptative/adaptative.cpp
+7
-2
modules/demux/adaptative/playlist/AbstractPlaylist.cpp
modules/demux/adaptative/playlist/AbstractPlaylist.cpp
+0
-1
modules/demux/dash/DASHManager.cpp
modules/demux/dash/DASHManager.cpp
+3
-1
modules/demux/dash/mpd/IsoffMainParser.cpp
modules/demux/dash/mpd/IsoffMainParser.cpp
+6
-2
modules/demux/dash/mpd/IsoffMainParser.h
modules/demux/dash/mpd/IsoffMainParser.h
+2
-1
modules/demux/dash/mpd/MPDFactory.cpp
modules/demux/dash/mpd/MPDFactory.cpp
+3
-2
modules/demux/dash/mpd/MPDFactory.h
modules/demux/dash/mpd/MPDFactory.h
+2
-1
No files found.
modules/demux/adaptative/adaptative.cpp
View file @
b78ea64b
...
...
@@ -114,6 +114,10 @@ static int Open(vlc_object_t *p_obj)
PlaylistManager
*
p_manager
=
NULL
;
int
logic
=
var_InheritInteger
(
p_obj
,
"adaptative-logic"
);
std
::
string
playlisturl
(
p_demux
->
psz_access
);
playlisturl
.
append
(
"://"
);
playlisturl
.
append
(
p_demux
->
psz_location
);
if
(
b_mimematched
||
DASHManager
::
isDASH
(
p_demux
->
s
))
{
//Build a XML tree
...
...
@@ -125,7 +129,8 @@ static int Open(vlc_object_t *p_obj)
}
//Begin the actual MPD parsing:
MPD
*
p_playlist
=
MPDFactory
::
create
(
parser
.
getRootNode
(),
p_demux
->
s
,
parser
.
getProfile
());
MPD
*
p_playlist
=
MPDFactory
::
create
(
parser
.
getRootNode
(),
p_demux
->
s
,
playlisturl
,
parser
.
getProfile
());
if
(
p_playlist
==
NULL
)
{
msg_Err
(
p_demux
,
"Cannot create/unknown MPD for profile"
);
...
...
@@ -139,7 +144,7 @@ static int Open(vlc_object_t *p_obj)
else
if
(
HLSManager
::
isHTTPLiveStreaming
(
p_demux
->
s
))
{
Parser
parser
(
p_demux
->
s
);
M3U8
*
p_playlist
=
parser
.
parse
(
std
::
string
()
);
M3U8
*
p_playlist
=
parser
.
parse
(
playlisturl
);
if
(
!
p_playlist
)
{
msg_Err
(
p_demux
,
"Could not parse MPD"
);
...
...
modules/demux/adaptative/playlist/AbstractPlaylist.cpp
View file @
b78ea64b
...
...
@@ -28,7 +28,6 @@
#include "SegmentTimeline.h"
#include <vlc_common.h>
#include <vlc_stream.h>
#include <sstream>
using
namespace
adaptative
::
playlist
;
...
...
modules/demux/dash/DASHManager.cpp
View file @
b78ea64b
...
...
@@ -119,7 +119,9 @@ bool DASHManager::updatePlaylist()
minsegmentTime
=
segmentTime
;
}
MPD
*
newmpd
=
MPDFactory
::
create
(
parser
.
getRootNode
(),
mpdstream
,
parser
.
getProfile
());
MPD
*
newmpd
=
MPDFactory
::
create
(
parser
.
getRootNode
(),
mpdstream
,
Helper
::
getDirectoryPath
(
url
).
append
(
"/"
),
parser
.
getProfile
());
if
(
newmpd
)
{
playlist
->
mergeWith
(
newmpd
,
minsegmentTime
);
...
...
modules/demux/dash/mpd/IsoffMainParser.cpp
View file @
b78ea64b
...
...
@@ -39,20 +39,21 @@
#include "ProgramInformation.h"
#include "DASHSegment.h"
#include "../xml/DOMHelper.h"
#include "../adaptative/tools/Helper.h"
#include <vlc_strings.h>
#include <vlc_stream.h>
#include <cstdio>
#include <sstream>
using
namespace
dash
::
mpd
;
using
namespace
dash
::
xml
;
using
namespace
adaptative
::
playlist
;
IsoffMainParser
::
IsoffMainParser
(
Node
*
root_
,
stream_t
*
stream
)
IsoffMainParser
::
IsoffMainParser
(
Node
*
root_
,
stream_t
*
stream
,
std
::
string
&
streambaseurl_
)
{
root
=
root_
;
mpd
=
NULL
;
p_stream
=
stream
;
playlisturl
=
streambaseurl_
;
}
IsoffMainParser
::~
IsoffMainParser
()
...
...
@@ -65,6 +66,9 @@ void IsoffMainParser::setMPDBaseUrl(Node *root)
for
(
size_t
i
=
0
;
i
<
baseUrls
.
size
();
i
++
)
mpd
->
addBaseUrl
(
baseUrls
.
at
(
i
)
->
getText
());
if
(
baseUrls
.
empty
())
mpd
->
addBaseUrl
(
Helper
::
getDirectoryPath
(
playlisturl
).
append
(
"/"
));
}
MPD
*
IsoffMainParser
::
getMPD
()
...
...
modules/demux/dash/mpd/IsoffMainParser.h
View file @
b78ea64b
...
...
@@ -64,7 +64,7 @@ namespace dash
class
IsoffMainParser
{
public:
IsoffMainParser
(
xml
::
Node
*
root
,
stream_t
*
p_stream
);
IsoffMainParser
(
xml
::
Node
*
root
,
stream_t
*
p_stream
,
std
::
string
&
);
virtual
~
IsoffMainParser
();
bool
parse
(
Profile
profile
);
...
...
@@ -87,6 +87,7 @@ namespace dash
xml
::
Node
*
root
;
MPD
*
mpd
;
stream_t
*
p_stream
;
std
::
string
playlisturl
;
};
class
IsoTime
...
...
modules/demux/dash/mpd/MPDFactory.cpp
View file @
b78ea64b
...
...
@@ -32,7 +32,8 @@
using
namespace
dash
::
xml
;
using
namespace
dash
::
mpd
;
MPD
*
MPDFactory
::
create
(
Node
*
root
,
stream_t
*
p_stream
,
Profile
profile
)
MPD
*
MPDFactory
::
create
(
Node
*
root
,
stream_t
*
p_stream
,
std
::
string
&
playlisturl
,
Profile
profile
)
{
IsoffMainParser
*
parser
=
NULL
;
...
...
@@ -41,7 +42,7 @@ MPD* MPDFactory::create(Node *root, stream_t *p_stream, Profile profile)
case
Profile
:
:
Unknown
:
break
;
default:
parser
=
new
(
std
::
nothrow
)
IsoffMainParser
(
root
,
p_stream
);
parser
=
new
(
std
::
nothrow
)
IsoffMainParser
(
root
,
p_stream
,
playlisturl
);
break
;
}
...
...
modules/demux/dash/mpd/MPDFactory.h
View file @
b78ea64b
...
...
@@ -39,7 +39,8 @@ namespace dash
class
MPDFactory
{
public:
static
MPD
*
create
(
xml
::
Node
*
root
,
stream_t
*
p_stream
,
Profile
profile
);
static
MPD
*
create
(
xml
::
Node
*
root
,
stream_t
*
p_stream
,
std
::
string
&
,
Profile
profile
);
};
}
}
...
...
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