melunko@394
|
1 |
/**
|
melunko@394
|
2 |
* GMyth Library
|
melunko@394
|
3 |
*
|
melunko@394
|
4 |
* @file gmyth/gmyth_transcoder.h
|
melunko@394
|
5 |
*
|
melunko@394
|
6 |
* @brief <p> This file contains the transcoder class.
|
melunko@394
|
7 |
*
|
melunko@394
|
8 |
* Copyright (C) 2007 INdT - Instituto Nokia de Tecnologia.
|
melunko@394
|
9 |
* @author Artur Duque de Souza <artur.souza@indt.org.br>
|
melunko@394
|
10 |
*
|
melunko@394
|
11 |
* This program is free software; you can redistribute it and/or modify
|
melunko@394
|
12 |
* it under the terms of the GNU Lesser General Public License as published by
|
melunko@394
|
13 |
* the Free Software Foundation; either version 2 of the License, or
|
melunko@394
|
14 |
* (at your option) any later version.
|
melunko@394
|
15 |
*
|
melunko@394
|
16 |
* This program is distributed in the hope that it will be useful,
|
melunko@394
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
melunko@394
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
melunko@394
|
19 |
* GNU General Public License for more details.
|
melunko@394
|
20 |
*
|
melunko@394
|
21 |
* You should have received a copy of the GNU Lesser General Public License
|
melunko@394
|
22 |
* along with this program; if not, write to the Free Software
|
melunko@394
|
23 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
melunko@394
|
24 |
*/
|
melunko@394
|
25 |
|
melunko@394
|
26 |
#ifndef _GMYTH_TRANSCODER_H
|
melunko@394
|
27 |
#define _GMYTH_TRANSCODER_H
|
melunko@394
|
28 |
|
melunko@394
|
29 |
#include <glib.h>
|
melunko@394
|
30 |
#include <glib-object.h>
|
melunko@394
|
31 |
|
melunko@394
|
32 |
#include "gmyth_stringlist.h"
|
melunko@394
|
33 |
#include "gmyth_backendinfo.h"
|
melunko@394
|
34 |
#include "gmyth_socket.h"
|
melunko@394
|
35 |
#include "gmyth_http.h"
|
melunko@394
|
36 |
#include "gmyth_recprofile.h"
|
melunko@394
|
37 |
|
melunko@394
|
38 |
G_BEGIN_DECLS
|
melunko@394
|
39 |
#define GMYTH_TRANSCODER_TYPE (gmyth_transcoder_get_type ())
|
melunko@394
|
40 |
#define GMYTH_TRANSCODER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_TRANSCODER_TYPE, GMythTranscoder))
|
melunko@394
|
41 |
#define GMYTH_TRANSCODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_TRANSCODER_TYPE, GMythTranscoderClass))
|
rosfran@545
|
42 |
#define IS_GMYTH_TRANSCODER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMYTH_TRANSCODER_TYPE))
|
melunko@394
|
43 |
#define IS_GMYTH_TRANSCODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_TRANSCODER_TYPE))
|
melunko@394
|
44 |
#define GMYTH_TRANSCODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_TRANSCODER_TYPE, GMythTranscoderClass))
|
melunko@394
|
45 |
#define DATE_ISO 0
|
melunko@394
|
46 |
#define DATE_FILE 1
|
rosfran@698
|
47 |
typedef struct _GMythTranscoder GMythTranscoder;
|
rosfran@698
|
48 |
typedef struct _GMythTranscoderClass GMythTranscoderClass;
|
melunko@394
|
49 |
|
renatofilho@754
|
50 |
struct _GMythTranscoderClass {
|
renatofilho@754
|
51 |
GObjectClass parent_class;
|
melunko@394
|
52 |
|
renatofilho@754
|
53 |
/*
|
renatofilho@754
|
54 |
* callbacks
|
renatofilho@754
|
55 |
*/
|
renatofilho@750
|
56 |
};
|
melunko@394
|
57 |
|
melunko@394
|
58 |
/**
|
melunko@394
|
59 |
* The GMythTranscoder structure is a class to implement functions
|
melunko@394
|
60 |
* related to transcoding.
|
melunko@394
|
61 |
*/
|
renatofilho@754
|
62 |
struct _GMythTranscoder {
|
renatofilho@754
|
63 |
GObject parent;
|
melunko@394
|
64 |
|
renatofilho@754
|
65 |
gboolean cutlist;
|
renatofilho@754
|
66 |
gboolean output;
|
renatofilho@754
|
67 |
gboolean started;
|
melunko@394
|
68 |
|
renatofilho@754
|
69 |
/*
|
renatofilho@754
|
70 |
* private begin
|
renatofilho@754
|
71 |
*/
|
renatofilho@754
|
72 |
gchar *output_filename;
|
renatofilho@754
|
73 |
gchar *filename;
|
renatofilho@754
|
74 |
gchar *profile;
|
renatofilho@754
|
75 |
/*
|
renatofilho@754
|
76 |
* private end
|
renatofilho@754
|
77 |
*/
|
melunko@394
|
78 |
|
renatofilho@754
|
79 |
gchar *starttime;
|
melunko@394
|
80 |
|
renatofilho@754
|
81 |
gint chanid;
|
melunko@394
|
82 |
|
renatofilho@754
|
83 |
GMythBackendInfo *backend_info;
|
renatofilho@750
|
84 |
};
|
melunko@394
|
85 |
|
renatofilho@754
|
86 |
GType gmyth_transcoder_type(void);
|
melunko@394
|
87 |
|
renatofilho@750
|
88 |
GMythTranscoder *gmyth_transcoder_new(GMythBackendInfo * backend_info);
|
renatofilho@754
|
89 |
void gmyth_transcoder_set_output(GMythTranscoder * transcode,
|
renatofilho@754
|
90 |
gboolean value,
|
renatofilho@754
|
91 |
const gchar * outputfile);
|
renatofilho@754
|
92 |
void gmyth_transcoder_set_filename(GMythTranscoder * transcode,
|
renatofilho@754
|
93 |
const gchar * file);
|
renatofilho@754
|
94 |
gint gmyth_transcoder_set_profile(GMythTranscoder * trans,
|
renatofilho@754
|
95 |
const gchar * value);
|
renatofilho@754
|
96 |
gboolean gmyth_transcoder_start(GMythTranscoder * trans);
|
renatofilho@754
|
97 |
gboolean gmyth_transcoder_pause(GMythTranscoder * trans);
|
renatofilho@754
|
98 |
gboolean gmyth_transcoder_resume(GMythTranscoder * trans);
|
renatofilho@754
|
99 |
gboolean gmyth_transcoder_cancel(GMythTranscoder * trans);
|
renatofilho@754
|
100 |
gint gmyth_transcoder_get_progress(GMythTranscoder * trans);
|
melunko@394
|
101 |
|
melunko@394
|
102 |
|
melunko@394
|
103 |
G_END_DECLS
|
melunko@394
|
104 |
#endif /*_GMYTH_TRANSCODER_H*/
|