freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

ffmpeg的解碼流程-wenkub

2022-11-28 16:34:02 本頁(yè)面
 

【正文】 給出了一個(gè)陽(yáng)春版的解碼器,我們來(lái)仔細(xì)看看 陽(yáng)春后面的故事,為了方便講述,我先貼出代碼: include ffmpeg/ include ffmpeg/ include void SaveFrame(AVFrame *pFrame, int width, int height, int iFrame) { FILE *pFile。 char szFilename[32]。 if(pFile==NULL) return。 y++) fwrite(pFramedata[0]+y*pFramelinesize[0], 1, width*3, pFile)。 AVCodecContext *pCodecCtx。 AVPacket packet。 if(argc 2) { printf(Please provide a movie file\n)。pFormatCtx, argv[1], NULL, 0, NULL)!=0) return 1。t find stream information // Dump information about file onto standard error dump_format(pFormatCtx, 0, argv[1], 0)。 i++) if(pFormatCtxstreams[i]codeccodec_type==CODEC_TYPE_VIDEO) { videoStream=i。t find a video stream // Get a pointer to the codec context for the video stream pCodecCtx=pFormatCtxstreams[videoStream]codec。 // Codec not found } // Open codec if(avcodec_open(pCodecCtx, pCodec)0) return 1。 // Determine required buffer size and allocate buffer numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtxwidth, pCodecCtxheight)。 while(av_read_frame(pFormatCtx, amp。 // Save the frame to disk if(++i=5) SaveFrame(pFrameRGB, pCodecCtxwidth, pCodecCtxheight, i)。 av_free(pFrameRGB)。 return 0。 } ...... err = av_open_input_stream(ic_ptr, pb, filename, fmt, ap)。 我們來(lái)看看如何獲取 Packet,又如何從 Packet 中解碼 frame 的。 從幀中解碼 。 真正的難度,其實(shí)就是上面的 [1],[2],[3],[4],其他部分
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1