• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * gst-cpu-throttling-clock.h
3  *
4  * Copyright (C) 2015 Thibault Saunier <tsaunier@gnome.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 
21 
22 #ifndef __GST_CPU_THROTTLING_CLOCK_H__
23 #define __GST_CPU_THROTTLING_CLOCK_H__
24 
25 #include <glib-object.h>
26 #include <gst/gst.h>
27 
28 G_BEGIN_DECLS
29 
30 typedef struct _GstCpuThrottlingClock GstCpuThrottlingClock;
31 typedef struct _GstCpuThrottlingClockClass GstCpuThrottlingClockClass;
32 typedef struct _GstCpuThrottlingClockPrivate GstCpuThrottlingClockPrivate;
33 
34 GType gst_cpu_throttling_clock_get_type (void) G_GNUC_CONST;
35 
36 #define GST_TYPE_CPU_THROTTLING_CLOCK (gst_cpu_throttling_clock_get_type ())
37 #define GST_CPU_THROTTLING_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CPU_THROTTLING_CLOCK, GstCpuThrottlingClock))
38 #define GST_CPU_THROTTLING_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_CPU_THROTTLING_CLOCK, GstCpuThrottlingClockClass))
39 #define GST_IS_CPU_THROTTLING_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_CPU_THROTTLING_CLOCK))
40 #define GST_IS_CPU_THROTTLING_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_CPU_THROTTLING_CLOCK))
41 #define GST_CPU_THROTTLING_CLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_CPU_THROTTLING_CLOCK, GstCpuThrottlingClockClass))
42 
43 struct _GstCpuThrottlingClockClass
44 {
45   /*<private>*/
46   GstClockClass parent_class;
47 };
48 
49 struct _GstCpuThrottlingClock
50 {
51   /*<private>*/
52   GstClock parent;
53   GstCpuThrottlingClockPrivate *priv;
54 };
55 
56 GstCpuThrottlingClock * gst_cpu_throttling_clock_new (guint cpu_usage);
57 
58 G_END_DECLS
59 
60 #endif /* #ifndef __GST_CPU_THROTTLING_CLOCK_H__*/
61