shmily

sdk upgrade

Showing 100 changed files with 88 additions and 1137 deletions

Too many changes to show.

To preserve performance only 100 of 100+ files are displayed.

Pod::Spec.new do |s|
s.name = "HHDoctor_pro"
s.version = "2.4.4.021017"
s.version = "2.4.4.031015"
s.summary = "和缓视频医生 pro SDK"
s.description = <<-DESC
... ...
No preview for this file type
... ... @@ -187,6 +187,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
@import NIMSDK;
@import ObjectiveC;
@import Photos;
@import QuartzCore;
@import UIKit;
#endif
... ... @@ -211,6 +212,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
@class NSCoder;
SWIFT_CLASS("_TtC11HHDoctorSDK13CommentBaseVC")
@interface CommentBaseVC : UIViewController
- (void)viewWillAppear:(BOOL)animated;
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtC11HHDoctorSDK9CommentVC")
@interface CommentVC : CommentBaseVC
- (void)viewDidLoad;
- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
@end
... ... @@ -369,6 +389,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau
/// \param type 呼叫类型
///
- (void)startCall:(enum HHCallType)type;
- (void)startNewCall:(NSInteger)uuid;
/// 使用指定账户发起通话
/// \param type 呼叫类型
///
... ... @@ -403,6 +424,8 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau
enum PermissionType : NSInteger;
/// 视频管理器代理
... ... @@ -415,9 +438,9 @@ SWIFT_PROTOCOL("_TtP11HHDoctorSDK16HHMVideoDelegate_")
- (void)callStateChange:(enum HHMCallingState)state;
/// 通话已接通
- (void)callDidEstablish;
/// 呼叫失败
/// 呼叫失败(服务端报错)
- (void)callFailWithCode:(NSInteger)code error:(NSString * _Nonnull)error;
/// 呼叫失败(主叫
/// 呼叫失败(云信报错
/// \param error 错误信息
///
- (void)onFailWithError:(NSError * _Nonnull)error;
... ... @@ -455,7 +478,6 @@ SWIFT_CLASS("_TtC11HHDoctorSDK13HHNetObserver")
+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
@end
@class NSCoder;
@class UIWindow;
@class UICollectionView;
@class UICollectionViewCell;
... ... @@ -496,7 +518,6 @@ typedef SWIFT_ENUM(NSInteger, HHPagerViewTransformerType, closed) {
HHPagerViewTransformerTypeCubic = 8,
};
@class UIViewController;
SWIFT_CLASS("_TtC11HHDoctorSDK23HHPhotoPickerController")
@interface HHPhotoPickerController : UINavigationController
... ... @@ -520,7 +541,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau
/// 是否开启测试服
@property (nonatomic) BOOL isDevelopment;
/// 产品 id
@property (nonatomic, copy) NSString * _Nonnull sdkProductId;
@property (nonatomic, copy) NSString * _Nonnull productId;
/// 推送证书名
@property (nonatomic, copy) NSString * _Nullable cerName;
/// 呼叫进入是否需要等待(呼入present 控制器前处理其他逻辑,3秒后自动失效)
... ... @@ -584,6 +605,26 @@ typedef SWIFT_ENUM(NSInteger, PermissionType, closed) {
@class UITapGestureRecognizer;
@class NSTimer;
... ... @@ -605,6 +646,8 @@ typedef SWIFT_ENUM(NSInteger, PermissionType, closed) {
/// 云信登录相关
SWIFT_CLASS("_TtC11HHDoctorSDK9VCManager")
@interface VCManager : NSObject
... ...
... ... @@ -10,27 +10,8 @@
#endif
#endif
#import "UITextView+Placeholder.h"
#import "HHMBProgressHUD.h"
#import "internal.h"
#import "ijksdl.h"
#import "ijksdl_class.h"
#import "ijksdl_endian.h"
#import "ijksdl_error.h"
#import "ijksdl_fourcc.h"
#import "ijksdl_gles2.h"
#import "ijksdl_inc_internal.h"
#import "ijksdl_log.h"
#import "ijksdl_misc.h"
#import "ijksdl_mutex.h"
#import "ijksdl_stdinc.h"
#import "ijksdl_thread.h"
#import "ijksdl_timer.h"
#import "ijksdl_video.h"
#import "ijksdl_vout.h"
#import "IJKSDLGLView.h"
#import "ijksdl_ios.h"
#import "ijksdl_vout_overlay_videotoolbox.h"
#import "NTESGLView.h"
#import "ObjectMapper.h"
#import "HHPhotoPicker.h"
#import "CGGeometry+RSKImageCropper.h"
... ...
/*
* IJKSDLGLView.h
*
* Copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* based on https://github.com/kolyvan/kxmovie
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#import <UIKit/UIKit.h>
#include "ijksdl_vout.h"
@interface NTESIJKSDLGLView : UIView
- (id) initWithFrame:(CGRect)frame;
- (void) display: (SDL_VoutOverlay *) overlay clear:(BOOL)clear;
- (UIImage*) snapshot;
#if defined NTESIJKSDLHudView
- (void)setHudValue:(NSString *)value forKey:(NSString *)key;
#endif
@property(nonatomic,strong) NSLock *appActivityLock;
@property(nonatomic) CGFloat fps;
@property(nonatomic) CGFloat scaleFactor;
#if defined NTESIJKSDLHudView
@property(nonatomic) BOOL shouldShowHudView;
#endif
@end
//
// NTESGLView.h
// NIM
//
// Created by fenric on 16/8/30.
// Copyright © 2016年 Netease. All rights reserved.
//
#import "IJKSDLGLView.h"
@interface NTESGLView : NTESIJKSDLGLView
- (void) render: (NSData *)yuvData
width:(NSUInteger)width
height:(NSUInteger)height;
- (void)clearData;
- (void)addBlack:(CGRect)rect;
- (void)clearBack;
@end
// The MIT License (MIT)
//
// Copyright (c) 2014 Suyeol Jeon (http:xoul.kr)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
@import UIKit;
FOUNDATION_EXPORT double UITextView_PlaceholderVersionNumber;
FOUNDATION_EXPORT const unsigned char UITextView_PlaceholderVersionString[];
@interface UITextView (Placeholder)
@property (nonatomic, readonly) UILabel *placeholderLabel;
@property (nonatomic, strong) IBInspectable NSString *placeholder;
@property (nonatomic, strong) NSAttributedString *attributedPlaceholder;
@property (nonatomic, strong) IBInspectable UIColor *placeholderColor;
+ (UIColor *)defaultPlaceholderColor;
@end
... ...
/*****************************************************************************
* ijksdl.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_H
#define IJKSDL__IJKSDL_H
#if defined NTESIJKSDLHasAudio
#include "ijksdl_audio.h"
#include "ijksdl_aout.h"
#endif
#include "ijksdl_class.h"
#include "ijksdl_error.h"
#include "ijksdl_log.h"
#include "ijksdl_misc.h"
#include "ijksdl_mutex.h"
#include "ijksdl_thread.h"
#include "ijksdl_timer.h"
#include "ijksdl_video.h"
#include "ijksdl_vout.h"
#if defined NTESIJKSDLHasFFmpeg
#include "ffmpeg/ijksdl_vout_overlay_ffmpeg.h"
#endif
#endif
/*****************************************************************************
* ijksdl_class.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_CLASS_H
#define IJKSDL__IJKSDL_CLASS_H
typedef struct SDL_Class {
const char *name;
} SDL_Class;
#endif
/*****************************************************************************
* ijksdl_endian.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_ENDIAN_H
#define IJKSDL__IJKSDL_ENDIAN_H
#define SDL_LIL_ENDIAN 1234
#define SDL_BIG_ENDIAN 4321
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
#ifdef __linux__
#include <endian.h>
#define SDL_BYTEORDER __BYTE_ORDER
#else /* __linux __ */
#if defined(__hppa__) || \
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
(defined(__MIPS__) && defined(__MISPEB__)) || \
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
defined(__sparc__)
#define SDL_BYTEORDER SDL_BIG_ENDIAN
#else
#define SDL_BYTEORDER SDL_LIL_ENDIAN
#endif
#endif /* __linux __ */
#endif /* !SDL_BYTEORDER */
#endif
/*****************************************************************************
* ijksdl_error.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_ERROR_H
#define IJKSDL__IJKSDL_ERROR_H
const char *SDL_GetError(void);
#endif
/*****************************************************************************
* ijksdl_fourcc.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_FOURCC_H
#define IJKSDL__IJKSDL_FOURCC_H
#include "ijksdl_stdinc.h"
#include "ijksdl_endian.h"
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
# define SDL_FOURCC(a, b, c, d) \
(((uint32_t)a) | (((uint32_t)b) << 8) | (((uint32_t)c) << 16) | (((uint32_t)d) << 24))
# define SDL_TWOCC(a, b) \
((uint16_t)(a) | ((uint16_t)(b) << 8))
#else
# define SDL_FOURCC(a, b, c, d) \
(((uint32_t)d) | (((uint32_t)c) << 8) | (((uint32_t)b) << 16) | (((uint32_t)a) << 24))
# define SDL_TWOCC( a, b ) \
((uint16_t)(b) | ((uint16_t)(a) << 8))
#endif
/*-
* http://www.webartz.com/fourcc/indexyuv.htm
* http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
* http://www.fourcc.org/yuv.php
*/
// YUV formats
#define SDL_FCC_YV12 SDL_FOURCC('Y', 'V', '1', '2') /**< bpp=12, Planar mode: Y + V + U (3 planes) */
#define SDL_FCC_IYUV SDL_FOURCC('I', 'Y', 'U', 'V') /**< bpp=12, Planar mode: Y + U + V (3 planes) */
#define SDL_FCC_I420 SDL_FOURCC('I', '4', '2', '0') /**< bpp=12, Planar mode: Y + U + V (3 planes) */
#define SDL_FCC_I444P10LE SDL_FOURCC('I', '4', 'A', 'L')
#define SDL_FCC_YUV2 SDL_FOURCC('Y', 'U', 'V', '2') /**< bpp=16, Packed mode: Y0+U0+Y1+V0 (1 plane) */
#define SDL_FCC_UYVY SDL_FOURCC('U', 'Y', 'V', 'Y') /**< bpp=16, Packed mode: U0+Y0+V0+Y1 (1 plane) */
#define SDL_FCC_YVYU SDL_FOURCC('Y', 'V', 'Y', 'U') /**< bpp=16, Packed mode: Y0+V0+Y1+U0 (1 plane) */
#define SDL_FCC_NV12 SDL_FOURCC('N', 'V', '1', '2')
// RGB formats
#define SDL_FCC_RV16 SDL_FOURCC('R', 'V', '1', '6') /**< bpp=16, RGB565 */
#define SDL_FCC_RV24 SDL_FOURCC('R', 'V', '2', '4') /**< bpp=24, RGB888 */
#define SDL_FCC_RV32 SDL_FOURCC('R', 'V', '3', '2') /**< bpp=32, RGBX8888 */
#define SDL_FCC_BGRA SDL_FOURCC('B', 'G', 'R', 'A') /**< bpp=32, BGRA8888 */
// opaque formats
#define SDL_FCC__AMC SDL_FOURCC('_', 'A', 'M', 'C') /**< Android MediaCodec */
#define SDL_FCC__VTB SDL_FOURCC('_', 'V', 'T', 'B') /**< iOS VideoToolbox */
#define SDL_FCC__GLES2 SDL_FOURCC('_', 'E', 'S', '2') /**< let Vout choose format */
// undefine
#define SDL_FCC_UNDF SDL_FOURCC('U', 'N', 'D', 'F') /**< undefined */
enum {
IJK_AV_PIX_FMT__START = 10000,
IJK_AV_PIX_FMT__ANDROID_MEDIACODEC,
IJK_AV_PIX_FMT__VIDEO_TOOLBOX,
};
#endif
/*
* copyright (c) 2016 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_GLES2_H
#define IJKSDL__IJKSDL_GLES2_H
#ifdef __APPLE__
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <GLES2/gl2platform.h>
#endif
typedef struct SDL_VoutOverlay SDL_VoutOverlay;
/*
* Common
*/
#ifdef DEBUG
#define IJK_GLES2_checkError_TRACE(op)
#define IJK_GLES2_checkError_DEBUG(op)
#else
#define IJK_GLES2_checkError_TRACE(op) NTES_IJK_GLES2_checkError(op)
#define IJK_GLES2_checkError_DEBUG(op) NTES_IJK_GLES2_checkError(op)
#endif
void NTES_IJK_GLES2_printString(const char *name, GLenum s);
void NTES_IJK_GLES2_checkError(const char *op);
GLuint NTES_IJK_GLES2_loadShader(GLenum shader_type, const char *shader_source);
/*
* Renderer
*/
#define IJK_GLES2_MAX_PLANE 3
typedef struct IJK_GLES2_Renderer IJK_GLES2_Renderer;
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create(SDL_VoutOverlay *overlay);
void NTES_IJK_GLES2_Renderer_reset(IJK_GLES2_Renderer *renderer);
void NTES_IJK_GLES2_Renderer_free(IJK_GLES2_Renderer *renderer);
void NTES_IJK_GLES2_Renderer_freeP(IJK_GLES2_Renderer **renderer);
GLboolean NTES_IJK_GLES2_Renderer_setupGLES();
GLboolean NTES_IJK_GLES2_Renderer_isValid(IJK_GLES2_Renderer *renderer);
GLboolean NTES_IJK_GLES2_Renderer_isFormat(IJK_GLES2_Renderer *renderer, int format);
GLboolean NTES_IJK_GLES2_Renderer_use(IJK_GLES2_Renderer *renderer);
GLboolean NTES_IJK_GLES2_Renderer_renderOverlay(IJK_GLES2_Renderer *renderer, SDL_VoutOverlay *overlay);
#define IJK_GLES2_GRAVITY_RESIZE (0) // Stretch to fill view bounds.
#define IJK_GLES2_GRAVITY_RESIZE_ASPECT (1) // Preserve aspect ratio; fit within view bounds.
#define IJK_GLES2_GRAVITY_RESIZE_ASPECT_FILL (2) // Preserve aspect ratio; fill view bounds.
GLboolean NTES_IJK_GLES2_Renderer_setGravity(IJK_GLES2_Renderer *renderer, int gravity, GLsizei view_width, GLsizei view_height);
#endif
/*
* ijksdl_inc_internal.h
*
* Copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKPLAYER__IJKSDL_INC_INTERNAL_H
#define IJKPLAYER__IJKSDL_INC_INTERNAL_H
#include <stdint.h>
#include "ijksdl_log.h"
#include "ijksdl_misc.h"
#include "ijksdl_stdinc.h"
#define SDLTRACE ALOGD
#endif
/*
* ijksdl_ios.h
*
* Copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "ijksdl.h"
#if defined NTESIJKSDLHasAudio
#include "ijksdl_aout_ios_audiounit.h"
#endif
#if defined NTESIJKSDLHasVout
#include "ijksdl_vout_ios_gles2.h"
#endif
#import <UIKit/UIKit.h>
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
inline static BOOL isIOS9OrLater()
{
return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.0");
}
inline static BOOL isIOS8OrLater()
{
return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0");
}
inline static BOOL isIOS7OrLater()
{
return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0");
}
inline static BOOL isIOS6OrLater()
{
return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0");
}
/*****************************************************************************
* ijksdl_log.h
*****************************************************************************
*
* copyright (c) 2015 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_LOG_H
#define IJKSDL__IJKSDL_LOG_H
#include <stdio.h>
#ifdef __ANDROID__
#include <android/log.h>
#define IJK_LOG_UNKNOWN ANDROID_LOG_UNKNOWN
#define IJK_LOG_DEFAULT ANDROID_LOG_DEFAULT
#define IJK_LOG_VERBOSE ANDROID_LOG_VERBOSE
#define IJK_LOG_DEBUG ANDROID_LOG_DEBUG
#define IJK_LOG_INFO ANDROID_LOG_INFO
#define IJK_LOG_WARN ANDROID_LOG_WARN
#define IJK_LOG_ERROR ANDROID_LOG_ERROR
#define IJK_LOG_FATAL ANDROID_LOG_FATAL
#define IJK_LOG_SILENT ANDROID_LOG_SILENT
#define VLOG(level, TAG, ...) ((void)__android_log_vprint(level, TAG, __VA_ARGS__))
#define ALOG(level, TAG, ...) ((void)__android_log_print(level, TAG, __VA_ARGS__))
#else
#define IJK_LOG_UNKNOWN 0
#define IJK_LOG_DEFAULT 1
#define IJK_LOG_VERBOSE 2
#define IJK_LOG_DEBUG 3
#define IJK_LOG_INFO 4
#define IJK_LOG_WARN 5
#define IJK_LOG_ERROR 6
#define IJK_LOG_FATAL 7
#define IJK_LOG_SILENT 8
#define VLOG(level, TAG, ...) ((void)vprintf(__VA_ARGS__))
#define ALOG(level, TAG, ...) ((void)printf(__VA_ARGS__))
#endif
#define IJK_LOG_TAG "IJKMEDIA"
#define VLOGV(...) VLOG(IJK_LOG_VERBOSE, IJK_LOG_TAG, __VA_ARGS__)
#define VLOGD(...) VLOG(IJK_LOG_DEBUG, IJK_LOG_TAG, __VA_ARGS__)
#define VLOGI(...) VLOG(IJK_LOG_INFO, IJK_LOG_TAG, __VA_ARGS__)
#define VLOGW(...) VLOG(IJK_LOG_WARN, IJK_LOG_TAG, __VA_ARGS__)
#define VLOGE(...) VLOG(IJK_LOG_ERROR, IJK_LOG_TAG, __VA_ARGS__)
#define ALOGV(...) ALOG(IJK_LOG_VERBOSE, IJK_LOG_TAG, __VA_ARGS__)
#define ALOGD(...) ALOG(IJK_LOG_DEBUG, IJK_LOG_TAG, __VA_ARGS__)
#define ALOGI(...) ALOG(IJK_LOG_INFO, IJK_LOG_TAG, __VA_ARGS__)
#define ALOGW(...) ALOG(IJK_LOG_WARN, IJK_LOG_TAG, __VA_ARGS__)
#define ALOGE(...) ALOG(IJK_LOG_ERROR, IJK_LOG_TAG, __VA_ARGS__)
#define LOG_ALWAYS_FATAL(...) do { ALOGE(__VA_ARGS__); exit(1); } while (0)
#endif
/*****************************************************************************
* ijksdl_misc.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_MISC_H
#define IJKSDL__IJKSDL_MISC_H
#include <stdlib.h>
//#include <memory.h>
#ifndef IJKMAX
#define IJKMAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef IJKMIN
#define IJKMIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef IJKALIGN
#define IJKALIGN(x, align) ((( x ) + (align) - 1) / (align) * (align))
#endif
#define IJK_CHECK_RET(condition__, retval__, ...) \
if (!(condition__)) { \
ALOGE(__VA_ARGS__); \
return (retval__); \
}
#ifndef NELEM
#define NELEM(x) ((int) (sizeof(x) / sizeof((x)[0])))
#endif
inline static void *mallocz(size_t size)
{
void *mem = malloc(size);
if (!mem)
return mem;
memset(mem, 0, size);
return mem;
}
inline static void freep(void **mem)
{
if (mem && *mem) {
free(*mem);
*mem = NULL;
}
}
#endif
/*****************************************************************************
* ijksdl_mutex.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_MUTEX_H
#define IJKSDL__IJKSDL_MUTEX_H
#include <stdint.h>
#include <pthread.h>
#define SDL_MUTEX_TIMEDOUT 1
#define SDL_MUTEX_MAXWAIT (~(uint32_t)0)
typedef struct SDL_mutex {
pthread_mutex_t id;
} SDL_mutex;
SDL_mutex *SDL_CreateMutex(void);
void SDL_DestroyMutex(SDL_mutex *mutex);
void SDL_DestroyMutexP(SDL_mutex **mutex);
int SDL_LockMutex(SDL_mutex *mutex);
int SDL_UnlockMutex(SDL_mutex *mutex);
typedef struct SDL_cond {
pthread_cond_t id;
} SDL_cond;
SDL_cond *SDL_CreateCond(void);
void SDL_DestroyCond(SDL_cond *cond);
void SDL_DestroyCondP(SDL_cond **mutex);
int SDL_CondSignal(SDL_cond *cond);
int SDL_CondBroadcast(SDL_cond *cond);
int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, uint32_t ms);
int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex);
#endif
/*****************************************************************************
* ijksdl_stdinc.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_STDINC_H
#define IJKSDL__IJKSDL_STDINC_H
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
typedef int8_t Sint8;
typedef uint8_t Uint8;
typedef int16_t Sint16;
typedef uint16_t Uint16;
typedef int32_t Sint32;
typedef uint32_t Uint32;
typedef int64_t Sint64;
typedef uint64_t Uint64;
char *SDL_getenv(const char *name);
#endif
/*****************************************************************************
* ijksdl_thread.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_THREAD_H
#define IJKSDL__IJKSDL_THREAD_H
#include <stdint.h>
#include <pthread.h>
typedef enum {
SDL_THREAD_PRIORITY_LOW,
SDL_THREAD_PRIORITY_NORMAL,
SDL_THREAD_PRIORITY_HIGH
} SDL_ThreadPriority;
typedef struct SDL_Thread
{
pthread_t id;
int (*func)(void *);
void *data;
char name[32];
int retval;
} SDL_Thread;
SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data, const char *name);
int SDL_SetThreadPriority(SDL_ThreadPriority priority);
void SDL_WaitThread(SDL_Thread *thread, int *status);
void SDL_DetachThread(SDL_Thread *thread);
#endif
/*****************************************************************************
* ijksdl_thread.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_TIMER_H
#define IJKSDL__IJKSDL_TIMER_H
#include "ijksdl_stdinc.h"
void SDL_Delay(Uint32 ms);
Uint64 NTES_SDL_GetTickHR(void);
typedef struct SDL_Profiler
{
int64_t total_elapsed;
int total_counter;
int64_t sample_elapsed;
int sample_counter;
float sample_per_seconds;
int64_t average_elapsed;
int64_t begin_time;
int max_sample;
} SDL_Profiler;
void SDL_ProfilerReset(SDL_Profiler* profiler, int max_sample);
void SDL_ProfilerBegin(SDL_Profiler* profiler);
int64_t SDL_ProfilerEnd(SDL_Profiler* profiler);
typedef struct SDL_SpeedSampler
{
Uint64 samples[10];
int capacity;
int count;
int first_index;
int next_index;
Uint64 last_log_time;
} SDL_SpeedSampler;
void SDL_SpeedSamplerReset(SDL_SpeedSampler *sampler);
// return samples per seconds
float SDL_SpeedSamplerAdd(SDL_SpeedSampler *sampler, int enable_log, const char *log_tag);
typedef struct SDL_SpeedSampler2
{
int64_t sample_range;
int64_t last_profile_tick;
int64_t last_profile_duration;
int64_t last_profile_quantity;
int64_t last_profile_speed;
} SDL_SpeedSampler2;
void SDL_SpeedSampler2Reset(SDL_SpeedSampler2 *sampler, int sample_range);
int64_t SDL_SpeedSampler2Add(SDL_SpeedSampler2 *sampler, int quantity);
int64_t SDL_SpeedSampler2GetSpeed(SDL_SpeedSampler2 *sampler);
#endif
/*****************************************************************************
* ijksdl_video.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_VIDEO_H
#define IJKSDL__IJKSDL_VIDEO_H
#include "ijksdl_stdinc.h"
#include "ijksdl_fourcc.h"
#endif
/*****************************************************************************
* ijksdl_vout.h
*****************************************************************************
*
* copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_VOUT_H
#define IJKSDL__IJKSDL_VOUT_H
#include "ijksdl_stdinc.h"
#include "ijksdl_class.h"
#include "ijksdl_mutex.h"
#include "ijksdl_video.h"
#if defined NTESIJKSDLHasFFmpeg
#include "ffmpeg/ijksdl_inc_ffmpeg.h"
#endif
typedef struct SDL_VoutOverlay_Opaque SDL_VoutOverlay_Opaque;
typedef struct SDL_VoutOverlay SDL_VoutOverlay;
struct SDL_VoutOverlay {
int w; /**< Read-only */
int h; /**< Read-only */
Uint32 format; /**< Read-only */
int planes; /**< Read-only */
Uint16 *pitches; /**< in bytes, Read-only */
Uint8 **pixels; /**< Read-write */
int is_private;
int sar_num;
int sar_den;
SDL_Class *opaque_class;
SDL_VoutOverlay_Opaque *opaque;
void (*free_l)(SDL_VoutOverlay *overlay);
int (*lock)(SDL_VoutOverlay *overlay);
int (*unlock)(SDL_VoutOverlay *overlay);
void (*unref)(SDL_VoutOverlay *overlay);
#if defined NTESIJKSDLHasFFmpeg
int (*func_fill_frame)(SDL_VoutOverlay *overlay, const AVFrame *frame);
#endif
};
typedef struct SDL_Vout_Opaque SDL_Vout_Opaque;
typedef struct SDL_Vout SDL_Vout;
struct SDL_Vout {
SDL_mutex *mutex;
SDL_Class *opaque_class;
SDL_Vout_Opaque *opaque;
SDL_VoutOverlay *(*create_overlay)(int width, int height, int frame_format, SDL_Vout *vout);
void (*free_l)(SDL_Vout *vout);
int (*display_overlay)(SDL_Vout *vout, SDL_VoutOverlay *overlay);
Uint32 overlay_format;
};
void SDL_VoutFree(SDL_Vout *vout);
void SDL_VoutFreeP(SDL_Vout **pvout);
int SDL_VoutDisplayYUVOverlay(SDL_Vout *vout, SDL_VoutOverlay *overlay);
int SDL_VoutSetOverlayFormat(SDL_Vout *vout, Uint32 overlay_format);
SDL_VoutOverlay *SDL_Vout_CreateOverlay(int width, int height, int frame_format, SDL_Vout *vout);
int SDL_VoutLockYUVOverlay(SDL_VoutOverlay *overlay);
int SDL_VoutUnlockYUVOverlay(SDL_VoutOverlay *overlay);
void SDL_VoutFreeYUVOverlay(SDL_VoutOverlay *overlay);
void SDL_VoutUnrefYUVOverlay(SDL_VoutOverlay *overlay);
#if defined NTESIJKSDLHasFFmpeg
int SDL_VoutFillFrameYUVOverlay(SDL_VoutOverlay *overlay, const AVFrame *frame);
#endif
#endif
/*****************************************************************************
* ijksdl_vout_overlay_videotoolbox.h
*****************************************************************************
*
* copyright (c) 2014 ZhouQuan <zhouqicy@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __IJKMediaPlayer__ijksdl_vout_overlay_videotoolbox__
#define __IJKMediaPlayer__ijksdl_vout_overlay_videotoolbox__
#import <CoreVideo/CoreVideo.h>
#include "ijksdl_stdinc.h"
#include "ijksdl_vout.h"
#if defined NTESIJKSDLHasFFmpeg
#include "ijksdl_inc_ffmpeg.h"
#else
#include "ijksdl_inc_internal.h"
#endif
SDL_VoutOverlay *SDL_VoutVideoToolBox_CreateOverlay(int width, int height, SDL_Vout *vout);
CVPixelBufferRef SDL_VoutOverlayVideoToolBox_GetCVPixelBufferRef(SDL_VoutOverlay *overlay);
#endif
/*
* copyright (c) 2016 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef IJKSDL__IJKSDL_GLES2__INTERNAL__H
#define IJKSDL__IJKSDL_GLES2__INTERNAL__H
#include <assert.h>
#include <stdlib.h>
#include "ijksdl_fourcc.h"
#include "ijksdl_log.h"
#include "ijksdl_gles2.h"
#include "ijksdl_vout.h"
#define IJK_GLES_STRINGIZE(x) #x
#define IJK_GLES_STRINGIZE2(x) IJK_GLES_STRINGIZE(x)
#define IJK_GLES_STRING(x) IJK_GLES_STRINGIZE2(x)
typedef struct IJK_GLES2_Renderer_Opaque IJK_GLES2_Renderer_Opaque;
typedef struct IJK_GLES2_Renderer
{
IJK_GLES2_Renderer_Opaque *opaque;
GLuint program;
GLuint vertex_shader;
GLuint fragment_shader;
GLuint plane_textures[IJK_GLES2_MAX_PLANE];
GLuint av4_position;
GLuint av2_texcoord;
GLuint um4_mvp;
GLuint us2_sampler[IJK_GLES2_MAX_PLANE];
GLuint um3_color_conversion;
GLboolean (*func_use)(IJK_GLES2_Renderer *renderer);
GLsizei (*func_getBufferWidth)(IJK_GLES2_Renderer *renderer, SDL_VoutOverlay *overlay);
GLboolean (*func_uploadTexture)(IJK_GLES2_Renderer *renderer, SDL_VoutOverlay *overlay);
GLvoid (*func_destroy)(IJK_GLES2_Renderer *renderer);
GLsizei buffer_width;
GLsizei visible_width;
GLfloat texcoords[8];
GLfloat vertices[8];
int vertices_changed;
int format;
int gravity;
GLsizei layer_width;
GLsizei layer_height;
int frame_width;
int frame_height;
int frame_sar_num;
int frame_sar_den;
GLsizei last_buffer_width;
} IJK_GLES2_Renderer;
typedef struct IJK_GLES_Matrix
{
GLfloat m[16];
} IJK_GLES_Matrix;
void NTES_IJK_GLES2_loadOrtho(IJK_GLES_Matrix *matrix, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far);
const char *NTES_IJK_GLES2_getVertexShader_default();
const char *NTES_IJK_GLES2_getFragmentShader_yuv420p();
const char *NTES_IJK_GLES2_getFragmentShader_yuv444p10le();
const char *NTES_IJK_GLES2_getFragmentShader_yuv420sp();
const char *NTES_IJK_GLES2_getFragmentShader_rgb();
const GLfloat *NTES_IJK_GLES2_getColorMatrix_bt709();
const GLfloat *NTES_IJK_GLES2_getColorMatrix_bt601();
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_base(const char *fragment_shader_source);
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_yuv420p();
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_yuv444p10le();
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_yuv420sp();
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_yuv420sp_vtb(SDL_VoutOverlay *overlay);
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_rgb565();
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_rgb888();
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_rgbx8888();
IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_bgra8888();
#endif