| 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 <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 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 "media/cast/cast_defines.h" | 15 #include "media/cast/cast_defines.h" |
| 16 | 16 |
| 17 namespace media { | 17 namespace media { |
| 18 namespace cast { | 18 namespace cast { |
| 19 | 19 |
| 20 enum RtcpMode { | 20 enum RtcpMode { |
| 21 kRtcpCompound, // Compound RTCP mode is described by RFC 4585. | 21 kRtcpCompound, // Compound RTCP mode is described by RFC 4585. |
| 22 kRtcpReducedSize, // Reduced-size RTCP mode is described by RFC 5506. | 22 kRtcpReducedSize, // Reduced-size RTCP mode is described by RFC 5506. |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 enum VideoCodec { | 25 enum VideoCodec { |
| 26 kVp8, | 26 kVp8, |
| 27 kH264, | 27 kH264, |
| 28 kExternalVideo, | |
| 29 }; | 28 }; |
| 30 | 29 |
| 31 enum AudioCodec { | 30 enum AudioCodec { |
| 32 kOpus, | 31 kOpus, |
| 33 kPcm16, | 32 kPcm16, |
| 34 kExternalAudio, | 33 kExternalAudio, |
| 35 }; | 34 }; |
| 36 | 35 |
| 37 struct AudioSenderConfig { | 36 struct AudioSenderConfig { |
| 38 AudioSenderConfig(); | 37 AudioSenderConfig(); |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 197 |
| 199 static void DeletePacket(const uint8* packet); | 198 static void DeletePacket(const uint8* packet); |
| 200 | 199 |
| 201 protected: | 200 protected: |
| 202 virtual ~PacketReceiver() {} | 201 virtual ~PacketReceiver() {} |
| 203 | 202 |
| 204 private: | 203 private: |
| 205 friend class base::RefCountedThreadSafe<PacketReceiver>; | 204 friend class base::RefCountedThreadSafe<PacketReceiver>; |
| 206 }; | 205 }; |
| 207 | 206 |
| 208 class VideoEncoderController { | |
| 209 public: | |
| 210 // Inform the encoder about the new target bit rate. | |
| 211 virtual void SetBitRate(int new_bit_rate) = 0; | |
| 212 | |
| 213 // Inform the encoder to not encode the next frame. | |
| 214 // Note: this setting is sticky and should last until called with false. | |
| 215 virtual void SkipNextFrame(bool skip_next_frame) = 0; | |
| 216 | |
| 217 // Inform the encoder to encode the next frame as a key frame. | |
| 218 virtual void GenerateKeyFrame() = 0; | |
| 219 | |
| 220 // Inform the encoder to only reference frames older or equal to frame_id; | |
| 221 virtual void LatestFrameIdToReference(uint32 frame_id) = 0; | |
| 222 | |
| 223 // Query the codec about how many frames it has skipped due to slow ACK. | |
| 224 virtual int NumberOfSkippedFrames() const = 0; | |
| 225 | |
| 226 protected: | |
| 227 virtual ~VideoEncoderController() {} | |
| 228 }; | |
| 229 | |
| 230 } // namespace cast | 207 } // namespace cast |
| 231 } // namespace media | 208 } // namespace media |
| 232 | 209 |
| 233 #endif // MEDIA_CAST_CAST_CONFIG_H_ | 210 #endif // MEDIA_CAST_CAST_CONFIG_H_ |
| OLD | NEW |