mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
obs-webrtc: Correctly guard HEVC in output using ifdefs
If an output does not support HEVC, it should not advertise it. For services, however, a service primarily defines the codecs which are supported for the protocol spec itself/destination platform, so HEVC can be advertised still.
This commit is contained in:
@@ -162,7 +162,7 @@ void WHIPOutput::ConfigureVideoTrack(std::string media_stream_id,
|
||||
packetizer = std::make_shared<rtc::H264RtpPacketizer>(
|
||||
rtc::H264RtpPacketizer::Separator::StartSequence,
|
||||
rtp_config, MAX_VIDEO_FRAGMENT_SIZE);
|
||||
#if ENABLE_HEVC
|
||||
#ifdef ENABLE_HEVC
|
||||
} else if (strcmp("hevc", codec) == 0) {
|
||||
video_description.addH265Codec(video_payload_type);
|
||||
packetizer = std::make_shared<rtc::H265RtpPacketizer>(
|
||||
@@ -632,7 +632,11 @@ void register_whip_output()
|
||||
info.get_connect_time_ms = [](void *priv_data) -> int {
|
||||
return static_cast<WHIPOutput *>(priv_data)->GetConnectTime();
|
||||
};
|
||||
#ifdef ENABLE_HEVC
|
||||
info.encoded_video_codecs = "h264;hevc;av1";
|
||||
#else
|
||||
info.encoded_video_codecs = "h264;av1";
|
||||
#endif
|
||||
info.encoded_audio_codecs = "opus";
|
||||
info.protocols = "WHIP";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user