diff options
author | miu <miu@chromium.org> | 2015-02-06 21:25:29 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-07 05:26:43 +0000 |
commit | 6377eb4a7055d3135e286e71b563ccd100ed4669 (patch) | |
tree | 534d35f8ef82297f78afe7c40a0f0df0b9e6ad74 /media/cast/cast_defines.h | |
parent | 209de48961dcf016f20a8d9afb964ed51ac9ee04 (diff) | |
download | chromium_src-6377eb4a7055d3135e286e71b563ccd100ed4669.zip chromium_src-6377eb4a7055d3135e286e71b563ccd100ed4669.tar.gz chromium_src-6377eb4a7055d3135e286e71b563ccd100ed4669.tar.bz2 |
[Cast] Repurpose CastInitializationStatus for variable frame size support.
1. Renamed the CastInitializationStatus enum to OperationalStatus.
2. Renamed CastInitializationCallback to StatusChangeCallback.
3. Documented use of enum and callback.
4. Callbacks may now be run repeatedly to indicate when codec reinit
occurs (e.g., for a frame size change), and whether runtime errors
occur after initialization.
BUG=451277
Review URL: https://codereview.chromium.org/901833004
Cr-Commit-Position: refs/heads/master@{#315187}
Diffstat (limited to 'media/cast/cast_defines.h')
-rw-r--r-- | media/cast/cast_defines.h | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/media/cast/cast_defines.h b/media/cast/cast_defines.h index 661c095..582729e 100644 --- a/media/cast/cast_defines.h +++ b/media/cast/cast_defines.h @@ -36,18 +36,33 @@ const int kMaxUnackedFrames = 120; const int64 kCastMessageUpdateIntervalMs = 33; const int64 kNackRepeatIntervalMs = 30; -enum CastInitializationStatus { - STATUS_AUDIO_UNINITIALIZED, - STATUS_VIDEO_UNINITIALIZED, - STATUS_AUDIO_INITIALIZED, - STATUS_VIDEO_INITIALIZED, - STATUS_INVALID_CAST_ENVIRONMENT, - STATUS_INVALID_CRYPTO_CONFIGURATION, - STATUS_UNSUPPORTED_AUDIO_CODEC, - STATUS_UNSUPPORTED_VIDEO_CODEC, - STATUS_INVALID_AUDIO_CONFIGURATION, - STATUS_INVALID_VIDEO_CONFIGURATION, - STATUS_HW_VIDEO_ENCODER_NOT_SUPPORTED, +// Success/in-progress/failure status codes bubbled up to clients via +// StatusChangeCallbacks. +enum OperationalStatus { + // Client should not send frames yet (sender), or should not expect to receive + // frames yet (receiver). + STATUS_UNINITIALIZED, + + // Client may now send or receive frames. + STATUS_INITIALIZED, + + // Codec is being re-initialized. Client may continue sending frames, but + // some may be ignored/dropped until a transition back to STATUS_INITIALIZED. + STATUS_CODEC_REINIT_PENDING, + + // Session has halted due to invalid configuration. + STATUS_INVALID_CONFIGURATION, + + // Session has halted due to an unsupported codec. + STATUS_UNSUPPORTED_CODEC, + + // Session has halted due to a codec initialization failure. Note that this + // can be reported after STATUS_INITIALIZED/STATUS_CODEC_REINIT_PENDING if the + // codec was re-initialized during the session. + STATUS_CODEC_INIT_FAILED, + + // Session has halted due to a codec runtime failure. + STATUS_CODEC_RUNTIME_ERROR, }; enum DefaultSettings { |