2 * Copyright 2009 Nokia Corporation <multimedia@maemo.org>
3 * 2006 Zeeshan Ali <zeeshan.ali@nokia.com>.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef __FPS_DISPLAY_SINK_H__
21 #define __FPS_DISPLAY_SINK_H__
27 #define GST_TYPE_FPS_DISPLAY_SINK \
28 (fps_display_sink_get_type())
29 #define GST_FPS_DISPLAY_SINK(obj) \
30 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FPS_DISPLAY_SINK,GstFPSDisplaySink))
31 #define GST_FPS_DISPLAY_SINK_CLASS(klass) \
32 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FPS_DISPLAY_SINK,GstFPSDisplaySinkClass))
33 #define GST_IS_FPS_DISPLAY_SINK(obj) \
34 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FPS_DISPLAY_SINK))
35 #define GST_IS_FPS_DISPLAY_SINK_CLASS(klass) \
36 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FPS_DISPLAY_SINK))
38 GType fps_display_sink_get_type (void);
40 typedef struct _GstFPSDisplaySink GstFPSDisplaySink;
41 typedef struct _GstFPSDisplaySinkClass GstFPSDisplaySinkClass;
43 struct _GstFPSDisplaySink
48 /* gstreamer components */
49 GstElement *text_overlay;
50 GstElement *video_sink;
54 gint frames_rendered, frames_dropped; /* ATOMIC */
55 guint64 last_frames_rendered, last_frames_dropped;
57 GstClockTime start_ts;
59 GstClockTime interval_ts;
64 gboolean use_text_overlay;
65 gboolean signal_measurements;
66 GstClockTime fps_update_interval;
73 struct _GstFPSDisplaySinkClass
75 GstBinClass parent_class;
80 #endif /* __FPS_DISPLAY_SINK_H__ */