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
40971ae5
Commit
40971ae5
authored
Sep 02, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: split StreamOutput
parent
11d6de98
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
624 additions
and
561 deletions
+624
-561
modules/demux/Makefile.am
modules/demux/Makefile.am
+2
-0
modules/demux/adaptative/PlaylistManager.cpp
modules/demux/adaptative/PlaylistManager.cpp
+1
-0
modules/demux/adaptative/Streams.cpp
modules/demux/adaptative/Streams.cpp
+1
-464
modules/demux/adaptative/Streams.hpp
modules/demux/adaptative/Streams.hpp
+0
-96
modules/demux/adaptative/plumbing/StreamOutput.cpp
modules/demux/adaptative/plumbing/StreamOutput.cpp
+486
-0
modules/demux/adaptative/plumbing/StreamOutput.hpp
modules/demux/adaptative/plumbing/StreamOutput.hpp
+132
-0
modules/demux/dash/DASHManager.h
modules/demux/dash/DASHManager.h
+1
-0
modules/demux/hls/HLSStreams.hpp
modules/demux/hls/HLSStreams.hpp
+1
-1
No files found.
modules/demux/Makefile.am
View file @
40971ae5
...
...
@@ -298,6 +298,8 @@ libadaptative_plugin_la_SOURCES = \
demux/adaptative/http/HTTPConnectionManager.h
\
demux/adaptative/http/Sockets.hpp
\
demux/adaptative/http/Sockets.cpp
\
demux/adaptative/plumbing/StreamOutput.cpp
\
demux/adaptative/plumbing/StreamOutput.hpp
\
demux/adaptative/PlaylistManager.cpp
\
demux/adaptative/PlaylistManager.h
\
demux/adaptative/SegmentTracker.cpp
\
...
...
modules/demux/adaptative/PlaylistManager.cpp
View file @
40971ae5
...
...
@@ -33,6 +33,7 @@
#include "logic/AlwaysBestAdaptationLogic.h"
#include "logic/RateBasedAdaptationLogic.h"
#include "logic/AlwaysLowestAdaptationLogic.hpp"
#include "plumbing/StreamOutput.hpp"
#include <vlc_stream.h>
#include <vlc_demux.h>
...
...
modules/demux/adaptative/Streams.cpp
View file @
40971ae5
This diff is collapsed.
Click to expand it.
modules/demux/adaptative/Streams.hpp
View file @
40971ae5
...
...
@@ -102,101 +102,5 @@ namespace adaptative
const
AbstractStreamOutputFactory
*
streamOutputFactory
;
};
class
AbstractStreamOutput
{
public:
AbstractStreamOutput
(
demux_t
*
,
const
StreamFormat
&
);
virtual
~
AbstractStreamOutput
();
void
setLanguage
(
const
std
::
string
&
);
void
setDescription
(
const
std
::
string
&
);
const
StreamFormat
&
getStreamFormat
()
const
;
virtual
void
pushBlock
(
block_t
*
,
bool
)
=
0
;
virtual
mtime_t
getPCR
()
const
;
virtual
mtime_t
getFirstDTS
()
const
=
0
;
virtual
int
esCount
()
const
=
0
;
virtual
bool
seekAble
()
const
=
0
;
virtual
void
setPosition
(
mtime_t
)
=
0
;
virtual
void
sendToDecoder
(
mtime_t
)
=
0
;
virtual
bool
isEmpty
()
const
=
0
;
virtual
bool
reinitsOnSeek
()
const
=
0
;
virtual
bool
switchAllowed
()
const
=
0
;
virtual
bool
isSelected
()
const
=
0
;
protected:
demux_t
*
realdemux
;
mtime_t
pcr
;
std
::
string
language
;
std
::
string
description
;
private:
StreamFormat
format
;
};
class
AbstractStreamOutputFactory
{
public:
virtual
~
AbstractStreamOutputFactory
()
{}
virtual
AbstractStreamOutput
*
create
(
demux_t
*
,
const
StreamFormat
&
)
const
=
0
;
};
class
BaseStreamOutput
:
public
AbstractStreamOutput
{
public:
BaseStreamOutput
(
demux_t
*
,
const
StreamFormat
&
,
const
std
::
string
&
);
virtual
~
BaseStreamOutput
();
virtual
void
pushBlock
(
block_t
*
,
bool
);
/* reimpl */
virtual
mtime_t
getFirstDTS
()
const
;
/* reimpl */
virtual
int
esCount
()
const
;
/* reimpl */
virtual
bool
seekAble
()
const
;
/* reimpl */
virtual
void
setPosition
(
mtime_t
);
/* reimpl */
virtual
void
sendToDecoder
(
mtime_t
);
/* reimpl */
virtual
bool
isEmpty
()
const
;
/* reimpl */
virtual
bool
reinitsOnSeek
()
const
;
/* reimpl */
virtual
bool
switchAllowed
()
const
;
/* reimpl */
virtual
bool
isSelected
()
const
;
/* reimpl */
void
setTimestampOffset
(
mtime_t
);
protected:
es_out_t
*
fakeesout
;
/* to intercept/proxy what is sent from demuxstream */
stream_t
*
demuxstream
;
bool
seekable
;
std
::
string
name
;
bool
restarting
;
mtime_t
timestamps_offset
;
virtual
es_out_id_t
*
esOutAdd
(
const
es_format_t
*
);
virtual
int
esOutSend
(
es_out_id_t
*
,
block_t
*
);
virtual
void
esOutDel
(
es_out_id_t
*
);
virtual
int
esOutControl
(
int
,
va_list
);
virtual
void
esOutDestroy
();
private:
/* static callbacks for demuxer */
static
es_out_id_t
*
esOutAdd_Callback
(
es_out_t
*
,
const
es_format_t
*
);
static
int
esOutSend_Callback
(
es_out_t
*
,
es_out_id_t
*
,
block_t
*
);
static
void
esOutDel_Callback
(
es_out_t
*
,
es_out_id_t
*
);
static
int
esOutControl_Callback
(
es_out_t
*
,
int
,
va_list
);
static
void
esOutDestroy_Callback
(
es_out_t
*
);
class
Demuxed
{
friend
class
BaseStreamOutput
;
Demuxed
(
es_out_id_t
*
,
const
es_format_t
*
);
~
Demuxed
();
void
drop
();
es_out_id_t
*
es_id
;
block_t
*
p_queue
;
block_t
**
pp_queue_last
;
bool
recycle
;
es_format_t
fmtcpy
;
};
std
::
list
<
Demuxed
*>
queues
;
bool
b_drop
;
vlc_mutex_t
lock
;
void
sendToDecoderUnlocked
(
mtime_t
);
bool
restart
();
};
}
#endif // STREAMS_HPP
modules/demux/adaptative/plumbing/StreamOutput.cpp
0 → 100644
View file @
40971ae5
This diff is collapsed.
Click to expand it.
modules/demux/adaptative/plumbing/StreamOutput.hpp
0 → 100644
View file @
40971ae5
/*
* StreamOutput.hpp
*****************************************************************************
* Copyright (C) 2014-2015 VideoLAN and VLC 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.
*****************************************************************************/
#ifndef STREAMOUTPUT_HPP
#define STREAMOUTPUT_HPP
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <string>
#include <list>
#include <vlc_common.h>
#include <vlc_es.h>
#include "../StreamFormat.hpp"
namespace
adaptative
{
class
AbstractStreamOutput
{
public:
AbstractStreamOutput
(
demux_t
*
,
const
StreamFormat
&
);
virtual
~
AbstractStreamOutput
();
void
setLanguage
(
const
std
::
string
&
);
void
setDescription
(
const
std
::
string
&
);
const
StreamFormat
&
getStreamFormat
()
const
;
virtual
void
pushBlock
(
block_t
*
,
bool
)
=
0
;
virtual
mtime_t
getPCR
()
const
;
virtual
mtime_t
getFirstDTS
()
const
=
0
;
virtual
int
esCount
()
const
=
0
;
virtual
bool
seekAble
()
const
=
0
;
virtual
void
setPosition
(
mtime_t
)
=
0
;
virtual
void
sendToDecoder
(
mtime_t
)
=
0
;
virtual
bool
isEmpty
()
const
=
0
;
virtual
bool
reinitsOnSeek
()
const
=
0
;
virtual
bool
switchAllowed
()
const
=
0
;
virtual
bool
isSelected
()
const
=
0
;
protected:
demux_t
*
realdemux
;
mtime_t
pcr
;
std
::
string
language
;
std
::
string
description
;
private:
StreamFormat
format
;
};
class
AbstractStreamOutputFactory
{
public:
virtual
~
AbstractStreamOutputFactory
()
{}
virtual
AbstractStreamOutput
*
create
(
demux_t
*
,
const
StreamFormat
&
)
const
=
0
;
};
class
BaseStreamOutput
:
public
AbstractStreamOutput
{
public:
BaseStreamOutput
(
demux_t
*
,
const
StreamFormat
&
,
const
std
::
string
&
);
virtual
~
BaseStreamOutput
();
virtual
void
pushBlock
(
block_t
*
,
bool
);
/* reimpl */
virtual
mtime_t
getFirstDTS
()
const
;
/* reimpl */
virtual
int
esCount
()
const
;
/* reimpl */
virtual
bool
seekAble
()
const
;
/* reimpl */
virtual
void
setPosition
(
mtime_t
);
/* reimpl */
virtual
void
sendToDecoder
(
mtime_t
);
/* reimpl */
virtual
bool
isEmpty
()
const
;
/* reimpl */
virtual
bool
reinitsOnSeek
()
const
;
/* reimpl */
virtual
bool
switchAllowed
()
const
;
/* reimpl */
virtual
bool
isSelected
()
const
;
/* reimpl */
void
setTimestampOffset
(
mtime_t
);
protected:
es_out_t
*
fakeesout
;
/* to intercept/proxy what is sent from demuxstream */
stream_t
*
demuxstream
;
bool
seekable
;
std
::
string
name
;
bool
restarting
;
mtime_t
timestamps_offset
;
virtual
es_out_id_t
*
esOutAdd
(
const
es_format_t
*
);
virtual
int
esOutSend
(
es_out_id_t
*
,
block_t
*
);
virtual
void
esOutDel
(
es_out_id_t
*
);
virtual
int
esOutControl
(
int
,
va_list
);
virtual
void
esOutDestroy
();
private:
/* static callbacks for demuxer */
static
es_out_id_t
*
esOutAdd_Callback
(
es_out_t
*
,
const
es_format_t
*
);
static
int
esOutSend_Callback
(
es_out_t
*
,
es_out_id_t
*
,
block_t
*
);
static
void
esOutDel_Callback
(
es_out_t
*
,
es_out_id_t
*
);
static
int
esOutControl_Callback
(
es_out_t
*
,
int
,
va_list
);
static
void
esOutDestroy_Callback
(
es_out_t
*
);
class
Demuxed
{
friend
class
BaseStreamOutput
;
Demuxed
(
es_out_id_t
*
,
const
es_format_t
*
);
~
Demuxed
();
void
drop
();
es_out_id_t
*
es_id
;
block_t
*
p_queue
;
block_t
**
pp_queue_last
;
bool
recycle
;
es_format_t
fmtcpy
;
};
std
::
list
<
Demuxed
*>
queues
;
bool
b_drop
;
vlc_mutex_t
lock
;
void
sendToDecoderUnlocked
(
mtime_t
);
bool
restart
();
};
}
#endif // STREAMOUTPUT_HPP
modules/demux/dash/DASHManager.h
View file @
40971ae5
...
...
@@ -27,6 +27,7 @@
#include "../adaptative/PlaylistManager.h"
#include "../adaptative/logic/AbstractAdaptationLogic.h"
#include "../adaptative/plumbing/StreamOutput.hpp"
#include "mpd/MPD.h"
namespace
dash
...
...
modules/demux/hls/HLSStreams.hpp
View file @
40971ae5
...
...
@@ -24,7 +24,7 @@
# include "config.h"
#endif
#include "../adaptative/
Streams
.hpp"
#include "../adaptative/
plumbing/StreamOutput
.hpp"
namespace
hls
{
...
...
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