henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 1 | /* |
| 2 | * libjingle |
jlmiller@webrtc.org | 5f93d0a | 2015-01-20 21:36:13 +0000 | [diff] [blame] | 3 | * Copyright 2013 Google Inc. |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions are met: |
| 7 | * |
| 8 | * 1. Redistributions of source code must retain the above copyright notice, |
| 9 | * this list of conditions and the following disclaimer. |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| 11 | * this list of conditions and the following disclaimer in the documentation |
| 12 | * and/or other materials provided with the distribution. |
| 13 | * 3. The name of the author may not be used to endorse or promote products |
| 14 | * derived from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
| 19 | * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 20 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
| 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | */ |
| 27 | |
| 28 | #import <Foundation/Foundation.h> |
| 29 | |
| 30 | // RTCI420Frame is an ObjectiveC version of cricket::VideoFrame. |
nisse | 0565451 | 2016-04-29 02:56:00 -0700 | [diff] [blame] | 31 | // TODO(nisse): It appears it doesn't support any VideoFrame methods, |
| 32 | // so let it wrap an webrtc::VideoFrameBuffer instead? |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 33 | @interface RTCI420Frame : NSObject |
| 34 | |
tkchin@webrtc.org | 1732a59 | 2014-05-19 23:26:01 +0000 | [diff] [blame] | 35 | @property(nonatomic, readonly) NSUInteger width; |
| 36 | @property(nonatomic, readonly) NSUInteger height; |
| 37 | @property(nonatomic, readonly) NSUInteger chromaWidth; |
| 38 | @property(nonatomic, readonly) NSUInteger chromaHeight; |
tkchin@webrtc.org | 1732a59 | 2014-05-19 23:26:01 +0000 | [diff] [blame] | 39 | // These can return NULL if the object is not backed by a buffer. |
| 40 | @property(nonatomic, readonly) const uint8_t* yPlane; |
| 41 | @property(nonatomic, readonly) const uint8_t* uPlane; |
| 42 | @property(nonatomic, readonly) const uint8_t* vPlane; |
| 43 | @property(nonatomic, readonly) NSInteger yPitch; |
| 44 | @property(nonatomic, readonly) NSInteger uPitch; |
| 45 | @property(nonatomic, readonly) NSInteger vPitch; |
| 46 | |
| 47 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 48 | // Disallow init and don't add to documentation |
| 49 | - (id)init __attribute__(( |
| 50 | unavailable("init is not a supported initializer for this class."))); |
| 51 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 52 | |
| 53 | @end |