27 #ifndef PTLIB_GSTREMER_H
28 #define PTLIB_GSTREMER_H
46 class PGBaseObject :
public PObject
53 PGBaseObject(const PGBaseObject &) { }
54 void operator=(
const PGBaseObject &) { }
59 template<
typename T> T * As()
const {
return reinterpret_cast<T *
>(m_object); }
60 void * Ptr()
const {
return m_object; }
61 operator bool()
const {
return m_object != NULL; }
62 bool operator!()
const {
return m_object == NULL; }
64 virtual bool IsValid()
const;
65 virtual bool Attach(
void *
object);
70 virtual void Unreference() = 0;
80 class PGObject :
public PGBaseObject
85 PGObject(
const PGObject & other);
86 void operator=(
const PGObject &);
89 ~PGObject() { SetNULL(); }
92 virtual void Unreference();
95 virtual bool IsValid()
const;
98 const char * attribute,
102 const char * attribute,
107 const char * attribute,
111 const char * attribute,
116 const char * attribute,
120 const char * attribute,
125 const char * attribute,
129 const char * attribute,
138 class PGstMiniObject :
public PGBaseObject
143 PGstMiniObject(
const PGstMiniObject & other);
144 void operator=(
const PGstMiniObject &);
147 ~PGstMiniObject() { SetNULL(); }
149 virtual bool IsValid()
const;
152 virtual void Unreference();
159 class PGstObject :
public PGObject
166 bool SetSockFd(
int fd);
173 class PGstPluginFeature : public PGstObject
179 enum InspectSearchField {
187 InspectSearchField searchField,
193 ) {
return Inspect(regex, ByKlass, detailed); }
200 class PGstElementFactory :
public PGstPluginFeature
202 PCLASSINFO(PGstElementFactory, PGstPluginFeature)
205 const
char * factoryName = NULL
209 PString GetDescription() const;
216 class PGstElement : public PGstObject
222 const char * factoryName,
227 bool SetName(
const PString & name);
230 const PGstElement & dest
247 StateResult SetState(
251 StateResult GetState(
254 StateResult GetPendingState(
257 StateResult WaitStateChange();
258 StateResult WaitStateChange(
267 class PGstBaseIterator :
public PGBaseObject
271 ~PGstBaseIterator() { SetNULL(); }
273 virtual bool Attach(
void *
object);
281 Result operator++() {
return InternalNext(); }
283 Result GetLastResult()
const {
return m_lastResult; }
288 PGstBaseIterator(PGBaseObject & valueRef);
290 virtual void Unreference();
291 Result InternalNext();
293 PGBaseObject & m_valueRef;
299 class PGstIterator :
public PGstBaseIterator
303 PGstIterator() : PGstBaseIterator(m_value) { }
304 const T * operator->()
const {
return &m_value; }
305 const T & operator*()
const {
return m_value; }
314 class PGstBin :
public PGstElement
319 const PGstElement & element
324 PGstElement & element
328 PGstIterator<PGstElement> & iterator,
329 bool recursive = false
337 class PGstAppSrc : public PGstElement
352 void SetType(Types type);
353 Types GetType()
const;
367 class PGstAppSink :
public PGstElement
389 class PGstPipeline :
public PGstBin
394 const
char * name = NULL
398 const
char * description
406 class PGstMessage : public PGstMiniObject
413 void PrintOn(ostream & strm) const;
420 class PGstBus : public PGstObject
426 const PGstPipeline & pipeline
430 bool Peek(PGstMessage & message);
431 bool Pop(PGstMessage & message);
435 #define PDECLARE_GstBusNotifier(cls, fn) PDECLARE_NOTIFIER2(PGstBus, cls, fn, PGstMessage)
436 #define PDECLARE_ASYNC_GstBusNotifier(cls, fn) PDECLARE_ASYNC_NOTIFIER2(PGstBus, cls, fn, PGstMessage)
437 #define PCREATE_GstBusNotifier(fn) PCREATE_NOTIFIER2(fn, PGstMessage)
445 #endif // P_GSTREAMER
447 #endif // PTLIB_GSTREMER_H
This class defines an arbitrary time interval to millisecond accuracy.
Definition: timeint.h:51
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:2164
The PNotifier and PNotifierFunction classes build a completely type safe mechanism for calling arbitr...
Definition: notifier.h:109
The character string class.
Definition: pstring.h:108
#define P_DECLARE_TRACED_ENUM
Definition: object.h:1119
This is a list collection class of PString objects.
Definition: pstring.h:2562
Ultimate parent class for all objects in the class library.
Definition: object.h:2204
void PrintOn(ostream &strm) const