Blame gst/gstsystemclock.h

Packit a6ee4b
/* GStreamer
Packit a6ee4b
 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
Packit a6ee4b
 *                    2000 Wim Taymans <wtay@chello.be>
Packit a6ee4b
 *                    2005 Wim Taymans <wim@fluendo.com>
Packit a6ee4b
 *
Packit a6ee4b
 * gstsystemclock.h: A clock implementation based on system time
Packit a6ee4b
 *
Packit a6ee4b
 * This library is free software; you can redistribute it and/or
Packit a6ee4b
 * modify it under the terms of the GNU Library General Public
Packit a6ee4b
 * License as published by the Free Software Foundation; either
Packit a6ee4b
 * version 2 of the License, or (at your option) any later version.
Packit a6ee4b
 *
Packit a6ee4b
 * This library is distributed in the hope that it will be useful,
Packit a6ee4b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit a6ee4b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit a6ee4b
 * Library General Public License for more details.
Packit a6ee4b
 *
Packit a6ee4b
 * You should have received a copy of the GNU Library General Public
Packit a6ee4b
 * License along with this library; if not, write to the
Packit a6ee4b
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit a6ee4b
 * Boston, MA 02110-1301, USA.
Packit a6ee4b
 */
Packit a6ee4b
Packit a6ee4b
Packit a6ee4b
#ifndef __GST_SYSTEM_CLOCK_H__
Packit a6ee4b
#define __GST_SYSTEM_CLOCK_H__
Packit a6ee4b
Packit a6ee4b
#include <gst/gstclock.h>
Packit a6ee4b
Packit a6ee4b
G_BEGIN_DECLS
Packit a6ee4b
Packit a6ee4b
#define GST_TYPE_SYSTEM_CLOCK                   (gst_system_clock_get_type ())
Packit a6ee4b
#define GST_SYSTEM_CLOCK(obj)                   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SYSTEM_CLOCK, GstSystemClock))
Packit a6ee4b
#define GST_SYSTEM_CLOCK_CAST(obj)              ((GstSystemClock *)(obj))
Packit a6ee4b
#define GST_IS_SYSTEM_CLOCK(obj)                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SYSTEM_CLOCK))
Packit a6ee4b
#define GST_SYSTEM_CLOCK_CLASS(klass)           (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SYSTEM_CLOCK, GstSystemClockClass))
Packit a6ee4b
#define GST_IS_SYSTEM_CLOCK_CLASS(klass)        (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SYSTEM_CLOCK))
Packit a6ee4b
#define GST_SYSTEM_CLOCK_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SYSTEM_CLOCK, GstSystemClockClass))
Packit a6ee4b
Packit a6ee4b
Packit a6ee4b
typedef struct _GstSystemClock GstSystemClock;
Packit a6ee4b
typedef struct _GstSystemClockClass GstSystemClockClass;
Packit a6ee4b
typedef struct _GstSystemClockPrivate GstSystemClockPrivate;
Packit a6ee4b
Packit a6ee4b
/**
Packit a6ee4b
 * GstClockType:
Packit a6ee4b
 * @GST_CLOCK_TYPE_REALTIME: time since Epoch
Packit a6ee4b
 * @GST_CLOCK_TYPE_MONOTONIC: monotonic time since some unspecified starting
Packit a6ee4b
 *                            point
Packit a6ee4b
 * @GST_CLOCK_TYPE_OTHER: some other time source is used (Since: 1.0.5)
Packit a6ee4b
 *
Packit a6ee4b
 * The different kind of clocks.
Packit a6ee4b
 */
Packit a6ee4b
typedef enum {
Packit a6ee4b
  GST_CLOCK_TYPE_REALTIME       = 0,
Packit a6ee4b
  GST_CLOCK_TYPE_MONOTONIC      = 1,
Packit a6ee4b
  GST_CLOCK_TYPE_OTHER          = 2
Packit a6ee4b
} GstClockType;
Packit a6ee4b
Packit a6ee4b
/**
Packit a6ee4b
 * GstSystemClock:
Packit a6ee4b
 *
Packit a6ee4b
 * The default implementation of a #GstClock that uses the system time.
Packit a6ee4b
 */
Packit a6ee4b
struct _GstSystemClock {
Packit a6ee4b
  GstClock       clock;
Packit a6ee4b
Packit a6ee4b
  /*< private >*/
Packit a6ee4b
  GstSystemClockPrivate *priv;
Packit a6ee4b
Packit a6ee4b
  gpointer _gst_reserved[GST_PADDING];
Packit a6ee4b
};
Packit a6ee4b
Packit a6ee4b
struct _GstSystemClockClass {
Packit a6ee4b
  GstClockClass  parent_class;
Packit a6ee4b
Packit a6ee4b
  /*< private >*/
Packit a6ee4b
  gpointer _gst_reserved[GST_PADDING];
Packit a6ee4b
};
Packit a6ee4b
Packit a6ee4b
GST_API
Packit a6ee4b
GType                   gst_system_clock_get_type       (void);
Packit a6ee4b
Packit a6ee4b
GST_API
Packit a6ee4b
GstClock*               gst_system_clock_obtain         (void);
Packit a6ee4b
Packit a6ee4b
GST_API
Packit a6ee4b
void                    gst_system_clock_set_default    (GstClock *new_clock);
Packit a6ee4b
Packit a6ee4b
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
Packit a6ee4b
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstSystemClock, gst_object_unref)
Packit a6ee4b
#endif
Packit a6ee4b
Packit a6ee4b
G_END_DECLS
Packit a6ee4b
Packit a6ee4b
#endif /* __GST_SYSTEM_CLOCK_H__ */