QtGStreamer 0.10.1
|
00001 /* 00002 Copyright (C) 2011 Collabora Ltd. <info@collabora.co.uk> 00003 @author George Kiagiadakis <george.kiagiadakis@collabora.co.uk> 00004 00005 This library is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU Lesser General Public License as published 00007 by the Free Software Foundation; either version 2.1 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public License 00016 along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 #ifndef QGST_UTILS_APPLICATIONSINK_H 00019 #define QGST_UTILS_APPLICATIONSINK_H 00020 00021 #include "global.h" 00022 #include "../element.h" 00023 #include "../bufferlist.h" 00024 00025 namespace QGst { 00026 namespace Utils { 00027 00066 class QTGSTREAMERUTILS_EXPORT ApplicationSink 00067 { 00068 public: 00069 ApplicationSink(); 00070 virtual ~ApplicationSink(); 00071 00073 ElementPtr element() const; 00074 00076 void setElement(const ElementPtr & appsink); 00077 00078 00080 CapsPtr caps() const; 00081 00083 void setCaps(const CapsPtr & caps); 00084 00085 00088 bool isEos() const; 00089 00090 00093 uint maxBuffers() const; 00094 00098 void setMaxBuffers(uint maxbuffers); 00099 00100 00103 bool dropEnabled() const; 00104 00106 void enableDrop(bool enable); 00107 00124 BufferPtr pullPreroll(); 00125 00137 BufferPtr pullBuffer(); 00138 00151 BufferListPtr pullBufferList(); 00152 00153 protected: 00156 virtual void eos(); 00157 00161 virtual FlowReturn newPreroll(); 00162 00166 virtual FlowReturn newBuffer(); 00167 00171 virtual FlowReturn newBufferList(); 00172 00173 private: 00174 /* vtable padding */ 00175 virtual void reservedVirtual1() {} 00176 virtual void reservedVirtual2() {} 00177 virtual void reservedVirtual3() {} 00178 00179 private: 00180 struct Priv; 00181 friend struct Priv; 00182 Priv *const d; 00183 Q_DISABLE_COPY(ApplicationSink) 00184 }; 00185 00186 } //namespace Utils 00187 } //namespace QGst 00188 00189 #endif // QGST_APPLICATIONSINK_H