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 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00010 
00011 /* gstreamermm - a C++ wrapper for gstreamer
00012  *
00013  * Copyright 2008 The gstreamermm Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <gstreamermm/clock.h>
00031 #include <gstreamermm/format.h>
00032 #include <gstreamermm/event.h>
00033 
00034 
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 extern "C" { typedef struct _GstSegment GstSegment; }
00037 #endif
00038 
00039 namespace Gst
00040 {
00041 
00098 class Segment
00099 {
00100   public:
00101 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00102   typedef Segment CppObjectType;
00103   typedef GstSegment BaseObjectType;
00104 
00105   static GType get_type() G_GNUC_CONST;
00106 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00107 
00108   Segment();
00109 
00110   explicit Segment(GstSegment* gobject, bool make_a_copy = true);
00111 
00112   Segment(const Segment& other);
00113   Segment& operator=(const Segment& other);
00114 
00115   ~Segment();
00116 
00117   void swap(Segment& other);
00118 
00120   GstSegment*       gobj()       { return gobject_; }
00121 
00123   const GstSegment* gobj() const { return gobject_; }
00124 
00126   GstSegment* gobj_copy() const;
00127 
00128 protected:
00129   GstSegment* gobject_;
00130 
00131 private:
00132 
00133 
00134 public:
00135   
00158   bool clip(Format format, gint64 start, gint64 stop, gint64& clip_start, gint64& clip_stop);
00159   
00167   void init(Format format);
00168   
00178   void set_duration(Format format, gint64 duration);
00179   
00187   void set_last_stop(Format format, gint64 position);
00188   
00200   void set_newsegment(bool update, double rate, Format format, gint64 start, gint64 stop, gint64 time);
00201   
00211   void set_newsegment(bool update, double rate, double applied_rate, Format format, gint64 start, gint64 stop, gint64 time);
00212   
00249   void set_seek(double rate, Format format, SeekFlags flags, SeekType start_type, gint64 start, SeekType stop_type, gint64 stop, bool& update);
00250   
00266   gint64 convert_to_running_time(Format format, gint64 position);
00267   
00283   gint64 convert_to_stream_time(Format format, gint64 position);
00284 
00285   
00286 };
00287 
00288 } //namespace Gst
00289 
00290 
00291 namespace Gst
00292 {
00293 
00298 inline void swap(Segment& lhs, Segment& rhs)
00299   { lhs.swap(rhs); }
00300 
00301 } // namespace Gst
00302 
00303 namespace Glib
00304 {
00305 
00314 Gst::Segment wrap(GstSegment* object, bool take_copy = false);
00315 
00316 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00317 template <>
00318 class Value<Gst::Segment> : public Glib::Value_Boxed<Gst::Segment>
00319 {};
00320 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00321 
00322 } // namespace Glib
00323 
00324 
00325 #endif /* _GSTREAMERMM_SEGMENT_H */
00326 

Generated on Sun Jul 27 17:07:20 2008 for gstreamermm by  doxygen 1.5.4