[vlmc-devel] IFilter
Yikai Lu
git at videolan.org
Mon Jul 4 15:33:48 CEST 2016
vlmc | branch: medialibrary | Yikai Lu <luyikei.qmltu at gmail.com> | Tue Jun 14 16:14:52 2016 +0900| [366af0290187e61838f024c468a4f52ec269da2e] | committer: Yikai Lu
IFilter
> https://code.videolan.org/videolan/vlmc/commit/366af0290187e61838f024c468a4f52ec269da2e
---
src/Backend/IFilter.h | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/CMakeLists.txt | 1 +
2 files changed, 76 insertions(+)
diff --git a/src/Backend/IFilter.h b/src/Backend/IFilter.h
new file mode 100644
index 0000000..7284f12
--- /dev/null
+++ b/src/Backend/IFilter.h
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * IFilter.h: Defines an interface of a filter
+ *****************************************************************************
+ * 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 IFILTER_H
+#define IFILTER_H
+
+#include <cstdint>
+#include <string>
+#include "Backend/IService.h"
+#include <vector>
+
+namespace Backend
+{
+ class IParameterInfo
+ {
+ public:
+ virtual ~IParameterInfo() = default;
+
+ virtual const std::string& identifier() const = 0;
+ virtual const std::string& name() const = 0;
+ virtual const std::string& type() const = 0;
+ virtual const std::string& description() const = 0;
+
+ virtual const std::string& defaultValue() const = 0;
+ virtual const std::string& minValue() const = 0;
+ virtual const std::string& maxValue() const = 0;
+ };
+
+ class IFilterInfo
+ {
+ public:
+ virtual ~IFilterInfo() = default;
+
+ virtual const std::string& identifier() const = 0;
+ virtual const std::string& name() const = 0;
+ virtual const std::string& description() const = 0;
+ virtual const std::string& author() const = 0;
+ virtual const std::vector<IParameterInfo*>& paramInfos() const = 0;
+ };
+
+ class IFilter : virtual public IService
+ {
+ public:
+ virtual ~IFilter() = default;
+
+ virtual bool connect( IService& service, int index = 0 ) = 0;
+ virtual void setBoundaries( int64_t begin, int64_t end ) = 0;
+ virtual int64_t begin() const = 0;
+ virtual int64_t end() const = 0;
+ virtual int64_t length() const = 0;
+
+ virtual const IFilterInfo& filterInfo() const = 0;
+ };
+}
+
+#endif // IFILTER_H
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 63cda5b..82751ba 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -65,6 +65,7 @@ SET(VLMC_SRCS
Backend/IProfile.h
Backend/ITractor.h
Backend/ITransition.h
+ Backend/IFilter.h
Backend/VLC/VLCBackend.cpp
Backend/VLC/VLCSourceRenderer.cpp
Backend/VLC/VLCVmemRenderer.cpp
More information about the Vlmc-devel
mailing list