- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# 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
    00095 class Segment
    00096 {
    00097   public:
    00098 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00099   typedef Segment CppObjectType;
    00100   typedef GstSegment BaseObjectType;
    00101
    00102   static GType get_type() G_GNUC_CONST;
    00103 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00104
    00105   Segment();
    00106
    00107   explicit Segment(GstSegment* gobject, bool make_a_copy = true);
    00108
    00109   Segment(const Segment& other);
    00110   Segment& operator=(const Segment& other);
    00111
    00112   ~Segment();
    00113
    00114   void swap(Segment& other);
    00115
    00117   GstSegment*       gobj()       { return gobject_; }
    00118
    00120   const GstSegment* gobj() const { return gobject_; }
    00121
    00123   GstSegment* gobj_copy() const;
    00124
    00125 protected:
    00126   GstSegment* gobject_;
    00127
    00128 private:
    00129
    00130
    00131 public:
    00132
    00155   bool clip(Format format, gint64 start, gint64 stop, gint64& clip_start, gint64& clip_stop) const;
    00156
    00164   void init(Format format);
    00165
    00175   void set_duration(Format format, gint64 duration);
    00176
    00184   void set_last_stop(Format format, gint64 position);
    00185
    00197   void set_newsegment(bool update, double rate, Format format, gint64 start, gint64 stop, gint64 time);
    00198
    00208   void set_newsegment(bool update, double rate, double applied_rate, Format format, gint64 start, gint64 stop, gint64 time);
    00209
    00247   void set_seek(double rate, Format format, SeekFlags flags, SeekType start_type, gint64 start, SeekType stop_type, gint64 stop, bool& update);
    00248
    00264   gint64 to_running_time(Format format, gint64 position) const;
    00265
    00281   gint64 to_stream_time(Format format, gint64 position) const;
    00282
    00292   gint64 to_position(Format format, gint64 running_time) const;
    00293
    00303   bool set_running_time(Format format, gint64 running_time);
    00304
    00305
    00306 };
    00307
    00308 } //namespace Gst
    00309
    00310
    00311 namespace Gst
    00312 {
    00313
    00318 inline void swap(Segment& lhs, Segment& rhs)
    00319   { lhs.swap(rhs); }
    00320
    00321 } // namespace Gst
    00322
    00323 namespace Glib
    00324 {
    00325
    00334 Gst::Segment wrap(GstSegment* object, bool take_copy = false);
    00335
    00336 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00337 template <>
    00338 class Value<Gst::Segment> : public Glib::Value_Boxed<Gst::Segment>
    00339 {};
    00340 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00341
    00342 } // namespace Glib
    00343
    00344
    00345 #endif /* _GSTREAMERMM_SEGMENT_H */
    00346