X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fvideo_encoder.cpp;h=8dee6da8307d47814f650302ad6d6ded2e78398e;hb=23da824e1d61e37fbe0cc1c0f4d32052022a50ba;hp=5f5b975feb175497316f3590b407bab42b5a0e22;hpb=131a051c4cd3719a9be415386fdf0f4e15da7c66;p=nageru diff --git a/nageru/video_encoder.cpp b/nageru/video_encoder.cpp index 5f5b975..8dee6da 100644 --- a/nageru/video_encoder.cpp +++ b/nageru/video_encoder.cpp @@ -15,7 +15,7 @@ extern "C" { #include "defs.h" #include "shared/ffmpeg_raii.h" #include "flags.h" -#include "httpd.h" +#include "shared/httpd.h" #include "shared/mux.h" #include "quicksync_encoder.h" #include "shared/timebase.h" @@ -194,8 +194,7 @@ void VideoEncoder::open_output_stream() } stream_mux.reset(new Mux(avctx, width, height, video_codec, video_extradata, stream_audio_encoder->get_codec_parameters().get(), - get_color_space(global_flags.ycbcr_rec709_coefficients), - Mux::WITH_AUDIO, COARSE_TIMEBASE, + get_color_space(global_flags.ycbcr_rec709_coefficients), COARSE_TIMEBASE, /*write_callback=*/nullptr, Mux::WRITE_FOREGROUND, { &stream_mux_metrics })); stream_mux_metrics.init({{ "destination", "http" }}); } @@ -218,9 +217,9 @@ int VideoEncoder::write_packet2(uint8_t *buf, int buf_size, AVIODataMarkerType t if (type == AVIO_DATA_MARKER_HEADER) { stream_mux_header.append((char *)buf, buf_size); - httpd->set_header(stream_mux_header); + httpd->set_header(HTTPD::MAIN_STREAM, stream_mux_header); } else { - httpd->add_data((char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT, time, AVRational{ AV_TIME_BASE, 1 }); + httpd->add_data(HTTPD::MAIN_STREAM, (char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT, time, AVRational{ AV_TIME_BASE, 1 }); } return buf_size; }