00001
00002
00003 #ifndef _GSTREAMERMM_BIN_H
00004 #define _GSTREAMERMM_BIN_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <gstreamermm/element.h>
00031 #include <gstreamermm/childproxy.h>
00032 #include <gstreamermm/pad.h>
00033 #include <stdexcept>
00034
00035
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GstBin GstBin;
00038 typedef struct _GstBinClass GstBinClass;
00039 #endif
00040
00041
00042 namespace Gst
00043 { class Bin_Class; }
00044 namespace Gst
00045 {
00046
00047 class Pad;
00048
00049
00050
00141 class Bin
00142 : public Element,
00143 public ChildProxy
00144 {
00145
00146 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00147
00148 public:
00149 typedef Bin CppObjectType;
00150 typedef Bin_Class CppClassType;
00151 typedef GstBin BaseObjectType;
00152 typedef GstBinClass BaseClassType;
00153
00154 private: friend class Bin_Class;
00155 static CppClassType bin_class_;
00156
00157 private:
00158
00159 Bin(const Bin&);
00160 Bin& operator=(const Bin&);
00161
00162 protected:
00163 explicit Bin(const Glib::ConstructParams& construct_params);
00164 explicit Bin(GstBin* castitem);
00165
00166 #endif
00167
00168 public:
00169 virtual ~Bin();
00170
00171 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00172 static GType get_type() G_GNUC_CONST;
00173 static GType get_base_type() G_GNUC_CONST;
00174 #endif
00175
00177 GstBin* gobj() { return reinterpret_cast<GstBin*>(gobject_); }
00178
00180 const GstBin* gobj() const { return reinterpret_cast<GstBin*>(gobject_); }
00181
00183 GstBin* gobj_copy();
00184
00185 private:
00186
00187
00188 protected:
00189 explicit Bin(const Glib::ustring& name);
00190
00191 public:
00198 static Glib::RefPtr<Bin> create(const Glib::ustring& name);
00199
00200
00215 Glib::RefPtr<Bin> add(const Glib::RefPtr<Element>& element);
00216
00231 Glib::RefPtr<Bin> remove(const Glib::RefPtr<Element>& element);
00232
00233
00234
00235
00236
00244 Glib::RefPtr<Element> get_element(const Glib::ustring& name);
00245
00253 Glib::RefPtr<const Element> get_element(const Glib::ustring& name) const;
00254
00255
00263 Glib::RefPtr<Element> get_element_recurse_up(const Glib::ustring& name);
00264
00272 Glib::RefPtr<const Element> get_element_recurse_up(const Glib::ustring& name) const;
00273
00274
00285 Glib::RefPtr<Element> get_element(GType interface);
00286
00297 Glib::RefPtr<const Element> get_element(GType interface) const;
00298
00299
00312 Glib::RefPtr<Pad> find_unconnected_pad(PadDirection dir);
00313
00326 Glib::RefPtr<const Pad> find_unconnected_pad(PadDirection dir) const;
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00341 Glib::ListHandle< Glib::RefPtr<Element> > get_children() const;
00342
00345 int get_num_children() const;
00346
00347
00354 Glib::SignalProxy1< void,const Glib::RefPtr<Element>& > signal_element_added();
00355
00356
00363 Glib::SignalProxy1< void,const Glib::RefPtr<Element>& > signal_element_removed();
00364
00365
00366 #ifdef GLIBMM_PROPERTIES_ENABLED
00367
00373 Glib::PropertyProxy<bool> property_async_handling() ;
00374 #endif //#GLIBMM_PROPERTIES_ENABLED
00375
00376 #ifdef GLIBMM_PROPERTIES_ENABLED
00377
00383 Glib::PropertyProxy_ReadOnly<bool> property_async_handling() const;
00384 #endif //#GLIBMM_PROPERTIES_ENABLED
00385
00386
00389 #ifdef GLIBMM_VFUNCS_ENABLED
00390 virtual bool add_element_vfunc(const Glib::RefPtr<Element>& element);
00391 #endif //GLIBMM_VFUNCS_ENABLED
00392
00393
00396 #ifdef GLIBMM_VFUNCS_ENABLED
00397 virtual bool remove_element_vfunc(const Glib::RefPtr<Element>& element);
00398 #endif //GLIBMM_VFUNCS_ENABLED
00399
00400
00403 #ifdef GLIBMM_VFUNCS_ENABLED
00404 virtual void handle_message_vfunc(const Glib::RefPtr<Message>& message);
00405 #endif //GLIBMM_VFUNCS_ENABLED
00406
00407
00408 public:
00409
00410 public:
00411
00412 #ifdef GLIBMM_VFUNCS_ENABLED
00413 #endif //GLIBMM_VFUNCS_ENABLED
00414
00415 protected:
00416
00417 #ifdef GLIBMM_VFUNCS_ENABLED
00418 #endif //GLIBMM_VFUNCS_ENABLED
00419
00420
00421 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00422 virtual void on_element_added(const Glib::RefPtr<Element>& element);
00423 virtual void on_element_removed(const Glib::RefPtr<Element>& element);
00424 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00425
00426
00427 };
00428
00429 }
00430
00431
00432 namespace Glib
00433 {
00442 Glib::RefPtr<Gst::Bin> wrap(GstBin* object, bool take_copy = false);
00443 }
00444
00445
00446 #endif
00447