return;
}
- // Dummy frame buffer size. It's not really used for rendering, just to
- // notify renderer with metadata from the buffer object underneath what
- // should be rendered.
- constexpr const size_t kFrameBufferSize = 4096;
+ int frame_buffer_width = 0;
+ int frame_buffer_height = 0;
+
+ res = IVideoDpControl::getInstance()->getFrameBufferSize(
+ &frame_buffer_width, &frame_buffer_height);
+
+ if (res != 0) {
+ constexpr const int kDefaultFrameBufferSize = 4096;
+ TIZEN_MEDIA_LOG(ERROR)
+ << "Cannot get frame buffer width and height, error: " << res;
+ frame_buffer_width = kDefaultFrameBufferSize;
+ frame_buffer_height = kDefaultFrameBufferSize;
+ }
+
+ TIZEN_MEDIA_LOG(VERBOSE) << "Frame buffer size: [" << frame_buffer_width
+ << "x" << frame_buffer_height << "]";
+
tbm_surface_info_s ts_info;
- ts_info.width = kFrameBufferSize;
- ts_info.height = kFrameBufferSize;
+ ts_info.width = frame_buffer_width;
+ ts_info.height = frame_buffer_height;
ts_info.format = TBM_FORMAT_XRGB8888;
ts_info.bpp = tbm_surface_internal_get_bpp(ts_info.format);
ts_info.num_planes = 1;
- ts_info.planes[0].stride = kFrameBufferSize * 4;
+ ts_info.planes[0].stride = frame_buffer_width * 4;
ts_info.planes[0].offset = 0;
auto tbm_bo_raw = tbm_bo.get();