Debian Codegraph @

src/byzanzencodergstreamer.h

raw symbols SCIP
1 /* desktop session recorder
2 * Copyright (C) 2009 Benjamin Otte <[email protected]>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 3 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #include "byzanzencoder.h"
19
20 #include <gst/gst.h>
21 #include <gst/app/gstappsrc.h>
22
23 #ifndef __HAVE_BYZANZ_ENCODER_GSTREAMER_H__
24 #define __HAVE_BYZANZ_ENCODER_GSTREAMER_H__
25
26 typedef struct _ByzanzEncoderGStreamer ByzanzEncoderGStreamer;
27 typedef struct _ByzanzEncoderGStreamerClass ByzanzEncoderGStreamerClass;
28
29 #define BYZANZ_TYPE_ENCODER_GSTREAMER (byzanz_encoder_gstreamer_get_type())
30 #define BYZANZ_IS_ENCODER_GSTREAMER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BYZANZ_TYPE_ENCODER_GSTREAMER))
31 #define BYZANZ_IS_ENCODER_GSTREAMER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BYZANZ_TYPE_ENCODER_GSTREAMER))
32 #define BYZANZ_ENCODER_GSTREAMER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BYZANZ_TYPE_ENCODER_GSTREAMER, ByzanzEncoderGStreamer))
33 #define BYZANZ_ENCODER_GSTREAMER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BYZANZ_TYPE_ENCODER_GSTREAMER, ByzanzEncoderGStreamerClass))
34 #define BYZANZ_ENCODER_GSTREAMER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BYZANZ_TYPE_ENCODER_GSTREAMER, ByzanzEncoderGStreamerClass))
35
36 struct _ByzanzEncoderGStreamer {
37 ByzanzEncoder encoder;
38
39 cairo_surface_t * surface; /* last surface pushed down the pipeline */
40 GTimeVal start_time; /* timestamp of first image */
41
42 GstElement * pipeline; /* The pipeline */
43 GstElement * audiosrc; /* the source we record audio from */
44 GstAppSrc * src; /* the source we feed with images */
45 GstCaps * caps; /* caps of video stream */
46 };
47
48 struct _ByzanzEncoderGStreamerClass {
49 ByzanzEncoderClass encoder_class;
50
51 const char * pipeline_string;
52 const char * audio_pipeline_string;
53 };
54
55 GType byzanz_encoder_gstreamer_get_type (void) G_GNUC_CONST;
56
57
58 #endif /* __HAVE_BYZANZ_ENCODER_GSTREAMER_H__ */