| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 virtual ~PacketSender() {} | 180 virtual ~PacketSender() {} |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 class PacketReceiver : public base::RefCountedThreadSafe<PacketReceiver> { | 183 class PacketReceiver : public base::RefCountedThreadSafe<PacketReceiver> { |
| 184 public: | 184 public: |
| 185 // All packets received from the network should be delivered via this | 185 // All packets received from the network should be delivered via this |
| 186 // function. | 186 // function. |
| 187 virtual void ReceivedPacket(const uint8* packet, int length, | 187 virtual void ReceivedPacket(const uint8* packet, int length, |
| 188 const base::Closure callback) = 0; | 188 const base::Closure callback) = 0; |
| 189 | 189 |
| 190 protected: |
| 190 virtual ~PacketReceiver() {} | 191 virtual ~PacketReceiver() {} |
| 192 |
| 193 private: |
| 194 friend class base::RefCountedThreadSafe<PacketReceiver>; |
| 191 }; | 195 }; |
| 192 | 196 |
| 193 class VideoEncoderController { | 197 class VideoEncoderController { |
| 194 public: | 198 public: |
| 195 // Inform the encoder about the new target bit rate. | 199 // Inform the encoder about the new target bit rate. |
| 196 virtual void SetBitRate(int new_bit_rate) = 0; | 200 virtual void SetBitRate(int new_bit_rate) = 0; |
| 197 | 201 |
| 198 // Inform the encoder to not encode the next frame. | 202 // Inform the encoder to not encode the next frame. |
| 199 // Note: this setting is sticky and should last until called with false. | 203 // Note: this setting is sticky and should last until called with false. |
| 200 virtual void SkipNextFrame(bool skip_next_frame) = 0; | 204 virtual void SkipNextFrame(bool skip_next_frame) = 0; |
| 201 | 205 |
| 202 // Inform the encoder to encode the next frame as a key frame. | 206 // Inform the encoder to encode the next frame as a key frame. |
| 203 virtual void GenerateKeyFrame() = 0; | 207 virtual void GenerateKeyFrame() = 0; |
| 204 | 208 |
| 205 // Inform the encoder to only reference frames older or equal to frame_id; | 209 // Inform the encoder to only reference frames older or equal to frame_id; |
| 206 virtual void LatestFrameIdToReference(uint8 frame_id) = 0; | 210 virtual void LatestFrameIdToReference(uint8 frame_id) = 0; |
| 207 | 211 |
| 208 // Query the codec about how many frames it has skipped due to slow ACK. | 212 // Query the codec about how many frames it has skipped due to slow ACK. |
| 209 virtual int NumberOfSkippedFrames() const = 0; | 213 virtual int NumberOfSkippedFrames() const = 0; |
| 210 | 214 |
| 211 protected: | 215 protected: |
| 212 virtual ~VideoEncoderController() {} | 216 virtual ~VideoEncoderController() {} |
| 213 }; | 217 }; |
| 214 | 218 |
| 215 } // namespace cast | 219 } // namespace cast |
| 216 } // namespace media | 220 } // namespace media |
| 217 | 221 |
| 218 #endif // MEDIA_CAST_CAST_CONFIG_H_ | 222 #endif // MEDIA_CAST_CAST_CONFIG_H_ |
| OLD | NEW |