- Main Page
- Modules
- Namespaces
- Classes
- Files

# segment.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GSTREAMERMM_SEGMENT_H
    00004 #define _GSTREAMERMM_SEGMENT_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 <gstreamermm/clock.h>
    00029 #include <gstreamermm/format.h>
    00030 #include <gstreamermm/event.h>
    00031
    00032
    00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00034 extern "C" { typedef struct _GstSegment GstSegment; }
    00035 #endif
    00036
    00037 namespace Gst
    00038 {
    00039
    00096 class Segment
    00097 {
    00098   public:
    00099 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00100   typedef Segment CppObjectType;
    00101   typedef GstSegment BaseObjectType;
    00102
    00103   static GType get_type() G_GNUC_CONST;
    00104 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00105
    00106   Segment();
    00107
    00108   explicit Segment(GstSegment* gobject, bool make_a_copy = true);
    00109
    00110   Segment(const Segment& other);
    00111   Segment& operator=(const Segment& other);
    00112
    00113   ~Segment();
    00114
    00115   void swap(Segment& other);
    00116
    00118   GstSegment*       gobj()       { return gobject_; }
    00119
    00121   const GstSegment* gobj() const { return gobject_; }
    00122
    00124   GstSegment* gobj_copy() const;
    00125
    00126 protected:
    00127   GstSegment* gobject_;
    00128
    00129 private:
    00130
    00131
    00132 public:
    00133
    00156   bool clip(Format format, gint64 start, gint64 stop, gint64& clip_start, gint64& clip_stop) const;
    00157
    00165   void init(Format format);
    00166
    00176   void set_duration(Format format, gint64 duration);
    00177
    00185   void set_last_stop(Format format, gint64 position);
    00186
    00198   void set_newsegment(bool update, double rate, Format format, gint64 start, gint64 stop, gint64 time);
    00199
    00209   void set_newsegment(bool update, double rate, double applied_rate, Format format, gint64 start, gint64 stop, gint64 time);
    00210
    00248   void set_seek(double rate, Format format, SeekFlags flags, SeekType start_type, gint64 start, SeekType stop_type, gint64 stop, bool& update);
    00249
    00265   gint64 convert_to_running_time(Format format, gint64 position) const;
    00266
    00282   gint64 convert_to_stream_time(Format format, gint64 position) const;
    00283
    00284
    00285 };
    00286
    00287 } //namespace Gst
    00288
    00289
    00290 namespace Gst
    00291 {
    00292
    00297 inline void swap(Segment& lhs, Segment& rhs)
    00298   { lhs.swap(rhs); }
    00299
    00300 } // namespace Gst
    00301
    00302 namespace Glib
    00303 {
    00304
    00313 Gst::Segment wrap(GstSegment* object, bool take_copy = false);
    00314
    00315 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00316 template <>
    00317 class Value<Gst::Segment> : public Glib::Value_Boxed<Gst::Segment>
    00318 {};
    00319 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00320
    00321 } // namespace Glib
    00322
    00323
    00324 #endif /* _GSTREAMERMM_SEGMENT_H */
    00325