Permalink
Browse files

enc-h264, enc-h265: Apply Profile, Level and Tier before Resolution a…

…nd Frame Rate

Co-authored-by: Qiang Wen <Qiang.Wen@amd.com>
  • Loading branch information...
Xaymar and heishanbaishui committed Jul 17, 2018
1 parent 95c6a51 commit c292f6de41f22a0521300e8ce0b74bbe5e4d0edf
Showing with 9 additions and 9 deletions.
  1. +4 −4 Source/enc-h264.cpp
  2. +5 −5 Source/enc-h265.cpp
@@ -1309,14 +1309,14 @@ Plugin::Interface::H264Interface::H264Interface(obs_data_t* data, obs_encoder_t*
/// Static Properties
m_VideoEncoder->SetQualityPreset(static_cast<QualityPreset>(obs_data_get_int(data, P_QUALITYPRESET)));

/// Frame
m_VideoEncoder->SetResolution(std::make_pair(obsWidth, obsHeight));
m_VideoEncoder->SetFrameRate(std::make_pair(obsFPSnum, obsFPSden));

/// Profile & Level
m_VideoEncoder->SetProfile(static_cast<Profile>(obs_data_get_int(data, P_PROFILE)));
m_VideoEncoder->SetProfileLevel(static_cast<ProfileLevel>(obs_data_get_int(data, P_PROFILELEVEL)));

/// Frame
m_VideoEncoder->SetResolution(std::make_pair(obsWidth, obsHeight));
m_VideoEncoder->SetFrameRate(std::make_pair(obsFPSnum, obsFPSden));

try {
m_VideoEncoder->SetCodingType(static_cast<CodingType>(obs_data_get_int(data, P_CODINGTYPE)));
} catch (...) {
@@ -904,16 +904,16 @@ Plugin::Interface::H265Interface::H265Interface(obs_data_t* data, obs_encoder_t*
//m_VideoEncoder->SetUsage(Usage::Transcoding);
m_VideoEncoder->SetQualityPreset(static_cast<QualityPreset>(obs_data_get_int(data, P_QUALITYPRESET)));

/// Frame
m_VideoEncoder->SetResolution(std::make_pair(obsWidth, obsHeight));
m_VideoEncoder->SetFrameRate(std::make_pair(obsFPSnum, obsFPSden));
///- Aspect Ratio

/// Profile & Level
m_VideoEncoder->SetProfile(static_cast<Profile>(obs_data_get_int(data, P_PROFILE)));
m_VideoEncoder->SetProfileLevel(static_cast<ProfileLevel>(obs_data_get_int(data, P_PROFILELEVEL)));
m_VideoEncoder->SetTier(static_cast<H265::Tier>(obs_data_get_int(data, P_TIER)));

/// Frame
m_VideoEncoder->SetResolution(std::make_pair(obsWidth, obsHeight));
m_VideoEncoder->SetFrameRate(std::make_pair(obsFPSnum, obsFPSden));
///- Aspect Ratio

try {
m_VideoEncoder->SetCodingType(static_cast<CodingType>(obs_data_get_int(data, P_CODINGTYPE)));
} catch (...) {

0 comments on commit c292f6d

Please sign in to comment.