- Main Page
- Modules
- Namespaces
- Classes
- Files

# bin.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GSTREAMERMM_BIN_H
    00004 #define _GSTREAMERMM_BIN_H
    00005
    00006
    00007 #include <glibmm.h>
    00008
    00009 /* gstreamermm - a C++ wrapper for gstreamer
    00010  *
    00011  * Copyright 2008 The gstreamermm Development Team
    00012  *
    00013  * This library is free software; you can redistribute it and/or
    00014  * modify it under the terms of the GNU Lesser General Public
    00015  * License as published by the Free Software Foundation; either
    00016  * version 2.1 of the License, or (at your option) any later version.
    00017  *
    00018  * This library is distributed in the hope that it will be useful,
    00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00021  * Lesser General Public License for more details.
    00022  *
    00023  * You should have received a copy of the GNU Lesser General Public
    00024  * License along with this library; if not, write to the Free
    00025  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00026  */
    00027
    00028 #include <gstreamermm/element.h>
    00029 #include <gstreamermm/childproxy.h>
    00030 #include <gstreamermm/pad.h>
    00031 #include <stdexcept> //Because add() throws std::runtime_error.
    00032
    00033
    00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00035 typedef struct _GstBin GstBin;
    00036 typedef struct _GstBinClass GstBinClass;
    00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00038
    00039
    00040 namespace Gst
    00041 { class Bin_Class; } // namespace Gst
    00042 namespace Gst
    00043 {
    00044
    00045 class Pad;
    00046
    00047 //Gst::Iterator<> forward declaration.
    00048 template <class CppType>
    00049 class Iterator;
    00050
    00142 class Bin
    00143 : public Element,
    00144   public ChildProxy
    00145 {
    00146
    00147 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00148
    00149 public:
    00150   typedef Bin CppObjectType;
    00151   typedef Bin_Class CppClassType;
    00152   typedef GstBin BaseObjectType;
    00153   typedef GstBinClass BaseClassType;
    00154
    00155 private:  friend class Bin_Class;
    00156   static CppClassType bin_class_;
    00157
    00158 private:
    00159   // noncopyable
    00160   Bin(const Bin&);
    00161   Bin& operator=(const Bin&);
    00162
    00163 protected:
    00164   explicit Bin(const Glib::ConstructParams& construct_params);
    00165   explicit Bin(GstBin* castitem);
    00166
    00167 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00168
    00169 public:
    00170   virtual ~Bin();
    00171
    00172 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00173   static GType get_type()      G_GNUC_CONST;
    00174   static GType get_base_type() G_GNUC_CONST;
    00175 #endif
    00176
    00178   GstBin*       gobj()       { return reinterpret_cast<GstBin*>(gobject_); }
    00179
    00181   const GstBin* gobj() const { return reinterpret_cast<GstBin*>(gobject_); }
    00182
    00184   GstBin* gobj_copy();
    00185
    00186 private:
    00187
    00188
    00189 protected:
    00190   explicit Bin(const Glib::ustring& name);
    00191   Bin();
    00192
    00193 public:
    00200   static Glib::RefPtr<Bin> create(const Glib::ustring& name);
    00201
    00202
    00208   static Glib::RefPtr<Bin> create();
    00209
    00210
    00225   Glib::RefPtr<Gst::Bin> add(const Glib::RefPtr<Gst::Element>& element);
    00226
    00227
    00242   Glib::RefPtr<Gst::Bin> remove(const Glib::RefPtr<Gst::Element>& element);
    00243
    00244
    00245   //We could add a bool recurse_up = false parameter,
    00246   //but get_element() and get_element_recurse_up() seem different enough to be separate.
    00247   //One recurses down and the other recurses up, so it's not just additional behaviour.
    00248
    00256   Glib::RefPtr<Gst::Element> get_element(const Glib::ustring& name);
    00257
    00265   Glib::RefPtr<const Gst::Element> get_element(const Glib::ustring& name) const;
    00266
    00267
    00275   Glib::RefPtr<Gst::Element> get_element_recurse_up(const Glib::ustring& name);
    00276
    00284   Glib::RefPtr<const Gst::Element> get_element_recurse_up(const Glib::ustring& name) const;
    00285
    00286
    00297   Glib::RefPtr<Gst::Element> get_element(GType interface);
    00298
    00309   Glib::RefPtr<const Gst::Element> get_element(GType interface) const;
    00310
    00311
    00322   Glib::RefPtr<Gst::Pad> find_unlinked_pad(PadDirection dir);
    00323
    00334   Glib::RefPtr<const Gst::Pad> find_unlinked_pad(PadDirection dir) const;
    00335
    00336
    00345   Gst::Iterator<Gst::Element> iterate_elements();
    00346
    00355   Gst::Iterator<const Gst::Element> iterate_elements() const;
    00356
    00366   Gst::Iterator<Gst::Element> iterate_recurse();
    00367
    00377   Gst::Iterator<const Gst::Element> iterate_recurse() const;
    00378
    00392   Gst::Iterator<Gst::Element> iterate_sorted();
    00393
    00407   Gst::Iterator<const Gst::Element> iterate_sorted() const;
    00408
    00418   Gst::Iterator<Gst::Element> iterate_sources();
    00419
    00429   Gst::Iterator<const Gst::Element> iterate_sources() const;
    00430
    00440   Gst::Iterator<Gst::Element> iterate_sinks();
    00441
    00451   Gst::Iterator<const Gst::Element> iterate_sinks() const;
    00452
    00466   Gst::Iterator<Gst::Element> iterate_by_interface(GType iface);
    00467
    00481   Gst::Iterator<const Gst::Element> iterate_by_interface(GType iface) const;
    00482
    00483
    00486    Glib::ListHandle< Glib::RefPtr<Gst::Element> > get_children() const;
    00487
    00490    int get_num_children() const;
    00491
    00492
    00499   Glib::SignalProxy1< void,const Glib::RefPtr<Gst::Element>& > signal_element_added();
    00500
    00501
    00508   Glib::SignalProxy1< void,const Glib::RefPtr<Gst::Element>& > signal_element_removed();
    00509
    00510
    00511   #ifdef GLIBMM_PROPERTIES_ENABLED
    00512
    00518   Glib::PropertyProxy<bool> property_async_handling() ;
    00519 #endif //#GLIBMM_PROPERTIES_ENABLED
    00520
    00521 #ifdef GLIBMM_PROPERTIES_ENABLED
    00522
    00528   Glib::PropertyProxy_ReadOnly<bool> property_async_handling() const;
    00529 #endif //#GLIBMM_PROPERTIES_ENABLED
    00530
    00531
    00534   #ifdef GLIBMM_VFUNCS_ENABLED
    00535   virtual bool add_element_vfunc(const Glib::RefPtr<Gst::Element>& element);
    00536 #endif //GLIBMM_VFUNCS_ENABLED
    00537
    00538
    00541   #ifdef GLIBMM_VFUNCS_ENABLED
    00542   virtual bool remove_element_vfunc(const Glib::RefPtr<Gst::Element>& element);
    00543 #endif //GLIBMM_VFUNCS_ENABLED
    00544
    00545
    00548   #ifdef GLIBMM_VFUNCS_ENABLED
    00549   virtual void handle_message_vfunc(const Glib::RefPtr<Gst::Message>& message);
    00550 #endif //GLIBMM_VFUNCS_ENABLED
    00551
    00552
    00553 public:
    00554
    00555 public:
    00556   //C++ methods used to invoke GTK+ virtual functions:
    00557 #ifdef GLIBMM_VFUNCS_ENABLED
    00558 #endif //GLIBMM_VFUNCS_ENABLED
    00559
    00560 protected:
    00561   //GTK+ Virtual Functions (override these to change behaviour):
    00562 #ifdef GLIBMM_VFUNCS_ENABLED
    00563 #endif //GLIBMM_VFUNCS_ENABLED
    00564
    00565   //Default Signal Handlers::
    00566 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00567   virtual void on_element_added(const Glib::RefPtr<Gst::Element>& element);
    00568   virtual void on_element_removed(const Glib::RefPtr<Gst::Element>& element);
    00569 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00570
    00571
    00572 };
    00573
    00574 } //namespace Gst
    00575
    00576
    00577 namespace Glib
    00578 {
    00587   Glib::RefPtr<Gst::Bin> wrap(GstBin* object, bool take_copy = false);
    00588 }
    00589
    00590
    00591 #endif /* _GSTREAMERMM_BIN_H */
    00592