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
83a72ce8
Commit
83a72ce8
authored
May 15, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: split common inheritable classes
parent
a649c63e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
196 additions
and
99 deletions
+196
-99
modules/demux/Makefile.am
modules/demux/Makefile.am
+3
-0
modules/demux/adaptative/SegmentTracker.cpp
modules/demux/adaptative/SegmentTracker.cpp
+1
-0
modules/demux/adaptative/playlist/Inheritables.cpp
modules/demux/adaptative/playlist/Inheritables.cpp
+59
-0
modules/demux/adaptative/playlist/Inheritables.hpp
modules/demux/adaptative/playlist/Inheritables.hpp
+69
-0
modules/demux/adaptative/playlist/SegmentInfoCommon.cpp
modules/demux/adaptative/playlist/SegmentInfoCommon.cpp
+0
-33
modules/demux/adaptative/playlist/SegmentInfoCommon.h
modules/demux/adaptative/playlist/SegmentInfoCommon.h
+4
-66
modules/demux/adaptative/playlist/Templates.hpp
modules/demux/adaptative/playlist/Templates.hpp
+60
-0
No files found.
modules/demux/Makefile.am
View file @
83a72ce8
...
...
@@ -294,6 +294,8 @@ libdash_plugin_la_SOURCES += \
demux/adaptative/playlist/CommonAttributesElements.cpp
\
demux/adaptative/playlist/CommonAttributesElements.h
\
demux/adaptative/playlist/ICanonicalUrl.hpp
\
demux/adaptative/playlist/Inheritables.hpp
\
demux/adaptative/playlist/Inheritables.cpp
\
demux/adaptative/playlist/Segment.cpp
\
demux/adaptative/playlist/Segment.h
\
demux/adaptative/playlist/SegmentBase.cpp
\
...
...
@@ -310,6 +312,7 @@ libdash_plugin_la_SOURCES += \
demux/adaptative/playlist/SegmentTemplate.h
\
demux/adaptative/playlist/Url.cpp
\
demux/adaptative/playlist/Url.hpp
\
demux/adaptative/playlist/Templates.hpp
\
demux/adaptative/logic/AbstractAdaptationLogic.cpp
\
demux/adaptative/logic/AbstractAdaptationLogic.h
\
demux/adaptative/logic/AlwaysBestAdaptationLogic.cpp
\
...
...
modules/demux/adaptative/SegmentTracker.cpp
View file @
83a72ce8
...
...
@@ -20,6 +20,7 @@
#include "SegmentTracker.hpp"
#include "playlist/AbstractPlaylist.hpp"
#include "playlist/BaseRepresentation.h"
#include "playlist/Segment.h"
#include "logic/AbstractAdaptationLogic.h"
using
namespace
adaptative
;
...
...
modules/demux/adaptative/playlist/Inheritables.cpp
0 → 100644
View file @
83a72ce8
/*****************************************************************************
* Inheritables.cpp
*****************************************************************************
* Copyright (C) 1998-2015 VLC authors and VideoLAN
*
* 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.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "Inheritables.hpp"
#include "SegmentTimeline.h"
using
namespace
adaptative
::
playlist
;
Timelineable
::
Timelineable
()
{
segmentTimeline
.
Set
(
NULL
);
}
Timelineable
::~
Timelineable
()
{
delete
segmentTimeline
.
Get
();
}
TimescaleAble
::
TimescaleAble
(
TimescaleAble
*
parent
)
{
timescale
.
Set
(
0
);
parentTimescale
=
parent
;
}
TimescaleAble
::~
TimescaleAble
()
{
}
uint64_t
TimescaleAble
::
inheritTimescale
()
const
{
if
(
timescale
.
Get
())
return
timescale
.
Get
();
else
if
(
parentTimescale
)
return
parentTimescale
->
inheritTimescale
();
else
return
1
;
}
modules/demux/adaptative/playlist/Inheritables.hpp
0 → 100644
View file @
83a72ce8
/*****************************************************************************
* Inheritables.hpp Nodes inheritables properties
*****************************************************************************
* Copyright (C) 1998-2015 VLC authors and VideoLAN
*
* 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 INHERITABLES_H
#define INHERITABLES_H
#include "../tools/Properties.hpp"
#include <string>
namespace
adaptative
{
namespace
playlist
{
class
SegmentTimeline
;
class
Timelineable
{
public:
Timelineable
();
~
Timelineable
();
Property
<
SegmentTimeline
*>
segmentTimeline
;
};
class
TimescaleAble
{
public:
TimescaleAble
(
TimescaleAble
*
=
NULL
);
~
TimescaleAble
();
uint64_t
inheritTimescale
()
const
;
Property
<
uint64_t
>
timescale
;
protected:
TimescaleAble
*
parentTimescale
;
};
template
<
class
T
>
class
UniqueNess
{
public:
UniqueNess
(){}
~
UniqueNess
()
{}
void
setId
(
const
std
::
string
&
id_
)
{
id
=
id_
;}
const
std
::
string
&
getId
()
const
{
return
id
;}
bool
sameAs
(
const
T
&
other
)
const
{
return
(
!
id
.
empty
()
&&
id
==
other
.
id
);
}
private:
std
::
string
id
;
};
}
}
#endif // INHERITABLES_H
modules/demux/adaptative/playlist/SegmentInfoCommon.cpp
View file @
83a72ce8
...
...
@@ -28,41 +28,8 @@
#include "SegmentInfoCommon.h"
#include "Segment.h"
#include "SegmentTimeline.h"
using
namespace
adaptative
::
playlist
;
Timelineable
::
Timelineable
()
{
segmentTimeline
.
Set
(
NULL
);
}
Timelineable
::~
Timelineable
()
{
delete
segmentTimeline
.
Get
();
}
TimescaleAble
::
TimescaleAble
(
TimescaleAble
*
parent
)
{
timescale
.
Set
(
0
);
parentTimescale
=
parent
;
}
TimescaleAble
::~
TimescaleAble
()
{
}
uint64_t
TimescaleAble
::
inheritTimescale
()
const
{
if
(
timescale
.
Get
())
return
timescale
.
Get
();
else
if
(
parentTimescale
)
return
parentTimescale
->
inheritTimescale
();
else
return
1
;
}
SegmentInfoCommon
::
SegmentInfoCommon
(
ICanonicalUrl
*
parent
)
:
ICanonicalUrl
(
parent
),
Initializable
(),
Indexable
(),
duration
(
0
),
...
...
modules/demux/adaptative/playlist/SegmentInfoCommon.h
View file @
83a72ce8
...
...
@@ -27,79 +27,17 @@
#include <string>
#include <list>
#include
<ctime>
#include "
ICanonicalUrl
.hpp"
#include
"Inheritables.hpp"
#include "
Templates
.hpp"
#include "Segment.h"
#include "ICanonicalUrl.hpp"
#include "../tools/Properties.hpp"
namespace
adaptative
{
namespace
playlist
{
class
SegmentTimeline
;
template
<
class
T
>
class
Initializable
{
public:
Initializable
()
{
initialisationSegment
.
Set
(
NULL
);
}
~
Initializable
()
{
delete
initialisationSegment
.
Get
();
}
Property
<
T
*>
initialisationSegment
;
};
template
<
class
T
>
class
Indexable
{
public:
Indexable
()
{
indexSegment
.
Set
(
NULL
);
}
~
Indexable
()
{
delete
indexSegment
.
Get
();
}
Property
<
T
*>
indexSegment
;
};
class
Timelineable
{
public:
Timelineable
();
~
Timelineable
();
Property
<
SegmentTimeline
*>
segmentTimeline
;
};
class
TimescaleAble
{
public:
TimescaleAble
(
TimescaleAble
*
=
NULL
);
~
TimescaleAble
();
uint64_t
inheritTimescale
()
const
;
Property
<
uint64_t
>
timescale
;
private:
TimescaleAble
*
parentTimescale
;
};
template
<
class
T
>
class
UniqueNess
{
public:
UniqueNess
(){}
~
UniqueNess
()
{}
void
setId
(
const
std
::
string
&
id_
)
{
id
=
id_
;}
const
std
::
string
&
getId
()
const
{
return
id
;}
bool
sameAs
(
const
T
&
other
)
const
{
return
(
!
id
.
empty
()
&&
id
==
other
.
id
);
}
private:
std
::
string
id
;
};
class
Segment
;
class
SegmentInfoCommon
:
public
ICanonicalUrl
,
public
Initializable
<
Segment
>
,
...
...
modules/demux/adaptative/playlist/Templates.hpp
0 → 100644
View file @
83a72ce8
/*****************************************************************************
* Templates.hpp
*****************************************************************************
* Copyright (C) 2014-2015 VLC authors and VideoLAN
*
* 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 TEMPLATES_HPP
#define TEMPLATES_HPP
namespace
adaptative
{
namespace
playlist
{
template
<
class
T
>
class
Initializable
{
public:
Initializable
()
{
initialisationSegment
.
Set
(
NULL
);
}
~
Initializable
()
{
delete
initialisationSegment
.
Get
();
}
Property
<
T
*>
initialisationSegment
;
};
template
<
class
T
>
class
Indexable
{
public:
Indexable
()
{
indexSegment
.
Set
(
NULL
);
}
~
Indexable
()
{
delete
indexSegment
.
Get
();
}
Property
<
T
*>
indexSegment
;
};
}
}
#endif // TEMPLATES_HPP
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