[vlmc-devel] ITrack
Yikai Lu
git at videolan.org
Mon Jul 4 15:33:45 CEST 2016
vlmc | branch: medialibrary | Yikai Lu <luyikei.qmltu at gmail.com> | Sun Jun 12 00:14:19 2016 +0900| [77cce8247c13a23f6d128211f1441f9dae87a756] | committer: Yikai Lu
ITrack
> https://code.videolan.org/videolan/vlmc/commit/77cce8247c13a23f6d128211f1441f9dae87a756
---
src/Backend/ITrack.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
src/CMakeLists.txt | 1 +
2 files changed, 51 insertions(+)
diff --git a/src/Backend/ITrack.h b/src/Backend/ITrack.h
new file mode 100644
index 0000000..87de464
--- /dev/null
+++ b/src/Backend/ITrack.h
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * ITrack.h: Defines an interface of a track
+ *****************************************************************************
+ * Copyright (C) 2008-2016 VideoLAN
+ *
+ * Authors: Yikei Lu <luyikei.qmltu at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU 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 ITRACK_H
+#define ITRACK_H
+
+#include <string>
+#include "IProducer.h"
+
+namespace Backend
+{
+ class ITrack : virtual public IProducer
+ {
+ public:
+ virtual ~ITrack() = default;
+
+ virtual bool insertAt( IProducer& producer, int64_t startFrame ) = 0;
+ virtual bool append( IProducer& producer ) = 0;
+ virtual bool remove( int index ) = 0;
+ // src and dist are indexes.
+ virtual bool move( int src, int dist ) = 0;
+ virtual IProducer* clip( int index ) const = 0;
+ virtual IProducer* clipAt( int64_t position ) const = 0 ;
+ virtual bool resizeClip( int clip, int64_t begin, int64_t end ) = 0;
+ virtual int clipIndexAt( int64_t position ) = 0;
+ virtual int count() const = 0;
+ virtual void clear() = 0;
+ };
+}
+
+#endif // ITRACK_H
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1af93af..d2771a1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -61,6 +61,7 @@ SET(VLMC_SRCS
Backend/IService.h
Backend/IConsumer.h
Backend/IProducer.h
+ Backend/ITrack.h
Backend/IProfile.h
Backend/VLC/VLCBackend.cpp
Backend/VLC/VLCSourceRenderer.cpp
More information about the Vlmc-devel
mailing list