@@ -564,6 +564,7 @@ OBJS-$(CONFIG_VPK_DEMUXER) += vpk.o
OBJS-$(CONFIG_VPLAYER_DEMUXER) += vplayerdec.o subtitles.o
OBJS-$(CONFIG_VQF_DEMUXER) += vqf.o
OBJS-$(CONFIG_VVC_DEMUXER) += vvcdec.o rawdec.o
+OBJS-$(CONFIG_VVC_MUXER) += rawenc.o
OBJS-$(CONFIG_W64_DEMUXER) += wavdec.o w64.o pcm.o
OBJS-$(CONFIG_W64_MUXER) += wavenc.o w64.o
OBJS-$(CONFIG_WAV_DEMUXER) += wavdec.o pcm.o
@@ -463,6 +463,7 @@ extern AVInputFormat ff_vpk_demuxer;
extern AVInputFormat ff_vplayer_demuxer;
extern AVInputFormat ff_vqf_demuxer;
extern AVInputFormat ff_vvc_demuxer;
+extern AVOutputFormat ff_vvc_muxer;
extern AVInputFormat ff_w64_demuxer;
extern AVOutputFormat ff_w64_muxer;
extern AVInputFormat ff_wav_demuxer;
@@ -372,6 +372,31 @@ AVOutputFormat ff_hevc_muxer = {
};
#endif
+#if CONFIG_VVC_MUXER
+static int vvc_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
+{
+ if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
+ AV_RB24(pkt->data) != 0x000001) {
+ //TODO: fixed this after vvc codec defined in http://mp4ra.org/#/codecs
+ av_log(s, AV_LOG_ERROR, "vvc: mp4 to annexb is not supported\n");
+ return AVERROR_PATCHWELCOME;
+ }
+ return 1;
+}
+
+AVOutputFormat ff_vvc_muxer = {
+ .name = "vvc",
+ .long_name = NULL_IF_CONFIG_SMALL("raw VVC video"),
+ .extensions = "hevc,h266,266",
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_VVC,
+ .write_header = force_one_stream,
+ .write_packet = ff_raw_write_packet,
+ .check_bitstream = vvc_check_bitstream,
+ .flags = AVFMT_NOTIMESTAMPS,
+};
+#endif
+
#if CONFIG_M4V_MUXER
AVOutputFormat ff_m4v_muxer = {
.name = "m4v",