¡@

Home 

2014/10/16 ¤W¤È 08:10:25

android Programming Glossary: avcodec_decode_audio3

How to decode audio via FFmpeg in Android

http://stackoverflow.com/questions/5367595/how-to-decode-audio-via-ffmpeg-in-android

can I now decode the audio and return it to the Java program Maybe somebody could give me an example EDIT When using avcodec_decode_audio3 Get the following 03 22 07 54 00.988 INFO DEBUG 31 03 22 07 54 00.988 INFO DEBUG 31 Build fingerprint 'generic sdk generic.. AVMEDIA_TYPE_AUDIO int data_size AVCODEC_MAX_AUDIO_FRAME_SIZE 2 int size packet.size while size 0 int len avcodec_decode_audio3 aCodecCtx int16_t pAudioBuffer &data_size &packet jbyte bytes env GetByteArrayElements env array NULL memcpy bytes int16_t.. codec_type AVMEDIA_TYPE_AUDIO int data_size AVCODEC_MAX_AUDIO_FRAME_SIZE 2 int size pkt size while size 0 int len avcodec_decode_audio3 m_fc streams pkt.stream_index codec int16_t pAudioBuffer data_size pkt LOGD data_size d len d data_size len size pkt size..

Decoding audio via Android using FFMpeg

http://stackoverflow.com/questions/6228008/decoding-audio-via-android-using-ffmpeg

play the exact same media in Mp3 format I only get garbled junk. I believe I am fundamentally misunderstanding how the avcodec_decode_audio3 function works. Since the Wav file contains PCM data when it is decoded it can go straight to the AudioTrack.write function... RAH packet size d size while size 0 __android_log_print ANDROID_LOG_DEBUG DEBUG_TAG RAH decoding d d x y int len avcodec_decode_audio3 aCodecCtx pAudioBuffer data_size packet __android_log_print ANDROID_LOG_DEBUG DEBUG_TAG RAH 1 size d len d data_size d.. inbuf avpkt.size fread inbuf 1 AUDIO_INBUF_SIZE f while avpkt.size 0 out_size AVCODEC_MAX_AUDIO_FRAME_SIZE len avcodec_decode_audio3 c short outbuf out_size avpkt if len 0 fprintf stderr Error while decoding n exit 1 if out_size 0 if a frame has been..