QtGStreamer  1.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
bus.h
1 /*
2  Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
3 
4  This library is free software; you can redistribute it and/or modify
5  it under the terms of the GNU Lesser General Public License as published
6  by the Free Software Foundation; either version 2.1 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 #ifndef QGST_BUS_H
18 #define QGST_BUS_H
19 
20 #include "object.h"
21 #include "clocktime.h"
22 
23 namespace QGst {
24 
51 class QTGSTREAMER_EXPORT Bus : public Object
52 {
53  QGST_WRAPPER(Bus)
54 public:
56  static BusPtr create();
57 
58 
60  bool post(const MessagePtr & message);
61 
62 
64  bool hasPendingMessages() const;
65 
67  MessagePtr peek() const;
68 
74  MessagePtr pop(ClockTime timeout = 0);
75 
82  MessagePtr pop(MessageType type, ClockTime timeout = 0);
83 
84 
88  void setFlushing(bool flush);
89 
90 
109  void addSignalWatch();
110 
115  void removeSignalWatch();
116 
117 
125  void enableSyncMessageEmission();
126 
132  void disableSyncMessageEmission();
133 };
134 
135 } //namespace QGst
136 
137 QGST_REGISTER_TYPE(QGst::Bus)
138 
139 #endif //QGST_BUS_H
Smart pointer class for working with wrapper classes that support reference counting.
Definition: global.h:56
A datatype to hold a time, measured in nanoseconds.
Definition: clocktime.h:37
Wrapper class for GstObject.
Definition: object.h:28
Wrapper class for GstBus.
Definition: bus.h:51