00001
00002
00003 #ifndef _GSTREAMERMM_BASETRANSFORM_H
00004 #define _GSTREAMERMM_BASETRANSFORM_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 <gst/base/gstbasetransform.h>
00031 #include <gstreamermm/element.h>
00032 #include <gstreamermm/pad.h>
00033
00034
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 typedef struct _GstBaseTransform GstBaseTransform;
00037 typedef struct _GstBaseTransformClass GstBaseTransformClass;
00038 #endif
00039
00040
00041 namespace Gst
00042 { class BaseTransform_Class; }
00043 namespace Gst
00044 {
00047 const Glib::ustring BASE_TRANSFORM_SINK_NAME = GST_BASE_TRANSFORM_SINK_NAME;
00048
00051 const Glib::ustring BASE_TRANSFORM_SRC_NAME = GST_BASE_TRANSFORM_SRC_NAME;
00052
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
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
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();
00208
00218 void set_passthrough(bool passthrough);
00219
00225 bool is_in_place();
00226
00238 void set_in_place(bool in_place);
00239
00247 bool is_qos_enabled();
00248
00256 void set_qos_enabled(bool enabled);
00257
00267 void update_qos(double proportion, ClockTimeDiff diff, ClockTime timestamp);
00268
00281 void set_gap_aware(bool gap_aware);
00282
00285 void lock();
00286
00290 void unlock();
00291
00294 Glib::RefPtr<Pad> get_sink_pad() const;
00295
00298 Glib::RefPtr<Pad> get_src_pad() const;
00299
00300 #ifdef GLIBMM_PROPERTIES_ENABLED
00301
00307 Glib::PropertyProxy<bool> property_qos() ;
00308 #endif //#GLIBMM_PROPERTIES_ENABLED
00309
00310 #ifdef GLIBMM_PROPERTIES_ENABLED
00311
00317 Glib::PropertyProxy_ReadOnly<bool> property_qos() const;
00318 #endif //#GLIBMM_PROPERTIES_ENABLED
00319
00320
00324 #ifdef GLIBMM_VFUNCS_ENABLED
00325 virtual Glib::RefPtr<Caps> transform_caps_vfunc(PadDirection direction, const Glib::RefPtr<Caps>& caps);
00326 #endif //GLIBMM_VFUNCS_ENABLED
00327
00328
00332 #ifdef GLIBMM_VFUNCS_ENABLED
00333 virtual void fixate_caps_vfunc(PadDirection direction, const Glib::RefPtr<Caps>& caps, const Glib::RefPtr<Caps>& othercaps);
00334 #endif //GLIBMM_VFUNCS_ENABLED
00335
00336
00342 #ifdef GLIBMM_VFUNCS_ENABLED
00343 virtual bool transform_size_vfunc(PadDirection direction, const Glib::RefPtr<Caps>& caps, guint size, const Glib::RefPtr<Caps>& othercaps, guint* othersize);
00344 #endif //GLIBMM_VFUNCS_ENABLED
00345
00346
00350 #ifdef GLIBMM_VFUNCS_ENABLED
00351 virtual bool get_unit_size_vfunc(const Glib::RefPtr<Caps>& caps, guint* size);
00352 #endif //GLIBMM_VFUNCS_ENABLED
00353
00354
00357 #ifdef GLIBMM_VFUNCS_ENABLED
00358 virtual bool set_caps_vfunc(const Glib::RefPtr<Caps>& incaps, const Glib::RefPtr<Caps>& outcaps);
00359 #endif //GLIBMM_VFUNCS_ENABLED
00360
00361
00365 #ifdef GLIBMM_VFUNCS_ENABLED
00366 virtual bool start_vfunc();
00367 #endif //GLIBMM_VFUNCS_ENABLED
00368
00369
00373 #ifdef GLIBMM_VFUNCS_ENABLED
00374 virtual bool stop_vfunc();
00375 #endif //GLIBMM_VFUNCS_ENABLED
00376
00377
00381 #ifdef GLIBMM_VFUNCS_ENABLED
00382 virtual bool event_vfunc(const Glib::RefPtr<Event>& event);
00383 #endif //GLIBMM_VFUNCS_ENABLED
00384
00385
00390 #ifdef GLIBMM_VFUNCS_ENABLED
00391 virtual FlowReturn transform_vfunc(const Glib::RefPtr<Buffer>& inbuf, const Glib::RefPtr<Buffer>& outbuf);
00392 #endif //GLIBMM_VFUNCS_ENABLED
00393
00394
00398 #ifdef GLIBMM_VFUNCS_ENABLED
00399 virtual FlowReturn transform_ip_vfunc(const Glib::RefPtr<Buffer>& buf);
00400 #endif //GLIBMM_VFUNCS_ENABLED
00401
00402
00403
00404
00405
00406
00407
00408
00409
00412 #ifdef GLIBMM_VFUNCS_ENABLED
00413 virtual bool src_event_vfunc(const Glib::RefPtr<Event>& event);
00414 #endif //GLIBMM_VFUNCS_ENABLED
00415
00416
00417 public:
00418
00419 public:
00420
00421 #ifdef GLIBMM_VFUNCS_ENABLED
00422 #endif //GLIBMM_VFUNCS_ENABLED
00423
00424 protected:
00425
00426 #ifdef GLIBMM_VFUNCS_ENABLED
00427 #endif //GLIBMM_VFUNCS_ENABLED
00428
00429
00430 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00431 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00432
00433
00434 };
00435
00436 }
00437
00438
00439 namespace Glib
00440 {
00449 Glib::RefPtr<Gst::BaseTransform> wrap(GstBaseTransform* object, bool take_copy = false);
00450 }
00451
00452
00453 #endif
00454