2 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
3 * 2005 Wim Taymans <wim@fluendo.com>
4 * Copyright (C) 2009 David Schleef <ds@schleef.org>
6 * gst1394clock.h: Clock for use by the IEEE 1394
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GST_1394_CLOCK_H__
25 #define __GST_1394_CLOCK_H__
28 #include <gst/gstsystemclock.h>
30 #include <libraw1394/raw1394.h>
34 #define GST_TYPE_1394_CLOCK \
35 (gst_1394_clock_get_type())
36 #define GST_1394_CLOCK(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_1394_CLOCK,Gst1394Clock))
38 #define GST_1394_CLOCK_CLASS(klass) \
39 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_1394_CLOCK,Gst1394ClockClass))
40 #define GST_IS_1394_CLOCK(obj) \
41 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_1394_CLOCK))
42 #define GST_IS_1394_CLOCK_CLASS(klass) \
43 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_1394_CLOCK))
44 #define GST_1394_CLOCK_CAST(obj) \
45 ((Gst1394Clock*)(obj))
47 typedef struct _Gst1394Clock Gst1394Clock;
48 typedef struct _Gst1394ClockClass Gst1394ClockClass;
52 * @clock: parent #GstSystemClock
54 * Opaque #Gst1394Clock.
56 struct _Gst1394Clock {
59 raw1394handle_t handle;
61 guint32 cycle_timer_lo;
62 guint32 cycle_timer_hi;
65 struct _Gst1394ClockClass {
66 GstSystemClockClass parent_class;
69 GType gst_1394_clock_get_type (void);
70 Gst1394Clock* gst_1394_clock_new (const gchar *name);
71 void gst_1394_clock_set_handle (Gst1394Clock *clock,
72 raw1394handle_t handle);
73 void gst_1394_clock_unset_handle (Gst1394Clock *clock);
77 #endif /* __GST_1394_CLOCK_H__ */