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

正文內(nèi)容

ffmpeg的解碼流程-閱讀頁

2024-08-30 12:35本頁面
  

【正文】 i=0。packet)=0) {// Is this a packet from the video stream?if(==videoStream) {// Decode video frameavcodec_decode_video(pCodecCtx, pFrame, amp。, )。// Did we get a video frame?if(frameFinished) {// Convert the image from its native format to RGBimg_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24,(AVPicture*)pFrame, pCodecCtxpix_fmt,pCodecCtxwidth,pCodecCtxheight)。// Save the frame to diskif(++i=5)SaveFrame(pFrameRGB, pCodecCtxwidth, pCodecCtxheight,i)。packet)。av_free(pFrameRGB)。// Free the YUV frameav_free(pFrame)。// Close the codecavcodec_close(pCodecCtx)。return 0。真正的難度,其實就是上面的[1],[2],[3],[4],其他部分,都是數(shù)據(jù)結(jié)構(gòu)之間的轉(zhuǎn)換,如果你認真看代碼的話,不難理解其他部分。AVInputFormat *fmt,AVFormatParameters *ap){......if (!fmt) {fmt = av_probe_input_format(pd, 0)。......err = av_open_input_stream(ic_ptr, pb, filename, fmt, ap)。......}這樣看來,只是做了兩件事情:1). 偵測容器文件格式2). 從容器文件獲取Stream的信息這兩件事情,實際上就是調(diào)用特定文件的demuxer以分離Stream的過程:具體流程如下:av_open_input_file|+av_probe_input_format從first_iformat中遍歷注冊的所有demuxer以|從幀中解碼。我們來看看如何獲取Packet,又如何從Packet中解碼frame的。|解碼|結(jié)合這部分和轉(zhuǎn)貼的ffmepg框架的文章,應(yīng)該可以基本打通解碼的流程了,后面的問題則是針對具體容器格式和具體編碼解碼器的分析,后面我們繼續(xù)
點擊復(fù)制文檔內(nèi)容
語文相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1