gst-plugins-mythtv/src/gstmythtvsrc.h
author morphbr
Wed Apr 04 16:47:00 2007 +0100 (2007-04-04)
branchtrunk
changeset 496 8f9fe41efa81
parent 308 fb8c04a619ad
child 528 4a604de8eaf5
permissions -rwxr-xr-x
[svn r501] Changed test client name
     1 /* GStreamer
     2  * Copyright (C) <2006> Rosfran Borges <rosfran.borges@indt.org.br>
     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 2 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, write to the
    16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    17  * Boston, MA 02111-1307, USA.
    18  */
    19 
    20 #ifndef __GST_MYTHTV_SRC_H__
    21 #define __GST_MYTHTV_SRC_H__
    22 
    23 #include <gst/gst.h>
    24 #include <gst/base/gstbasesrc.h>
    25 #include <gst/base/gstpushsrc.h>
    26 #include <stdio.h>
    27 
    28 #include <gmyth/gmyth_socket.h>
    29 #include <gmyth/gmyth_file_transfer.h>
    30 #include <gmyth/gmyth_livetv.h>
    31 #include <gmyth/gmyth_backendinfo.h>
    32 
    33 G_BEGIN_DECLS
    34 
    35 #define GST_TYPE_MYTHTV_SRC \
    36   (gst_mythtv_src_get_type())
    37 #define GST_MYTHTV_SRC(obj) \
    38   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MYTHTV_SRC,GstMythtvSrc))
    39 #define GST_MYTHTV_SRC_CLASS(klass) \
    40   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MYTHTV_SRC,GstMythtvSrcClass))
    41 #define GST_IS_MYTHTV_SRC(obj) \
    42   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MYTHTV_SRC))
    43 #define GST_IS_MYTHTV_SRC_CLASS(klass) \
    44   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MYTHTV_SRC))
    45 
    46 typedef struct _GstMythtvSrc GstMythtvSrc;
    47 typedef struct _GstMythtvSrcClass GstMythtvSrcClass;
    48 
    49 typedef enum { 
    50   GST_MYTHTV_SRC_FILE_TRANSFER,
    51   GST_MYTHTV_SRC_NEXT_PROGRAM_CHAIN,
    52   GST_MYTHTV_SRC_INVALID_DATA
    53 } GstMythtvState;
    54 
    55 struct _GstMythtvSrc {
    56   GstPushSrc element;
    57 
    58   /* MythFileTransfer */
    59   GMythFileTransfer *file_transfer;
    60 
    61   GMythLiveTV *spawn_livetv;
    62   
    63   GMythBackendInfo *backend_info;
    64 
    65   GstMythtvState state;
    66 
    67   gchar *uri_name;
    68   gchar *user_agent;
    69 
    70   gchar *live_chain_id;
    71 
    72   gint mythtv_version;
    73 
    74   gint64 content_size;
    75 
    76   gint64 prev_content_size;
    77 
    78   gint64 content_size_last;
    79 
    80   guint64 bytes_read;
    81 
    82   gint64 read_offset;
    83 
    84   gint buffer_remain;
    85 
    86   gboolean eos;
    87 
    88   gboolean do_start;
    89 
    90   gboolean unique_setup;
    91 
    92   gboolean live_tv;
    93 
    94   gboolean enable_timing_position;
    95 
    96   gint live_tv_id;
    97 
    98   gchar* channel_name;  
    99 
   100   guint mode;
   101 
   102   /* MythTV capabilities */
   103   GstCaps *mythtv_caps;
   104 
   105   GByteArray *bytes_queue;
   106 
   107 #ifndef GST_DISABLE_GST_DEBUG
   108   /* enable Myth TV debug messages */
   109   gboolean mythtv_msgs_dbg;
   110 #endif
   111 
   112   gboolean update_prog_chain;
   113 
   114 	/* stablish a maximum iteration value to the IS_RECORDING message */
   115 	guint wait_to_transfer;
   116 
   117 };
   118 
   119 struct _GstMythtvSrcClass {
   120   GstPushSrcClass parent_class;
   121 };
   122 
   123 GType gst_mythtv_src_get_type (void);
   124 
   125 G_END_DECLS
   126 
   127 #endif /* __GST_MYTHTV_SRC_H__ */