技術共有

【FFmpeg】a​​vcodec_send_packet関数

2024-07-08

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

FFmpeg 関連レコード:

プロジェクト例:
[FFmpeg] ffmpeg ライブラリを呼び出して 264 ソフト編集を実装する
[FFmpeg] ffmpeg ライブラリを呼び出して 264 ソフト デコーディングを実装する
[FFmpeg] ffmpeg ライブラリを呼び出して RTMP ストリームをプッシュおよびプルします
[FFmpeg] SDL2 デコード後にレンダリングするために ffmpeg ライブラリを呼び出します

プロセス分析:
[FFmpeg] エンコードリンクの主な機能の簡単な分析
[FFmpeg] デコードリンク上の主要関数の簡単な分析

構造解析:
【FFmpeg】AVCodecの構造
【FFmpeg】AVCodecContextの構造体
【FFmpeg】AVStreamの構造
【FFmpeg】AVFormatContextの構造体
【FFmpeg】AVIOContext構造体
【FFmpeg】AVPacketの構造

機能分析:
【一般的な】
【FFmpeg】a​​vcodec_find_encoderとavcodec_find_decoder
[FFmpeg] キー構造(AVFormatContext、AVIOContextなど)の初期化と解放
【FFmpeg】a​​vcodec_open2関数

【プッシュストリーミング】
【FFmpeg】a​​vformat_open_input関数
【FFmpeg】a​​vformat_find_stream_info関数
【FFmpeg】a​​vformat_alloc_output_context2関数
【FFmpeg】a​​vio_open2関数
【FFmpeg】a​​vformat_write_header関数
【FFmpeg】a​​v_write_frame関数

【コーディング】
【FFmpeg】a​​vcodec_send_frame関数

1.avcodec_send_packet

この関数の主な機能は、圧縮パケットをデコードのためにデコーダに送信することです。定義は libavcodecdecode.c にあります。

/**
 * Supply raw packet data as input to a decoder.
 *
 * Internally, this call will copy relevant AVCodecContext fields, which can
 * influence decoding per-packet, and apply them when the packet is actually
 * decoded. (For example AVCodecContext.skip_frame, which might direct the
 * decoder to drop the frame contained by the packet sent with this function.)
 *
 * @warning The input buffer, avpkt-