gst_plugins_good/gst/wavparse/gstwavparse.h
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
equal deleted inserted replaced
29:567bb019e3e3 30:7e817e7e631c
    22 #ifndef __GST_WAVPARSE_H__
    22 #ifndef __GST_WAVPARSE_H__
    23 #define __GST_WAVPARSE_H__
    23 #define __GST_WAVPARSE_H__
    24 
    24 
    25 
    25 
    26 #include <gst/gst.h>
    26 #include <gst/gst.h>
    27 #include "gst/riff/riff-ids.h"
    27 #include <gst/gst_global.h>
    28 #include "gst/riff/riff-read.h"
    28 #include <gst/riff/riff-read.h>
       
    29 #include <gst/riff/riff-ids.h>
       
    30 #include <gst/riff/riff-media.h>
       
    31 
    29 #include <gst/base/gstadapter.h>
    32 #include <gst/base/gstadapter.h>
    30 
    33 
    31 G_BEGIN_DECLS
    34 G_BEGIN_DECLS
    32 
    35 
    33 #define GST_TYPE_WAVPARSE \
    36 #define GST_TYPE_WAVPARSE \
    42   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAVPARSE))
    45   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_WAVPARSE))
    43 
    46 
    44 typedef enum {
    47 typedef enum {
    45   GST_WAVPARSE_START,
    48   GST_WAVPARSE_START,
    46   GST_WAVPARSE_HEADER,
    49   GST_WAVPARSE_HEADER,
    47   GST_WAVPARSE_DATA
    50   GST_WAVPARSE_DATA,
    48 } GstWavParseState;
    51 } GstWavParseState;
    49 
    52 
    50 typedef struct _GstWavParse GstWavParse;
    53 typedef struct _GstWavParse GstWavParse;
    51 typedef struct _GstWavParseClass GstWavParseClass;
    54 typedef struct _GstWavParseClass GstWavParseClass;
    52 
    55 
    64   /* for delayed source pad creation for when
    67   /* for delayed source pad creation for when
    65    * we have the first chunk of data and know
    68    * we have the first chunk of data and know
    66    * the format for sure */
    69    * the format for sure */
    67   GstCaps     *caps;
    70   GstCaps     *caps;
    68   GstTagList  *tags;
    71   GstTagList  *tags;
    69   GstEvent    *close_segment;
    72   GstEvent    *newsegment;
    70   GstEvent    *start_segment;
       
    71 
    73 
    72   /* WAVE decoding state */
    74   /* WAVE decoding state */
    73   GstWavParseState state;
    75   GstWavParseState state;
    74 
    76 
    75   /* format of audio, see defines below */
    77   /* format of audio, see defines below */
    76   gint format;
    78   gint format;
    77 
    79 
    78   /* useful audio data */
    80   /* useful audio data */
    79   guint16 depth;
    81   guint16 depth;
    80   guint32 rate;
    82   gint rate;
    81   guint16 channels;
    83   guint16 channels;
    82   guint16 blockalign;
    84   guint16 blockalign;
    83   guint16 width;
    85   guint16 width;
    84   guint32 av_bps;
       
    85   guint32 fact;
       
    86 
       
    87   /* real bps used or 0 when no bitrate is known */
       
    88   guint32 bps;
    86   guint32 bps;
    89   gboolean vbr;
       
    90 
    87 
    91   guint bytes_per_sample;
    88   guint bytes_per_sample;
    92 
    89 
    93   /* position in data part */
    90   /* position in data part */
    94   guint64	offset;
    91   guint64	offset;
    95   guint64	end_offset;
    92   guint64	end_offset;
    96   guint64 	dataleft;
    93   guint64 	dataleft;
    97   /* offset/length of data part */
    94   /* offset/length of data part */
    98   guint64 	datastart;
    95   guint64 	datastart;
    99   guint64 	datasize;
    96   guint64 	datasize;
   100   /* duration in time */
    97   
   101   guint64 	duration;
       
   102 
       
   103   /* pending seek */
    98   /* pending seek */
   104   GstEvent *seek_event;
    99   GstEvent *seek_event;
   105 
   100 
   106   /* For streaming */
   101   /* For streaming */
   107   GstAdapter *adapter;
   102   GstAdapter *adapter;
   109   gboolean streaming;
   104   gboolean streaming;
   110 
   105 
   111   /* configured segment, start/stop expressed in time */
   106   /* configured segment, start/stop expressed in time */
   112   GstSegment segment;
   107   GstSegment segment;
   113   gboolean segment_running;
   108   gboolean segment_running;
   114 
   109   
   115   /* for late pad configuration */
   110   /* for late pad configuration */
   116   gboolean first;
   111   gboolean first;
   117   /* discont after seek */
       
   118   gboolean discont;
       
   119 };
   112 };
   120 
   113 
   121 struct _GstWavParseClass {
   114 struct _GstWavParseClass {
   122   GstElementClass parent_class;
   115   GstElementClass parent_class;
   123 };
   116 };