X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fquicksync_encoder.cpp;h=84bfaac80b9c6e3b5c4e731c92a674b71510e7b8;hb=8bb8bb7cc9700befab35a8cc2c4b7a88f0638af9;hp=19565ad506263112aae7768ef169c0b059fbc127;hpb=9fa1937b8af43ec93e6fd4ea3a23519257b3274d;p=nageru diff --git a/nageru/quicksync_encoder.cpp b/nageru/quicksync_encoder.cpp index 19565ad..84bfaac 100644 --- a/nageru/quicksync_encoder.cpp +++ b/nageru/quicksync_encoder.cpp @@ -719,6 +719,9 @@ void QuickSyncEncoderImpl::enable_zerocopy_if_possible() } else if (global_flags.x264_video_to_http) { fprintf(stderr, "Disabling zerocopy H.264 encoding due to --http-x264-video.\n"); use_zerocopy = false; + } else if (global_flags.av1_video_to_http) { + fprintf(stderr, "Disabling zerocopy H.264 encoding due to --http-av1-video.\n"); + use_zerocopy = false; } else if (!global_flags.v4l_output_device.empty()) { fprintf(stderr, "Disabling zerocopy H.264 encoding due to --v4l-output.\n"); use_zerocopy = false; @@ -1342,7 +1345,8 @@ void QuickSyncEncoderImpl::save_codeddata(GLSurface *surf, storage_task task) file_mux->add_packet(pkt, task.pts + global_delay(), task.dts + global_delay()); } if (!global_flags.uncompressed_video_to_http && - !global_flags.x264_video_to_http) { + !global_flags.x264_video_to_http && + !global_flags.av1_video_to_http) { stream_mux->add_packet(pkt, task.pts + global_delay(), task.dts + global_delay()); } } @@ -1450,6 +1454,8 @@ QuickSyncEncoderImpl::QuickSyncEncoderImpl(const std::string &filename, Resource if (global_flags.x264_video_to_http || global_flags.x264_video_to_disk) { assert(http_encoder != nullptr); assert(disk_encoder != nullptr); + } else if (global_flags.av1_video_to_http) { + assert(http_encoder != nullptr); } else { assert(http_encoder == nullptr); assert(disk_encoder == nullptr); @@ -1911,10 +1917,9 @@ void QuickSyncEncoderImpl::pass_frame(QuickSyncEncoderImpl::PendingFrame frame, uint8_t *data = reinterpret_cast(surf->y_ptr); if (global_flags.uncompressed_video_to_http) { add_packet_for_uncompressed_frame(pts, duration, data); - } else if (global_flags.x264_video_to_http || global_flags.x264_video_to_disk) { + } else if (http_encoder != nullptr) { http_encoder->add_frame(pts, duration, frame.ycbcr_coefficients, data, received_ts); - } - if (global_flags.x264_separate_disk_encode) { + } if (disk_encoder != nullptr && disk_encoder != http_encoder) { disk_encoder->add_frame(pts, duration, frame.ycbcr_coefficients, data, received_ts); }