Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: media/cast/cast_defines.h

Issue 901833004: [Cast] Repurpose CastInitializationStatus for variable frame size support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fixes. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CAST_CAST_DEFINES_H_ 5 #ifndef MEDIA_CAST_CAST_DEFINES_H_
6 #define MEDIA_CAST_CAST_DEFINES_H_ 6 #define MEDIA_CAST_CAST_DEFINES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 18 matching lines...) Expand all
29 // implementation must retain in order to process the acknowledgements of past 29 // implementation must retain in order to process the acknowledgements of past
30 // frames. 30 // frames.
31 // This value is carefully choosen such that it fits in the 8-bits range for 31 // This value is carefully choosen such that it fits in the 8-bits range for
32 // frame IDs. It is also less than half of the full 8-bits range such that we 32 // frame IDs. It is also less than half of the full 8-bits range such that we
33 // can handle wrap around and compare two frame IDs. 33 // can handle wrap around and compare two frame IDs.
34 const int kMaxUnackedFrames = 120; 34 const int kMaxUnackedFrames = 120;
35 35
36 const int64 kCastMessageUpdateIntervalMs = 33; 36 const int64 kCastMessageUpdateIntervalMs = 33;
37 const int64 kNackRepeatIntervalMs = 30; 37 const int64 kNackRepeatIntervalMs = 30;
38 38
39 enum CastInitializationStatus { 39 // Success/in-progress/failure status codes bubbled up to clients via
40 STATUS_AUDIO_UNINITIALIZED, 40 // StatusChangeCallbacks.
41 STATUS_VIDEO_UNINITIALIZED, 41 enum OperationalStatus {
42 STATUS_AUDIO_INITIALIZED, 42 // Client should not send frames yet (sender), or should not expect to receive
43 STATUS_VIDEO_INITIALIZED, 43 // frames yet (receiver).
44 STATUS_INVALID_CAST_ENVIRONMENT, 44 STATUS_UNINITIALIZED,
45 STATUS_INVALID_CRYPTO_CONFIGURATION, 45
46 STATUS_UNSUPPORTED_AUDIO_CODEC, 46 // Client may now send or receive frames.
47 STATUS_UNSUPPORTED_VIDEO_CODEC, 47 STATUS_INITIALIZED,
48 STATUS_INVALID_AUDIO_CONFIGURATION, 48
49 STATUS_INVALID_VIDEO_CONFIGURATION, 49 // Codec is being re-initialized. Client may continue sending frames, but
50 STATUS_HW_VIDEO_ENCODER_NOT_SUPPORTED, 50 // some may be ignored/dropped until a transition back to STATUS_INITIALIZED.
51 STATUS_CODEC_REINIT_PENDING,
52
53 // Session has halted due to invalid configuration.
54 STATUS_INVALID_CONFIGURATION,
55
56 // Session has halted due to an unsupported codec.
57 STATUS_UNSUPPORTED_CODEC,
58
59 // Session has halted due to a codec initialization failure. Note that this
60 // can be reported after STATUS_INITIALIZED/STATUS_CODEC_REINIT_PENDING if the
61 // codec was re-initialized during the session.
62 STATUS_CODEC_INIT_FAILED,
63
64 // Session has halted due to a codec runtime failure.
65 STATUS_CODEC_RUNTIME_ERROR,
51 }; 66 };
52 67
53 enum DefaultSettings { 68 enum DefaultSettings {
54 kDefaultAudioEncoderBitrate = 0, // This means "auto," and may mean VBR. 69 kDefaultAudioEncoderBitrate = 0, // This means "auto," and may mean VBR.
55 kDefaultAudioSamplingRate = 48000, 70 kDefaultAudioSamplingRate = 48000,
56 kDefaultMaxQp = 56, 71 kDefaultMaxQp = 56,
57 kDefaultMinQp = 4, 72 kDefaultMinQp = 4,
58 kDefaultMaxFrameRate = 30, 73 kDefaultMaxFrameRate = 30,
59 kDefaultNumberOfVideoBuffers = 1, 74 kDefaultNumberOfVideoBuffers = 1,
60 kDefaultRtcpIntervalMs = 500, 75 kDefaultRtcpIntervalMs = 500,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 212
198 inline int64 TimeDeltaToRtpDelta(base::TimeDelta delta, int rtp_timebase) { 213 inline int64 TimeDeltaToRtpDelta(base::TimeDelta delta, int rtp_timebase) {
199 DCHECK_GT(rtp_timebase, 0); 214 DCHECK_GT(rtp_timebase, 0);
200 return delta * rtp_timebase / base::TimeDelta::FromSeconds(1); 215 return delta * rtp_timebase / base::TimeDelta::FromSeconds(1);
201 } 216 }
202 217
203 } // namespace cast 218 } // namespace cast
204 } // namespace media 219 } // namespace media
205 220
206 #endif // MEDIA_CAST_CAST_DEFINES_H_ 221 #endif // MEDIA_CAST_CAST_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698