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 #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
00037
00038
00039 namespace Gst
00040 { class BaseTransform_Class; }
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
00152 class BaseTransform
00153 : public Element
00154 {
00155
00156 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00157
00158 public:
00159 typedef BaseTransform CppObjectType;
00160 typedef BaseTransform_Class CppClassType;
00161 typedef GstBaseTransform BaseObjectType;
00162 typedef GstBaseTransformClass BaseClassType;
00163
00164 private: friend class BaseTransform_Class;
00165 static CppClassType basetransform_class_;
00166
00167 private:
00168
00169 BaseTransform(const BaseTransform&);
00170 BaseTransform& operator=(const BaseTransform&);
00171
00172 protected:
00173 explicit BaseTransform(const Glib::ConstructParams& construct_params);
00174 explicit BaseTransform(GstBaseTransform* castitem);
00175
00176 #endif
00177
00178 public:
00179 virtual ~BaseTransform();
00180
00181 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00182 static GType get_type() G_GNUC_CONST;
00183
00184
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
00293 void suggest(const Glib::RefPtr<Gst::Caps>& caps, guint size);
00294
00301 void reconfigure();
00302
00305 void lock();
00306
00310 void unlock();
00311
00314 Glib::RefPtr<Gst::Pad> get_sink_pad();
00315 Glib::RefPtr<const Gst::Pad> get_sink_pad() const;
00316
00319 Glib::RefPtr<Gst::Pad> get_src_pad();
00320 Glib::RefPtr<const Gst::Pad> get_src_pad() const;
00321
00322 #ifdef GLIBMM_PROPERTIES_ENABLED
00323
00329 Glib::PropertyProxy<bool> property_qos() ;
00330 #endif //#GLIBMM_PROPERTIES_ENABLED
00331
00332 #ifdef GLIBMM_PROPERTIES_ENABLED
00333
00339 Glib::PropertyProxy_ReadOnly<bool> property_qos() const;
00340 #endif //#GLIBMM_PROPERTIES_ENABLED
00341
00342
00346 #ifdef GLIBMM_VFUNCS_ENABLED
00347 virtual Glib::RefPtr<Gst::Caps> transform_caps_vfunc(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps);
00348 #endif //GLIBMM_VFUNCS_ENABLED
00349
00350
00354 #ifdef GLIBMM_VFUNCS_ENABLED
00355 virtual void fixate_caps_vfunc(PadDirection direction, const Glib::RefPtr<Gst::Caps>& caps, const Glib::RefPtr<Gst::Caps>& othercaps);
00356 #endif //GLIBMM_VFUNCS_ENABLED
00357
00358
00359
00360
00361
00363
00364
00365
00366
00367
00368
00369
00370
00371
00373
00374
00375
00376
00377
00378
00379
00381
00382
00383
00384
00385
00386
00388
00389
00390
00391
00392
00393
00394
00396
00397
00398
00399
00400
00402
00403
00404
00405
00406
00407
00408
00409
00414 #ifdef GLIBMM_VFUNCS_ENABLED
00415 virtual FlowReturn transform_vfunc(const Glib::RefPtr<Gst::Buffer>& inbuf, const Glib::RefPtr<Gst::Buffer>& outbuf);
00416 #endif //GLIBMM_VFUNCS_ENABLED
00417
00418
00422 #ifdef GLIBMM_VFUNCS_ENABLED
00423 virtual FlowReturn transform_ip_vfunc(const Glib::RefPtr<Gst::Buffer>& buf);
00424 #endif //GLIBMM_VFUNCS_ENABLED
00425
00426
00427 #ifdef GLIBMM_VFUNCS_ENABLED
00428
00433 virtual FlowReturn prepare_output_buffer_vfunc(const Glib::RefPtr<Gst::Buffer>& input, int size, const Glib::RefPtr<Gst::Caps>& caps, Glib::RefPtr<Gst::Buffer>& buffer);
00434 #endif //GLIBMM_VFUNCS_ENABLED
00435
00436
00437
00438
00440
00441
00442
00447 #ifdef GLIBMM_VFUNCS_ENABLED
00448 virtual void before_transform_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer);
00449 #endif //GLIBMM_VFUNCS_ENABLED
00450
00451
00452 protected:
00453
00454
00455 public:
00456
00457 public:
00458
00459 #ifdef GLIBMM_VFUNCS_ENABLED
00460 #endif //GLIBMM_VFUNCS_ENABLED
00461
00462 protected:
00463
00464 #ifdef GLIBMM_VFUNCS_ENABLED
00465 #endif //GLIBMM_VFUNCS_ENABLED
00466
00467
00468 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00469 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00470
00471
00472 };
00473
00474 }
00475
00476
00477 namespace Glib
00478 {
00487 Glib::RefPtr<Gst::BaseTransform> wrap(GstBaseTransform* object, bool take_copy = false);
00488 }
00489
00490
00491 #endif
00492