Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_CONFIG_H_ | 5 #ifndef MEDIA_CAST_CAST_CONFIG_H_ |
| 6 #define MEDIA_CAST_CAST_CONFIG_H_ | 6 #define MEDIA_CAST_CAST_CONFIG_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/shared_memory.h" | 15 #include "base/memory/shared_memory.h" |
| 16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "media/cast/net/cast_transport_config.h" | 18 //#include "media/cast/net/cast_transport_config.h" |
| 19 | 19 |
| 20 namespace media { | 20 namespace media { |
| 21 class VideoEncodeAccelerator; | 21 class VideoEncodeAccelerator; |
| 22 | 22 |
| 23 namespace cast { | 23 namespace cast { |
| 24 | 24 |
| 25 enum Codec { | |
|
Wez
2016/10/29 21:24:18
As per crbug.com/530839, do these really belong he
miu
2016/10/31 02:10:34
Not entirely sure. I wanted to plan all this out b
| |
| 26 CODEC_UNKNOWN, | |
| 27 CODEC_AUDIO_OPUS, | |
| 28 CODEC_AUDIO_PCM16, | |
| 29 CODEC_AUDIO_AAC, | |
| 30 CODEC_AUDIO_REMOTE, | |
| 31 CODEC_VIDEO_FAKE, | |
| 32 CODEC_VIDEO_VP8, | |
| 33 CODEC_VIDEO_H264, | |
| 34 CODEC_VIDEO_REMOTE, | |
| 35 CODEC_LAST = CODEC_VIDEO_REMOTE | |
| 36 }; | |
| 37 | |
| 38 // Describes the content being transported over RTP streams. | |
| 39 enum class RtpPayloadType { | |
| 40 UNKNOWN = -1, | |
| 41 | |
| 42 // Cast Streaming will encode raw audio frames using one of its available | |
| 43 // codec implementations, and transport encoded data in the RTP stream. | |
| 44 FIRST = 96, | |
| 45 AUDIO_OPUS = 96, | |
| 46 AUDIO_AAC = 97, | |
| 47 AUDIO_PCM16 = 98, | |
| 48 | |
| 49 // Audio frame data is not modified, and should be transported reliably and | |
| 50 // in-sequence. No assumptions about the data can be made. | |
| 51 REMOTE_AUDIO = 99, | |
| 52 | |
| 53 AUDIO_LAST = REMOTE_AUDIO, | |
| 54 | |
| 55 // Cast Streaming will encode raw video frames using one of its available | |
| 56 // codec implementations, and transport encoded data in the RTP stream. | |
| 57 VIDEO_VP8 = 100, | |
| 58 VIDEO_H264 = 101, | |
| 59 | |
| 60 // Video frame data is not modified, and should be transported reliably and | |
| 61 // in-sequence. No assumptions about the data can be made. | |
| 62 REMOTE_VIDEO = 102, | |
| 63 | |
| 64 LAST = REMOTE_VIDEO | |
| 65 }; | |
| 66 | |
| 25 // TODO(miu): Eliminate these after moving "default config" into the top-level | 67 // TODO(miu): Eliminate these after moving "default config" into the top-level |
| 26 // media/cast directory. http://crbug.com/530839 | 68 // media/cast directory. http://crbug.com/530839 |
| 27 enum SuggestedDefaults { | 69 enum SuggestedDefaults { |
| 28 // Audio encoder bitrate. Zero means "auto," which asks the encoder to select | 70 // Audio encoder bitrate. Zero means "auto," which asks the encoder to select |
| 29 // a bitrate that dynamically adjusts to the content. Otherwise, a constant | 71 // a bitrate that dynamically adjusts to the content. Otherwise, a constant |
| 30 // bitrate is used. | 72 // bitrate is used. |
| 31 kDefaultAudioEncoderBitrate = 0, | 73 kDefaultAudioEncoderBitrate = 0, |
| 32 | 74 |
| 33 // Suggested default audio sampling rate. | 75 // Suggested default audio sampling rate. |
| 34 kDefaultAudioSamplingRate = 48000, | 76 kDefaultAudioSamplingRate = 48000, |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 213 typedef base::Callback<void(std::unique_ptr<base::SharedMemory>)> | 255 typedef base::Callback<void(std::unique_ptr<base::SharedMemory>)> |
| 214 ReceiveVideoEncodeMemoryCallback; | 256 ReceiveVideoEncodeMemoryCallback; |
| 215 typedef base::Callback<void(size_t size, | 257 typedef base::Callback<void(size_t size, |
| 216 const ReceiveVideoEncodeMemoryCallback&)> | 258 const ReceiveVideoEncodeMemoryCallback&)> |
| 217 CreateVideoEncodeMemoryCallback; | 259 CreateVideoEncodeMemoryCallback; |
| 218 | 260 |
| 219 } // namespace cast | 261 } // namespace cast |
| 220 } // namespace media | 262 } // namespace media |
| 221 | 263 |
| 222 #endif // MEDIA_CAST_CAST_CONFIG_H_ | 264 #endif // MEDIA_CAST_CAST_CONFIG_H_ |
| OLD | NEW |