Skip to content

Commit

Permalink
Hookup pyroenc h265.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Feb 9, 2025
1 parent fc0d32e commit bc7b6d5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions video/ffmpeg_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,10 @@ bool VideoEncoder::Impl::init_video_codec_pyro(PyroEnc::Profile profile)
pyro_codec.video_codec = PYRO_VIDEO_CODEC_H264;
break;

case PyroEnc::Profile::H265_Main:
pyro_codec.video_codec = PYRO_VIDEO_CODEC_H265;
break;

default:
return false;
}
Expand All @@ -1268,15 +1272,25 @@ bool VideoEncoder::Impl::init_video_codec()
// Only allow PyroEnc path for pure streaming scenario for now.
if (!codec && options.realtime &&
mux_stream_callback && !options.realtime_options.local_backup_path &&
options.encoder && strcmp(options.encoder, "h264_pyro") == 0)
options.encoder && (strcmp(options.encoder, "h264_pyro") == 0 || strcmp(options.encoder, "h265_pyro") == 0))
{
// Use custom.
using_pyro_encoder = true;

if (options.format == Format::NV12 && device->get_device_features().supports_video_encode_h264)
auto &ext = device->get_device_features();

if (options.format == Format::NV12 &&
ext.supports_video_encode_h264 &&
strcmp(options.encoder, "h264_pyro") == 0)
{
pyro_profile = PyroEnc::Profile::H264_High;
}
else if (options.format == Format::NV12 &&
ext.supports_video_encode_h265 &&
strcmp(options.encoder, "h265_pyro") == 0)
{
pyro_profile = PyroEnc::Profile::H265_Main;
}
else
{
LOGE("Could not find supported pyroenc profile for requested codec.\n");
Expand Down

0 comments on commit bc7b6d5

Please sign in to comment.