Tizen 2.0 Release
[framework/multimedia/gst-plugins-good0.10.git] / ext / raw1394 / gst1394clock.h
1 /* GStreamer
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>
5  *
6  * gst1394clock.h: Clock for use by the IEEE 1394
7  *
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.
12  *
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.
17  *
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., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #ifndef __GST_1394_CLOCK_H__
25 #define __GST_1394_CLOCK_H__
26
27 #include <gst/gst.h>
28 #include <gst/gstsystemclock.h>
29
30 #include <libraw1394/raw1394.h>
31
32 G_BEGIN_DECLS
33
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))
46
47 typedef struct _Gst1394Clock Gst1394Clock;
48 typedef struct _Gst1394ClockClass Gst1394ClockClass;
49
50 /**
51  * Gst1394Clock:
52  * @clock: parent #GstSystemClock
53  *
54  * Opaque #Gst1394Clock.
55  */
56 struct _Gst1394Clock {
57   GstSystemClock clock;
58
59   raw1394handle_t handle;
60
61   guint32 cycle_timer_lo;
62   guint32 cycle_timer_hi;
63 };
64
65 struct _Gst1394ClockClass {
66   GstSystemClockClass parent_class;
67 };
68
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);
74
75 G_END_DECLS
76
77 #endif /* __GST_1394_CLOCK_H__ */