} // namespace
+constexpr gfx::Size kFHDVideoMaxSize(1920, 1080);
+constexpr gfx::Size k4KVideoMaxSize(3840, 2160);
+constexpr gfx::Size k8KVideoMaxSize(7680, 4320);
+
namespace media {
const char* GetString(media::BufferStatus status) {
case ESPLUSPLAYER_VIDEO_MIME_TYPE_AV1:
case ESPLUSPLAYER_VIDEO_MIME_TYPE_HEVC:
case ESPLUSPLAYER_VIDEO_MIME_TYPE_VP9:
- return {k8KVideoMaxWidth, k8KVideoMaxHeight};
- case ESPLUSPLAYER_VIDEO_MIME_TYPE_VP8:
- return {kFHDVideoMaxWidth, kFHDVideoMaxHeight};
+ return k8KVideoMaxSize;
case ESPLUSPLAYER_VIDEO_MIME_TYPE_H264:
if (is_video_hole)
- return {k4KVideoMaxWidth, k4KVideoMaxHeight};
+ return k4KVideoMaxSize;
else
- return {kFHDVideoMaxWidth, kFHDVideoMaxHeight};
+ return kFHDVideoMaxSize;
+ case ESPLUSPLAYER_VIDEO_MIME_TYPE_VP8:
default:
- // for all kind of codecs.
- return {kFHDVideoMaxWidth, kFHDVideoMaxHeight};
+ return kFHDVideoMaxSize;
}
}
gfx::Size GetPanelResolution() {
+ gfx::Size panel_size;
#if BUILDFLAG(IS_TIZEN_TV)
- int panel_width = GetTVPanelWidth();
- int panel_height = GetTVPanelHeight();
-#else
- int panel_width = 0;
- int panel_height = 0;
+ panel_size = gfx::Size(GetTVPanelWidth(), GetTVPanelHeight());
#endif
- if (!panel_width || !panel_height) {
- panel_width = kFHDVideoMaxWidth;
- panel_height = kFHDVideoMaxHeight;
- }
-
- LOG(INFO) << "Panel resolution: " << panel_width << " x " << panel_height;
- return {panel_width, panel_height};
+ return panel_size.IsEmpty() ? kFHDVideoMaxSize : panel_size;
}
gfx::Size GetMaxResolution(esplusplayer_video_mime_type mime_type,
#include "ui/gfx/geometry/size.h"
namespace media {
-const int kElementryStreamCount = 2; // Audio, Video only.
-
-const int kVideoFramerateDen = 100;
-const int kVideoFramerateNum = 2997;
-const int kFHDVideoMaxWidth = 1920;
-const int kFHDVideoMaxHeight = 1080;
-const int k4KVideoMaxWidth = 3840;
-const int k4KVideoMaxHeight = 2160;
-const int k8KVideoMaxWidth = 7680;
-const int k8KVideoMaxHeight = 4320;
-const int kMaxFramerate = 60;
-const int kBuffingLimit = 5; // Seconds
+constexpr int kElementryStreamCount = 2; // Audio, Video only.
+constexpr int kVideoFramerateDen = 100;
+constexpr int kVideoFramerateNum = 2997;
+constexpr int kMaxFramerate = 60;
const char* GetString(media::BufferStatus status);
const char* GetString(esplusplayer_submit_status status);
PipelineStatus GetPipelineError(const esplusplayer_error_type error);
-gfx::Size GetMaxCodecResolution(esplusplayer_video_mime_type mime_type,
- bool is_video_hole);
gfx::Size GetPanelResolution();
gfx::Size GetMaxResolution(esplusplayer_video_mime_type mime_type,
bool is_video_hole);