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