欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

FFmpegAVFMT_NOFILE宏定義剖析

使用說明
    當(dāng)前為了避免在調(diào)用init_input函數(shù)的時候,讀取緩存區(qū)的數(shù)據(jù),從而設(shè)置了該標(biāo)志位,但是最終在avformat_open_input的其他地方還是讀取了緩沖區(qū)的數(shù)據(jù)

公司主營業(yè)務(wù):做網(wǎng)站、網(wǎng)站建設(shè)、移動網(wǎng)站開發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競爭能力。創(chuàng)新互聯(lián)是一支青春激揚、勤奮敬業(yè)、活力青春激揚、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊。公司秉承以“開放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對我們的高要求,感謝他們從不同領(lǐng)域給我們帶來的挑戰(zhàn),讓我們激情的團(tuán)隊有機(jī)會用頭腦與智慧不斷的給客戶帶來驚喜。創(chuàng)新互聯(lián)推出黃浦免費做網(wǎng)站回饋大家。

        pAVInputFormat = av_find_input_format("h364");
        pAVInputFormat->flags |= AVFMT_NOFILE;

宏定義
/// Demuxer will use avio_open, no opened file should be provided by the caller.
//解復(fù)用器將調(diào)用avio_open函數(shù),調(diào)用者提供一個沒有打開的文件,估計是打開的文件會被占用
#define AVFMT_NOFILE        0x0001
#define AVFMT_NEEDNUMBER    0x0002 /**< Needs '%d' in filename. */
#define AVFMT_SHOW_IDS      0x0008 /**< Show format stream IDs numbers. */


AVFMT_NOFILE formats will not have a AVIOContext
當(dāng)設(shè)置了AVFMT_NOFILE標(biāo)志,將不會攜帶AVIOContext


/* Open input file and probe the format if necessary. */
static int init_input(AVFormatContext *s, const char *filename,
                      AVDictionary **options)
{
    int ret;
    AVProbeData pd = { filename, NULL, 0 };
    int score = AVPROBE_SCORE_RETRY;

    //這里探測碼流的方式,企圖通過AVIOContext結(jié)構(gòu)體中的read_packet函數(shù)
    //如果碼流格式已經(jīng)指定并且指定了標(biāo)志位,直接返回
    if (s->pb) {
        s->flags |= AVFMT_FLAG_CUSTOM_IO;
    //如果沒有指定輸入格式,開始探測碼流格式
        if (!s->iformat)
            return av_probe_input_buffer2(s->pb, &s->iformat, filename,
                                         s, 0, s->format_probesize);
        else if (s->iformat->flags & AVFMT_NOFILE)
            av_log(s, AV_LOG_WARNING, "Custom AVIOContext makes no sense and "
                                      "will be ignored with AVFMT_NOFILE format.\n");
        return 0;
    }
   //這里探測碼流的方式,企圖通過通過進(jìn)來的文件名稱
   //如果碼流格式已經(jīng)指定并且指定了標(biāo)志位,直接返回
   //這里非常明顯網(wǎng)絡(luò)RTSP流,肯定是不會走到這里
    if ((s->iformat && s->iformat->flags & AVFMT_NOFILE) ||
        (!s->iformat && (s->iformat = av_probe_input_format2(&pd, 0, &score))))
        return score;

    //如果指定了iformat結(jié)構(gòu)體,并且沒有設(shè)置標(biāo)志位,肯定執(zhí)行下面的語句,該語句會調(diào)用read_packet函數(shù)
    //進(jìn)行分析碼流
    if ((ret = s->io_open(s, &s->pb, filename, AVIO_FLAG_READ | s->avio_flags, options)) < 0)
        return ret;

    if (s->iformat)
        return 0;
    return av_probe_input_buffer2(s->pb, &s->iformat, filename,
                                 s, 0, s->format_probesize);
}


從下面的說明可以得知,當(dāng)添加了AVFMT_NOFILE標(biāo)志位,AVIOContext *pb會設(shè)置為空
    /**
     * I/O context.
     *
     * - demuxing: either set by the user before avformat_open_input() (then
     *             the user must close it manually) or set by avformat_open_input().
     * - muxing: set by the user before avformat_write_header(). The caller must
     *           take care of closing / freeing the IO context.
     *
     * Do NOT set this field if AVFMT_NOFILE flag is set in
     * iformat/oformat.flags. In such a case, the (de)muxer will handle
     * I/O in some other way and this field will be NULL.
     */
    AVIOContext *pb;

    /**
     * Custom interrupt callbacks for the I/O layer.
     *
     * demuxing: set by the user before avformat_open_input().
     * muxing: set by the user before avformat_write_header()
     * (mainly useful for AVFMT_NOFILE formats). The callback
     * should also be passed to avio_open2() if it's used to
     * open the file.
     */
    AVIOInterruptCB interrupt_callback;

/**
 * Guess the file format.
 *
 * @param pd        data to be probed
 * @param is_opened Whether the file is already opened; determines whether
 *                  demuxers with or without AVFMT_NOFILE are probed.
 */
AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened);
AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max);
AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score_ret);

當(dāng)前名稱:FFmpegAVFMT_NOFILE宏定義剖析
本文鏈接:http://www.aaarwkj.com/article12/pegjgc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供Google、ChatGPT、搜索引擎優(yōu)化靜態(tài)網(wǎng)站、商城網(wǎng)站全網(wǎng)營銷推廣

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)
青青草原天堂在线免费观看| 欧美激情一区二区亚洲专区| 人人狠狠综合久久亚洲| 国产放荡av剧情精品| 欧美又粗又成人大视频| 一二三日韩电影在线观看| 蜜桃网站视频免费观看| 免费看国产一级黄色大片| 日韩精品欧美成人高清一区二区| 色呦呦中文字幕在线播放| 免费在线成人av观看| 日韩av在线国产观看| 国产精品成人免费久久黄| 日韩国产亚洲欧美国产| 亚洲日本欧美在线一区| 日韩av一区二区在线| 欧美另类精品一区二区三区| 日韩在线不卡中文字幕| 伊人丁香六月日日操操| 国产精品美女黄色av| 日本免费熟女一区二区| 成人亚洲理论片在线观看| 日本人妻丰满熟妇久久| 一区二区三区日韩欧美在线| 国产精品亚洲欧美中字| 亚洲欧洲另类美女久久精品| 97视频免费观看在线| 精品亚洲美无人区乱码| 国产91白丝在线观看| 日日夜夜久久国产精品| 欧美色视频综合在线观看| 国产精品欧美日韩精品| 扒开女性毛茸茸的视频| 日韩欧美精品久久黄| 天天干夜夜泡天天操| 五月婷婷六月丁香在线观看| 又爽又色的日本网站| 国产成人激情自拍视频在线观看 | 日韩欧美中文字幕一区二区| 日本高清一区二区不卡视频 | 国产精品一区2区3区|