00001
00002
00003 #ifndef _GSTREAMERMM_MIXER_H
00004 #define _GSTREAMERMM_MIXER_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/interfaces/mixeroptions.h>
00029 #include <gstreamermm/mixertrack.h>
00030 #include <glibmm/interface.h>
00031
00032
00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00034 typedef struct _GstMixer GstMixer;
00035 typedef struct _GstMixerClass GstMixerClass;
00036 #endif
00037
00038
00039 namespace Gst
00040 { class Mixer_Class; }
00041 namespace Gst
00042 {
00043
00049 enum MixerType
00050 {
00051 MIXER_HARDWARE,
00052 MIXER_SOFTWARE
00053 };
00054
00055 }
00056
00057
00058 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00059 namespace Glib
00060 {
00061
00062 template <>
00063 class Value<Gst::MixerType> : public Glib::Value_Enum<Gst::MixerType>
00064 {
00065 public:
00066 static GType value_type() G_GNUC_CONST;
00067 };
00068
00069 }
00070 #endif
00071
00072
00073 namespace Gst
00074 {
00075
00087 enum MixerFlags
00088 {
00089 MIXER_FLAG_NONE = 0,
00090 MIXER_FLAG_AUTO_NOTIFICATIONS = 1<<0
00091 };
00092
00094 inline MixerFlags operator|(MixerFlags lhs, MixerFlags rhs)
00095 { return static_cast<MixerFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00096
00098 inline MixerFlags operator&(MixerFlags lhs, MixerFlags rhs)
00099 { return static_cast<MixerFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00100
00102 inline MixerFlags operator^(MixerFlags lhs, MixerFlags rhs)
00103 { return static_cast<MixerFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00104
00106 inline MixerFlags operator~(MixerFlags flags)
00107 { return static_cast<MixerFlags>(~static_cast<unsigned>(flags)); }
00108
00110 inline MixerFlags& operator|=(MixerFlags& lhs, MixerFlags rhs)
00111 { return (lhs = static_cast<MixerFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00112
00114 inline MixerFlags& operator&=(MixerFlags& lhs, MixerFlags rhs)
00115 { return (lhs = static_cast<MixerFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00116
00118 inline MixerFlags& operator^=(MixerFlags& lhs, MixerFlags rhs)
00119 { return (lhs = static_cast<MixerFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00120
00121 }
00122
00123
00124 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00125 namespace Glib
00126 {
00127
00128 template <>
00129 class Value<Gst::MixerFlags> : public Glib::Value_Flags<Gst::MixerFlags>
00130 {
00131 public:
00132 static GType value_type() G_GNUC_CONST;
00133 };
00134
00135 }
00136 #endif
00137
00138
00139 namespace Gst
00140 {
00141
00145 enum MixerMessageType
00146 {
00147 MIXER_MESSAGE_INVALID,
00148 MIXER_MESSAGE_MUTE_TOGGLED,
00149 MIXER_MESSAGE_RECORD_TOGGLED,
00150 MIXER_MESSAGE_VOLUME_CHANGED,
00151 MIXER_MESSAGE_OPTION_CHANGED,
00152 MIXER_MESSAGE_OPTIONS_LIST_CHANGED,
00153 MIXER_MESSAGE_MIXER_CHANGED
00154 };
00155
00156 }
00157
00158
00159 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00160 namespace Glib
00161 {
00162
00163 template <>
00164 class Value<Gst::MixerMessageType> : public Glib::Value_Enum<Gst::MixerMessageType>
00165 {
00166 public:
00167 static GType value_type() G_GNUC_CONST;
00168 };
00169
00170 }
00171 #endif
00172
00173
00174 namespace Gst
00175 {
00176
00177
00178 class MixerOptions;
00179 class MixerTrack;
00180
00185 class Mixer : public Glib::Interface
00186 {
00187
00188 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00189
00190 public:
00191 typedef Mixer CppObjectType;
00192 typedef Mixer_Class CppClassType;
00193 typedef GstMixer BaseObjectType;
00194 typedef GstMixerClass BaseClassType;
00195
00196 private:
00197 friend class Mixer_Class;
00198 static CppClassType mixer_class_;
00199
00200
00201 Mixer(const Mixer&);
00202 Mixer& operator=(const Mixer&);
00203
00204 protected:
00205 Mixer();
00206
00213 explicit Mixer(const Glib::Interface_Class& interface_class);
00214
00215 public:
00216
00217
00218
00219 explicit Mixer(GstMixer* castitem);
00220
00221 protected:
00222 #endif
00223
00224 public:
00225 virtual ~Mixer();
00226
00227 static void add_interface(GType gtype_implementer);
00228
00229 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00230 static GType get_type() G_GNUC_CONST;
00231 static GType get_base_type() G_GNUC_CONST;
00232 #endif
00233
00235 GstMixer* gobj() { return reinterpret_cast<GstMixer*>(gobject_); }
00236
00238 const GstMixer* gobj() const { return reinterpret_cast<GstMixer*>(gobject_); }
00239
00240 private:
00241
00242
00243 public:
00244
00245
00249 Glib::ListHandle< Glib::RefPtr<Gst::MixerTrack> > list_tracks();
00250
00251
00255 Glib::ListHandle< Glib::RefPtr<const Gst::MixerTrack> > list_tracks() const;
00256
00263 Glib::ArrayHandle<int> get_volume(const Glib::RefPtr<const Gst::MixerTrack>& track) const;
00264
00265
00276 void set_volume(const Glib::RefPtr<Gst::MixerTrack>& track, const Glib::ArrayHandle<int>& volumes);
00277
00278
00285 void set_mute(const Glib::RefPtr<Gst::MixerTrack>& track, bool mute);
00286
00295 void set_record(const Glib::RefPtr<Gst::MixerTrack>& track, bool record);
00296
00301 void set_option(const Glib::RefPtr<Gst::MixerOptions>& opts, const Glib::ustring& value);
00302
00312 void mute_toggled(const Glib::RefPtr<Gst::MixerTrack>& track, bool mute);
00313
00323 void record_toggled(const Glib::RefPtr<Gst::MixerTrack>& track, bool record);
00324
00334 void volume_changed(const Glib::RefPtr<Gst::MixerTrack>& track, const Glib::ArrayHandle<int>& volumes);
00335
00345 void option_changed(const Glib::RefPtr<Gst::MixerOptions>& opts, const Glib::ustring& value);
00346
00362 void options_list_changed(const Glib::RefPtr<Gst::MixerOptions>& opts);
00363
00368 Glib::ustring get_option(const Glib::RefPtr<const Gst::MixerOptions>& opts) const;
00369
00380 void mixer_changed();
00381
00385 Gst::MixerFlags get_mixer_flags() const;
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400 #ifdef GLIBMM_VFUNCS_ENABLED
00401
00402
00403 virtual Glib::ArrayHandle<int> get_volume_vfunc(const Glib::RefPtr<const Gst::MixerTrack>& track) const;
00404 #endif //GLIBMM_VFUNCS_ENABLED
00405
00406
00407
00408
00409
00410 #ifdef GLIBMM_VFUNCS_ENABLED
00411 virtual void set_mute_vfunc(const Glib::RefPtr<Gst::MixerTrack>& track, bool mute);
00412 #endif //GLIBMM_VFUNCS_ENABLED
00413
00414 #ifdef GLIBMM_VFUNCS_ENABLED
00415 virtual void set_record_vfunc(const Glib::RefPtr<Gst::MixerTrack>& track, bool record);
00416 #endif //GLIBMM_VFUNCS_ENABLED
00417
00418
00419 #ifdef GLIBMM_VFUNCS_ENABLED
00420 virtual void set_option_vfunc(const Glib::RefPtr<Gst::MixerOptions>& opts, const Glib::ustring& value);
00421 #endif //GLIBMM_VFUNCS_ENABLED
00422
00423
00424
00425
00426
00427 protected:
00428
00429
00430 public:
00431
00432 public:
00433
00434 #ifdef GLIBMM_VFUNCS_ENABLED
00435 #endif //GLIBMM_VFUNCS_ENABLED
00436
00437 protected:
00438
00439 #ifdef GLIBMM_VFUNCS_ENABLED
00440 #endif //GLIBMM_VFUNCS_ENABLED
00441
00442
00443 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00444 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00445
00446
00447 };
00448
00449 }
00450
00451
00452 namespace Glib
00453 {
00462 Glib::RefPtr<Gst::Mixer> wrap(GstMixer* object, bool take_copy = false);
00463
00464 }
00465
00466
00467 #endif
00468