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

Side by Side Diff: media/cast/sender/video_encoder.h

Issue 863083002: [cast] Add optional VideoEncoder method to flush frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 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
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.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698