| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#include <glib.h> |
| 19 |
#include <gtk/gtk.h> |
| 20 |
|
| 21 |
#include "byzanzencoder.h" |
| 22 |
#include "byzanzqueue.h" |
| 23 |
#include "byzanzrecorder.h" |
| 24 |
|
| 25 |
#ifndef __HAVE_BYZANZ_SESSION_H__ |
| 26 |
#define __HAVE_BYZANZ_SESSION_H__ |
| 27 |
|
| 28 |
typedef struct _ByzanzSession ByzanzSession; |
| 29 |
typedef struct _ByzanzSessionClass ByzanzSessionClass; |
| 30 |
|
| 31 |
#define BYZANZ_TYPE_SESSION (byzanz_session_get_type()) |
| 32 |
#define BYZANZ_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BYZANZ_TYPE_SESSION)) |
| 33 |
#define BYZANZ_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BYZANZ_TYPE_SESSION)) |
| 34 |
#define BYZANZ_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BYZANZ_TYPE_SESSION, ByzanzSession)) |
| 35 |
#define BYZANZ_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BYZANZ_TYPE_SESSION, ByzanzSessionClass)) |
| 36 |
#define BYZANZ_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BYZANZ_TYPE_SESSION, ByzanzSessionClass)) |
| 37 |
|
| 38 |
struct _ByzanzSession { |
| 39 |
GObject object; |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
GFile * file; |
| 44 |
cairo_rectangle_int_t area; |
| 45 |
GdkWindow * window; |
| 46 |
gboolean record_audio; |
| 47 |
GType encoder_type; |
| 48 |
ByzanzQueue * queue; |
| 49 |
GTimeVal start_time; |
| 50 |
|
| 51 |
|
| 52 |
GCancellable * cancellable; |
| 53 |
ByzanzRecorder * recorder; |
| 54 |
ByzanzEncoder * encoder; |
| 55 |
GError * error; |
| 56 |
}; |
| 57 |
|
| 58 |
struct _ByzanzSessionClass { |
| 59 |
GObjectClass object_class; |
| 60 |
}; |
| 61 |
|
| 62 |
GType byzanz_session_get_type (void) G_GNUC_CONST; |
| 63 |
|
| 64 |
|
| 65 |
ByzanzSession * byzanz_session_new (GFile * file, |
| 66 |
GType encoder_type, |
| 67 |
GdkWindow * window, |
| 68 |
const cairo_rectangle_int_t * area, |
| 69 |
gboolean record_cursor, |
| 70 |
gboolean record_audio); |
| 71 |
void byzanz_session_start (ByzanzSession * session); |
| 72 |
void byzanz_session_stop (ByzanzSession * session); |
| 73 |
void byzanz_session_abort (ByzanzSession * session); |
| 74 |
|
| 75 |
gboolean byzanz_session_is_recording (ByzanzSession * session); |
| 76 |
gboolean byzanz_session_is_encoding (ByzanzSession * session); |
| 77 |
const GError * byzanz_session_get_error (ByzanzSession * session); |
| 78 |
|
| 79 |
|
| 80 |
#endif |