| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright (c) 2004 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 50   // Returns the handle of the underlying video frame. This is used when the | 50   // Returns the handle of the underlying video frame. This is used when the | 
| 51   // frame is backed by a texture. The object should be destroyed when it is no | 51   // frame is backed by a texture. The object should be destroyed when it is no | 
| 52   // longer in use, so the underlying resource can be freed. | 52   // longer in use, so the underlying resource can be freed. | 
| 53   virtual void* GetNativeHandle() const = 0; | 53   virtual void* GetNativeHandle() const = 0; | 
| 54 | 54 | 
| 55   // Returns the underlying video frame buffer. This function is ok to call | 55   // Returns the underlying video frame buffer. This function is ok to call | 
| 56   // multiple times, but the returned object will refer to the same memory. | 56   // multiple times, but the returned object will refer to the same memory. | 
| 57   virtual rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() | 57   virtual rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() | 
| 58       const = 0; | 58       const = 0; | 
| 59 | 59 | 
| 60   virtual int64_t GetTimeStamp() const = 0; | 60   // System monotonic clock, same timebase as rtc::TimeMicros(). | 
| 61   virtual void SetTimeStamp(int64_t time_stamp) = 0; | 61   virtual int64_t timestamp_us() const = 0; | 
|  | 62   virtual void set_timestamp_us(int64_t time_us) = 0; | 
|  | 63 | 
|  | 64   // Deprecated methods, for backwards compatibility. | 
|  | 65   // TODO(nisse): Delete when usage in Chrome and other applications | 
|  | 66   // have been replaced. | 
|  | 67   virtual int64_t GetTimeStamp() const { | 
|  | 68     return rtc::kNumNanosecsPerMicrosec * timestamp_us(); | 
|  | 69   } | 
|  | 70   virtual void SetTimeStamp(int64_t time_ns) { | 
|  | 71     set_timestamp_us(time_ns / rtc::kNumNanosecsPerMicrosec); | 
|  | 72   } | 
| 62 | 73 | 
| 63   // Indicates the rotation angle in degrees. | 74   // Indicates the rotation angle in degrees. | 
| 64   virtual webrtc::VideoRotation rotation() const = 0; | 75   virtual webrtc::VideoRotation rotation() const = 0; | 
| 65 | 76 | 
| 66   // Make a shallow copy of the frame. The frame buffer itself is not copied. | 77   // Make a shallow copy of the frame. The frame buffer itself is not copied. | 
| 67   // Both the current and new VideoFrame will share a single reference-counted | 78   // Both the current and new VideoFrame will share a single reference-counted | 
| 68   // frame buffer. | 79   // frame buffer. | 
| 69   virtual VideoFrame *Copy() const = 0; | 80   virtual VideoFrame *Copy() const = 0; | 
| 70 | 81 | 
| 71   // Since VideoFrame supports shallow copy and the internal frame buffer might | 82   // Since VideoFrame supports shallow copy and the internal frame buffer might | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 130   // take the nearest-point. The parameter "crop" controls whether to crop this | 141   // take the nearest-point. The parameter "crop" controls whether to crop this | 
| 131   // frame to the aspect ratio of the given dimensions before stretching. | 142   // frame to the aspect ratio of the given dimensions before stretching. | 
| 132   virtual bool CopyToPlanes(uint8_t* dst_y, | 143   virtual bool CopyToPlanes(uint8_t* dst_y, | 
| 133                             uint8_t* dst_u, | 144                             uint8_t* dst_u, | 
| 134                             uint8_t* dst_v, | 145                             uint8_t* dst_v, | 
| 135                             int32_t dst_pitch_y, | 146                             int32_t dst_pitch_y, | 
| 136                             int32_t dst_pitch_u, | 147                             int32_t dst_pitch_u, | 
| 137                             int32_t dst_pitch_v) const; | 148                             int32_t dst_pitch_v) const; | 
| 138 | 149 | 
| 139   // Creates an empty frame. | 150   // Creates an empty frame. | 
| 140   virtual VideoFrame *CreateEmptyFrame(int w, int h, | 151   virtual VideoFrame* CreateEmptyFrame(int w, | 
| 141                                        int64_t time_stamp) const = 0; | 152                                        int h, | 
|  | 153                                        int64_t timestamp_us) const = 0; | 
| 142   virtual void set_rotation(webrtc::VideoRotation rotation) = 0; | 154   virtual void set_rotation(webrtc::VideoRotation rotation) = 0; | 
| 143 }; | 155 }; | 
| 144 | 156 | 
| 145 }  // namespace cricket | 157 }  // namespace cricket | 
| 146 | 158 | 
| 147 #endif  // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 159 #endif  // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 
| OLD | NEW | 
|---|