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

Side by Side Diff: webrtc/frame_callback.h

Issue 1371043003: Unify FrameType and VideoFrameType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 2 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
« no previous file with comments | « webrtc/common_types.h ('k') | webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 15
16 #include "webrtc/common_types.h" 16 #include "webrtc/common_types.h"
17 17
18 namespace webrtc { 18 namespace webrtc {
19 19
20 class VideoFrame; 20 class VideoFrame;
21 21
22 struct EncodedFrame { 22 struct EncodedFrame {
23 public: 23 public:
24 EncodedFrame() : data_(NULL), length_(0), frame_type_(kFrameEmpty) {} 24 EncodedFrame() : data_(NULL), length_(0), frame_type_(kEmptyFrame) {}
25 EncodedFrame(const uint8_t* data, size_t length, FrameType frame_type) 25 EncodedFrame(const uint8_t* data, size_t length, FrameType frame_type)
26 : data_(data), length_(length), frame_type_(frame_type) {} 26 : data_(data), length_(length), frame_type_(frame_type) {}
27 27
28 const uint8_t* data_; 28 const uint8_t* data_;
29 const size_t length_; 29 const size_t length_;
30 const FrameType frame_type_; 30 const FrameType frame_type_;
31 }; 31 };
32 32
33 class I420FrameCallback { 33 class I420FrameCallback {
34 public: 34 public:
35 // This function is called with a I420 frame allowing the user to modify the 35 // This function is called with a I420 frame allowing the user to modify the
36 // frame content. 36 // frame content.
37 virtual void FrameCallback(VideoFrame* video_frame) = 0; 37 virtual void FrameCallback(VideoFrame* video_frame) = 0;
38 38
39 protected: 39 protected:
40 virtual ~I420FrameCallback() {} 40 virtual ~I420FrameCallback() {}
41 }; 41 };
42 42
43 class EncodedFrameObserver { 43 class EncodedFrameObserver {
44 public: 44 public:
45 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) = 0; 45 virtual void EncodedFrameCallback(const EncodedFrame& encoded_frame) = 0;
46 46
47 protected: 47 protected:
48 virtual ~EncodedFrameObserver() {} 48 virtual ~EncodedFrameObserver() {}
49 }; 49 };
50 50
51 } // namespace webrtc 51 } // namespace webrtc
52 52
53 #endif // WEBRTC_FRAME_CALLBACK_H_ 53 #endif // WEBRTC_FRAME_CALLBACK_H_
OLDNEW
« no previous file with comments | « webrtc/common_types.h ('k') | webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698