[svn r53] LiveTV working fine, adjustments in some GMyth functions dealing with the TVChain.
2 * Copyright (C) <2006> Renato Araujo Oliveira Filho <renato.filho@indt.org.br>
3 * Rosfran Borges <rosfran.borges@indt.org.br>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * 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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __GST_NUV_DEMUX_H__
22 #define __GST_NUV_DEMUX_H__
26 #include <gst/base/gstadapter.h>
30 #define GST_TYPE_NUV_DEMUX \
31 (gst_nuv_demux_get_type ())
32 #define GST_NUV_DEMUX(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_NUV_DEMUX, GstNuvDemux))
34 #define GST_NUV_DEMUX_CLASS(klass) \
35 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_NUV_DEMUX, GstNuvDemuxClass))
36 #define GST_IS_NUV_DEMUX(obj) \
37 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_NUV_DEMUX))
38 #define GST_IS_NUV_DEMUX_CLASS(klass) \
39 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_NUV_DEMUX))
45 gchar id[12]; /* "NuppelVideo\0" or "MythTVVideo\0" */
46 gchar version[5]; /* "x.xx\0" */
51 gint i_height_desired;
53 gchar i_mode; /* P progressive, I interlaced */
55 gdouble d_aspect; /* 1.0 squared pixel */
58 gint i_video_blocks; /* 0 no video, -1 unknown */
62 gint i_keyframe_distance;
68 gchar i_type; /* A: audio, V: video, S: sync; T: test
69 R: Seekpoint (string:RTjjjjjjjj)
70 D: Extra data for codec */
71 gchar i_compression; /* V: 0 uncompressed
76 A: 0 uncompressed (44100 1-bits, 2ch)
84 S: B audio and vdeo sync point
85 A audio sync info (timecode == effective
87 V next video sync (timecode == next video
89 S audio,video,text correlation */
90 gchar i_keyframe; /* 0 keyframe, else no no key frame */
91 guint8 i_filters; /* 0x01: gauss 5 pixel (8,2,2,2,2)/16
92 0x02: gauss 5 pixel (8,1,1,1,1)/12
93 0x04: cartoon filter */
95 guint32 i_timecode; /* ms */
97 guint32 i_length; /* V,A,T: length of following data
98 S: length of packet correl */
101 /* FIXME Not sure of this one */
108 gint i_audio_sample_rate;
109 gint i_audio_bits_per_sample;
110 gint i_audio_channels;
111 gint i_audio_compression_ratio;
112 gint i_audio_quality;
113 gint i_rtjpeg_quality;
114 gint i_rtjpeg_luma_filter;
115 gint i_rtjpeg_chroma_filter;
119 gint i_lavc_maxqdiff;
120 gint64 i_seekable_offset;
121 gint64 i_keyframe_adjust_offset;
123 } nuv_extended_header;
127 GST_NUV_DEMUX_HEADER_DATA,
128 GST_NUV_DEMUX_EXTRA_DATA,
129 GST_NUV_DEMUX_MPEG_DATA,
130 GST_NUV_DEMUX_EXTEND_HEADER,
131 GST_NUV_DEMUX_EXTEND_HEADER_DATA,
132 GST_NUV_DEMUX_FRAME_HEADER,
134 GST_NUV_DEMUX_INVALID_DATA
137 typedef struct _GstNuvDemux {
142 guint64 video_offset;
143 guint64 audio_offset;
147 GstPad *src_video_pad;
148 GstPad *src_audio_pad;
149 gboolean first_video;
150 gboolean first_audio;
152 /* NUV decoding state */
153 GstNuvDemuxState state;
157 guint64 mpeg_data_size;
158 GstBuffer *mpeg_buffer;
161 nuv_extended_header *eh;
162 nuv_frame_header *fh;
165 typedef struct _GstNuvDemuxClass {
166 GstElementClass parent_class;
169 GType gst_nuv_demux_get_type (void);
173 #endif /* __GST_NUV_DEMUX_H__ */