- Main Page
- Modules
- Namespaces
- Classes
- Files

# basetransform.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GSTREAMERMM_BASETRANSFORM_H
    00004 #define _GSTREAMERMM_BASETRANSFORM_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 <gst/base/gstbasetransform.h>
    00029 #include <gstreamermm/element.h>
    00030 #include <gstreamermm/pad.h>
    00031
    00032
    00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00034 typedef struct _GstBaseTransform GstBaseTransform;
    00035 typedef struct _GstBaseTransformClass GstBaseTransformClass;
    00036 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00037
    00038
    00039 namespace Gst
    00040 { class BaseTransform_Class; } // namespace Gst
    00041 namespace Gst
    00042 {
    00045 const Glib::ustring BASE_TRANSFORM_SINK_NAME = GST_BASE_TRANSFORM_SINK_NAME;
    00046
    00049 const Glib::ustring BASE_TRANSFORM_SRC_NAME = GST_BASE_TRANSFORM_SRC_NAME;
    00050
    00154 class BaseTransform
    00155 : public Element
    00156 {
    00157
    00158 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00159
    00160 public:
    00161   typedef BaseTransform CppObjectType;
    00162   typedef BaseTransform_Class CppClassType;
    00163   typedef GstBaseTransform BaseObjectType;
    00164   typedef GstBaseTransformClass BaseClassType;
    00165
    00166 private:  friend class BaseTransform_Class;
    00167   static CppClassType basetransform_class_;
    00168
    00169 private:
    00170   // noncopyable
    00171   BaseTransform(const BaseTransform&);
    00172   BaseTransform& operator=(const BaseTransform&);
    00173
    00174 protected:
    00175   explicit BaseTransform(const Glib::ConstructParams& construct_params);
    00176   explicit BaseTransform(GstBaseTransform* castitem);
    00177
    00178 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00179
    00180 public:
    00181   virtual ~BaseTransform();
    00182
    00183 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00184   static GType get_type()      G_GNUC_CONST;
    00185   static GType get_base_type() G_GNUC_CONST;
    00186 #endif
    00187
    00189   GstBaseTransform*       gobj()       { return reinterpret_cast<GstBaseTransform*>(gobject_); }
    00190
    00192   const GstBaseTransform* gobj() const { return reinterpret_cast<GstBaseTransform*>(gobject_); }
    00193
    00195   GstBaseTransform* gobj_copy();
    00196
    00197 private:
    00198
    00199
    00200 public:
    00201
    00207   bool is_passthrough() const;
    00208
    00218   void set_passthrough(bool passthrough);
    00219
    00225   bool is_in_place() const;
    00226
    00238   void set_in_place(bool in_place);
    00239
    00247   bool is_qos_enabled() const;
    00248
    00256   void set_qos_enabled(bool enabled);
    00257
    00270   void update_qos(double proportion, ClockTimeDiff diff, ClockTime timestamp);
    00271
    00284   void set_gap_aware(bool gap_aware);
    00285
    00288   void lock();
    00289
    00293   void unlock();
    00294
    00297    Glib::RefPtr<Gst::Pad> get_sink_pad() const;
    00298
    00301    Glib::RefPtr<Gst::Pad> get_src_pad() const;
    00302
    00303   #ifdef GLIBMM_PROPERTIES_ENABLED
    00304
    00310   Glib::PropertyProxy<bool> property_qos() ;
    00311 #endif //#GLIBMM_PROPERTIES_ENABLED
    00312
    00313 #ifdef GLIBMM_PROPERTIES_ENABLED
    00314
    00320   Glib::PropertyProxy_ReadOnly<bool> property_qos() const;
    00321 #endif //#GLIBMM_PROPERTIES_ENABLED
    00322
    00323
    00324   //TODO: bool vfuncs are a problem because if the base class does not
    00325   //implement one (which occurs often in GStreamer -- don't know why) the
    00326   //default generated callback returns false because of the "typedef RType;
    00327   //return RType()" statements (see discussion about bug #530416 in element.hg
    00328   //for more).  I've filed a patch for the bug which will allow a custom return
    00329   //to be specified for the callback, in which case the bool vfuncs can be made
    00330   //to return true which would then work.
    00331
    00332
    00336   #ifdef GLIBMM_VFUNCS_ENABLED
    00337   virtual Glib::RefPtr<Gst::Caps> transform_caps_vfunc(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps);
    00338 #endif //GLIBMM_VFUNCS_ENABLED
    00339
    00340
    00344   #ifdef GLIBMM_VFUNCS_ENABLED
    00345   virtual void fixate_caps_vfunc(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps, const Glib::RefPtr<Gst::Caps>& othercaps);
    00346 #endif //GLIBMM_VFUNCS_ENABLED
    00347
    00348
    00350    //* given caps, calculate the size in bytes of a buffer on the other pad with
    00351    //* the given other caps. The default implementation uses
    00352    //* get_unit_size_vfunc() and keeps the number of units the same.
    00353    //*/
    00354   //_WRAP_VFUNC(bool transform_size(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps, guint size, const Glib::RefPtr<Gst::Caps>& othercaps, guint& othersize), "transform_size")
    00355
    00357    //* unit for the given caps.
    00358    //*/
    00359   //_WRAP_VFUNC(bool get_unit_size(const Glib::RefPtr<Gst::Caps>& caps, guint& size) const, "get_unit_size")
    00360
    00362    //*/
    00363   //_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& incaps, const Glib::RefPtr<Gst::Caps>& outcaps), "set_caps")
    00364
    00366    //* external resources.
    00367    //*/
    00368   //_WRAP_VFUNC(bool start(), "start")
    00369
    00371    //* external resources.
    00372    //*/
    00373   //_WRAP_VFUNC(bool stop(), "stop")
    00374
    00376    //* if the base class should forward the event.
    00377    //*/
    00378   //_WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
    00379
    00380
    00385   #ifdef GLIBMM_VFUNCS_ENABLED
    00386   virtual FlowReturn transform_vfunc(const Glib::RefPtr<Gst::Buffer>& inbuf, const Glib::RefPtr<Gst::Buffer>& outbuf);
    00387 #endif //GLIBMM_VFUNCS_ENABLED
    00388
    00389
    00393   #ifdef GLIBMM_VFUNCS_ENABLED
    00394   virtual FlowReturn transform_ip_vfunc(const Glib::RefPtr<Gst::Buffer>& buf);
    00395 #endif //GLIBMM_VFUNCS_ENABLED
    00396
    00397
    00398   //TODO: Should "passthrough_on_same_caps" variable in GstBaseTransformClass
    00399   //be wrapped?
    00400
    00401 //TODO: #m4 __CONVERSION(`Glib::RefPtr<Gst::Buffer>&', `GstBuffer**', `&(($3)->gobj())')
    00402 //#m4 __CONVERSION(`GstBuffer**', `Glib::RefPtr<Gst::Buffer>&', `Gst::wrap(*($3, true))')
    00403   //_WRAP_VFUNC(FlowReturn prepare_output_buffer(const Glib::RefPtr<Gst::Buffer>& input, int size, const Glib::RefPtr<Gst::Caps>& caps, Glib::RefPtr<Gst::Buffer>&), "prepare_output_buffer")
    00404
    00406    //*/
    00407   //_WRAP_VFUNC(bool src_event(const Glib::RefPtr<Gst::Event>& event), "src_event")
    00408
    00409
    00410 public:
    00411
    00412 public:
    00413   //C++ methods used to invoke GTK+ virtual functions:
    00414 #ifdef GLIBMM_VFUNCS_ENABLED
    00415 #endif //GLIBMM_VFUNCS_ENABLED
    00416
    00417 protected:
    00418   //GTK+ Virtual Functions (override these to change behaviour):
    00419 #ifdef GLIBMM_VFUNCS_ENABLED
    00420 #endif //GLIBMM_VFUNCS_ENABLED
    00421
    00422   //Default Signal Handlers::
    00423 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00424 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00425
    00426
    00427 };
    00428
    00429 } //namespace Gst
    00430
    00431
    00432 namespace Glib
    00433 {
    00442   Glib::RefPtr<Gst::BaseTransform> wrap(GstBaseTransform* object, bool take_copy = false);
    00443 }
    00444
    00445
    00446 #endif /* _GSTREAMERMM_BASETRANSFORM_H */
    00447