Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SENDER_VIDEO_ENCODER_H_ | 5 #ifndef MEDIA_CAST_SENDER_VIDEO_ENCODER_H_ |
| 6 #define MEDIA_CAST_SENDER_VIDEO_ENCODER_H_ | 6 #define MEDIA_CAST_SENDER_VIDEO_ENCODER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 // Inform the encoder to encode the next frame as a key frame. | 41 // Inform the encoder to encode the next frame as a key frame. |
| 42 virtual void GenerateKeyFrame() = 0; | 42 virtual void GenerateKeyFrame() = 0; |
| 43 | 43 |
| 44 // Inform the encoder to only reference frames older or equal to frame_id; | 44 // Inform the encoder to only reference frames older or equal to frame_id; |
| 45 virtual void LatestFrameIdToReference(uint32 frame_id) = 0; | 45 virtual void LatestFrameIdToReference(uint32 frame_id) = 0; |
| 46 | 46 |
| 47 // Creates a |VideoFrameFactory| object to vend |VideoFrame| object with | 47 // Creates a |VideoFrameFactory| object to vend |VideoFrame| object with |
| 48 // encoder affinity (defined as offering some sort of performance benefit). | 48 // encoder affinity (defined as offering some sort of performance benefit). |
| 49 // This is an optional capability and by default returns null. | 49 // This is an optional capability and by default returns null. |
| 50 virtual scoped_ptr<VideoFrameFactory> CreateVideoFrameFactory(); | 50 virtual scoped_ptr<VideoFrameFactory> CreateVideoFrameFactory(); |
| 51 | |
| 52 // Instructs the encoder to finish and emit all frames that have been | |
| 53 // submitted for encoding. An encoder may hold a certain number of frames for | |
| 54 // analysis. Under certain network conditions, particularly when there is | |
| 55 // network congestion, it is necessary to flush out of the encoder all | |
| 56 // submitted frames so that eventually new frames may be encoded. | |
|
miu
2015/01/22 01:07:18
Also in this comment, please add something to the
| |
| 57 virtual void EmitFrames(); | |
| 51 }; | 58 }; |
| 52 | 59 |
| 53 } // namespace cast | 60 } // namespace cast |
| 54 } // namespace media | 61 } // namespace media |
| 55 | 62 |
| 56 #endif // MEDIA_CAST_SENDER_VIDEO_ENCODER_H_ | 63 #endif // MEDIA_CAST_SENDER_VIDEO_ENCODER_H_ |
| OLD | NEW |