diff options
author | rileya@chromium.org <rileya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 13:08:00 +0000 |
---|---|---|
committer | rileya@chromium.org <rileya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 13:08:00 +0000 |
commit | 956d9ef3e58d85771c18620a1fdf1ca54e16c150 (patch) | |
tree | 82437279f1f44e27f8f7136d1494794d28a0616b /media/base/video_frame.cc | |
parent | d6ec84afaa637fb057ad1cbf5a7c03b02b6a456c (diff) | |
download | chromium_src-956d9ef3e58d85771c18620a1fdf1ca54e16c150.zip chromium_src-956d9ef3e58d85771c18620a1fdf1ca54e16c150.tar.gz chromium_src-956d9ef3e58d85771c18620a1fdf1ca54e16c150.tar.bz2 |
Replace VideoFrame::INVALID with UNKNOWN.
INVALID was misleading: the usage has more to do with the format being unknown at the time, rather than being invalid.
BUG=313827
TBR=danakj
Review URL: https://codereview.chromium.org/51343005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/video_frame.cc')
-rw-r--r-- | media/base/video_frame.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc index a372889..9c07251 100644 --- a/media/base/video_frame.cc +++ b/media/base/video_frame.cc @@ -46,8 +46,8 @@ scoped_refptr<VideoFrame> VideoFrame::CreateFrame( // static std::string VideoFrame::FormatToString(VideoFrame::Format format) { switch (format) { - case VideoFrame::INVALID: - return "INVALID"; + case VideoFrame::UNKNOWN: + return "UNKNOWN"; case VideoFrame::RGB32: return "RGB32"; case VideoFrame::YV12: @@ -76,7 +76,7 @@ bool VideoFrame::IsValidConfig(VideoFrame::Format format, const gfx::Size& coded_size, const gfx::Rect& visible_rect, const gfx::Size& natural_size) { - return (format != VideoFrame::INVALID && + return (format != VideoFrame::UNKNOWN && !coded_size.IsEmpty() && coded_size.GetArea() <= limits::kMaxCanvas && coded_size.width() <= limits::kMaxDimension && @@ -240,7 +240,7 @@ size_t VideoFrame::NumPlanes(Format format) { case VideoFrame::YV12A: return 4; case VideoFrame::EMPTY: - case VideoFrame::INVALID: + case VideoFrame::UNKNOWN: break; } NOTREACHED() << "Unsupported video frame format: " << format; @@ -274,7 +274,7 @@ size_t VideoFrame::AllocationSize(Format format, const gfx::Size& coded_size) { RoundUp(coded_size.width(), 2) * RoundUp(coded_size.height(), 2); return rounded_size * 2; } - case VideoFrame::INVALID: + case VideoFrame::UNKNOWN: case VideoFrame::EMPTY: case VideoFrame::NATIVE_TEXTURE: #if defined(GOOGLE_TV) |