diff -r 2a70ed80ed1a -r c3fdac309aec gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.h --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.h Wed Nov 15 18:11:45 2006 +0000 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.h Wed Jan 24 23:06:53 2007 +0000 @@ -38,155 +38,10 @@ #define GST_IS_NUV_DEMUX_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_NUV_DEMUX)) -#define DEMUX_INDEX_SIZE_MAX (100000) - -/* Indexes (timecodes/offsets) conversion structures */ -typedef struct -{ - gint64 i_time; - gint64 i_offset; - -} nuv_demux_index_entry; - -typedef struct -{ - gint i_idx; - gint i_idx_max; - - nuv_demux_index_entry idx[DEMUX_INDEX_SIZE_MAX]; -} nuv_demux_index; - -/* */ -typedef struct -{ - gchar id[12]; /* "NuppelVideo\0" or "MythTVVideo\0" */ - gchar version[5]; /* "x.xx\0" */ - - gint i_width; - gint i_height; - gint i_width_desired; - gint i_height_desired; - - gchar i_mode; /* P progressive, I interlaced */ - - gdouble d_aspect; /* 1.0 squared pixel */ - gdouble d_fps; - //fps num/denom - gint i_fpsn; - gint i_fpsd; - - gint i_video_blocks; /* 0 no video, -1 unknown */ - gint i_audio_blocks; - gint i_text_blocks; - - gint i_keyframe_distance; - -} nuv_header; - -typedef struct -{ - gchar i_type; /* A: audio, V: video, S: sync; T: test - R: Seekpoint (string:RTjjjjjjjj) - D: Extra data for codec */ - gchar i_compression; /* V: 0 uncompressed - 1 RTJpeg - 2 RTJpeg+lzo - N black frame - L copy last - A: 0 uncompressed (44100 1-bits, 2ch) - 1 lzo - 2 layer 2 - 3 layer 3 - F flac - S shorten - N null frame loudless - L copy last - S: B audio and vdeo sync point - A audio sync info (timecode == effective - dsp frequency*100) - V next video sync (timecode == next video - frame num) - S audio,video,text correlation */ - gchar i_keyframe; /* 0 keyframe, else no no key frame */ - guint8 i_filters; /* 0x01: gauss 5 pixel (8,2,2,2,2)/16 - 0x02: gauss 5 pixel (8,1,1,1,1)/12 - 0x04: cartoon filter */ - - gint32 i_timecode; /* ms */ - - gint i_length; /* V,A,T: length of following data - S: length of packet correl */ -} nuv_frame_header; - -/* FIXME Not sure of this one */ -typedef struct -{ - gint i_version; - guint32 i_video_fcc; - - guint32 i_audio_fcc; - gint i_audio_sample_rate; - gint i_audio_bits_per_sample; - gint i_audio_channels; - gint i_audio_compression_ratio; - gint i_audio_quality; - gint i_rtjpeg_quality; - gint i_rtjpeg_luma_filter; - gint i_rtjpeg_chroma_filter; - gint i_lavc_bitrate; - gint i_lavc_qmin; - gint i_lavc_qmax; - gint i_lavc_maxqdiff; - gint64 i_seekable_offset; - gint64 i_keyframe_adjust_offset; - -} nuv_extended_header; - -typedef enum { - GST_NUV_DEMUX_START, - GST_NUV_DEMUX_HEADER_DATA, - GST_NUV_DEMUX_EXTRA_DATA, - GST_NUV_DEMUX_MPEG_DATA, - GST_NUV_DEMUX_EXTEND_HEADER, - GST_NUV_DEMUX_EXTEND_HEADER_DATA, - GST_NUV_DEMUX_FRAME_HEADER, - GST_NUV_DEMUX_MOVI, - GST_NUV_DEMUX_INVALID_DATA -} GstNuvDemuxState; - +typedef struct _GstNuvDemuxPrivate GstNuvDemuxPrivate; typedef struct _GstNuvDemux { - GstElement parent; - - guint mode; - GstAdapter *adapter; - - /* pads */ - GstPad *sinkpad; - GstPad *src_video_pad; - GstPad *src_audio_pad; - - GstFlowReturn last_video_return; - GstFlowReturn last_audio_return; - - /* NUV decoding state */ - GstNuvDemuxState state; - guint64 duration; - guint64 offset; - guint64 time_offset; - guint64 last_frame_time; - gboolean new_audio_segment; - gboolean new_video_segment; - - /* Mpeg ExtraData */ - guint64 mpeg_data_size; - GstBuffer *mpeg_buffer; - - nuv_header *h; - nuv_extended_header *eh; - nuv_frame_header *fh; - - /* FIXME: change these fields to private struct */ - /* first data buffer received, should sent new_segment */ + GstElement parent; + GstNuvDemuxPrivate *priv; } GstNuvDemux; typedef struct _GstNuvDemuxClass {