gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.h
branchtrunk
changeset 404 c057ae06c14b
parent 88 2a70ed80ed1a
     1.1 --- a/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.h	Wed Nov 15 18:11:45 2006 +0000
     1.2 +++ b/gst-plugins-nuvdemux/nuvdemux/gstnuvdemux.h	Thu Mar 08 19:32:21 2007 +0000
     1.3 @@ -38,155 +38,10 @@
     1.4  #define GST_IS_NUV_DEMUX_CLASS(klass) \
     1.5    (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_NUV_DEMUX))
     1.6  
     1.7 -#define DEMUX_INDEX_SIZE_MAX (100000)
     1.8 -
     1.9 -/* Indexes (timecodes/offsets) conversion structures */
    1.10 -typedef struct
    1.11 -{
    1.12 -    gint64 i_time;
    1.13 -    gint64 i_offset;
    1.14 -
    1.15 -} nuv_demux_index_entry;
    1.16 -
    1.17 -typedef struct
    1.18 -{
    1.19 -    gint i_idx;
    1.20 -    gint i_idx_max;
    1.21 -
    1.22 -    nuv_demux_index_entry idx[DEMUX_INDEX_SIZE_MAX];
    1.23 -} nuv_demux_index;
    1.24 -
    1.25 -/* */
    1.26 -typedef struct
    1.27 -{
    1.28 -    gchar id[12];       /* "NuppelVideo\0" or "MythTVVideo\0" */
    1.29 -    gchar version[5];    /* "x.xx\0" */
    1.30 -
    1.31 -    gint  i_width;
    1.32 -    gint  i_height;
    1.33 -    gint  i_width_desired;
    1.34 -    gint  i_height_desired;
    1.35 -
    1.36 -    gchar i_mode;            /* P progressive, I interlaced */
    1.37 -
    1.38 -    gdouble  d_aspect;       /* 1.0 squared pixel */
    1.39 -    gdouble  d_fps;
    1.40 -    //fps num/denom
    1.41 -    gint     i_fpsn;
    1.42 -    gint     i_fpsd;
    1.43 -
    1.44 -    gint     i_video_blocks; /* 0 no video, -1 unknown */
    1.45 -    gint     i_audio_blocks;
    1.46 -    gint     i_text_blocks;
    1.47 -
    1.48 -    gint     i_keyframe_distance;
    1.49 -
    1.50 -} nuv_header;
    1.51 -
    1.52 -typedef struct
    1.53 -{
    1.54 -    gchar i_type;        /* A: audio, V: video, S: sync; T: test
    1.55 -                           R: Seekpoint (string:RTjjjjjjjj)
    1.56 -                           D: Extra data for codec */
    1.57 -    gchar i_compression; /* V: 0 uncompressed
    1.58 -                              1 RTJpeg
    1.59 -                              2 RTJpeg+lzo
    1.60 -                              N black frame
    1.61 -                              L copy last
    1.62 -                           A: 0 uncompressed (44100 1-bits, 2ch)
    1.63 -                              1 lzo
    1.64 -                              2 layer 2
    1.65 -                              3 layer 3
    1.66 -                              F flac
    1.67 -                              S shorten
    1.68 -                              N null frame loudless
    1.69 -                              L copy last
    1.70 -                            S: B audio and vdeo sync point
    1.71 -                               A audio sync info (timecode == effective
    1.72 -                                    dsp frequency*100)
    1.73 -                               V next video sync (timecode == next video
    1.74 -                                    frame num)
    1.75 -                               S audio,video,text correlation */
    1.76 -    gchar i_keyframe;    /* 0 keyframe, else no no key frame */
    1.77 -    guint8 i_filters;  /* 0x01: gauss 5 pixel (8,2,2,2,2)/16
    1.78 -                           0x02: gauss 5 pixel (8,1,1,1,1)/12
    1.79 -                           0x04: cartoon filter */
    1.80 -
    1.81 -    gint32 i_timecode;     /* ms */
    1.82 -
    1.83 -    gint i_length;       /* V,A,T: length of following data
    1.84 -                           S: length of packet correl */
    1.85 -} nuv_frame_header;
    1.86 -
    1.87 -/* FIXME Not sure of this one */
    1.88 -typedef struct
    1.89 -{
    1.90 -    gint             i_version;
    1.91 -    guint32		     i_video_fcc;
    1.92 -
    1.93 -    guint32		     i_audio_fcc;
    1.94 -    gint             i_audio_sample_rate;
    1.95 -    gint             i_audio_bits_per_sample;
    1.96 -    gint             i_audio_channels;
    1.97 -    gint             i_audio_compression_ratio;
    1.98 -    gint             i_audio_quality;
    1.99 -    gint             i_rtjpeg_quality;
   1.100 -    gint             i_rtjpeg_luma_filter;
   1.101 -    gint             i_rtjpeg_chroma_filter;
   1.102 -    gint             i_lavc_bitrate;
   1.103 -    gint             i_lavc_qmin;
   1.104 -    gint             i_lavc_qmax;
   1.105 -    gint             i_lavc_maxqdiff;
   1.106 -    gint64         	 i_seekable_offset;
   1.107 -    gint64           i_keyframe_adjust_offset;
   1.108 -
   1.109 -} nuv_extended_header;
   1.110 -
   1.111 -typedef enum {
   1.112 -  GST_NUV_DEMUX_START,
   1.113 -  GST_NUV_DEMUX_HEADER_DATA,
   1.114 -  GST_NUV_DEMUX_EXTRA_DATA,
   1.115 -  GST_NUV_DEMUX_MPEG_DATA,
   1.116 -  GST_NUV_DEMUX_EXTEND_HEADER,
   1.117 -  GST_NUV_DEMUX_EXTEND_HEADER_DATA,
   1.118 -  GST_NUV_DEMUX_FRAME_HEADER,
   1.119 -  GST_NUV_DEMUX_MOVI,
   1.120 -  GST_NUV_DEMUX_INVALID_DATA
   1.121 -} GstNuvDemuxState;
   1.122 -
   1.123 +typedef struct _GstNuvDemuxPrivate GstNuvDemuxPrivate;
   1.124  typedef struct _GstNuvDemux {
   1.125 -  GstElement     parent;
   1.126 -
   1.127 -  guint         mode;
   1.128 -  GstAdapter    *adapter; 
   1.129 -
   1.130 -  /* pads */
   1.131 -  GstPad        *sinkpad;
   1.132 -  GstPad        *src_video_pad;  
   1.133 -  GstPad        *src_audio_pad;
   1.134 -
   1.135 -  GstFlowReturn last_video_return;
   1.136 -  GstFlowReturn last_audio_return;
   1.137 -
   1.138 -  /* NUV decoding state */
   1.139 -  GstNuvDemuxState  state;
   1.140 -  guint64           duration;
   1.141 -  guint64           offset;
   1.142 -  guint64           time_offset;
   1.143 -  guint64           last_frame_time;
   1.144 -  gboolean          new_audio_segment;
   1.145 -  gboolean          new_video_segment;
   1.146 -
   1.147 -  /* Mpeg ExtraData */
   1.148 -  guint64       mpeg_data_size;
   1.149 -  GstBuffer     *mpeg_buffer;
   1.150 -  
   1.151 -  nuv_header *h;
   1.152 -  nuv_extended_header *eh;
   1.153 -  nuv_frame_header *fh;
   1.154 -  
   1.155 -  /* FIXME: change these fields to private struct */
   1.156 -  /* first data buffer received, should sent new_segment */
   1.157 +  GstElement          parent;
   1.158 +  GstNuvDemuxPrivate *priv;
   1.159  } GstNuvDemux;
   1.160  
   1.161  typedef struct _GstNuvDemuxClass {