- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List

# 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
    00032
    00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00034 typedef struct _GstBin GstBin;
    00035 typedef struct _GstBinClass GstBinClass;
    00036 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00037
    00038
    00039 namespace Gst
    00040 { class Bin_Class; } // namespace Gst
    00041 namespace Gst
    00042 {
    00043
    00044 class Pad;
    00045
    00046 //Gst::Iterator<> forward declaration.
    00047 template <class CppType>
    00048 class Iterator;
    00049
    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   // noncopyable
    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 /* DOXYGEN_SHOULD_SKIP_THIS */
    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   Bin();
    00191
    00192 public:
    00199   static Glib::RefPtr<Bin> create(const Glib::ustring& name);
    00200
    00201
    00207   static Glib::RefPtr<Bin> create();
    00208
    00209
    00224   Glib::RefPtr<Gst::Bin> add(const Glib::RefPtr<Gst::Element>& element);
    00225
    00226
    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
    00496   bool recalculate_latency();
    00497
    00498
    00501    Glib::ListHandle< Glib::RefPtr<Gst::Element> > get_children() const;
    00502
    00505    int get_num_children() const;
    00506
    00507
    00514   Glib::SignalProxy1< void,const Glib::RefPtr<Gst::Element>& > signal_element_added();
    00515
    00516
    00523   Glib::SignalProxy1< void,const Glib::RefPtr<Gst::Element>& > signal_element_removed();
    00524
    00525
    00526   //TODO: The default signal handler is marked as private in the C header. Is that intendend?
    00527
    00533   Glib::SignalProxy0< bool > signal_do_latency();
    00534
    00535
    00536   #ifdef GLIBMM_PROPERTIES_ENABLED
    00537
    00543   Glib::PropertyProxy<bool> property_async_handling() ;
    00544 #endif //#GLIBMM_PROPERTIES_ENABLED
    00545
    00546 #ifdef GLIBMM_PROPERTIES_ENABLED
    00547
    00553   Glib::PropertyProxy_ReadOnly<bool> property_async_handling() const;
    00554 #endif //#GLIBMM_PROPERTIES_ENABLED
    00555
    00556
    00559   #ifdef GLIBMM_VFUNCS_ENABLED
    00560   virtual bool add_element_vfunc(const Glib::RefPtr<Gst::Element>& element);
    00561 #endif //GLIBMM_VFUNCS_ENABLED
    00562
    00563
    00566   #ifdef GLIBMM_VFUNCS_ENABLED
    00567   virtual bool remove_element_vfunc(const Glib::RefPtr<Gst::Element>& element);
    00568 #endif //GLIBMM_VFUNCS_ENABLED
    00569
    00570
    00573   #ifdef GLIBMM_VFUNCS_ENABLED
    00574   virtual void handle_message_vfunc(const Glib::RefPtr<Gst::Message>& message);
    00575 #endif //GLIBMM_VFUNCS_ENABLED
    00576
    00577
    00578 private:
    00579   void handle_error(const Glib::ustring& message);
    00580
    00581
    00582 public:
    00583
    00584 public:
    00585   //C++ methods used to invoke GTK+ virtual functions:
    00586 #ifdef GLIBMM_VFUNCS_ENABLED
    00587 #endif //GLIBMM_VFUNCS_ENABLED
    00588
    00589 protected:
    00590   //GTK+ Virtual Functions (override these to change behaviour):
    00591 #ifdef GLIBMM_VFUNCS_ENABLED
    00592 #endif //GLIBMM_VFUNCS_ENABLED
    00593
    00594   //Default Signal Handlers::
    00595 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00596   virtual void on_element_added(const Glib::RefPtr<Gst::Element>& element);
    00597   virtual void on_element_removed(const Glib::RefPtr<Gst::Element>& element);
    00598   virtual bool on_do_latency();
    00599 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00600
    00601
    00602 };
    00603
    00604 } //namespace Gst
    00605
    00606
    00607 namespace Glib
    00608 {
    00617   Glib::RefPtr<Gst::Bin> wrap(GstBin* object, bool take_copy = false);
    00618 }
    00619
    00620
    00621 #endif /* _GSTREAMERMM_BIN_H */
    00622