QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
pad.h
00001 /*
00002     Copyright (C) 2009-2010  George Kiagiadakis <kiagiadakis.george@gmail.com>
00003 
00004     This library is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU Lesser General Public License as published
00006     by the Free Software Foundation; either version 2.1 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU Lesser General Public License for more details.
00013 
00014     You should have received a copy of the GNU Lesser General Public License
00015     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 #ifndef QGST_PAD_H
00018 #define QGST_PAD_H
00019 
00020 #include "object.h"
00021 
00022 namespace QGst {
00023 
00027 class QTGSTREAMER_EXPORT Pad : public Object
00028 {
00029     QGST_WRAPPER(Pad)
00030 public:
00031     static PadPtr create(PadDirection direction, const char *name = NULL);
00032 
00033     PadDirection direction() const;
00034 
00039     ElementPtr parentElement() const;
00040     PadPtr peer() const;
00041 
00042     bool isLinked() const;
00043     bool canLink(const PadPtr & sink) const;
00044     PadLinkReturn link(const PadPtr & sink);
00045     bool unlink(const PadPtr & sink);
00046 
00052     CapsPtr caps() const;
00053     CapsPtr allowedCaps() const;
00054     CapsPtr negotiatedCaps() const;
00055     bool setCaps(const CapsPtr & caps);
00056 
00057     bool isActive() const;
00058     bool setActive(bool active);
00059 
00060     bool isBlocked() const;
00061     bool isBlocking() const;
00062     bool setBlocked(bool blocked);
00063 
00064     bool query(const QueryPtr & query);
00065     bool sendEvent(const EventPtr & event);
00066 };
00067 
00068 }
00069 
00070 QGST_REGISTER_TYPE(QGst::Pad)
00071 
00072 #endif