if (global_flags.x264_video_to_disk) {
// Quick Sync is entirely disabled.
use_zerocopy = false;
- } else if (global_flags.uncompressed_video_to_http) {
- fprintf(stderr, "Disabling zerocopy H.264 encoding due to --http-uncompressed-video.\n");
- use_zerocopy = false;
} else if (global_flags.x264_video_to_http) {
fprintf(stderr, "Disabling zerocopy H.264 encoding due to --http-x264-video.\n");
use_zerocopy = false;
if (file_mux) {
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 &&
+ if (!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());
}
}
}
-void QuickSyncEncoderImpl::add_packet_for_uncompressed_frame(int64_t pts, int64_t duration, const uint8_t *data)
-{
- AVPacket pkt;
- memset(&pkt, 0, sizeof(pkt));
- pkt.buf = nullptr;
- pkt.data = const_cast<uint8_t *>(data);
- pkt.size = frame_width * frame_height * 2;
- pkt.stream_index = 0;
- pkt.flags = AV_PKT_FLAG_KEY;
- pkt.duration = duration;
- stream_mux->add_packet(pkt, pts, pts);
-}
-
void memcpy_with_pitch(uint8_t *dst, const uint8_t *src, size_t src_width, size_t dst_pitch, size_t height)
{
if (src_width == dst_pitch) {
assert(surf != nullptr);
}
uint8_t *data = reinterpret_cast<uint8_t *>(surf->y_ptr);
- if (global_flags.uncompressed_video_to_http) {
- add_packet_for_uncompressed_frame(pts, duration, data);
- } else if (http_encoder != nullptr) {
+ if (http_encoder != nullptr) {
http_encoder->add_frame(pts, duration, frame.ycbcr_coefficients, data, received_ts);
} if (disk_encoder != nullptr && disk_encoder != http_encoder) {
disk_encoder->add_frame(pts, duration, frame.ycbcr_coefficients, data, received_ts);