Commit bf06b45a authored by Ted Meyer's avatar Ted Meyer Committed by Commit Bot

MediaError code grouping preliminary design.

This design is still subject to change. We need a way to prevent
collisions in the codes as they get added.

Bug: 1043289
Change-Id: I512b2a66fb0e1f05d56f9910f5dc8c9779112269
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2026411
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742949}
parent 664e2387
...@@ -9,14 +9,32 @@ namespace media { ...@@ -9,14 +9,32 @@ namespace media {
// NOTE: These numbers are still subject to change. Do not use for things like // NOTE: These numbers are still subject to change. Do not use for things like
// UMA yet! // UMA yet!
// Codes are grouped with a bitmask:
// 0xFFFFFFFF
// └─┬┘├┘└┴ enumeration within the group
// │ └─ group code
// └─ reserved for now
// 256 groups is more than anyone will ever need on a computer.
enum class ErrorCode : uint32_t { enum class ErrorCode : uint32_t {
kOk = 0, kOk = 0,
kCannotMakeContextCurrent = 1000, // Decoder Errors: 0x01
kCouldNotPostTexture = 1001, kDecoderInitializeNeverCompleted = 0x00000101,
kCouldNotPostAcquireStream = 1002, kDecoderFailedDecode = 0x00000102,
kDecoderUnsupportedProfile = 0x00000103,
kDecoderUnsupportedCodec = 0x00000104,
// Windows Errors: 0x02
kWindowsWrappedHresult = 0x00000201,
kWindowsApiNotAvailible = 0x00000202,
// D3D11VideoDecoder Errors: 0x03
kCannotMakeContextCurrent = 0x00000301,
kCouldNotPostTexture = 0x00000302,
kCouldNotPostAcquireStream = 0x00000303,
kCodeOnlyForTesting = 10000, kCodeOnlyForTesting = std::numeric_limits<uint32_t>::max(),
kMaxValue = kCodeOnlyForTesting, kMaxValue = kCodeOnlyForTesting,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment