Send both frame rate and refresh rate in description
This commit is contained in:
@@ -140,7 +140,7 @@ decoder::decoder(
|
||||
// latency mode
|
||||
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_WIDTH, width);
|
||||
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_HEIGHT, height);
|
||||
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_OPERATING_RATE, std::ceil(description.fps));
|
||||
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_OPERATING_RATE, std::ceil(description.frame_rate));
|
||||
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_PRIORITY, 0);
|
||||
|
||||
media_codec.reset(AMediaCodec_createDecoderByType(mime(description.codec[stream_index])));
|
||||
|
||||
@@ -1165,7 +1165,7 @@ void scenes::stream::exit()
|
||||
|
||||
void scenes::stream::setup(const to_headset::video_stream_description & description)
|
||||
{
|
||||
session.set_refresh_rate(description.fps);
|
||||
session.set_refresh_rate(description.refresh_rate);
|
||||
|
||||
std::unique_lock lock(decoder_mutex);
|
||||
if (video_stream_description == description)
|
||||
@@ -1189,7 +1189,7 @@ void scenes::stream::setup_reprojection_swapchain(uint32_t swapchain_width, uint
|
||||
assert(swapchain_width);
|
||||
assert(swapchain_height);
|
||||
device.waitIdle();
|
||||
session.set_refresh_rate(video_stream_description->fps);
|
||||
session.set_refresh_rate(video_stream_description->refresh_rate);
|
||||
|
||||
auto views = system.view_configuration_views(viewconfig);
|
||||
|
||||
|
||||
@@ -111,10 +111,10 @@ void scenes::stream::operator()(to_headset::video_stream_description && desc)
|
||||
|
||||
void scenes::stream::operator()(to_headset::refresh_rate_change && rate)
|
||||
{
|
||||
session.set_refresh_rate(rate.fps);
|
||||
session.set_refresh_rate(rate.hz);
|
||||
std::shared_lock lock(decoder_mutex);
|
||||
if (video_stream_description)
|
||||
video_stream_description->fps = rate.fps;
|
||||
video_stream_description->refresh_rate = rate.hz;
|
||||
}
|
||||
|
||||
void scenes::stream::operator()(to_headset::stream_tab_change && tab)
|
||||
|
||||
Reference in New Issue
Block a user