~ubuntu-branches/ubuntu/precise/gst-plugins-bad0.10/precise-proposed

« back to all changes in this revision

Viewing changes to ext/mythtv/gstmythtvsrc.h

Tags: upstream-0.10.5.3
Import upstream version 0.10.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
 
1
/*
 
2
 * GStreamer
 
3
 * Copyright (C) <2006> INdT - Rosfran Borges <rosfran.borges@indt.org.br>
 
4
 * Copyright (C) <2007> INdT - Rentao Filho <renato.filho@indt.org.br>
 
5
 *
 
6
 * This library is free software; you can
 
7
 * redistribute it and/or modify it under the terms of the GNU Library
 
8
 * General Public License as published by the Free Software Foundation;
 
9
 * either version 2 of the License, or (at your option) any later version.
 
10
 * This library is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
 
13
 * General Public License for more details. You should have received a copy
 
14
 * of the GNU Library General Public License along with this library; if
 
15
 * not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite
 
16
 * 330, Boston, MA 02111-1307, USA.
18
17
 */
19
18
 
20
19
#ifndef __GST_MYTHTV_SRC_H__
26
25
#include <stdio.h>
27
26
 
28
27
#include <gmyth/gmyth_socket.h>
 
28
#include <gmyth/gmyth_file.h>
29
29
#include <gmyth/gmyth_file_transfer.h>
 
30
#include <gmyth/gmyth_file_local.h>
30
31
#include <gmyth/gmyth_livetv.h>
31
32
#include <gmyth/gmyth_backendinfo.h>
32
33
 
33
34
G_BEGIN_DECLS
34
 
 
35
35
#define GST_TYPE_MYTHTV_SRC \
36
36
  (gst_mythtv_src_get_type())
37
37
#define GST_MYTHTV_SRC(obj) \
42
42
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MYTHTV_SRC))
43
43
#define GST_IS_MYTHTV_SRC_CLASS(klass) \
44
44
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MYTHTV_SRC))
45
 
 
46
45
typedef struct _GstMythtvSrc GstMythtvSrc;
47
46
typedef struct _GstMythtvSrcClass GstMythtvSrcClass;
48
47
 
49
 
typedef enum { 
 
48
typedef enum {
50
49
  GST_MYTHTV_SRC_FILE_TRANSFER,
51
50
  GST_MYTHTV_SRC_NEXT_PROGRAM_CHAIN,
52
51
  GST_MYTHTV_SRC_INVALID_DATA
53
52
} GstMythtvState;
54
53
 
55
54
struct _GstMythtvSrc {
56
 
  GstPushSrc element;
57
 
 
58
 
  /* MythFileTransfer */
59
 
  GMythFileTransfer *file_transfer;
60
 
 
61
 
  GMythLiveTV *spawn_livetv;
62
 
  
 
55
  GstPushSrc      element;
 
56
 
 
57
  /*
 
58
   * MythFileTransfer 
 
59
   */
 
60
  GMythFile      *file;
 
61
  GMythLiveTV    *spawn_livetv;
63
62
  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
 
  gint channel_num;  
99
 
 
100
 
  guint mode;
101
 
 
102
 
  /* MythTV capabilities */
103
 
  GstCaps *mythtv_caps;
104
 
 
105
 
  GstPad *sinkpad;
106
 
 
107
 
  GStaticRecMutex *th_mutex;
108
 
 
109
 
  GByteArray *bytes_queue;
110
 
 
111
 
#ifndef GST_DISABLE_GST_DEBUG
112
 
  /* enable Myth TV debug messages */
113
 
  gboolean mythtv_msgs_dbg;
114
 
#endif
115
 
 
116
 
  gboolean update_prog_chain;
117
 
 
118
 
        /* stablish a maximum iteration value to the IS_RECORDING message */
119
 
        guint wait_to_transfer;
120
 
 
 
63
  GstMythtvState  state;
 
64
  gchar          *uri_name;
 
65
  gchar          *user_agent;
 
66
  gchar          *live_chain_id;
 
67
  gint            mythtv_version;
 
68
  gint64          content_size;
 
69
  gint64          prev_content_size;
 
70
  gint64          content_size_last;
 
71
  guint64         bytes_read;
 
72
  gint64          read_offset;
 
73
  gboolean        eos;
 
74
  gboolean        do_start;
 
75
  gboolean        unique_setup;
 
76
  gboolean        live_tv;
 
77
  gboolean        enable_timing_position;
 
78
  gint            live_tv_id;
 
79
  gchar          *channel_name;
 
80
  guint           mode;
 
81
 
 
82
  /*
 
83
   * MythTV capabilities 
 
84
   */
 
85
  GstCaps        *mythtv_caps;
 
86
  gboolean        update_prog_chain;
 
87
 
 
88
  /*
 
89
   * stablish a maximum iteration value to the IS_RECORDING message 
 
90
   */
 
91
  guint           wait_to_transfer;
121
92
};
122
93
 
123
94
struct _GstMythtvSrcClass {
124
95
  GstPushSrcClass parent_class;
125
96
};
126
97
 
127
 
GType gst_mythtv_src_get_type (void);
 
98
GType           gst_mythtv_src_get_type(void);
128
99
 
129
100
G_END_DECLS
130
 
 
131
101
#endif /* __GST_MYTHTV_SRC_H__ */