Allow injecting more than one type of header data into video

This commit is contained in:
loki
2021-06-18 17:27:56 +02:00
parent ac862f9157
commit 63d15333f2
5 changed files with 121 additions and 81 deletions
+10 -2
View File
@@ -7,8 +7,16 @@ struct AVPacket;
struct AVCodecContext;
namespace cbs {
util::buffer_t<std::uint8_t> read_sps(const AVPacket *packet, int codec_id);
util::buffer_t<std::uint8_t> make_sps(const AVCodecContext *ctx, int video_format);
struct sps_hevc_t {
util::buffer_t<std::uint8_t> vps;
util::buffer_t<std::uint8_t> sps;
};
util::buffer_t<std::uint8_t> read_sps_h264(const AVPacket *packet);
sps_hevc_t read_sps_hevc(const AVPacket *packet);
util::buffer_t<std::uint8_t> make_sps_h264(const AVCodecContext *ctx);
sps_hevc_t make_sps_hevc(const AVCodecContext *ctx);
/**
* Check if SPS->VUI is present