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 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 timestamp_(timestamp) {} | 43 timestamp_(timestamp) {} |
44 | 44 |
45 const uint8_t* data_; | 45 const uint8_t* data_; |
46 const size_t length_; | 46 const size_t length_; |
47 const FrameType frame_type_; | 47 const FrameType frame_type_; |
48 const uint32_t encoded_width_; | 48 const uint32_t encoded_width_; |
49 const uint32_t encoded_height_; | 49 const uint32_t encoded_height_; |
50 const uint32_t timestamp_; | 50 const uint32_t timestamp_; |
51 }; | 51 }; |
52 | 52 |
53 class I420FrameCallback { | |
54 public: | |
55 // This function is called with a I420 frame allowing the user to modify the | |
56 // frame content. | |
57 virtual void FrameCallback(VideoFrame* video_frame) = 0; | |
58 | |
59 protected: | |
60 virtual ~I420FrameCallback() {} | |
61 }; | |
62 | |
63 class EncodedFrameObserver { | 53 class EncodedFrameObserver { |
64 public: | 54 public: |
65 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) = 0; | 55 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) = 0; |
66 virtual void OnEncodeTiming(int64_t capture_ntp_ms, int encode_duration_ms) {} | 56 virtual void OnEncodeTiming(int64_t capture_ntp_ms, int encode_duration_ms) {} |
67 | 57 |
68 protected: | 58 protected: |
69 virtual ~EncodedFrameObserver() {} | 59 virtual ~EncodedFrameObserver() {} |
70 }; | 60 }; |
71 | 61 |
72 } // namespace webrtc | 62 } // namespace webrtc |
73 | 63 |
74 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_FRAME_CALLBACK_H_ | 64 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_FRAME_CALLBACK_H_ |
OLD | NEW |