video_render_ios_view.h revision 36cf4d2309c394cf458c72c672862223faca008e
136cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org/* 236cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 336cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org * 436cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org * Use of this source code is governed by a BSD-style license 536cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org * that can be found in the LICENSE file in the root of the source 636cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org * tree. An additional intellectual property rights grant can be found 736cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org * in the file PATENTS. All contributing project authors may 836cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org * be found in the AUTHORS file in the root of the source tree. 936cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org */ 1036cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org 1136cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org#ifndef WEBRTC_MODULES_VIDEO_RENDER_IOS_RENDER_VIEW_H_ 1236cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org#define WEBRTC_MODULES_VIDEO_RENDER_IOS_RENDER_VIEW_H_ 1336cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org 1436cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org#import <UIKit/UIKit.h> 1536cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org#import <QuartzCore/QuartzCore.h> 1636cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org 1736cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org#include "webrtc/modules/video_render/ios/open_gles20.h" 1836cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org 1936cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org@interface VideoRenderIosView : UIView { 2036cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org @private // NOLINT 2136cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org EAGLContext* context_; 2236cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org webrtc::OpenGles20* gles_renderer20_; 2336cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org int _frameBufferWidth; 2436cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org int _frameBufferHeight; 2536cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org unsigned int _defaultFrameBuffer; 2636cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org unsigned int _colorRenderBuffer; 2736cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org} 2836cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org 2936cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org- (BOOL)createContext; 3036cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org- (BOOL)presentFramebuffer; 3136cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org- (BOOL)renderFrame:(webrtc::I420VideoFrame*)frameToRender; 3236cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org- (BOOL)setCoordinatesForZOrder:(const float)zOrder 3336cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org Left:(const float)left 3436cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org Top:(const float)top 3536cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org Right:(const float)right 3636cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org Bottom:(const float)bottom; 3736cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org 3836cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org@property(nonatomic, retain) EAGLContext* context; 3936cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org 4036cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org@end 4136cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org 4236cf4d2309c394cf458c72c672862223faca008efischman@webrtc.org#endif // WEBRTC_MODULES_VIDEO_RENDER_IOS_RENDER_VIEW_H_ 43