gst_plugins_base/gst-libs/gst/audio/gstaudioclock.h
changeset 8 4a7fac7dd34a
parent 0 0e761a78d257
child 30 7e817e7e631c
equal deleted inserted replaced
7:71e347f905f2 8:4a7fac7dd34a
    21  */
    21  */
    22 
    22 
    23 #ifndef __GST_AUDIO_CLOCK_H__
    23 #ifndef __GST_AUDIO_CLOCK_H__
    24 #define __GST_AUDIO_CLOCK_H__
    24 #define __GST_AUDIO_CLOCK_H__
    25 
    25 
       
    26 #include <gst/gst.h>
    26 #include <gst/gstsystemclock.h>
    27 #include <gst/gstsystemclock.h>
    27 
    28 
    28 G_BEGIN_DECLS
    29 G_BEGIN_DECLS
    29 
    30 
    30 #define GST_TYPE_AUDIO_CLOCK \
    31 #define GST_TYPE_AUDIO_CLOCK \
    35   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_CLOCK,GstAudioClockClass))
    36   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_CLOCK,GstAudioClockClass))
    36 #define GST_IS_AUDIO_CLOCK(obj) \
    37 #define GST_IS_AUDIO_CLOCK(obj) \
    37   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_CLOCK))
    38   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_CLOCK))
    38 #define GST_IS_AUDIO_CLOCK_CLASS(klass) \
    39 #define GST_IS_AUDIO_CLOCK_CLASS(klass) \
    39   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_CLOCK))
    40   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_CLOCK))
       
    41 #define GST_AUDIO_CLOCK_CAST(obj) \
       
    42   ((GstAudioClock*)(obj))
    40 
    43 
    41 typedef struct _GstAudioClock GstAudioClock;
    44 typedef struct _GstAudioClock GstAudioClock;
    42 typedef struct _GstAudioClockClass GstAudioClockClass;
    45 typedef struct _GstAudioClockClass GstAudioClockClass;
    43 
    46 
    44 /**
    47 /**
    69   gpointer user_data;
    72   gpointer user_data;
    70 
    73 
    71   GstClockTime last_time;
    74   GstClockTime last_time;
    72 
    75 
    73   /*< private >*/
    76   /*< private >*/
    74   gpointer _gst_reserved[GST_PADDING];
    77   union {
       
    78     struct {
       
    79       GstClockTimeDiff   time_offset;
       
    80     } ABI;
       
    81     /* adding + 0 to mark ABI change to be undone later */
       
    82     gpointer _gst_reserved[GST_PADDING + 0];
       
    83   } abidata;
    75 };
    84 };
    76 
    85 
    77 struct _GstAudioClockClass {
    86 struct _GstAudioClockClass {
    78   GstSystemClockClass parent_class;
    87   GstSystemClockClass parent_class;
    79 
    88 
    88 GType           gst_audio_clock_get_type        (void);
    97 GType           gst_audio_clock_get_type        (void);
    89 #ifdef __SYMBIAN32__
    98 #ifdef __SYMBIAN32__
    90 IMPORT_C
    99 IMPORT_C
    91 #endif
   100 #endif
    92 
   101 
    93 GstClock*       gst_audio_clock_new             (gchar *name, GstAudioClockGetTimeFunc func,
   102 GstClock*       gst_audio_clock_new             (const gchar *name, GstAudioClockGetTimeFunc func,
    94                                                  gpointer user_data);
   103                                                  gpointer user_data);
       
   104 #ifdef __SYMBIAN32__
       
   105 IMPORT_C
       
   106 #endif
       
   107 
       
   108 void            gst_audio_clock_reset           (GstAudioClock *clock, GstClockTime time);
       
   109 #ifdef __SYMBIAN32__
       
   110 IMPORT_C
       
   111 #endif
       
   112 
       
   113 
       
   114 GstClockTime    gst_audio_clock_get_time        (GstClock * clock);
       
   115 #ifdef __SYMBIAN32__
       
   116 IMPORT_C
       
   117 #endif
       
   118 
       
   119 GstClockTime    gst_audio_clock_adjust          (GstClock * clock, GstClockTime time);
    95 
   120 
    96 G_END_DECLS
   121 G_END_DECLS
    97 
   122 
    98 #endif /* __GST_AUDIO_CLOCK_H__ */
   123 #endif /* __GST_AUDIO_CLOCK_H__ */