OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_FRAME_CALLBACK_H_ | 11 #ifndef WEBRTC_FRAME_CALLBACK_H_ |
12 #define WEBRTC_FRAME_CALLBACK_H_ | 12 #define WEBRTC_FRAME_CALLBACK_H_ |
13 | 13 |
14 #include <stddef.h> | 14 #include <stddef.h> |
| 15 #include <stdint.h> |
15 | 16 |
16 #include "webrtc/common_types.h" | 17 #include "webrtc/common_types.h" |
17 | 18 |
18 namespace webrtc { | 19 namespace webrtc { |
19 | 20 |
20 class VideoFrame; | 21 class VideoFrame; |
21 | 22 |
22 struct EncodedFrame { | 23 struct EncodedFrame { |
23 public: | 24 public: |
24 EncodedFrame() : data_(NULL), length_(0), frame_type_(kEmptyFrame) {} | 25 EncodedFrame() : data_(NULL), length_(0), frame_type_(kEmptyFrame) {} |
(...skipping 11 matching lines...) Expand all Loading... |
36 // frame content. | 37 // frame content. |
37 virtual void FrameCallback(VideoFrame* video_frame) = 0; | 38 virtual void FrameCallback(VideoFrame* video_frame) = 0; |
38 | 39 |
39 protected: | 40 protected: |
40 virtual ~I420FrameCallback() {} | 41 virtual ~I420FrameCallback() {} |
41 }; | 42 }; |
42 | 43 |
43 class EncodedFrameObserver { | 44 class EncodedFrameObserver { |
44 public: | 45 public: |
45 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) = 0; | 46 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) = 0; |
| 47 virtual void OnEncodeTiming(int64_t capture_ntp_ms, int encode_duration_ms) {} |
46 | 48 |
47 protected: | 49 protected: |
48 virtual ~EncodedFrameObserver() {} | 50 virtual ~EncodedFrameObserver() {} |
49 }; | 51 }; |
50 | 52 |
51 } // namespace webrtc | 53 } // namespace webrtc |
52 | 54 |
53 #endif // WEBRTC_FRAME_CALLBACK_H_ | 55 #endif // WEBRTC_FRAME_CALLBACK_H_ |
OLD | NEW |