¡@

Home 

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

android Programming Glossary: av_read_frame

Decoding Video using FFMpeg for android

http://stackoverflow.com/questions/11322952/decoding-video-using-ffmpeg-for-android

buffer PIX_FMT_RGB24 pCodecCtx width pCodecCtx height Read frames and save first five frames to disk i 0 while av_read_frame pFormatCtx packet 0 Is this a packet from the video stream if packet.stream_index videoStream Decode video frame avcodec_decode_video2.. pFrameRGB pCodecCtx width pCodecCtx height i LOGI After Saving Frame n Free the packet that was allocated by av_read_frame av_free_packet packet Free the RGB image av_free buffer av_free pFrameRGB Free the YUV frame av_free pFrame Close the codec..

How to decode audio via FFmpeg in Android

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

Unsupported codec n return 45 avcodec_open aCodecCtx aCodec c avcodec_alloc_context packet_queue_init & audioq while av_read_frame pFormatCtx & packet 0 if packet.stream_index videoStream Else if packet.stream_index audioStream packet_queue_put & audioq.. Unsupported codec n return 45 avcodec_open aCodecCtx aCodec c avcodec_alloc_context packet_queue_init &audioq while av_read_frame pFormatCtx &packet 0 if aCodecCtx codec_type AVMEDIA_TYPE_AUDIO int data_size AVCODEC_MAX_AUDIO_FRAME_SIZE 2 int size.. m_fc streams i codec codec_id if codec 0 continue err avcodec_open m_fc streams i codec codec if err 0 continue while av_read_frame m_fc pkt 0 if m_fc streams pkt.stream_index codec codec_type AVMEDIA_TYPE_AUDIO int data_size AVCODEC_MAX_AUDIO_FRAME_SIZE..

Decoding audio via Android using FFMpeg

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

d sample rate d sample format d aCodecCtx channels aCodecCtx sample_rate aCodecCtx sample_fmt int x y x 0 y 0 while av_read_frame pFormatCtx packet 0 __android_log_print ANDROID_LOG_DEBUG DEBUG_TAG RAH frame read d d x y if aCodecCtx codec_type AVMEDIA_TYPE_AUDIO..