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
51e7ebd5
Commit
51e7ebd5
authored
Apr 29, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: dash: remove IMPDParser
parent
1850ed6c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
132 deletions
+60
-132
modules/demux/Makefile.am
modules/demux/Makefile.am
+0
-2
modules/demux/dash/mpd/IMPDParser.cpp
modules/demux/dash/mpd/IMPDParser.cpp
+0
-45
modules/demux/dash/mpd/IMPDParser.h
modules/demux/dash/mpd/IMPDParser.h
+0
-63
modules/demux/dash/mpd/IsoffMainParser.cpp
modules/demux/dash/mpd/IsoffMainParser.cpp
+20
-2
modules/demux/dash/mpd/IsoffMainParser.h
modules/demux/dash/mpd/IsoffMainParser.h
+29
-14
modules/demux/dash/mpd/MPDFactory.cpp
modules/demux/dash/mpd/MPDFactory.cpp
+4
-3
modules/demux/dash/mpd/MPDFactory.h
modules/demux/dash/mpd/MPDFactory.h
+7
-3
No files found.
modules/demux/Makefile.am
View file @
51e7ebd5
...
...
@@ -253,8 +253,6 @@ libdash_plugin_la_SOURCES = \
demux/dash/mpd/DASHSegment.h
\
demux/dash/mpd/ContentDescription.cpp
\
demux/dash/mpd/ContentDescription.h
\
demux/dash/mpd/IMPDParser.cpp
\
demux/dash/mpd/IMPDParser.h
\
demux/dash/mpd/IsoffMainParser.cpp
\
demux/dash/mpd/IsoffMainParser.h
\
demux/dash/mpd/MPD.cpp
\
...
...
modules/demux/dash/mpd/IMPDParser.cpp
deleted
100644 → 0
View file @
1850ed6c
/*
* IMPDParser.cpp
*****************************************************************************
* Copyright (C) 2010 - 2014 VideoLAN Authors
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "IMPDParser.h"
#include "xml/DOMHelper.h"
using
namespace
dash
::
mpd
;
using
namespace
dash
::
xml
;
IMPDParser
::
IMPDParser
(
Node
*
root_
,
MPD
*
mpd_
,
stream_t
*
stream
,
Representation
*
rep
)
{
root
=
root_
;
mpd
=
mpd_
;
currentRepresentation
=
rep
;
p_stream
=
stream
;
}
void
IMPDParser
::
setMPDBaseUrl
(
Node
*
root
)
{
std
::
vector
<
Node
*>
baseUrls
=
DOMHelper
::
getChildElementByTagName
(
root
,
"BaseURL"
);
for
(
size_t
i
=
0
;
i
<
baseUrls
.
size
();
i
++
)
mpd
->
addBaseUrl
(
baseUrls
.
at
(
i
)
->
getText
());
}
MPD
*
IMPDParser
::
getMPD
()
{
return
mpd
;
}
modules/demux/dash/mpd/IMPDParser.h
deleted
100644 → 0
View file @
1850ed6c
/*
* IMPDParser.h
*****************************************************************************
* Copyright (C) 2010 - 2011 Klagenfurt University
*
* Created on: Aug 10, 2010
* Authors: Christopher Mueller <christopher.mueller@itec.uni-klu.ac.at>
* Christian Timmerer <christian.timmerer@itec.uni-klu.ac.at>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef IMPDPARSER_H_
#define IMPDPARSER_H_
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "mpd/MPD.h"
#include "xml/DOMParser.h"
#include <vlc_common.h>
namespace
dash
{
namespace
mpd
{
class
Representation
;
class
Period
;
class
IMPDParser
{
public:
IMPDParser
(
dash
::
xml
::
Node
*
,
MPD
*
,
stream_t
*
,
Representation
*
);
virtual
~
IMPDParser
(){}
virtual
bool
parse
(
Profile
profile
)
=
0
;
virtual
MPD
*
getMPD
();
virtual
void
setMPDBaseUrl
(
dash
::
xml
::
Node
*
root
);
virtual
void
setAdaptationSets
(
dash
::
xml
::
Node
*
periodNode
,
Period
*
period
)
=
0
;
protected:
dash
::
xml
::
Node
*
root
;
MPD
*
mpd
;
stream_t
*
p_stream
;
Representation
*
currentRepresentation
;
};
}
}
#endif
/* IMPDPARSER_H_ */
modules/demux/dash/mpd/IsoffMainParser.cpp
View file @
51e7ebd5
...
...
@@ -32,6 +32,7 @@
#include "../adaptative/playlist/SegmentBase.h"
#include "../adaptative/playlist/SegmentList.h"
#include "../adaptative/playlist/SegmentTimeline.h"
#include "MPD.h"
#include "Representation.h"
#include "Period.h"
#include "AdaptationSet.h"
...
...
@@ -47,14 +48,31 @@ using namespace dash::mpd;
using
namespace
dash
::
xml
;
using
namespace
adaptative
::
playlist
;
IsoffMainParser
::
IsoffMainParser
(
Node
*
root
,
stream_t
*
p_stream
)
:
IMPDParser
(
root
,
NULL
,
p_stream
,
NULL
)
IsoffMainParser
::
IsoffMainParser
(
Node
*
root_
,
stream_t
*
stream
)
{
root
=
root_
;
mpd
=
NULL
;
currentRepresentation
=
NULL
;
p_stream
=
stream
;
}
IsoffMainParser
::~
IsoffMainParser
()
{
}
void
IsoffMainParser
::
setMPDBaseUrl
(
Node
*
root
)
{
std
::
vector
<
Node
*>
baseUrls
=
DOMHelper
::
getChildElementByTagName
(
root
,
"BaseURL"
);
for
(
size_t
i
=
0
;
i
<
baseUrls
.
size
();
i
++
)
mpd
->
addBaseUrl
(
baseUrls
.
at
(
i
)
->
getText
());
}
MPD
*
IsoffMainParser
::
getMPD
()
{
return
mpd
;
}
bool
IsoffMainParser
::
parse
(
Profile
profile
)
{
mpd
=
new
MPD
(
p_stream
,
profile
);
...
...
modules/demux/dash/mpd/IsoffMainParser.h
View file @
51e7ebd5
...
...
@@ -25,12 +25,18 @@
#ifndef ISOFFMAINPARSER_H_
#define ISOFFMAINPARSER_H_
#include "IMPDParser.h"
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "../adaptative/playlist/SegmentInfoCommon.h"
#include "mpd/Profile.hpp"
#include <cstdlib>
#include <sstream>
#include <vlc_common.h>
namespace
adaptative
{
namespace
playlist
...
...
@@ -51,29 +57,38 @@ namespace dash
{
class
Period
;
class
AdaptationSet
;
class
Representation
;
class
MPD
;
using
namespace
adaptative
::
playlist
;
class
IsoffMainParser
:
public
IMPDParser
class
IsoffMainParser
{
public:
IsoffMainParser
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
);
IsoffMainParser
(
xml
::
Node
*
root
,
stream_t
*
p_stream
);
virtual
~
IsoffMainParser
();
bool
parse
(
Profile
profile
);
virtual
MPD
*
getMPD
();
virtual
void
setMPDBaseUrl
(
xml
::
Node
*
root
);
private:
void
setMPDAttributes
();
void
setAdaptationSets
(
dash
::
xml
::
Node
*
periodNode
,
Period
*
period
);
void
setRepresentations
(
dash
::
xml
::
Node
*
adaptationSetNode
,
AdaptationSet
*
adaptationSet
);
void
parseInitSegment
(
dash
::
xml
::
Node
*
,
Initializable
<
Segment
>
*
);
void
parseTimeline
(
dash
::
xml
::
Node
*
,
MediaSegmentTemplate
*
);
void
parsePeriods
(
dash
::
xml
::
Node
*
);
size_t
parseSegmentInformation
(
dash
::
xml
::
Node
*
,
SegmentInformation
*
);
size_t
parseSegmentBase
(
dash
::
xml
::
Node
*
,
SegmentInformation
*
);
size_t
parseSegmentList
(
dash
::
xml
::
Node
*
,
SegmentInformation
*
);
size_t
parseSegmentTemplate
(
dash
::
xml
::
Node
*
,
SegmentInformation
*
);
void
parseProgramInformation
(
dash
::
xml
::
Node
*
,
MPD
*
);
void
setAdaptationSets
(
xml
::
Node
*
periodNode
,
Period
*
period
);
void
setRepresentations
(
xml
::
Node
*
adaptationSetNode
,
AdaptationSet
*
adaptationSet
);
void
parseInitSegment
(
xml
::
Node
*
,
Initializable
<
Segment
>
*
);
void
parseTimeline
(
xml
::
Node
*
,
MediaSegmentTemplate
*
);
void
parsePeriods
(
xml
::
Node
*
);
size_t
parseSegmentInformation
(
xml
::
Node
*
,
SegmentInformation
*
);
size_t
parseSegmentBase
(
xml
::
Node
*
,
SegmentInformation
*
);
size_t
parseSegmentList
(
xml
::
Node
*
,
SegmentInformation
*
);
size_t
parseSegmentTemplate
(
xml
::
Node
*
,
SegmentInformation
*
);
void
parseProgramInformation
(
xml
::
Node
*
,
MPD
*
);
xml
::
Node
*
root
;
MPD
*
mpd
;
stream_t
*
p_stream
;
Representation
*
currentRepresentation
;
};
class
IsoTime
...
...
modules/demux/dash/mpd/MPDFactory.cpp
View file @
51e7ebd5
...
...
@@ -27,20 +27,21 @@
#endif
#include "MPDFactory.h"
#include "mpd/IsoffMainParser.h"
using
namespace
dash
::
xml
;
using
namespace
dash
::
mpd
;
MPD
*
MPDFactory
::
create
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
,
Profile
profile
)
MPD
*
MPDFactory
::
create
(
Node
*
root
,
stream_t
*
p_stream
,
Profile
profile
)
{
I
MPD
Parser
*
parser
=
NULL
;
I
soffMain
Parser
*
parser
=
NULL
;
switch
(
profile
)
{
case
Profile
:
:
Unknown
:
break
;
default:
parser
=
new
IsoffMainParser
(
root
,
p_stream
);
parser
=
new
(
std
::
nothrow
)
IsoffMainParser
(
root
,
p_stream
);
break
;
}
...
...
modules/demux/dash/mpd/MPDFactory.h
View file @
51e7ebd5
...
...
@@ -21,21 +21,25 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef MPDFACTORY_H_
#define MPDFACTORY_H_
#include "mpd/MPD.h"
#include "mpd/
IsoffMainParser.h
"
#include "mpd/
Profile.hpp
"
namespace
dash
{
namespace
xml
{
class
Node
;
}
namespace
mpd
{
class
MPDFactory
{
public:
static
MPD
*
create
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
,
Profile
profile
);
static
MPD
*
create
(
xml
::
Node
*
root
,
stream_t
*
p_stream
,
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