| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright (c) 2011 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_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ | 11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ | 
| 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ | 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ | 
| 13 | 13 | 
| 14 #include <memory> | 14 #include <memory> | 
| 15 | 15 | 
| 16 #include "webrtc/base/buffer.h" | 16 #include "webrtc/base/buffer.h" | 
| 17 #include "webrtc/base/refcount.h" | 17 #include "webrtc/base/refcount.h" | 
| 18 #include "webrtc/base/scoped_ref_ptr.h" | 18 #include "webrtc/base/scoped_ref_ptr.h" | 
| 19 #include "webrtc/common_types.h" | 19 #include "webrtc/common_types.h" | 
| 20 #include "webrtc/common_video/include/video_frame_buffer.h" | 20 #include "webrtc/common_video/include/video_frame_buffer.h" | 
| 21 #include "webrtc/media/base/videoframe.h" | 21 #include "webrtc/media/base/videoframe.h" | 
| 22 | 22 | 
| 23 namespace cricket { | 23 namespace cricket { | 
| 24 | 24 | 
| 25 struct CapturedFrame; | 25 struct CapturedFrame; | 
| 26 | 26 | 
|  | 27 // TODO(nisse): This class will be deleted when the cricket::VideoFrame and | 
|  | 28 // webrtc::VideoFrame classes are merged. See | 
|  | 29 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5682. Try to use only the | 
|  | 30 // preferred constructor, and the non-deprecated methods of the VideoFrame base | 
|  | 31 // class. | 
| 27 class WebRtcVideoFrame : public VideoFrame { | 32 class WebRtcVideoFrame : public VideoFrame { | 
| 28  public: | 33  public: | 
| 29   WebRtcVideoFrame(); | 34   WebRtcVideoFrame(); | 
| 30 | 35 | 
| 31   // Preferred construction, with microsecond timestamp. | 36   // Preferred constructor. | 
| 32   WebRtcVideoFrame(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer, | 37   WebRtcVideoFrame(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer, | 
| 33                    webrtc::VideoRotation rotation, | 38                    webrtc::VideoRotation rotation, | 
| 34                    int64_t timestamp_us); | 39                    int64_t timestamp_us); | 
| 35 | 40 | 
| 36   // TODO(nisse): Deprecate/delete. | 41   // TODO(nisse): Deprecated, delete as soon as all callers have switched to the | 
|  | 42   // above constructor with microsecond timestamp. | 
| 37   WebRtcVideoFrame(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer, | 43   WebRtcVideoFrame(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer, | 
| 38                    int64_t time_stamp_ns, | 44                    int64_t time_stamp_ns, | 
| 39                    webrtc::VideoRotation rotation); | 45                    webrtc::VideoRotation rotation); | 
| 40 | 46 | 
| 41   ~WebRtcVideoFrame(); | 47   ~WebRtcVideoFrame(); | 
| 42 | 48 | 
| 43   // Creates a frame from a raw sample with FourCC "format" and size "w" x "h". | 49   // Creates a frame from a raw sample with FourCC "format" and size "w" x "h". | 
| 44   // "h" can be negative indicating a vertically flipped image. | 50   // "h" can be negative indicating a vertically flipped image. | 
| 45   // "dh" is destination height if cropping is desired and is always positive. | 51   // "dh" is destination height if cropping is desired and is always positive. | 
| 46   // Returns "true" if successful. | 52   // Returns "true" if successful. | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 114   webrtc::VideoRotation rotation_; | 120   webrtc::VideoRotation rotation_; | 
| 115 | 121 | 
| 116   // This is mutable as the calculation is expensive but once calculated, it | 122   // This is mutable as the calculation is expensive but once calculated, it | 
| 117   // remains const. | 123   // remains const. | 
| 118   mutable std::unique_ptr<VideoFrame> rotated_frame_; | 124   mutable std::unique_ptr<VideoFrame> rotated_frame_; | 
| 119 }; | 125 }; | 
| 120 | 126 | 
| 121 }  // namespace cricket | 127 }  // namespace cricket | 
| 122 | 128 | 
| 123 #endif  // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ | 129 #endif  // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOFRAME_H_ | 
| OLD | NEW | 
|---|