| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 namespace cricket { | 36 namespace cricket { |
| 37 | 37 |
| 38 // Represents a YUV420 (a.k.a. I420) video frame. | 38 // Represents a YUV420 (a.k.a. I420) video frame. |
| 39 class VideoFrame { | 39 class VideoFrame { |
| 40 public: | 40 public: |
| 41 VideoFrame() {} | 41 VideoFrame() {} |
| 42 virtual ~VideoFrame() {} | 42 virtual ~VideoFrame() {} |
| 43 | 43 |
| 44 virtual bool InitToBlack(int w, int h, int64_t time_stamp) = 0; | 44 virtual bool InitToBlack(int w, int h, int64_t time_stamp) = 0; |
| 45 | 45 |
| 46 // TODO(nisse): Old signature. Delete after chrome is updated. | |
| 47 virtual bool InitToBlack(int w, int h, size_t pixel_width, | |
| 48 size_t pixel_height, int64_t time_stamp) { | |
| 49 return InitToBlack(w, h, time_stamp); | |
| 50 } | |
| 51 // Creates a frame from a raw sample with FourCC |format| and size |w| x |h|. | 46 // Creates a frame from a raw sample with FourCC |format| and size |w| x |h|. |
| 52 // |h| can be negative indicating a vertically flipped image. | 47 // |h| can be negative indicating a vertically flipped image. |
| 53 // |dw| is destination width; can be less than |w| if cropping is desired. | 48 // |dw| is destination width; can be less than |w| if cropping is desired. |
| 54 // |dh| is destination height, like |dw|, but must be a positive number. | 49 // |dh| is destination height, like |dw|, but must be a positive number. |
| 55 // Returns whether the function succeeded or failed. | 50 // Returns whether the function succeeded or failed. |
| 56 | 51 |
| 57 virtual bool Reset(uint32_t fourcc, | 52 virtual bool Reset(uint32_t fourcc, |
| 58 int w, | 53 int w, |
| 59 int h, | 54 int h, |
| 60 int dw, | 55 int dw, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 protected: | 203 protected: |
| 209 // Creates an empty frame. | 204 // Creates an empty frame. |
| 210 virtual VideoFrame *CreateEmptyFrame(int w, int h, | 205 virtual VideoFrame *CreateEmptyFrame(int w, int h, |
| 211 int64_t time_stamp) const = 0; | 206 int64_t time_stamp) const = 0; |
| 212 virtual void SetRotation(webrtc::VideoRotation rotation) = 0; | 207 virtual void SetRotation(webrtc::VideoRotation rotation) = 0; |
| 213 }; | 208 }; |
| 214 | 209 |
| 215 } // namespace cricket | 210 } // namespace cricket |
| 216 | 211 |
| 217 #endif // TALK_MEDIA_BASE_VIDEOFRAME_H_ | 212 #endif // TALK_MEDIA_BASE_VIDEOFRAME_H_ |
| OLD | NEW |