Commit 0a4494f3 authored by fischman@chromium.org's avatar fischman@chromium.org

Make explicit the PipelineStatus enum values and warn that they are logged to UMA.

The explicit values should make it easier to avoid accidentally reusing a
previously-used code as obsolete ones are retired.


Review URL: https://chromiumcodereview.appspot.com/10824283

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151667 0039d316-1c4b-4281-b951-d872f2087c98
parent 1a42c61b
...@@ -12,26 +12,27 @@ ...@@ -12,26 +12,27 @@
namespace media { namespace media {
// Status states for pipeline. All codes except PIPELINE_OK indicate errors. // Status states for pipeline. All codes except PIPELINE_OK indicate errors.
// Logged to UMA, so never reuse a value, always add new/greater ones!
// TODO(vrk/scherkus): Trim the unused status codes. (crbug.com/126070) // TODO(vrk/scherkus): Trim the unused status codes. (crbug.com/126070)
enum PipelineStatus { enum PipelineStatus {
PIPELINE_OK, PIPELINE_OK = 0,
PIPELINE_ERROR_URL_NOT_FOUND, PIPELINE_ERROR_URL_NOT_FOUND = 1,
PIPELINE_ERROR_NETWORK, PIPELINE_ERROR_NETWORK = 2,
PIPELINE_ERROR_DECODE, PIPELINE_ERROR_DECODE = 3,
PIPELINE_ERROR_DECRYPT, PIPELINE_ERROR_DECRYPT = 4,
PIPELINE_ERROR_ABORT, PIPELINE_ERROR_ABORT = 5,
PIPELINE_ERROR_INITIALIZATION_FAILED, PIPELINE_ERROR_INITIALIZATION_FAILED = 6,
PIPELINE_ERROR_REQUIRED_FILTER_MISSING, PIPELINE_ERROR_REQUIRED_FILTER_MISSING = 7,
PIPELINE_ERROR_COULD_NOT_RENDER, PIPELINE_ERROR_COULD_NOT_RENDER = 8,
PIPELINE_ERROR_READ, PIPELINE_ERROR_READ = 9,
PIPELINE_ERROR_OPERATION_PENDING, PIPELINE_ERROR_OPERATION_PENDING = 10,
PIPELINE_ERROR_INVALID_STATE, PIPELINE_ERROR_INVALID_STATE = 11,
// Demuxer related errors. // Demuxer related errors.
DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN = 12,
DEMUXER_ERROR_COULD_NOT_PARSE, DEMUXER_ERROR_COULD_NOT_PARSE = 13,
DEMUXER_ERROR_NO_SUPPORTED_STREAMS, DEMUXER_ERROR_NO_SUPPORTED_STREAMS = 14,
// Decoder related errors. // Decoder related errors.
DECODER_ERROR_NOT_SUPPORTED, DECODER_ERROR_NOT_SUPPORTED = 15,
PIPELINE_STATUS_MAX, // Must be greater than all other values logged. PIPELINE_STATUS_MAX, // Must be greater than all other values logged.
}; };
......
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