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 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00010 
00011 /* gstreamermm - a C++ wrapper for gstreamer
00012  *
00013  * Copyright 2008 The gstreamermm Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <gstreamermm/element.h>
00031 #include <gstreamermm/childproxy.h>
00032 #include <gstreamermm/pad.h>
00033 #include <stdexcept> //Because add() throws std::runtime_error.
00034 
00035 
00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00037 typedef struct _GstBin GstBin;
00038 typedef struct _GstBinClass GstBinClass;
00039 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00040 
00041 
00042 namespace Gst
00043 { class Bin_Class; } // namespace Gst
00044 namespace Gst
00045 {
00046 
00047 class Pad;
00048 
00049 //TODO: Correct statements about iterators in class docs below:
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   // 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 
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   //We could add a bool recurse_up = false parameter, 
00234   //but get_element() and get_element_recurse_up() seem different enough to be separate.
00235   //One recurses down and the other recurses up, so it's not just additional behaviour. 
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 /* TODO:
00329 GstIterator*    gst_bin_iterate_elements     (GstBin *bin);
00330 GstIterator*    gst_bin_iterate_sorted       (GstBin *bin);
00331 GstIterator*    gst_bin_iterate_recurse      (GstBin *bin);
00332 
00333 GstIterator*    gst_bin_iterate_sinks        (GstBin *bin);
00334 GstIterator*    gst_bin_iterate_sources      (GstBin *bin);
00335 GstIterator*    gst_bin_iterate_all_by_interface (GstBin *bin, GType iface);
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   //C++ methods used to invoke GTK+ virtual functions:
00412 #ifdef GLIBMM_VFUNCS_ENABLED
00413 #endif //GLIBMM_VFUNCS_ENABLED
00414 
00415 protected:
00416   //GTK+ Virtual Functions (override these to change behaviour):
00417 #ifdef GLIBMM_VFUNCS_ENABLED
00418 #endif //GLIBMM_VFUNCS_ENABLED
00419 
00420   //Default Signal Handlers::
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 } //namespace Gst
00430 
00431 
00432 namespace Glib
00433 {
00442   Glib::RefPtr<Gst::Bin> wrap(GstBin* object, bool take_copy = false);
00443 }
00444 
00445 
00446 #endif /* _GSTREAMERMM_BIN_H */
00447 

Generated on Sun Jul 27 17:07:20 2008 for gstreamermm by  doxygen 1.5.4