renatofilho@320
|
1 |
/**
|
renatofilho@320
|
2 |
* GMyth Library
|
renatofilho@320
|
3 |
*
|
renatofilho@320
|
4 |
* @file gmyth/gmyth_recorder.h
|
renatofilho@320
|
5 |
*
|
renatofilho@320
|
6 |
* @brief <p> GMythRecorder class defines functions for playing live tv.
|
renatofilho@320
|
7 |
*
|
renatofilho@320
|
8 |
* Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
|
renatofilho@320
|
9 |
* @author Hallyson Luiz de Morais Melo <hallyson.melo@indt.org.br>
|
renatofilho@320
|
10 |
*
|
renatofilho@320
|
11 |
*//*
|
renatofilho@320
|
12 |
*
|
renatofilho@320
|
13 |
* This program is free software; you can redistribute it and/or modify
|
renatofilho@320
|
14 |
* it under the terms of the GNU Lesser General Public License as published by
|
renatofilho@320
|
15 |
* the Free Software Foundation; either version 2 of the License, or
|
renatofilho@320
|
16 |
* (at your option) any later version.
|
renatofilho@320
|
17 |
*
|
renatofilho@320
|
18 |
* This program is distributed in the hope that it will be useful,
|
renatofilho@320
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
renatofilho@320
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
renatofilho@320
|
21 |
* GNU General Public License for more details.
|
renatofilho@320
|
22 |
*
|
renatofilho@320
|
23 |
* You should have received a copy of the GNU Lesser General Public License
|
renatofilho@320
|
24 |
* along with this program; if not, write to the Free Software
|
renatofilho@320
|
25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
renatofilho@320
|
26 |
*/
|
renatofilho@320
|
27 |
|
renatofilho@320
|
28 |
#ifndef __GMYTH_RECORDER_H__
|
renatofilho@320
|
29 |
#define __GMYTH_RECORDER_H__
|
renatofilho@320
|
30 |
|
renatofilho@320
|
31 |
#include <glib-object.h>
|
renatofilho@320
|
32 |
|
renatofilho@320
|
33 |
#include "gmyth_socket.h"
|
renatofilho@320
|
34 |
#include "gmyth_programinfo.h"
|
renatofilho@320
|
35 |
|
renatofilho@320
|
36 |
#include <stdio.h>
|
renatofilho@320
|
37 |
#include <stdlib.h>
|
renatofilho@320
|
38 |
#include <string.h>
|
renatofilho@320
|
39 |
#include <netdb.h>
|
renatofilho@320
|
40 |
#include <sys/socket.h>
|
renatofilho@320
|
41 |
#include <unistd.h>
|
renatofilho@320
|
42 |
|
renatofilho@320
|
43 |
G_BEGIN_DECLS
|
renatofilho@320
|
44 |
|
renatofilho@320
|
45 |
#define GMYTH_RECORDER_TYPE (gmyth_recorder_get_type ())
|
renatofilho@320
|
46 |
#define GMYTH_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_RECORDER_TYPE, GMythRecorder))
|
renatofilho@320
|
47 |
#define GMYTH_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_RECORDER_TYPE, GMythRecorderClass))
|
renatofilho@320
|
48 |
#define IS_GMYTH_RECORDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_RECORDER_TYPE))
|
renatofilho@320
|
49 |
#define IS_GMYTH_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_RECORDER_TYPE))
|
renatofilho@320
|
50 |
#define GMYTH_RECORDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_RECORDER_TYPE, GMythRecorderClass))
|
renatofilho@320
|
51 |
|
renatofilho@320
|
52 |
|
renatofilho@320
|
53 |
typedef struct _GMythRecorder GMythRecorder;
|
renatofilho@320
|
54 |
typedef struct _GMythRecorderClass GMythRecorderClass;
|
renatofilho@320
|
55 |
|
renatofilho@320
|
56 |
struct _GMythRecorderClass
|
renatofilho@320
|
57 |
{
|
renatofilho@320
|
58 |
GObjectClass parent_class;
|
renatofilho@320
|
59 |
|
renatofilho@320
|
60 |
/* callbacks */
|
renatofilho@320
|
61 |
/* no one for now */
|
renatofilho@320
|
62 |
};
|
renatofilho@320
|
63 |
|
renatofilho@320
|
64 |
struct _GMythRecorder
|
renatofilho@320
|
65 |
{
|
renatofilho@320
|
66 |
GObject parent;
|
renatofilho@320
|
67 |
|
renatofilho@320
|
68 |
/* socket descriptor */
|
renatofilho@320
|
69 |
GMythSocket *myth_socket;
|
renatofilho@320
|
70 |
|
renatofilho@320
|
71 |
gint recorder_num;
|
renatofilho@320
|
72 |
GString *hostname;
|
renatofilho@320
|
73 |
gint port;
|
renatofilho@320
|
74 |
};
|
renatofilho@320
|
75 |
|
renatofilho@320
|
76 |
typedef enum _GMythRecorderChannelChangeDirection {
|
renatofilho@320
|
77 |
CHANNEL_DIRECTION_UP = 0,
|
renatofilho@320
|
78 |
CHANNEL_DIRECTION_DOWN,
|
renatofilho@320
|
79 |
CHANNEL_DIRECTION_FAVORITE,
|
renatofilho@320
|
80 |
CHANNEL_DIRECTION_SAME
|
renatofilho@320
|
81 |
} GMythRecorderChannelChangeDirection;
|
renatofilho@320
|
82 |
|
renatofilho@320
|
83 |
GType gmyth_recorder_get_type (void);
|
renatofilho@320
|
84 |
|
renatofilho@320
|
85 |
GMythRecorder* gmyth_recorder_new (int num,
|
renatofilho@320
|
86 |
GString *hostname,
|
renatofilho@320
|
87 |
gshort port);
|
renatofilho@320
|
88 |
|
renatofilho@320
|
89 |
gboolean gmyth_recorder_setup (GMythRecorder *recorder);
|
renatofilho@320
|
90 |
gboolean gmyth_recorder_spawntv (GMythRecorder *recorder,
|
renatofilho@320
|
91 |
GString *tvchain_id);
|
renatofilho@320
|
92 |
|
renatofilho@320
|
93 |
gboolean gmyth_recorder_spawntv_no_tvchain (GMythRecorder *recorder);
|
renatofilho@320
|
94 |
|
renatofilho@320
|
95 |
gboolean gmyth_recorder_stop_livetv (GMythRecorder *recorder);
|
renatofilho@320
|
96 |
|
renatofilho@320
|
97 |
gboolean gmyth_recorder_send_frontend_ready_command (GMythRecorder *recorder);
|
renatofilho@320
|
98 |
|
renatofilho@320
|
99 |
gboolean gmyth_recorder_check_channel (GMythRecorder *recorder, gint channel);
|
renatofilho@320
|
100 |
|
renatofilho@320
|
101 |
gboolean gmyth_recorder_check_channel_name (GMythRecorder *recorder, gchar* channel);
|
renatofilho@320
|
102 |
|
renatofilho@320
|
103 |
gboolean gmyth_recorder_set_channel (GMythRecorder *recorder,
|
renatofilho@320
|
104 |
gint channel);
|
renatofilho@320
|
105 |
|
renatofilho@320
|
106 |
gboolean gmyth_recorder_set_channel_name (GMythRecorder *recorder,
|
renatofilho@320
|
107 |
const gchar* channel);
|
renatofilho@320
|
108 |
|
renatofilho@320
|
109 |
gboolean gmyth_recorder_change_channel (GMythRecorder *recorder,
|
renatofilho@320
|
110 |
const GMythRecorderChannelChangeDirection direction);
|
renatofilho@320
|
111 |
|
renatofilho@320
|
112 |
gboolean gmyth_recorder_pause_recording ( GMythRecorder *recorder );
|
renatofilho@320
|
113 |
|
renatofilho@320
|
114 |
GMythProgramInfo *gmyth_recorder_get_current_program_info ( GMythRecorder *recorder );
|
renatofilho@320
|
115 |
|
renatofilho@320
|
116 |
gint64 gmyth_recorder_get_file_position ( GMythRecorder *recorder );
|
renatofilho@320
|
117 |
|
renatofilho@320
|
118 |
gboolean gmyth_recorder_is_recording ( GMythRecorder *recorder );
|
renatofilho@320
|
119 |
|
renatofilho@320
|
120 |
G_END_DECLS
|
renatofilho@320
|
121 |
|
renatofilho@320
|
122 |
#endif /* __GMYTH_REMOTE_ENCODER_H__ */
|