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.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This file is too large to display.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type

269 Bytes

403 Bytes

466 Bytes

984 Bytes

1.27 KB

2.32 KB

799 Bytes

1.65 KB

866 Bytes

1.78 KB

802 Bytes

1.63 KB

843 Bytes

1.8 KB

1.75 KB

3.27 KB

1.15 KB

2.09 KB
@@ -187,6 +187,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); | @@ -187,6 +187,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); | ||
187 | @import NIMSDK; | 187 | @import NIMSDK; |
188 | @import ObjectiveC; | 188 | @import ObjectiveC; |
189 | @import Photos; | 189 | @import Photos; |
190 | +@import QuartzCore; | ||
190 | @import UIKit; | 191 | @import UIKit; |
191 | #endif | 192 | #endif |
192 | 193 | ||
@@ -211,6 +212,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); | @@ -211,6 +212,25 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); | ||
211 | 212 | ||
212 | 213 | ||
213 | 214 | ||
215 | +@class NSCoder; | ||
216 | + | ||
217 | +SWIFT_CLASS("_TtC11HHDoctorSDK13CommentBaseVC") | ||
218 | +@interface CommentBaseVC : UIViewController | ||
219 | +- (void)viewWillAppear:(BOOL)animated; | ||
220 | +- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER; | ||
221 | +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; | ||
222 | +@end | ||
223 | + | ||
224 | + | ||
225 | +SWIFT_CLASS("_TtC11HHDoctorSDK9CommentVC") | ||
226 | +@interface CommentVC : CommentBaseVC | ||
227 | +- (void)viewDidLoad; | ||
228 | +- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER; | ||
229 | +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; | ||
230 | +@end | ||
231 | + | ||
232 | + | ||
233 | + | ||
214 | 234 | ||
215 | 235 | ||
216 | 236 | ||
@@ -369,6 +389,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau | @@ -369,6 +389,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau | ||
369 | /// \param type 呼叫类型 | 389 | /// \param type 呼叫类型 |
370 | /// | 390 | /// |
371 | - (void)startCall:(enum HHCallType)type; | 391 | - (void)startCall:(enum HHCallType)type; |
392 | +- (void)startNewCall:(NSInteger)uuid; | ||
372 | /// 使用指定账户发起通话 | 393 | /// 使用指定账户发起通话 |
373 | /// \param type 呼叫类型 | 394 | /// \param type 呼叫类型 |
374 | /// | 395 | /// |
@@ -403,6 +424,8 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau | @@ -403,6 +424,8 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau | ||
403 | 424 | ||
404 | 425 | ||
405 | 426 | ||
427 | + | ||
428 | + | ||
406 | enum PermissionType : NSInteger; | 429 | enum PermissionType : NSInteger; |
407 | 430 | ||
408 | /// 视频管理器代理 | 431 | /// 视频管理器代理 |
@@ -415,9 +438,9 @@ SWIFT_PROTOCOL("_TtP11HHDoctorSDK16HHMVideoDelegate_") | @@ -415,9 +438,9 @@ SWIFT_PROTOCOL("_TtP11HHDoctorSDK16HHMVideoDelegate_") | ||
415 | - (void)callStateChange:(enum HHMCallingState)state; | 438 | - (void)callStateChange:(enum HHMCallingState)state; |
416 | /// 通话已接通 | 439 | /// 通话已接通 |
417 | - (void)callDidEstablish; | 440 | - (void)callDidEstablish; |
418 | -/// 呼叫失败 | 441 | +/// 呼叫失败(服务端报错) |
419 | - (void)callFailWithCode:(NSInteger)code error:(NSString * _Nonnull)error; | 442 | - (void)callFailWithCode:(NSInteger)code error:(NSString * _Nonnull)error; |
420 | -/// 呼叫失败(主叫) | 443 | +/// 呼叫失败(云信报错) |
421 | /// \param error 错误信息 | 444 | /// \param error 错误信息 |
422 | /// | 445 | /// |
423 | - (void)onFailWithError:(NSError * _Nonnull)error; | 446 | - (void)onFailWithError:(NSError * _Nonnull)error; |
@@ -455,7 +478,6 @@ SWIFT_CLASS("_TtC11HHDoctorSDK13HHNetObserver") | @@ -455,7 +478,6 @@ SWIFT_CLASS("_TtC11HHDoctorSDK13HHNetObserver") | ||
455 | + (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable"); | 478 | + (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable"); |
456 | @end | 479 | @end |
457 | 480 | ||
458 | -@class NSCoder; | ||
459 | @class UIWindow; | 481 | @class UIWindow; |
460 | @class UICollectionView; | 482 | @class UICollectionView; |
461 | @class UICollectionViewCell; | 483 | @class UICollectionViewCell; |
@@ -496,7 +518,6 @@ typedef SWIFT_ENUM(NSInteger, HHPagerViewTransformerType, closed) { | @@ -496,7 +518,6 @@ typedef SWIFT_ENUM(NSInteger, HHPagerViewTransformerType, closed) { | ||
496 | HHPagerViewTransformerTypeCubic = 8, | 518 | HHPagerViewTransformerTypeCubic = 8, |
497 | }; | 519 | }; |
498 | 520 | ||
499 | -@class UIViewController; | ||
500 | 521 | ||
501 | SWIFT_CLASS("_TtC11HHDoctorSDK23HHPhotoPickerController") | 522 | SWIFT_CLASS("_TtC11HHDoctorSDK23HHPhotoPickerController") |
502 | @interface HHPhotoPickerController : UINavigationController | 523 | @interface HHPhotoPickerController : UINavigationController |
@@ -520,7 +541,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau | @@ -520,7 +541,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong, getter=defau | ||
520 | /// 是否开启测试服 | 541 | /// 是否开启测试服 |
521 | @property (nonatomic) BOOL isDevelopment; | 542 | @property (nonatomic) BOOL isDevelopment; |
522 | /// 产品 id | 543 | /// 产品 id |
523 | -@property (nonatomic, copy) NSString * _Nonnull sdkProductId; | 544 | +@property (nonatomic, copy) NSString * _Nonnull productId; |
524 | /// 推送证书名 | 545 | /// 推送证书名 |
525 | @property (nonatomic, copy) NSString * _Nullable cerName; | 546 | @property (nonatomic, copy) NSString * _Nullable cerName; |
526 | /// 呼叫进入是否需要等待(呼入present 控制器前处理其他逻辑,3秒后自动失效) | 547 | /// 呼叫进入是否需要等待(呼入present 控制器前处理其他逻辑,3秒后自动失效) |
@@ -584,6 +605,26 @@ typedef SWIFT_ENUM(NSInteger, PermissionType, closed) { | @@ -584,6 +605,26 @@ typedef SWIFT_ENUM(NSInteger, PermissionType, closed) { | ||
584 | 605 | ||
585 | 606 | ||
586 | 607 | ||
608 | + | ||
609 | + | ||
610 | + | ||
611 | + | ||
612 | + | ||
613 | + | ||
614 | + | ||
615 | + | ||
616 | + | ||
617 | + | ||
618 | + | ||
619 | + | ||
620 | + | ||
621 | + | ||
622 | + | ||
623 | + | ||
624 | + | ||
625 | + | ||
626 | + | ||
627 | + | ||
587 | @class UITapGestureRecognizer; | 628 | @class UITapGestureRecognizer; |
588 | @class NSTimer; | 629 | @class NSTimer; |
589 | 630 | ||
@@ -605,6 +646,8 @@ typedef SWIFT_ENUM(NSInteger, PermissionType, closed) { | @@ -605,6 +646,8 @@ typedef SWIFT_ENUM(NSInteger, PermissionType, closed) { | ||
605 | 646 | ||
606 | 647 | ||
607 | 648 | ||
649 | + | ||
650 | + | ||
608 | /// 云信登录相关 | 651 | /// 云信登录相关 |
609 | SWIFT_CLASS("_TtC11HHDoctorSDK9VCManager") | 652 | SWIFT_CLASS("_TtC11HHDoctorSDK9VCManager") |
610 | @interface VCManager : NSObject | 653 | @interface VCManager : NSObject |
@@ -10,27 +10,8 @@ | @@ -10,27 +10,8 @@ | ||
10 | #endif | 10 | #endif |
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | +#import "UITextView+Placeholder.h" | ||
13 | #import "HHMBProgressHUD.h" | 14 | #import "HHMBProgressHUD.h" |
14 | -#import "internal.h" | ||
15 | -#import "ijksdl.h" | ||
16 | -#import "ijksdl_class.h" | ||
17 | -#import "ijksdl_endian.h" | ||
18 | -#import "ijksdl_error.h" | ||
19 | -#import "ijksdl_fourcc.h" | ||
20 | -#import "ijksdl_gles2.h" | ||
21 | -#import "ijksdl_inc_internal.h" | ||
22 | -#import "ijksdl_log.h" | ||
23 | -#import "ijksdl_misc.h" | ||
24 | -#import "ijksdl_mutex.h" | ||
25 | -#import "ijksdl_stdinc.h" | ||
26 | -#import "ijksdl_thread.h" | ||
27 | -#import "ijksdl_timer.h" | ||
28 | -#import "ijksdl_video.h" | ||
29 | -#import "ijksdl_vout.h" | ||
30 | -#import "IJKSDLGLView.h" | ||
31 | -#import "ijksdl_ios.h" | ||
32 | -#import "ijksdl_vout_overlay_videotoolbox.h" | ||
33 | -#import "NTESGLView.h" | ||
34 | #import "ObjectMapper.h" | 15 | #import "ObjectMapper.h" |
35 | #import "HHPhotoPicker.h" | 16 | #import "HHPhotoPicker.h" |
36 | #import "CGGeometry+RSKImageCropper.h" | 17 | #import "CGGeometry+RSKImageCropper.h" |
1 | -/* | ||
2 | - * IJKSDLGLView.h | ||
3 | - * | ||
4 | - * Copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
5 | - * | ||
6 | - * based on https://github.com/kolyvan/kxmovie | ||
7 | - * | ||
8 | - * This file is part of ijkPlayer. | ||
9 | - * | ||
10 | - * ijkPlayer is free software; you can redistribute it and/or | ||
11 | - * modify it under the terms of the GNU Lesser General Public | ||
12 | - * License as published by the Free Software Foundation; either | ||
13 | - * version 2.1 of the License, or (at your option) any later version. | ||
14 | - * | ||
15 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
16 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
18 | - * Lesser General Public License for more details. | ||
19 | - * | ||
20 | - * You should have received a copy of the GNU Lesser General Public | ||
21 | - * License along with ijkPlayer; if not, write to the Free Software | ||
22 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
23 | - */ | ||
24 | - | ||
25 | -#import <UIKit/UIKit.h> | ||
26 | - | ||
27 | -#include "ijksdl_vout.h" | ||
28 | - | ||
29 | -@interface NTESIJKSDLGLView : UIView | ||
30 | - | ||
31 | -- (id) initWithFrame:(CGRect)frame; | ||
32 | -- (void) display: (SDL_VoutOverlay *) overlay clear:(BOOL)clear; | ||
33 | - | ||
34 | -- (UIImage*) snapshot; | ||
35 | -#if defined NTESIJKSDLHudView | ||
36 | -- (void)setHudValue:(NSString *)value forKey:(NSString *)key; | ||
37 | -#endif | ||
38 | - | ||
39 | -@property(nonatomic,strong) NSLock *appActivityLock; | ||
40 | -@property(nonatomic) CGFloat fps; | ||
41 | -@property(nonatomic) CGFloat scaleFactor; | ||
42 | -#if defined NTESIJKSDLHudView | ||
43 | -@property(nonatomic) BOOL shouldShowHudView; | ||
44 | -#endif | ||
45 | - | ||
46 | -@end |
1 | -// | ||
2 | -// NTESGLView.h | ||
3 | -// NIM | ||
4 | -// | ||
5 | -// Created by fenric on 16/8/30. | ||
6 | -// Copyright © 2016年 Netease. All rights reserved. | ||
7 | -// | ||
8 | - | ||
9 | -#import "IJKSDLGLView.h" | ||
10 | - | ||
11 | -@interface NTESGLView : NTESIJKSDLGLView | ||
12 | - | ||
13 | -- (void) render: (NSData *)yuvData | ||
14 | - width:(NSUInteger)width | ||
15 | - height:(NSUInteger)height; | ||
16 | - | ||
17 | -- (void)clearData; | ||
18 | - | ||
19 | -- (void)addBlack:(CGRect)rect; | ||
20 | - | ||
21 | -- (void)clearBack; | ||
22 | - | ||
23 | -@end |
1 | +// The MIT License (MIT) | ||
2 | +// | ||
3 | +// Copyright (c) 2014 Suyeol Jeon (http:xoul.kr) | ||
4 | +// | ||
5 | +// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
6 | +// of this software and associated documentation files (the "Software"), to deal | ||
7 | +// in the Software without restriction, including without limitation the rights | ||
8 | +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
9 | +// copies of the Software, and to permit persons to whom the Software is | ||
10 | +// furnished to do so, subject to the following conditions: | ||
11 | +// | ||
12 | +// The above copyright notice and this permission notice shall be included in all | ||
13 | +// copies or substantial portions of the Software. | ||
14 | +// | ||
15 | +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
18 | +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
19 | +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
20 | +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
21 | +// SOFTWARE. | ||
22 | + | ||
23 | +@import UIKit; | ||
24 | + | ||
25 | +FOUNDATION_EXPORT double UITextView_PlaceholderVersionNumber; | ||
26 | +FOUNDATION_EXPORT const unsigned char UITextView_PlaceholderVersionString[]; | ||
27 | + | ||
28 | +@interface UITextView (Placeholder) | ||
29 | + | ||
30 | +@property (nonatomic, readonly) UILabel *placeholderLabel; | ||
31 | + | ||
32 | +@property (nonatomic, strong) IBInspectable NSString *placeholder; | ||
33 | +@property (nonatomic, strong) NSAttributedString *attributedPlaceholder; | ||
34 | +@property (nonatomic, strong) IBInspectable UIColor *placeholderColor; | ||
35 | + | ||
36 | ++ (UIColor *)defaultPlaceholderColor; | ||
37 | + | ||
38 | +@end |
1 | -/***************************************************************************** | ||
2 | - * ijksdl.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_H | ||
25 | -#define IJKSDL__IJKSDL_H | ||
26 | - | ||
27 | -#if defined NTESIJKSDLHasAudio | ||
28 | -#include "ijksdl_audio.h" | ||
29 | -#include "ijksdl_aout.h" | ||
30 | -#endif | ||
31 | - | ||
32 | -#include "ijksdl_class.h" | ||
33 | -#include "ijksdl_error.h" | ||
34 | -#include "ijksdl_log.h" | ||
35 | -#include "ijksdl_misc.h" | ||
36 | -#include "ijksdl_mutex.h" | ||
37 | -#include "ijksdl_thread.h" | ||
38 | -#include "ijksdl_timer.h" | ||
39 | -#include "ijksdl_video.h" | ||
40 | -#include "ijksdl_vout.h" | ||
41 | -#if defined NTESIJKSDLHasFFmpeg | ||
42 | -#include "ffmpeg/ijksdl_vout_overlay_ffmpeg.h" | ||
43 | -#endif | ||
44 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_class.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_CLASS_H | ||
25 | -#define IJKSDL__IJKSDL_CLASS_H | ||
26 | - | ||
27 | -typedef struct SDL_Class { | ||
28 | - const char *name; | ||
29 | -} SDL_Class; | ||
30 | - | ||
31 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_endian.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_ENDIAN_H | ||
25 | -#define IJKSDL__IJKSDL_ENDIAN_H | ||
26 | - | ||
27 | -#define SDL_LIL_ENDIAN 1234 | ||
28 | -#define SDL_BIG_ENDIAN 4321 | ||
29 | - | ||
30 | -#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ | ||
31 | -#ifdef __linux__ | ||
32 | -#include <endian.h> | ||
33 | -#define SDL_BYTEORDER __BYTE_ORDER | ||
34 | -#else /* __linux __ */ | ||
35 | -#if defined(__hppa__) || \ | ||
36 | - defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ | ||
37 | - (defined(__MIPS__) && defined(__MISPEB__)) || \ | ||
38 | - defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \ | ||
39 | - defined(__sparc__) | ||
40 | -#define SDL_BYTEORDER SDL_BIG_ENDIAN | ||
41 | -#else | ||
42 | -#define SDL_BYTEORDER SDL_LIL_ENDIAN | ||
43 | -#endif | ||
44 | -#endif /* __linux __ */ | ||
45 | -#endif /* !SDL_BYTEORDER */ | ||
46 | - | ||
47 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_error.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_ERROR_H | ||
25 | -#define IJKSDL__IJKSDL_ERROR_H | ||
26 | - | ||
27 | -const char *SDL_GetError(void); | ||
28 | - | ||
29 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_fourcc.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_FOURCC_H | ||
25 | -#define IJKSDL__IJKSDL_FOURCC_H | ||
26 | - | ||
27 | -#include "ijksdl_stdinc.h" | ||
28 | -#include "ijksdl_endian.h" | ||
29 | - | ||
30 | -#if SDL_BYTEORDER == SDL_LIL_ENDIAN | ||
31 | -# define SDL_FOURCC(a, b, c, d) \ | ||
32 | - (((uint32_t)a) | (((uint32_t)b) << 8) | (((uint32_t)c) << 16) | (((uint32_t)d) << 24)) | ||
33 | -# define SDL_TWOCC(a, b) \ | ||
34 | - ((uint16_t)(a) | ((uint16_t)(b) << 8)) | ||
35 | -#else | ||
36 | -# define SDL_FOURCC(a, b, c, d) \ | ||
37 | - (((uint32_t)d) | (((uint32_t)c) << 8) | (((uint32_t)b) << 16) | (((uint32_t)a) << 24)) | ||
38 | -# define SDL_TWOCC( a, b ) \ | ||
39 | - ((uint16_t)(b) | ((uint16_t)(a) << 8)) | ||
40 | -#endif | ||
41 | - | ||
42 | -/*- | ||
43 | - * http://www.webartz.com/fourcc/indexyuv.htm | ||
44 | - * http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html | ||
45 | - * http://www.fourcc.org/yuv.php | ||
46 | - */ | ||
47 | - | ||
48 | -// YUV formats | ||
49 | -#define SDL_FCC_YV12 SDL_FOURCC('Y', 'V', '1', '2') /**< bpp=12, Planar mode: Y + V + U (3 planes) */ | ||
50 | -#define SDL_FCC_IYUV SDL_FOURCC('I', 'Y', 'U', 'V') /**< bpp=12, Planar mode: Y + U + V (3 planes) */ | ||
51 | -#define SDL_FCC_I420 SDL_FOURCC('I', '4', '2', '0') /**< bpp=12, Planar mode: Y + U + V (3 planes) */ | ||
52 | -#define SDL_FCC_I444P10LE SDL_FOURCC('I', '4', 'A', 'L') | ||
53 | - | ||
54 | -#define SDL_FCC_YUV2 SDL_FOURCC('Y', 'U', 'V', '2') /**< bpp=16, Packed mode: Y0+U0+Y1+V0 (1 plane) */ | ||
55 | -#define SDL_FCC_UYVY SDL_FOURCC('U', 'Y', 'V', 'Y') /**< bpp=16, Packed mode: U0+Y0+V0+Y1 (1 plane) */ | ||
56 | -#define SDL_FCC_YVYU SDL_FOURCC('Y', 'V', 'Y', 'U') /**< bpp=16, Packed mode: Y0+V0+Y1+U0 (1 plane) */ | ||
57 | - | ||
58 | -#define SDL_FCC_NV12 SDL_FOURCC('N', 'V', '1', '2') | ||
59 | - | ||
60 | -// RGB formats | ||
61 | -#define SDL_FCC_RV16 SDL_FOURCC('R', 'V', '1', '6') /**< bpp=16, RGB565 */ | ||
62 | -#define SDL_FCC_RV24 SDL_FOURCC('R', 'V', '2', '4') /**< bpp=24, RGB888 */ | ||
63 | -#define SDL_FCC_RV32 SDL_FOURCC('R', 'V', '3', '2') /**< bpp=32, RGBX8888 */ | ||
64 | -#define SDL_FCC_BGRA SDL_FOURCC('B', 'G', 'R', 'A') /**< bpp=32, BGRA8888 */ | ||
65 | - | ||
66 | - | ||
67 | -// opaque formats | ||
68 | -#define SDL_FCC__AMC SDL_FOURCC('_', 'A', 'M', 'C') /**< Android MediaCodec */ | ||
69 | -#define SDL_FCC__VTB SDL_FOURCC('_', 'V', 'T', 'B') /**< iOS VideoToolbox */ | ||
70 | -#define SDL_FCC__GLES2 SDL_FOURCC('_', 'E', 'S', '2') /**< let Vout choose format */ | ||
71 | - | ||
72 | -// undefine | ||
73 | -#define SDL_FCC_UNDF SDL_FOURCC('U', 'N', 'D', 'F') /**< undefined */ | ||
74 | - | ||
75 | -enum { | ||
76 | - IJK_AV_PIX_FMT__START = 10000, | ||
77 | - IJK_AV_PIX_FMT__ANDROID_MEDIACODEC, | ||
78 | - IJK_AV_PIX_FMT__VIDEO_TOOLBOX, | ||
79 | -}; | ||
80 | - | ||
81 | -#endif |
1 | -/* | ||
2 | - * copyright (c) 2016 Zhang Rui <bbcallen@gmail.com> | ||
3 | - * | ||
4 | - * This file is part of ijkPlayer. | ||
5 | - * | ||
6 | - * ijkPlayer is free software; you can redistribute it and/or | ||
7 | - * modify it under the terms of the GNU Lesser General Public | ||
8 | - * License as published by the Free Software Foundation; either | ||
9 | - * version 2.1 of the License, or (at your option) any later version. | ||
10 | - * | ||
11 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | - * Lesser General Public License for more details. | ||
15 | - * | ||
16 | - * You should have received a copy of the GNU Lesser General Public | ||
17 | - * License along with ijkPlayer; if not, write to the Free Software | ||
18 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | - */ | ||
20 | - | ||
21 | -#ifndef IJKSDL__IJKSDL_GLES2_H | ||
22 | -#define IJKSDL__IJKSDL_GLES2_H | ||
23 | - | ||
24 | -#ifdef __APPLE__ | ||
25 | -#include <OpenGLES/ES2/gl.h> | ||
26 | -#include <OpenGLES/ES2/glext.h> | ||
27 | -#else | ||
28 | -#include <GLES2/gl2.h> | ||
29 | -#include <GLES2/gl2ext.h> | ||
30 | -#include <GLES2/gl2platform.h> | ||
31 | -#endif | ||
32 | - | ||
33 | -typedef struct SDL_VoutOverlay SDL_VoutOverlay; | ||
34 | - | ||
35 | -/* | ||
36 | - * Common | ||
37 | - */ | ||
38 | - | ||
39 | -#ifdef DEBUG | ||
40 | -#define IJK_GLES2_checkError_TRACE(op) | ||
41 | -#define IJK_GLES2_checkError_DEBUG(op) | ||
42 | -#else | ||
43 | -#define IJK_GLES2_checkError_TRACE(op) NTES_IJK_GLES2_checkError(op) | ||
44 | -#define IJK_GLES2_checkError_DEBUG(op) NTES_IJK_GLES2_checkError(op) | ||
45 | -#endif | ||
46 | - | ||
47 | -void NTES_IJK_GLES2_printString(const char *name, GLenum s); | ||
48 | -void NTES_IJK_GLES2_checkError(const char *op); | ||
49 | - | ||
50 | -GLuint NTES_IJK_GLES2_loadShader(GLenum shader_type, const char *shader_source); | ||
51 | - | ||
52 | - | ||
53 | -/* | ||
54 | - * Renderer | ||
55 | - */ | ||
56 | -#define IJK_GLES2_MAX_PLANE 3 | ||
57 | -typedef struct IJK_GLES2_Renderer IJK_GLES2_Renderer; | ||
58 | - | ||
59 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create(SDL_VoutOverlay *overlay); | ||
60 | -void NTES_IJK_GLES2_Renderer_reset(IJK_GLES2_Renderer *renderer); | ||
61 | -void NTES_IJK_GLES2_Renderer_free(IJK_GLES2_Renderer *renderer); | ||
62 | -void NTES_IJK_GLES2_Renderer_freeP(IJK_GLES2_Renderer **renderer); | ||
63 | - | ||
64 | -GLboolean NTES_IJK_GLES2_Renderer_setupGLES(); | ||
65 | -GLboolean NTES_IJK_GLES2_Renderer_isValid(IJK_GLES2_Renderer *renderer); | ||
66 | -GLboolean NTES_IJK_GLES2_Renderer_isFormat(IJK_GLES2_Renderer *renderer, int format); | ||
67 | -GLboolean NTES_IJK_GLES2_Renderer_use(IJK_GLES2_Renderer *renderer); | ||
68 | -GLboolean NTES_IJK_GLES2_Renderer_renderOverlay(IJK_GLES2_Renderer *renderer, SDL_VoutOverlay *overlay); | ||
69 | - | ||
70 | -#define IJK_GLES2_GRAVITY_RESIZE (0) // Stretch to fill view bounds. | ||
71 | -#define IJK_GLES2_GRAVITY_RESIZE_ASPECT (1) // Preserve aspect ratio; fit within view bounds. | ||
72 | -#define IJK_GLES2_GRAVITY_RESIZE_ASPECT_FILL (2) // Preserve aspect ratio; fill view bounds. | ||
73 | -GLboolean NTES_IJK_GLES2_Renderer_setGravity(IJK_GLES2_Renderer *renderer, int gravity, GLsizei view_width, GLsizei view_height); | ||
74 | - | ||
75 | -#endif |
1 | -/* | ||
2 | - * ijksdl_inc_internal.h | ||
3 | - * | ||
4 | - * Copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
5 | - * | ||
6 | - * This file is part of ijkPlayer. | ||
7 | - * | ||
8 | - * ijkPlayer is free software; you can redistribute it and/or | ||
9 | - * modify it under the terms of the GNU Lesser General Public | ||
10 | - * License as published by the Free Software Foundation; either | ||
11 | - * version 2.1 of the License, or (at your option) any later version. | ||
12 | - * | ||
13 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | - * Lesser General Public License for more details. | ||
17 | - * | ||
18 | - * You should have received a copy of the GNU Lesser General Public | ||
19 | - * License along with ijkPlayer; if not, write to the Free Software | ||
20 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | - */ | ||
22 | - | ||
23 | -#ifndef IJKPLAYER__IJKSDL_INC_INTERNAL_H | ||
24 | -#define IJKPLAYER__IJKSDL_INC_INTERNAL_H | ||
25 | - | ||
26 | -#include <stdint.h> | ||
27 | - | ||
28 | -#include "ijksdl_log.h" | ||
29 | -#include "ijksdl_misc.h" | ||
30 | -#include "ijksdl_stdinc.h" | ||
31 | - | ||
32 | -#define SDLTRACE ALOGD | ||
33 | - | ||
34 | -#endif |
1 | -/* | ||
2 | - * ijksdl_ios.h | ||
3 | - * | ||
4 | - * Copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
5 | - * | ||
6 | - * This file is part of ijkPlayer. | ||
7 | - * | ||
8 | - * ijkPlayer is free software; you can redistribute it and/or | ||
9 | - * modify it under the terms of the GNU Lesser General Public | ||
10 | - * License as published by the Free Software Foundation; either | ||
11 | - * version 2.1 of the License, or (at your option) any later version. | ||
12 | - * | ||
13 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
14 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | - * Lesser General Public License for more details. | ||
17 | - * | ||
18 | - * You should have received a copy of the GNU Lesser General Public | ||
19 | - * License along with ijkPlayer; if not, write to the Free Software | ||
20 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | - */ | ||
22 | - | ||
23 | -#include "ijksdl.h" | ||
24 | -#if defined NTESIJKSDLHasAudio | ||
25 | -#include "ijksdl_aout_ios_audiounit.h" | ||
26 | -#endif | ||
27 | -#if defined NTESIJKSDLHasVout | ||
28 | -#include "ijksdl_vout_ios_gles2.h" | ||
29 | -#endif | ||
30 | -#import <UIKit/UIKit.h> | ||
31 | - | ||
32 | - | ||
33 | - | ||
34 | -#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | ||
35 | -#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | ||
36 | -#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | ||
37 | -#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | ||
38 | -#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) | ||
39 | - | ||
40 | -inline static BOOL isIOS9OrLater() | ||
41 | -{ | ||
42 | - return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"9.0"); | ||
43 | -} | ||
44 | - | ||
45 | -inline static BOOL isIOS8OrLater() | ||
46 | -{ | ||
47 | - return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"); | ||
48 | -} | ||
49 | - | ||
50 | -inline static BOOL isIOS7OrLater() | ||
51 | -{ | ||
52 | - return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"); | ||
53 | -} | ||
54 | - | ||
55 | -inline static BOOL isIOS6OrLater() | ||
56 | -{ | ||
57 | - return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0"); | ||
58 | -} |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_log.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2015 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_LOG_H | ||
25 | -#define IJKSDL__IJKSDL_LOG_H | ||
26 | - | ||
27 | -#include <stdio.h> | ||
28 | - | ||
29 | -#ifdef __ANDROID__ | ||
30 | - | ||
31 | -#include <android/log.h> | ||
32 | - | ||
33 | -#define IJK_LOG_UNKNOWN ANDROID_LOG_UNKNOWN | ||
34 | -#define IJK_LOG_DEFAULT ANDROID_LOG_DEFAULT | ||
35 | - | ||
36 | -#define IJK_LOG_VERBOSE ANDROID_LOG_VERBOSE | ||
37 | -#define IJK_LOG_DEBUG ANDROID_LOG_DEBUG | ||
38 | -#define IJK_LOG_INFO ANDROID_LOG_INFO | ||
39 | -#define IJK_LOG_WARN ANDROID_LOG_WARN | ||
40 | -#define IJK_LOG_ERROR ANDROID_LOG_ERROR | ||
41 | -#define IJK_LOG_FATAL ANDROID_LOG_FATAL | ||
42 | -#define IJK_LOG_SILENT ANDROID_LOG_SILENT | ||
43 | - | ||
44 | -#define VLOG(level, TAG, ...) ((void)__android_log_vprint(level, TAG, __VA_ARGS__)) | ||
45 | -#define ALOG(level, TAG, ...) ((void)__android_log_print(level, TAG, __VA_ARGS__)) | ||
46 | - | ||
47 | -#else | ||
48 | - | ||
49 | -#define IJK_LOG_UNKNOWN 0 | ||
50 | -#define IJK_LOG_DEFAULT 1 | ||
51 | - | ||
52 | -#define IJK_LOG_VERBOSE 2 | ||
53 | -#define IJK_LOG_DEBUG 3 | ||
54 | -#define IJK_LOG_INFO 4 | ||
55 | -#define IJK_LOG_WARN 5 | ||
56 | -#define IJK_LOG_ERROR 6 | ||
57 | -#define IJK_LOG_FATAL 7 | ||
58 | -#define IJK_LOG_SILENT 8 | ||
59 | - | ||
60 | -#define VLOG(level, TAG, ...) ((void)vprintf(__VA_ARGS__)) | ||
61 | -#define ALOG(level, TAG, ...) ((void)printf(__VA_ARGS__)) | ||
62 | - | ||
63 | -#endif | ||
64 | - | ||
65 | -#define IJK_LOG_TAG "IJKMEDIA" | ||
66 | - | ||
67 | -#define VLOGV(...) VLOG(IJK_LOG_VERBOSE, IJK_LOG_TAG, __VA_ARGS__) | ||
68 | -#define VLOGD(...) VLOG(IJK_LOG_DEBUG, IJK_LOG_TAG, __VA_ARGS__) | ||
69 | -#define VLOGI(...) VLOG(IJK_LOG_INFO, IJK_LOG_TAG, __VA_ARGS__) | ||
70 | -#define VLOGW(...) VLOG(IJK_LOG_WARN, IJK_LOG_TAG, __VA_ARGS__) | ||
71 | -#define VLOGE(...) VLOG(IJK_LOG_ERROR, IJK_LOG_TAG, __VA_ARGS__) | ||
72 | - | ||
73 | -#define ALOGV(...) ALOG(IJK_LOG_VERBOSE, IJK_LOG_TAG, __VA_ARGS__) | ||
74 | -#define ALOGD(...) ALOG(IJK_LOG_DEBUG, IJK_LOG_TAG, __VA_ARGS__) | ||
75 | -#define ALOGI(...) ALOG(IJK_LOG_INFO, IJK_LOG_TAG, __VA_ARGS__) | ||
76 | -#define ALOGW(...) ALOG(IJK_LOG_WARN, IJK_LOG_TAG, __VA_ARGS__) | ||
77 | -#define ALOGE(...) ALOG(IJK_LOG_ERROR, IJK_LOG_TAG, __VA_ARGS__) | ||
78 | -#define LOG_ALWAYS_FATAL(...) do { ALOGE(__VA_ARGS__); exit(1); } while (0) | ||
79 | - | ||
80 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_misc.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_MISC_H | ||
25 | -#define IJKSDL__IJKSDL_MISC_H | ||
26 | - | ||
27 | -#include <stdlib.h> | ||
28 | -//#include <memory.h> | ||
29 | - | ||
30 | -#ifndef IJKMAX | ||
31 | -#define IJKMAX(a, b) ((a) > (b) ? (a) : (b)) | ||
32 | -#endif | ||
33 | - | ||
34 | -#ifndef IJKMIN | ||
35 | -#define IJKMIN(a, b) ((a) < (b) ? (a) : (b)) | ||
36 | -#endif | ||
37 | - | ||
38 | -#ifndef IJKALIGN | ||
39 | -#define IJKALIGN(x, align) ((( x ) + (align) - 1) / (align) * (align)) | ||
40 | -#endif | ||
41 | - | ||
42 | -#define IJK_CHECK_RET(condition__, retval__, ...) \ | ||
43 | - if (!(condition__)) { \ | ||
44 | - ALOGE(__VA_ARGS__); \ | ||
45 | - return (retval__); \ | ||
46 | - } | ||
47 | - | ||
48 | -#ifndef NELEM | ||
49 | -#define NELEM(x) ((int) (sizeof(x) / sizeof((x)[0]))) | ||
50 | -#endif | ||
51 | - | ||
52 | -inline static void *mallocz(size_t size) | ||
53 | -{ | ||
54 | - void *mem = malloc(size); | ||
55 | - if (!mem) | ||
56 | - return mem; | ||
57 | - | ||
58 | - memset(mem, 0, size); | ||
59 | - return mem; | ||
60 | -} | ||
61 | - | ||
62 | -inline static void freep(void **mem) | ||
63 | -{ | ||
64 | - if (mem && *mem) { | ||
65 | - free(*mem); | ||
66 | - *mem = NULL; | ||
67 | - } | ||
68 | -} | ||
69 | - | ||
70 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_mutex.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_MUTEX_H | ||
25 | -#define IJKSDL__IJKSDL_MUTEX_H | ||
26 | - | ||
27 | -#include <stdint.h> | ||
28 | -#include <pthread.h> | ||
29 | - | ||
30 | -#define SDL_MUTEX_TIMEDOUT 1 | ||
31 | -#define SDL_MUTEX_MAXWAIT (~(uint32_t)0) | ||
32 | - | ||
33 | -typedef struct SDL_mutex { | ||
34 | - pthread_mutex_t id; | ||
35 | -} SDL_mutex; | ||
36 | - | ||
37 | -SDL_mutex *SDL_CreateMutex(void); | ||
38 | -void SDL_DestroyMutex(SDL_mutex *mutex); | ||
39 | -void SDL_DestroyMutexP(SDL_mutex **mutex); | ||
40 | -int SDL_LockMutex(SDL_mutex *mutex); | ||
41 | -int SDL_UnlockMutex(SDL_mutex *mutex); | ||
42 | - | ||
43 | -typedef struct SDL_cond { | ||
44 | - pthread_cond_t id; | ||
45 | -} SDL_cond; | ||
46 | - | ||
47 | -SDL_cond *SDL_CreateCond(void); | ||
48 | -void SDL_DestroyCond(SDL_cond *cond); | ||
49 | -void SDL_DestroyCondP(SDL_cond **mutex); | ||
50 | -int SDL_CondSignal(SDL_cond *cond); | ||
51 | -int SDL_CondBroadcast(SDL_cond *cond); | ||
52 | -int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, uint32_t ms); | ||
53 | -int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex); | ||
54 | - | ||
55 | -#endif | ||
56 | - |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_stdinc.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_STDINC_H | ||
25 | -#define IJKSDL__IJKSDL_STDINC_H | ||
26 | - | ||
27 | -#include <stddef.h> | ||
28 | -#include <stdint.h> | ||
29 | -#include <stdbool.h> | ||
30 | - | ||
31 | -typedef int8_t Sint8; | ||
32 | -typedef uint8_t Uint8; | ||
33 | -typedef int16_t Sint16; | ||
34 | -typedef uint16_t Uint16; | ||
35 | -typedef int32_t Sint32; | ||
36 | -typedef uint32_t Uint32; | ||
37 | -typedef int64_t Sint64; | ||
38 | -typedef uint64_t Uint64; | ||
39 | - | ||
40 | -char *SDL_getenv(const char *name); | ||
41 | - | ||
42 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_thread.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_THREAD_H | ||
25 | -#define IJKSDL__IJKSDL_THREAD_H | ||
26 | - | ||
27 | -#include <stdint.h> | ||
28 | -#include <pthread.h> | ||
29 | - | ||
30 | -typedef enum { | ||
31 | - SDL_THREAD_PRIORITY_LOW, | ||
32 | - SDL_THREAD_PRIORITY_NORMAL, | ||
33 | - SDL_THREAD_PRIORITY_HIGH | ||
34 | -} SDL_ThreadPriority; | ||
35 | - | ||
36 | -typedef struct SDL_Thread | ||
37 | -{ | ||
38 | - pthread_t id; | ||
39 | - int (*func)(void *); | ||
40 | - void *data; | ||
41 | - char name[32]; | ||
42 | - int retval; | ||
43 | -} SDL_Thread; | ||
44 | - | ||
45 | -SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data, const char *name); | ||
46 | -int SDL_SetThreadPriority(SDL_ThreadPriority priority); | ||
47 | -void SDL_WaitThread(SDL_Thread *thread, int *status); | ||
48 | -void SDL_DetachThread(SDL_Thread *thread); | ||
49 | - | ||
50 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_thread.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_TIMER_H | ||
25 | -#define IJKSDL__IJKSDL_TIMER_H | ||
26 | - | ||
27 | -#include "ijksdl_stdinc.h" | ||
28 | - | ||
29 | -void SDL_Delay(Uint32 ms); | ||
30 | - | ||
31 | -Uint64 NTES_SDL_GetTickHR(void); | ||
32 | - | ||
33 | - | ||
34 | -typedef struct SDL_Profiler | ||
35 | -{ | ||
36 | - int64_t total_elapsed; | ||
37 | - int total_counter; | ||
38 | - | ||
39 | - int64_t sample_elapsed; | ||
40 | - int sample_counter; | ||
41 | - float sample_per_seconds; | ||
42 | - int64_t average_elapsed; | ||
43 | - | ||
44 | - int64_t begin_time; | ||
45 | - | ||
46 | - int max_sample; | ||
47 | -} SDL_Profiler; | ||
48 | - | ||
49 | -void SDL_ProfilerReset(SDL_Profiler* profiler, int max_sample); | ||
50 | -void SDL_ProfilerBegin(SDL_Profiler* profiler); | ||
51 | -int64_t SDL_ProfilerEnd(SDL_Profiler* profiler); | ||
52 | - | ||
53 | -typedef struct SDL_SpeedSampler | ||
54 | -{ | ||
55 | - Uint64 samples[10]; | ||
56 | - | ||
57 | - int capacity; | ||
58 | - int count; | ||
59 | - int first_index; | ||
60 | - int next_index; | ||
61 | - | ||
62 | - Uint64 last_log_time; | ||
63 | -} SDL_SpeedSampler; | ||
64 | - | ||
65 | -void SDL_SpeedSamplerReset(SDL_SpeedSampler *sampler); | ||
66 | -// return samples per seconds | ||
67 | -float SDL_SpeedSamplerAdd(SDL_SpeedSampler *sampler, int enable_log, const char *log_tag); | ||
68 | - | ||
69 | - | ||
70 | - | ||
71 | -typedef struct SDL_SpeedSampler2 | ||
72 | -{ | ||
73 | - int64_t sample_range; | ||
74 | - int64_t last_profile_tick; | ||
75 | - int64_t last_profile_duration; | ||
76 | - int64_t last_profile_quantity; | ||
77 | - int64_t last_profile_speed; | ||
78 | -} SDL_SpeedSampler2; | ||
79 | - | ||
80 | -void SDL_SpeedSampler2Reset(SDL_SpeedSampler2 *sampler, int sample_range); | ||
81 | -int64_t SDL_SpeedSampler2Add(SDL_SpeedSampler2 *sampler, int quantity); | ||
82 | -int64_t SDL_SpeedSampler2GetSpeed(SDL_SpeedSampler2 *sampler); | ||
83 | - | ||
84 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_video.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_VIDEO_H | ||
25 | -#define IJKSDL__IJKSDL_VIDEO_H | ||
26 | - | ||
27 | -#include "ijksdl_stdinc.h" | ||
28 | -#include "ijksdl_fourcc.h" | ||
29 | - | ||
30 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_vout.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef IJKSDL__IJKSDL_VOUT_H | ||
25 | -#define IJKSDL__IJKSDL_VOUT_H | ||
26 | - | ||
27 | -#include "ijksdl_stdinc.h" | ||
28 | -#include "ijksdl_class.h" | ||
29 | -#include "ijksdl_mutex.h" | ||
30 | -#include "ijksdl_video.h" | ||
31 | -#if defined NTESIJKSDLHasFFmpeg | ||
32 | -#include "ffmpeg/ijksdl_inc_ffmpeg.h" | ||
33 | -#endif | ||
34 | -typedef struct SDL_VoutOverlay_Opaque SDL_VoutOverlay_Opaque; | ||
35 | -typedef struct SDL_VoutOverlay SDL_VoutOverlay; | ||
36 | -struct SDL_VoutOverlay { | ||
37 | - int w; /**< Read-only */ | ||
38 | - int h; /**< Read-only */ | ||
39 | - Uint32 format; /**< Read-only */ | ||
40 | - int planes; /**< Read-only */ | ||
41 | - Uint16 *pitches; /**< in bytes, Read-only */ | ||
42 | - Uint8 **pixels; /**< Read-write */ | ||
43 | - | ||
44 | - int is_private; | ||
45 | - | ||
46 | - int sar_num; | ||
47 | - int sar_den; | ||
48 | - | ||
49 | - SDL_Class *opaque_class; | ||
50 | - SDL_VoutOverlay_Opaque *opaque; | ||
51 | - | ||
52 | - void (*free_l)(SDL_VoutOverlay *overlay); | ||
53 | - int (*lock)(SDL_VoutOverlay *overlay); | ||
54 | - int (*unlock)(SDL_VoutOverlay *overlay); | ||
55 | - void (*unref)(SDL_VoutOverlay *overlay); | ||
56 | -#if defined NTESIJKSDLHasFFmpeg | ||
57 | - int (*func_fill_frame)(SDL_VoutOverlay *overlay, const AVFrame *frame); | ||
58 | -#endif | ||
59 | -}; | ||
60 | - | ||
61 | -typedef struct SDL_Vout_Opaque SDL_Vout_Opaque; | ||
62 | -typedef struct SDL_Vout SDL_Vout; | ||
63 | -struct SDL_Vout { | ||
64 | - SDL_mutex *mutex; | ||
65 | - | ||
66 | - SDL_Class *opaque_class; | ||
67 | - SDL_Vout_Opaque *opaque; | ||
68 | - SDL_VoutOverlay *(*create_overlay)(int width, int height, int frame_format, SDL_Vout *vout); | ||
69 | - void (*free_l)(SDL_Vout *vout); | ||
70 | - int (*display_overlay)(SDL_Vout *vout, SDL_VoutOverlay *overlay); | ||
71 | - | ||
72 | - Uint32 overlay_format; | ||
73 | -}; | ||
74 | - | ||
75 | -void SDL_VoutFree(SDL_Vout *vout); | ||
76 | -void SDL_VoutFreeP(SDL_Vout **pvout); | ||
77 | -int SDL_VoutDisplayYUVOverlay(SDL_Vout *vout, SDL_VoutOverlay *overlay); | ||
78 | -int SDL_VoutSetOverlayFormat(SDL_Vout *vout, Uint32 overlay_format); | ||
79 | - | ||
80 | -SDL_VoutOverlay *SDL_Vout_CreateOverlay(int width, int height, int frame_format, SDL_Vout *vout); | ||
81 | -int SDL_VoutLockYUVOverlay(SDL_VoutOverlay *overlay); | ||
82 | -int SDL_VoutUnlockYUVOverlay(SDL_VoutOverlay *overlay); | ||
83 | -void SDL_VoutFreeYUVOverlay(SDL_VoutOverlay *overlay); | ||
84 | -void SDL_VoutUnrefYUVOverlay(SDL_VoutOverlay *overlay); | ||
85 | -#if defined NTESIJKSDLHasFFmpeg | ||
86 | -int SDL_VoutFillFrameYUVOverlay(SDL_VoutOverlay *overlay, const AVFrame *frame); | ||
87 | -#endif | ||
88 | -#endif |
1 | -/***************************************************************************** | ||
2 | - * ijksdl_vout_overlay_videotoolbox.h | ||
3 | - ***************************************************************************** | ||
4 | - * | ||
5 | - * copyright (c) 2014 ZhouQuan <zhouqicy@gmail.com> | ||
6 | - * | ||
7 | - * This file is part of ijkPlayer. | ||
8 | - * | ||
9 | - * ijkPlayer is free software; you can redistribute it and/or | ||
10 | - * modify it under the terms of the GNU Lesser General Public | ||
11 | - * License as published by the Free Software Foundation; either | ||
12 | - * version 2.1 of the License, or (at your option) any later version. | ||
13 | - * | ||
14 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | - * Lesser General Public License for more details. | ||
18 | - * | ||
19 | - * You should have received a copy of the GNU Lesser General Public | ||
20 | - * License along with ijkPlayer; if not, write to the Free Software | ||
21 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
22 | - */ | ||
23 | - | ||
24 | -#ifndef __IJKMediaPlayer__ijksdl_vout_overlay_videotoolbox__ | ||
25 | -#define __IJKMediaPlayer__ijksdl_vout_overlay_videotoolbox__ | ||
26 | - | ||
27 | -#import <CoreVideo/CoreVideo.h> | ||
28 | -#include "ijksdl_stdinc.h" | ||
29 | -#include "ijksdl_vout.h" | ||
30 | -#if defined NTESIJKSDLHasFFmpeg | ||
31 | -#include "ijksdl_inc_ffmpeg.h" | ||
32 | -#else | ||
33 | -#include "ijksdl_inc_internal.h" | ||
34 | -#endif | ||
35 | - | ||
36 | -SDL_VoutOverlay *SDL_VoutVideoToolBox_CreateOverlay(int width, int height, SDL_Vout *vout); | ||
37 | -CVPixelBufferRef SDL_VoutOverlayVideoToolBox_GetCVPixelBufferRef(SDL_VoutOverlay *overlay); | ||
38 | - | ||
39 | -#endif |
1 | -/* | ||
2 | - * copyright (c) 2016 Zhang Rui <bbcallen@gmail.com> | ||
3 | - * | ||
4 | - * This file is part of ijkPlayer. | ||
5 | - * | ||
6 | - * ijkPlayer is free software; you can redistribute it and/or | ||
7 | - * modify it under the terms of the GNU Lesser General Public | ||
8 | - * License as published by the Free Software Foundation; either | ||
9 | - * version 2.1 of the License, or (at your option) any later version. | ||
10 | - * | ||
11 | - * ijkPlayer is distributed in the hope that it will be useful, | ||
12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | - * Lesser General Public License for more details. | ||
15 | - * | ||
16 | - * You should have received a copy of the GNU Lesser General Public | ||
17 | - * License along with ijkPlayer; if not, write to the Free Software | ||
18 | - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | - */ | ||
20 | - | ||
21 | -#ifndef IJKSDL__IJKSDL_GLES2__INTERNAL__H | ||
22 | -#define IJKSDL__IJKSDL_GLES2__INTERNAL__H | ||
23 | - | ||
24 | -#include <assert.h> | ||
25 | -#include <stdlib.h> | ||
26 | -#include "ijksdl_fourcc.h" | ||
27 | -#include "ijksdl_log.h" | ||
28 | -#include "ijksdl_gles2.h" | ||
29 | -#include "ijksdl_vout.h" | ||
30 | - | ||
31 | -#define IJK_GLES_STRINGIZE(x) #x | ||
32 | -#define IJK_GLES_STRINGIZE2(x) IJK_GLES_STRINGIZE(x) | ||
33 | -#define IJK_GLES_STRING(x) IJK_GLES_STRINGIZE2(x) | ||
34 | - | ||
35 | -typedef struct IJK_GLES2_Renderer_Opaque IJK_GLES2_Renderer_Opaque; | ||
36 | - | ||
37 | -typedef struct IJK_GLES2_Renderer | ||
38 | -{ | ||
39 | - IJK_GLES2_Renderer_Opaque *opaque; | ||
40 | - | ||
41 | - GLuint program; | ||
42 | - | ||
43 | - GLuint vertex_shader; | ||
44 | - GLuint fragment_shader; | ||
45 | - GLuint plane_textures[IJK_GLES2_MAX_PLANE]; | ||
46 | - | ||
47 | - GLuint av4_position; | ||
48 | - GLuint av2_texcoord; | ||
49 | - GLuint um4_mvp; | ||
50 | - | ||
51 | - GLuint us2_sampler[IJK_GLES2_MAX_PLANE]; | ||
52 | - GLuint um3_color_conversion; | ||
53 | - | ||
54 | - GLboolean (*func_use)(IJK_GLES2_Renderer *renderer); | ||
55 | - GLsizei (*func_getBufferWidth)(IJK_GLES2_Renderer *renderer, SDL_VoutOverlay *overlay); | ||
56 | - GLboolean (*func_uploadTexture)(IJK_GLES2_Renderer *renderer, SDL_VoutOverlay *overlay); | ||
57 | - GLvoid (*func_destroy)(IJK_GLES2_Renderer *renderer); | ||
58 | - | ||
59 | - GLsizei buffer_width; | ||
60 | - GLsizei visible_width; | ||
61 | - | ||
62 | - GLfloat texcoords[8]; | ||
63 | - | ||
64 | - GLfloat vertices[8]; | ||
65 | - int vertices_changed; | ||
66 | - | ||
67 | - int format; | ||
68 | - int gravity; | ||
69 | - GLsizei layer_width; | ||
70 | - GLsizei layer_height; | ||
71 | - int frame_width; | ||
72 | - int frame_height; | ||
73 | - int frame_sar_num; | ||
74 | - int frame_sar_den; | ||
75 | - | ||
76 | - GLsizei last_buffer_width; | ||
77 | -} IJK_GLES2_Renderer; | ||
78 | - | ||
79 | -typedef struct IJK_GLES_Matrix | ||
80 | -{ | ||
81 | - GLfloat m[16]; | ||
82 | -} IJK_GLES_Matrix; | ||
83 | -void NTES_IJK_GLES2_loadOrtho(IJK_GLES_Matrix *matrix, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far); | ||
84 | - | ||
85 | -const char *NTES_IJK_GLES2_getVertexShader_default(); | ||
86 | -const char *NTES_IJK_GLES2_getFragmentShader_yuv420p(); | ||
87 | -const char *NTES_IJK_GLES2_getFragmentShader_yuv444p10le(); | ||
88 | -const char *NTES_IJK_GLES2_getFragmentShader_yuv420sp(); | ||
89 | -const char *NTES_IJK_GLES2_getFragmentShader_rgb(); | ||
90 | - | ||
91 | -const GLfloat *NTES_IJK_GLES2_getColorMatrix_bt709(); | ||
92 | -const GLfloat *NTES_IJK_GLES2_getColorMatrix_bt601(); | ||
93 | - | ||
94 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_base(const char *fragment_shader_source); | ||
95 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_yuv420p(); | ||
96 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_yuv444p10le(); | ||
97 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_yuv420sp(); | ||
98 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_yuv420sp_vtb(SDL_VoutOverlay *overlay); | ||
99 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_rgb565(); | ||
100 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_rgb888(); | ||
101 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_rgbx8888(); | ||
102 | -IJK_GLES2_Renderer *NTES_IJK_GLES2_Renderer_create_bgra8888(); | ||
103 | - | ||
104 | -#endif |
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
HHDoctorPro/HHDoctorSDK.framework/Video.storyboardc/1yM-In-WzS-view-hCB-L7-FyM.nib/objects-13.0+.nib
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
HHDoctorPro/HHDoctorSDK.framework/Video.storyboardc/eYM-0S-bXl-view-yXU-C3-IV4.nib/objects-13.0+.nib
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
-
Please register or login to post a comment