gst_plugins_symbian/gst/devsound/devsoundsrcwrapper.h
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
equal deleted inserted replaced
29:567bb019e3e3 30:7e817e7e631c
    34 #include <pthreadtypes.h>
    34 #include <pthreadtypes.h>
    35 #include <e32def.h>
    35 #include <e32def.h>
    36 #include <e32cons.h>
    36 #include <e32cons.h>
    37 #include <e32std.h>
    37 #include <e32std.h>
    38 #include <e32debug.h>
    38 #include <e32debug.h>
    39 #include <AudioInput.h>
       
    40 #include <gst/gstbuffer.h>
    39 #include <gst/gstbuffer.h>
    41 #include <gst/gst.h>
    40 #include <gst/gst.h>
    42 
    41 
    43 
    42 
    44 #include <SpeechEncoderConfig.h>
    43 #include <SpeechEncoderConfig.h>
    85 {
    84 {
    86 
    85 
    87 public:
    86 public:
    88 	CActiveListener	*AL;
    87 	CActiveListener	*AL;
    89 	CActiveScheduler *as;
    88 	CActiveScheduler *as;
       
    89 	TInt init_complete;
    90 	CMMFBuffer *buffer;
    90 	CMMFBuffer *buffer;
    91 	CMMFDevSound    *dev_sound;
    91 	CMMFDevSound    *dev_sound;
    92 	TMMFCapabilities caps;
    92 	TMMFCapabilities caps;
    93   	int buffersize;
    93   	int buffersize;
    94   	int gain;
    94   	int gain;
    95   	int dev_count;
    95   	int dev_count;
    96   	TInt iCallbackError;
    96   	TInt iCallbackError;
    97   	TUint32 fourcc;
    97   	TUint32 fourcc;
    98   	int bufferreadpos;
    98   	int bufferreadpos;
    99   	guint* supportedbitrates;
    99   	guint* supportedbitrates;
   100   	int iSamplesRecorded;
       
   101   	TUint speechbitrate;
       
   102     CSpeechEncoderConfig* iSpeechEncoderConfig;
   100     CSpeechEncoderConfig* iSpeechEncoderConfig;
   103     CG711EncoderIntfc*    iG711EncoderIntfc;
   101     CG711EncoderIntfc*    iG711EncoderIntfc;
   104     CG729EncoderIntfc*    iG729EncoderIntfc;
   102     CG729EncoderIntfc*    iG729EncoderIntfc;
   105     CIlbcEncoderIntfc*    iIlbcEncoderIntfc;
   103     CIlbcEncoderIntfc*    iIlbcEncoderIntfc;
   106     CAudioInput*          iAudoInputRecord;
       
   107 
   104 
   108 public:
   105 public:
   109 	DevSoundWrapperSrc();
   106 	DevSoundWrapperSrc();
   110 
   107 
   111 	void InitializeComplete(TInt aError);
   108 	void InitializeComplete(TInt aError);
   142 	void set_fourcc(DevSoundWrapperSrc *handle,int fourcc);
   139 	void set_fourcc(DevSoundWrapperSrc *handle,int fourcc);
   143 
   140 
   144 	int open_devsound(DevSoundWrapperSrc **handle);
   141 	int open_devsound(DevSoundWrapperSrc **handle);
   145     int open_device(DevSoundWrapperSrc **handle);
   142     int open_device(DevSoundWrapperSrc **handle);
   146     int initialize_devsound(GstDevsoundSrc* ds);
   143     int initialize_devsound(GstDevsoundSrc* ds);
   147     int pause_devsound(GstDevsoundSrc *ds);
       
   148     int stop_devsound(GstDevsoundSrc *ds);
       
   149     int resume_devsound(GstDevsoundSrc *ds);
       
   150 	int close_devsound(GstDevsoundSrc* ds);
   144 	int close_devsound(GstDevsoundSrc* ds);
   151 
   145 
   152 	int SetConfigurations(DevSoundWrapperSrc *handle);
   146 	int SetConfigurations(DevSoundWrapperSrc *handle);
   153 	int reset_devsound(DevSoundWrapperSrc *handle);
   147 	int reset_devsound(DevSoundWrapperSrc *handle);
   154 
   148 
   175     int get_g729_vad_mode(DevSoundWrapperSrc *handle,TBool* aVadMode);
   169     int get_g729_vad_mode(DevSoundWrapperSrc *handle,TBool* aVadMode);
   176 
   170 
   177     int set_ilbc_encoder_mode(DevSoundWrapperSrc *handle,enum TIlbcEncodeMode aEncodeMode);
   171     int set_ilbc_encoder_mode(DevSoundWrapperSrc *handle,enum TIlbcEncodeMode aEncodeMode);
   178     int set_ilbc_vad_mode(DevSoundWrapperSrc *handle,gboolean aVadMode);
   172     int set_ilbc_vad_mode(DevSoundWrapperSrc *handle,gboolean aVadMode);
   179     int get_ilbc_vad_mode(DevSoundWrapperSrc *handle,gboolean* aVadMode);
   173     int get_ilbc_vad_mode(DevSoundWrapperSrc *handle,gboolean* aVadMode);
   180     void update_devsound_speech_bitrate(DevSoundWrapperSrc *handle, TUint bitrate);
   174 
   181     
       
   182     /// getting the call back error 
       
   183     int call_back_error(DevSoundWrapperSrc* dsPtr);
       
   184 
   175 
   185 #ifdef __cplusplus
   176 #ifdef __cplusplus
   186 }//extern c
   177 }//extern c
   187 #endif
   178 #endif