gstreamermm: task.h Source File

- Main Page
- Modules
- Namespaces
- Classes
- Files

# task.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GSTREAMERMM_TASK_H
    00004 #define _GSTREAMERMM_TASK_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/gsttask.h>
    00029 #include <gstreamermm/object.h>
    00030
    00031
    00032 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00033 typedef struct _GstTask GstTask;
    00034 typedef struct _GstTaskClass GstTaskClass;
    00035 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00036
    00037
    00038 namespace Gst
    00039 { class Task_Class; } // namespace Gst
    00040 namespace Gst
    00041 {
    00042
    00048 enum TaskState
    00049 {
    00050   TASK_STARTED,
    00051   TASK_STOPPED,
    00052   TASK_PAUSED
    00053 };
    00054
    00055 } // namespace Gst
    00056
    00057
    00058 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00059 namespace Glib
    00060 {
    00061
    00062 template <>
    00063 class Value<Gst::TaskState> : public Glib::Value_Enum<Gst::TaskState>
    00064 {
    00065 public:
    00066   static GType value_type() G_GNUC_CONST;
    00067 };
    00068
    00069 } // namespace Glib
    00070 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00071
    00072
    00073 namespace Gst
    00074 {
    00075
    00076
    00108 class Task : public Object
    00109 {
    00110
    00111 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00112
    00113 public:
    00114   typedef Task CppObjectType;
    00115   typedef Task_Class CppClassType;
    00116   typedef GstTask BaseObjectType;
    00117   typedef GstTaskClass BaseClassType;
    00118
    00119 private:  friend class Task_Class;
    00120   static CppClassType task_class_;
    00121
    00122 private:
    00123   // noncopyable
    00124   Task(const Task&);
    00125   Task& operator=(const Task&);
    00126
    00127 protected:
    00128   explicit Task(const Glib::ConstructParams& construct_params);
    00129   explicit Task(GstTask* castitem);
    00130
    00131 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00132
    00133 public:
    00134   virtual ~Task();
    00135
    00136 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00137   static GType get_type()      G_GNUC_CONST;
    00138   static GType get_base_type() G_GNUC_CONST;
    00139 #endif
    00140
    00142   GstTask*       gobj()       { return reinterpret_cast<GstTask*>(gobject_); }
    00143
    00145   const GstTask* gobj() const { return reinterpret_cast<GstTask*>(gobject_); }
    00146
    00148   GstTask* gobj_copy();
    00149
    00150 private:
    00151
    00152
    00153 public:
    00157   typedef sigc::slot<void> SlotTask;
    00158
    00159 protected:
    00160   Task(const SlotTask& task_slot);
    00161
    00162 public:
    00173   static Glib::RefPtr<Task> create(const SlotTask& task_slot);
    00174 ;
    00175
    00176
    00182   static void cleanup_all();
    00183
    00189   TaskState get_state() const;
    00190
    00203   bool join();
    00204
    00213   bool pause();
    00214
    00224   void set_lock(Glib::StaticRecMutex& mutex);
    00225
    00232   bool start();
    00233
    00241   bool stop();
    00242
    00243 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00244 private:
    00245   SlotTask* slot;
    00246   bool _slot_set(bool mark_set = false) const;
    00247 #endif
    00248
    00249
    00250 public:
    00251
    00252 public:
    00253   //C++ methods used to invoke GTK+ virtual functions:
    00254 #ifdef GLIBMM_VFUNCS_ENABLED
    00255 #endif //GLIBMM_VFUNCS_ENABLED
    00256
    00257 protected:
    00258   //GTK+ Virtual Functions (override these to change behaviour):
    00259 #ifdef GLIBMM_VFUNCS_ENABLED
    00260 #endif //GLIBMM_VFUNCS_ENABLED
    00261
    00262   //Default Signal Handlers::
    00263 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00264 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00265
    00266
    00267 };
    00268
    00269 } // namespace Gst
    00270
    00271
    00272 namespace Glib
    00273 {
    00282   Glib::RefPtr<Gst::Task> wrap(GstTask* object, bool take_copy = false);
    00283 }
    00284
    00285
    00286 #endif /* _GSTREAMERMM_TASK_H */
    00287