From 9e3ee39ac2ac18b2e35296ac56428fc3304d341e Mon Sep 17 00:00:00 2001 From: baishuai Date: Sat, 25 May 2019 13:00:55 +0800 Subject: [PATCH 001/163] ios: IJKSDLGLView fix xcode 10.2.1 Main Thread Checker issues --- .../ijkmedia/ijksdl/ios/IJKSDLGLView.m | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m index c3162776e0..0a9b15e110 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m @@ -61,6 +61,7 @@ @implementation IJKSDLGLView { BOOL _didLockedDueToMovedToWindow; BOOL _shouldLockWhileBeingMovedToWindow; NSMutableArray *_registeredNotifications; + CAEAGLLayer *_eaglLayer; IJKSDLGLViewApplicationState _applicationState; } @@ -140,17 +141,12 @@ - (BOOL)setupEAGLContext:(EAGLContext *)context return YES; } -- (CAEAGLLayer *)eaglLayer -{ - return (CAEAGLLayer*) self.layer; -} - - (BOOL)setupGL { if (_didSetupGL) return YES; - CAEAGLLayer *eaglLayer = (CAEAGLLayer*) self.layer; + CAEAGLLayer *eaglLayer = _eaglLayer; eaglLayer.opaque = YES; eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, @@ -190,6 +186,7 @@ - (BOOL)setupGLOnce if (![self tryLockGLActive]) return NO; + _eaglLayer = (CAEAGLLayer*) self.layer; BOOL didSetupGL = [self setupGL]; [self unlockGLActive]; return didSetupGL; @@ -206,10 +203,12 @@ - (BOOL)isApplicationActive UIApplicationState appState = [UIApplication sharedApplication].applicationState; switch (appState) { case UIApplicationStateActive: + _applicationState = IJKSDLGLViewApplicationForegroundState; return YES; case UIApplicationStateInactive: case UIApplicationStateBackground: default: + _applicationState = IJKSDLGLViewApplicationBackgroundState; return NO; } } @@ -371,14 +370,14 @@ - (void)displayInternal: (SDL_VoutOverlay *) overlay return; } - [[self eaglLayer] setContentsScale:_scaleFactor]; + [_eaglLayer setContentsScale:_scaleFactor]; if (_isRenderBufferInvalidated) { NSLog(@"IJKSDLGLView: renderbufferStorage fromDrawable\n"); _isRenderBufferInvalidated = NO; glBindRenderbuffer(GL_RENDERBUFFER, _renderbuffer); - [_context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer*)self.layer]; + [_context renderbufferStorage:GL_RENDERBUFFER fromDrawable:_eaglLayer]; glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &_backingWidth); glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &_backingHeight); IJK_GLES2_Renderer_setGravity(_renderer, _rendererGravity, _backingWidth, _backingHeight); From 79ffe083bd477daffa784d962d2b91af53ef3c2b Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 18 Jun 2019 16:16:57 +0800 Subject: [PATCH 002/163] add objc wrap IJKFFMediaPlayer for c IjkMediaPlayer --- .../IJKMediaFramework/IJKMediaFramework.h | 1 + .../IJKMediaFrameworkWithSSL.h | 1 + .../IJKMediaPlayer.xcodeproj/project.pbxproj | 28 ++- .../IJKMediaPlayer/IJKFFMediaPlayer.h | 56 +++++ .../IJKMediaPlayer/IJKFFMediaPlayer.m | 219 ++++++++++++++++++ 5 files changed, 303 insertions(+), 2 deletions(-) create mode 100644 ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h create mode 100644 ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m diff --git a/ios/IJKMediaPlayer/IJKMediaFramework/IJKMediaFramework.h b/ios/IJKMediaPlayer/IJKMediaFramework/IJKMediaFramework.h index d0bc5265d3..9493e19d52 100644 --- a/ios/IJKMediaPlayer/IJKMediaFramework/IJKMediaFramework.h +++ b/ios/IJKMediaPlayer/IJKMediaFramework/IJKMediaFramework.h @@ -33,6 +33,7 @@ FOUNDATION_EXPORT const unsigned char IJKMediaFrameworkVersionString[]; #import #import #import +#import #import #import #import diff --git a/ios/IJKMediaPlayer/IJKMediaFrameworkWithSSL/IJKMediaFrameworkWithSSL.h b/ios/IJKMediaPlayer/IJKMediaFrameworkWithSSL/IJKMediaFrameworkWithSSL.h index 5680be283e..44cd301486 100644 --- a/ios/IJKMediaPlayer/IJKMediaFrameworkWithSSL/IJKMediaFrameworkWithSSL.h +++ b/ios/IJKMediaPlayer/IJKMediaFrameworkWithSSL/IJKMediaFrameworkWithSSL.h @@ -19,6 +19,7 @@ FOUNDATION_EXPORT const unsigned char IJKMediaFrameworkWithSSLVersionString[]; #import #import #import +#import #import #import #import diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 0f023aecb6..6fef8f9a23 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -7,6 +7,15 @@ objects = { /* Begin PBXBuildFile section */ + 215FF44B22B7E83500FAAD0E /* IJKFFMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 215FF44922B7E83500FAAD0E /* IJKFFMediaPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 215FF44C22B7E83500FAAD0E /* IJKFFMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 215FF44922B7E83500FAAD0E /* IJKFFMediaPlayer.h */; }; + 215FF44D22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; + 215FF44E22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; + 215FF44F22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; + 21DAA1592298FEBB007B0784 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8B1E63E59300568494 /* libcrypto.a */; }; + 21DAA15A2298FEBE007B0784 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8C1E63E59300568494 /* libssl.a */; }; + 21DAA15B2298FEC7007B0784 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8F1E63E59800568494 /* libz.tbd */; }; + 21DAA15D2298FED6007B0784 /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 21DAA15C2298FED6007B0784 /* libbz2.tbd */; }; 4D32BC811F906E3A00CE9F03 /* IJKSDLGLViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D32BC801F906E3600CE9F03 /* IJKSDLGLViewProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4D32BC821F906E3B00CE9F03 /* IJKSDLGLViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D32BC801F906E3600CE9F03 /* IJKSDLGLViewProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4DA7F6891F2B1E270032A499 /* ijkiourlhook.c in Sources */ = {isa = PBXBuildFile; fileRef = 4DA7F6881F2B1E270032A499 /* ijkiourlhook.c */; }; @@ -271,6 +280,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 215FF44922B7E83500FAAD0E /* IJKFFMediaPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IJKFFMediaPlayer.h; sourceTree = ""; }; + 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IJKFFMediaPlayer.m; sourceTree = ""; }; + 21DAA15C2298FED6007B0784 /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; }; 454316201A66493700676070 /* ffpipeline_ios.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffpipeline_ios.c; path = ijkmedia/ijkplayer/ios/pipeline/ffpipeline_ios.c; sourceTree = ""; }; 454316211A66493700676070 /* ffpipeline_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipeline_ios.h; path = ijkmedia/ijkplayer/ios/pipeline/ffpipeline_ios.h; sourceTree = ""; }; 454316221A66493700676070 /* ffpipenode_ios_videotoolbox_vdec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipenode_ios_videotoolbox_vdec.h; path = ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.h; sourceTree = ""; }; @@ -487,6 +499,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 21DAA15D2298FED6007B0784 /* libbz2.tbd in Frameworks */, + 21DAA15B2298FEC7007B0784 /* libz.tbd in Frameworks */, + 21DAA15A2298FEBE007B0784 /* libssl.a in Frameworks */, + 21DAA1592298FEBB007B0784 /* libcrypto.a in Frameworks */, E653C6F61BCE5A750016835A /* libavcodec.a in Frameworks */, E653C6F81BCE5A750016835A /* libavfilter.a in Frameworks */, E653C6FA1BCE5A750016835A /* libavformat.a in Frameworks */, @@ -656,6 +672,7 @@ E6903EBB17EAF6C500CFD954 /* Frameworks */ = { isa = PBXGroup; children = ( + 21DAA15C2298FED6007B0784 /* libbz2.tbd */, 5450AF8F1E63E59800568494 /* libz.tbd */, 5450AF8B1E63E59300568494 /* libcrypto.a */, 5450AF8C1E63E59300568494 /* libssl.a */, @@ -674,6 +691,8 @@ E66F8DE617EFD9C300354D80 /* IJKFFMoviePlayerController.m */, E6F727B917F2D9D30043623F /* IJKFFMoviePlayerDef.h */, E6F727BA17F2D9D30043623F /* IJKFFMoviePlayerDef.m */, + 215FF44922B7E83500FAAD0E /* IJKFFMediaPlayer.h */, + 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */, E62139BC180FA89A00553533 /* IJKFFOptions.h */, E62139BD180FA89A00553533 /* IJKFFOptions.m */, E6903FCC17EAFC6100CFD954 /* ijkmedia */, @@ -967,6 +986,7 @@ 5450B0251E63EA4300568494 /* ijkdict.h in Headers */, 5450B0261E63EA4300568494 /* IJKAVMoviePlayerController.h in Headers */, 5450B0271E63EA4300568494 /* ijksdl_gles2.h in Headers */, + 215FF44C22B7E83500FAAD0E /* IJKFFMediaPlayer.h in Headers */, 5450B0281E63EA4300568494 /* ijksdl_egl.h in Headers */, 549385C41E640456001AE08D /* IJKMediaFrameworkWithSSL.h in Headers */, 5450B0291E63EA4300568494 /* ff_ffplay_options.h in Headers */, @@ -1008,6 +1028,7 @@ E654EAE81B6B295200B0F2D0 /* IJKAVMoviePlayerController.h in Headers */, E6C459841C7030AA004831EC /* ijksdl_gles2.h in Headers */, E6C459BB1C706A13004831EC /* ijksdl_egl.h in Headers */, + 215FF44B22B7E83500FAAD0E /* IJKFFMediaPlayer.h in Headers */, E6C459BD1C7089AB004831EC /* ff_ffplay_options.h in Headers */, E654EA8F1B6B27E600B0F2D0 /* IJKMediaFramework.h in Headers */, E6C2E7BE1C92BD3600E59229 /* IJKKVOController.h in Headers */, @@ -1223,6 +1244,7 @@ 5450AFE31E63EA4300568494 /* ijklivehook.c in Sources */, 5450AFE41E63EA4300568494 /* ijkurlhook.c in Sources */, 5450AFE51E63EA4300568494 /* IJKVideoToolBoxSync.m in Sources */, + 215FF44E22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */, 5450AFE61E63EA4300568494 /* IJKMediaPlayback.m in Sources */, 5450AFE71E63EA4300568494 /* ijkdict.c in Sources */, 5450AFE81E63EA4300568494 /* ff_ffpipeline.c in Sources */, @@ -1314,6 +1336,7 @@ E69BE5721B946FF600AFBA3F /* ijklivehook.c in Sources */, 54A029BA1D4700E6001C61C1 /* ijkurlhook.c in Sources */, 5407EC2E1DF81D2600457BFE /* IJKVideoToolBoxSync.m in Sources */, + 215FF44D22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */, E654EAA51B6B283700B0F2D0 /* IJKMediaPlayback.m in Sources */, 54CF8A491E15287D00309DD5 /* ijkdict.c in Sources */, E654EAB01B6B285900B0F2D0 /* ff_ffpipeline.c in Sources */, @@ -1371,6 +1394,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 215FF44F22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */, E654EA9C1B6B27E600B0F2D0 /* IJKMediaFrameworkTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1426,7 +1450,7 @@ "$(inherited)", "\"$(SRCROOT)/../build/universal/lib\"", ); - MACH_O_TYPE = mh_dylib; + MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ( "-read_only_relocs", @@ -1477,7 +1501,7 @@ "$(inherited)", "\"$(SRCROOT)/../build/universal/lib\"", ); - MACH_O_TYPE = mh_dylib; + MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ( "-read_only_relocs", diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h new file mode 100644 index 0000000000..93e5740d33 --- /dev/null +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -0,0 +1,56 @@ +/* + * IJKFFMoviePlayerDef.m + * + * Copyright (c) 2019 Befovy + * + * 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 +#import "IJKFFOptions.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface IJKFFMediaPlayer : NSObject + + +- (IJKFFMediaPlayer *)init; + +@property (readonly, nonatomic) int videoWidth; +@property (readonly, nonatomic) int videoHeight; +@property (readonly, nonatomic) int videoSarNum; +@property (readonly, nonatomic) int videoSarDen; + +- (void) setDataSource:(NSString *)url; +- (void) prepareAsync; +- (void) start; +- (void) stop; +- (void) pause; +- (BOOL) isPlaying; +- (void) shutdown; + +- (void)setOptionValue:(NSString *)value + forKey:(NSString *)key + ofCategory:(IJKFFOptionCategory)category; + +- (void)setOptionIntValue:(int64_t)value + forKey:(NSString *)key + ofCategory:(IJKFFOptionCategory)category; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m new file mode 100644 index 0000000000..65e2b71e7e --- /dev/null +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -0,0 +1,219 @@ +/* + * IJKFFMoviePlayerDef.m + * + * Copyright (c) 2019 Befovy + * + * 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 "IJKFFMediaPlayer.h" + +#import "IJKFFMoviePlayerDef.h" +#import "IJKAudioKit.h" +#import "IJKFFOptions.h" +#import "ijkplayer/ijkplayer.h" + + +@interface IJKFFWeakHolder : NSObject +@property (nonatomic, weak) id object; +@end + +@implementation IJKFFWeakHolder +@end + + +@implementation IJKFFMediaPlayer { + IjkMediaPlayer* _nativeMediaPlayer; + IJKFFMoviePlayerMessagePool *_msgPool; + + NSString *_dataSource; + int _videoWidth; + int _videoHeight; + int _videoSarNum; + int _videoSarDen; +} + +- (IJKFFMoviePlayerMessage *) obtainMessage { + return [_msgPool obtain]; +} + +inline static IJKFFMediaPlayer *ffplayerRetain(void *arg) { + return (__bridge_transfer IJKFFMediaPlayer *) arg; +} + +int ff_media_player_msg_loop(void* arg) +{ + @autoreleasepool { + IjkMediaPlayer *mp = (IjkMediaPlayer*)arg; + __weak IJKFFMediaPlayer *ffPlayer = ffplayerRetain(ijkmp_set_weak_thiz(mp, NULL)); + while (ffPlayer) { + @autoreleasepool { + IJKFFMoviePlayerMessage *msg = [ffPlayer obtainMessage]; + if (!msg) + break; + + int retval = ijkmp_get_msg(mp, &msg->_msg, 1); + if (retval < 0) + break; + + // block-get should never return 0 + assert(retval > 0); + [ffPlayer performSelectorOnMainThread:@selector(postEvent:) withObject:msg waitUntilDone:NO]; + } + } + + // retained in prepare_async, before SDL_CreateThreadEx + ijkmp_dec_ref_p(&mp); + return 0; + } +} + +- (IJKFFMediaPlayer *)init +{ + self = [super init]; + if (self) { + ijkmp_global_init(); + _msgPool = [[IJKFFMoviePlayerMessagePool alloc] init]; + + [self nativeSetup]; + + ijkmp_set_option(_nativeMediaPlayer, IJKMP_OPT_CATEGORY_PLAYER, "overlay-format", "fcc-_es2"); + + [[IJKAudioKit sharedInstance] setupAudioSession]; + } + return self; +} + +- (void) nativeSetup +{ + _nativeMediaPlayer = ijkmp_ios_create(ff_media_player_msg_loop); + + IJKFFWeakHolder *weakHolder = [[IJKFFWeakHolder alloc] init]; + weakHolder.object = self; + + ijkmp_set_weak_thiz(_nativeMediaPlayer, (__bridge_retained void *) self); + ijkmp_set_inject_opaque(_nativeMediaPlayer, (__bridge_retained void *) weakHolder); + ijkmp_set_ijkio_inject_opaque(_nativeMediaPlayer, (__bridge_retained void *) weakHolder); +} + +- (void)postEvent: (IJKFFMoviePlayerMessage *)msg +{ + if (!msg) + return; + + AVMessage *avmsg = &msg->_msg; + switch (avmsg->what) { + case FFP_MSG_FLUSH: + break; + case FFP_MSG_ERROR: + break; + case FFP_MSG_PREPARED: + break; + + default: + break; + } + [_msgPool recycle:msg]; +} + + +- (void) setSurface +{ + +} + +- (void) prepareAsync +{ + ijkmp_prepare_async(_nativeMediaPlayer); +} + +- (void) setDataSource:(NSString *)url +{ + _dataSource = url; + ijkmp_set_data_source(_nativeMediaPlayer, [url UTF8String]); +} + + +- (void) start +{ + ijkmp_start(_nativeMediaPlayer); +} + +- (void) stop +{ + ijkmp_stop(_nativeMediaPlayer); +} + +- (void) pause +{ + ijkmp_pause(_nativeMediaPlayer); +} + + +- (BOOL) isPlaying +{ + return ijkmp_is_playing(_nativeMediaPlayer); +} + +- (long) getCurrentPosition +{ + return ijkmp_get_current_position(_nativeMediaPlayer); +} + +- (long) getDuration +{ + return ijkmp_get_duration(_nativeMediaPlayer); +} + +- (void) seekTo:(long) msec +{ + ijkmp_seek_to(_nativeMediaPlayer, msec); +} + +- (void) shutdown +{ + ijkmp_shutdown(_nativeMediaPlayer); + + __unused id weakPlayer = (__bridge_transfer IJKFFMediaPlayer*)ijkmp_set_weak_thiz(_nativeMediaPlayer, NULL); + __unused id weakHolder = (__bridge_transfer IJKFFWeakHolder*)ijkmp_set_inject_opaque(_nativeMediaPlayer, NULL); + __unused id weakijkHolder = (__bridge_transfer IJKFFWeakHolder*)ijkmp_set_ijkio_inject_opaque(_nativeMediaPlayer, NULL); + ijkmp_dec_ref_p(&_nativeMediaPlayer); +} + +- (void) reset +{ + [self shutdown]; + [self nativeSetup]; +} + + +- (void)setOptionValue:(NSString *)value + forKey:(NSString *)key + ofCategory:(IJKFFOptionCategory)category +{ + ijkmp_set_option(_nativeMediaPlayer, category, [key UTF8String], [value UTF8String]); +} + +- (void)setOptionIntValue:(int64_t)value + forKey:(NSString *)key + ofCategory:(IJKFFOptionCategory)category +{ + ijkmp_set_option_int(_nativeMediaPlayer, category, [key UTF8String], value); +} + + +@end From 943ac895a502f003a367f74ffbb23e10663b41f5 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 19 Jun 2019 09:32:55 +0800 Subject: [PATCH 003/163] android gradle config update, make it usable in android studio 3.4 --- android/ijkplayer/build.gradle | 22 +++++++-- .../gradle/wrapper/gradle-wrapper.properties | 4 +- .../ijkplayer/ijkplayer-arm64/build.gradle | 2 +- .../src/main/AndroidManifest.xml | 3 -- .../ijkplayer/ijkplayer-armv5/build.gradle | 2 +- .../src/main/AndroidManifest.xml | 3 -- .../ijkplayer/ijkplayer-armv7a/build.gradle | 2 +- .../src/main/AndroidManifest.xml | 3 -- .../ijkplayer/ijkplayer-example/build.gradle | 45 +++++++++++-------- .../src/main/AndroidManifest.xml | 4 -- android/ijkplayer/ijkplayer-exo/build.gradle | 6 +-- android/ijkplayer/ijkplayer-java/build.gradle | 2 +- .../src/main/AndroidManifest.xml | 3 -- android/ijkplayer/ijkplayer-x86/build.gradle | 2 +- .../src/main/AndroidManifest.xml | 3 -- .../ijkplayer/ijkplayer-x86_64/build.gradle | 2 +- .../src/main/AndroidManifest.xml | 3 -- 17 files changed, 56 insertions(+), 55 deletions(-) diff --git a/android/ijkplayer/build.gradle b/android/ijkplayer/build.gradle index abc1270f52..49fa890af0 100644 --- a/android/ijkplayer/build.gradle +++ b/android/ijkplayer/build.gradle @@ -1,11 +1,24 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. +//NOTE:: run `./gradlew ideaModule` to apply exclude dirs +apply plugin: 'idea' + +idea.module { + //excludeDirs += file('ijkplayer-armv7a/src/') + excludeDirs += file('ijkplayer-arm64/src/') + excludeDirs += file('ijkplayer-armv5/src/') + excludeDirs += file('ijkplayer-x86/src/') + excludeDirs += file('ijkplayer-x86_64/src/') +} + + buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.3' + classpath 'com.android.tools.build:gradle:3.4.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' @@ -17,14 +30,15 @@ buildscript { allprojects { repositories { jcenter() + google() } } ext { - compileSdkVersion = 25 - buildToolsVersion = "25.0.3" + compileSdkVersion = 28 + buildToolsVersion = "28.0.3" - targetSdkVersion = 25 + targetSdkVersion = 28 versionCode = 800800 versionName = "0.8.8" diff --git a/android/ijkplayer/gradle/wrapper/gradle-wrapper.properties b/android/ijkplayer/gradle/wrapper/gradle-wrapper.properties index f47ae66616..3460769178 100644 --- a/android/ijkplayer/gradle/wrapper/gradle-wrapper.properties +++ b/android/ijkplayer/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Aug 24 16:26:25 CST 2016 +#Tue Jun 18 13:38:02 CST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip diff --git a/android/ijkplayer/ijkplayer-arm64/build.gradle b/android/ijkplayer/ijkplayer-arm64/build.gradle index a8cbe0cb34..91b35571d2 100644 --- a/android/ijkplayer/ijkplayer-arm64/build.gradle +++ b/android/ijkplayer/ijkplayer-arm64/build.gradle @@ -24,7 +24,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) } apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle"); diff --git a/android/ijkplayer/ijkplayer-arm64/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-arm64/src/main/AndroidManifest.xml index f075c28515..88a4fb0d68 100644 --- a/android/ijkplayer/ijkplayer-arm64/src/main/AndroidManifest.xml +++ b/android/ijkplayer/ijkplayer-arm64/src/main/AndroidManifest.xml @@ -1,7 +1,4 @@ - - diff --git a/android/ijkplayer/ijkplayer-armv5/build.gradle b/android/ijkplayer/ijkplayer-armv5/build.gradle index b3b7b3a8b7..4b3368017c 100644 --- a/android/ijkplayer/ijkplayer-armv5/build.gradle +++ b/android/ijkplayer/ijkplayer-armv5/build.gradle @@ -24,7 +24,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) } apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle"); diff --git a/android/ijkplayer/ijkplayer-armv5/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-armv5/src/main/AndroidManifest.xml index 5d35eadf2a..2975659e0f 100644 --- a/android/ijkplayer/ijkplayer-armv5/src/main/AndroidManifest.xml +++ b/android/ijkplayer/ijkplayer-armv5/src/main/AndroidManifest.xml @@ -1,7 +1,4 @@ - - \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-armv7a/build.gradle b/android/ijkplayer/ijkplayer-armv7a/build.gradle index b3b7b3a8b7..4b3368017c 100644 --- a/android/ijkplayer/ijkplayer-armv7a/build.gradle +++ b/android/ijkplayer/ijkplayer-armv7a/build.gradle @@ -24,7 +24,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) } apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle"); diff --git a/android/ijkplayer/ijkplayer-armv7a/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-armv7a/src/main/AndroidManifest.xml index f3727da39c..64e550b80c 100644 --- a/android/ijkplayer/ijkplayer-armv7a/src/main/AndroidManifest.xml +++ b/android/ijkplayer/ijkplayer-armv7a/src/main/AndroidManifest.xml @@ -1,7 +1,4 @@ - - \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-example/build.gradle b/android/ijkplayer/ijkplayer-example/build.gradle index ae4a0c6589..25e4871f82 100644 --- a/android/ijkplayer/ijkplayer-example/build.gradle +++ b/android/ijkplayer/ijkplayer-example/build.gradle @@ -12,7 +12,6 @@ android { } defaultConfig { applicationId "tv.danmaku.ijk.media.example" - minSdkVersion 9 targetSdkVersion rootProject.ext.targetSdkVersion versionCode rootProject.ext.versionCode versionName rootProject.ext.versionName @@ -23,9 +22,17 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + flavorDimensions "ndkabi" + productFlavors { - all32 { minSdkVersion 9 } - all64 { minSdkVersion 21 } + all32 { + dimension "ndkabi" + minSdkVersion 14 + } + all64 { + dimension "ndkabi" + minSdkVersion 21 + } // armv5 {} // armv7a {} // arm64 { minSdkVersion 21 } @@ -34,25 +41,27 @@ android { } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') - compile 'com.android.support:appcompat-v7:23.0.1' - compile 'com.android.support:preference-v7:23.0.1' - compile 'com.android.support:support-annotations:23.0.1' + implementation fileTree(include: ['*.jar'], dir: 'libs') + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:preference-v7:28.0.0' + implementation 'com.android.support:support-annotations:28.0.0' - compile 'com.squareup:otto:1.3.8' + implementation 'com.squareup:otto:1.3.8' - compile project(':ijkplayer-java') - compile project(':ijkplayer-exo') + implementation project(':ijkplayer-java') + implementation project(':ijkplayer-exo') - all32Compile project(':ijkplayer-armv5') - all32Compile project(':ijkplayer-armv7a') - all32Compile project(':ijkplayer-x86') + //all32Implementation + all32Implementation project(':ijkplayer-armv5') + all32Implementation project(':ijkplayer-armv7a') + all32Implementation project(':ijkplayer-x86') - all64Compile project(':ijkplayer-armv5') - all64Compile project(':ijkplayer-armv7a') - all64Compile project(':ijkplayer-arm64') - all64Compile project(':ijkplayer-x86') - all64Compile project(':ijkplayer-x86_64') + //all64Implementation + all64Implementation project(':ijkplayer-armv5') + all64Implementation project(':ijkplayer-armv7a') + all64Implementation project(':ijkplayer-arm64') + all64Implementation project(':ijkplayer-x86') + all64Implementation project(':ijkplayer-x86_64') // compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8' // compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8' diff --git a/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml index dd3a3af123..84ec25f6bb 100644 --- a/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml +++ b/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml @@ -2,10 +2,6 @@ - - diff --git a/android/ijkplayer/ijkplayer-exo/build.gradle b/android/ijkplayer/ijkplayer-exo/build.gradle index b582803aa3..f6e7a6ca87 100644 --- a/android/ijkplayer/ijkplayer-exo/build.gradle +++ b/android/ijkplayer/ijkplayer-exo/build.gradle @@ -23,11 +23,11 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.google.android.exoplayer:exoplayer:r1.5.11' + implementation 'com.google.android.exoplayer:exoplayer:r1.5.11' - compile project(':ijkplayer-java') + implementation project(':ijkplayer-java') // compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8' } diff --git a/android/ijkplayer/ijkplayer-java/build.gradle b/android/ijkplayer/ijkplayer-java/build.gradle index 30d3ad27b4..849a5dd50e 100644 --- a/android/ijkplayer/ijkplayer-java/build.gradle +++ b/android/ijkplayer/ijkplayer-java/build.gradle @@ -23,7 +23,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) } apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle"); diff --git a/android/ijkplayer/ijkplayer-java/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-java/src/main/AndroidManifest.xml index c87fe47051..e45a047395 100644 --- a/android/ijkplayer/ijkplayer-java/src/main/AndroidManifest.xml +++ b/android/ijkplayer/ijkplayer-java/src/main/AndroidManifest.xml @@ -1,7 +1,4 @@ - - \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-x86/build.gradle b/android/ijkplayer/ijkplayer-x86/build.gradle index b3b7b3a8b7..4b3368017c 100644 --- a/android/ijkplayer/ijkplayer-x86/build.gradle +++ b/android/ijkplayer/ijkplayer-x86/build.gradle @@ -24,7 +24,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) } apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle"); diff --git a/android/ijkplayer/ijkplayer-x86/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-x86/src/main/AndroidManifest.xml index 68a12d04a8..01dd7f8702 100644 --- a/android/ijkplayer/ijkplayer-x86/src/main/AndroidManifest.xml +++ b/android/ijkplayer/ijkplayer-x86/src/main/AndroidManifest.xml @@ -1,7 +1,4 @@ - - diff --git a/android/ijkplayer/ijkplayer-x86_64/build.gradle b/android/ijkplayer/ijkplayer-x86_64/build.gradle index a8cbe0cb34..91b35571d2 100644 --- a/android/ijkplayer/ijkplayer-x86_64/build.gradle +++ b/android/ijkplayer/ijkplayer-x86_64/build.gradle @@ -24,7 +24,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) + implementation fileTree(dir: 'libs', include: ['*.jar']) } apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle"); diff --git a/android/ijkplayer/ijkplayer-x86_64/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-x86_64/src/main/AndroidManifest.xml index 9ff26a79ea..d5691663a0 100644 --- a/android/ijkplayer/ijkplayer-x86_64/src/main/AndroidManifest.xml +++ b/android/ijkplayer/ijkplayer-x86_64/src/main/AndroidManifest.xml @@ -1,7 +1,4 @@ - - From b449817dec12620595b843bbd9a0d96ddf66b3c4 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 19 Jun 2019 11:17:38 +0800 Subject: [PATCH 004/163] android iOS: add isomorphic player event listener --- .../ijk/media/player/IjkEventListener.java | 20 ++++++++ .../ijk/media/player/IjkMediaPlayer.java | 49 ++++++++++++++++--- ijkmedia/ijkplayer/android/ijkplayer_jni.c | 17 +++++++ ijkmedia/ijkplayer/ijkplayer.c | 3 +- .../IJKMediaPlayer/IJKFFMediaPlayer.h | 33 ++++++++++++- .../IJKMediaPlayer/IJKFFMediaPlayer.m | 39 ++++++++++++--- 6 files changed, 143 insertions(+), 18 deletions(-) create mode 100644 android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java new file mode 100644 index 0000000000..5455712ab5 --- /dev/null +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java @@ -0,0 +1,20 @@ +package tv.danmaku.ijk.media.player; + +interface IjkEventListener { + + int FLUSH = 0; + int ERROR = 100; + int PREPARED = 200; + int COMPLETED = 300; + int VIDEO_SIZE_CHANGED = 400; + int SAR_CHANGED = 401; + int VIDEO_RENDERING_START = 402; + int AUDIO_RENDERING_START = 403; + int VIDEO_ROTATION_CHANGED = 404; + int BUFFERING_START = 500; + int BUFFERING_END = 501; + int BUFFERING_UPDATE = 502; + int PLAYBACK_STATE_CHANGED = 700; + + void onEvent(IjkMediaPlayer mp, int what, int arg1, int arg2, Object extra); +} diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java index beb73f76e8..b929cdf894 100755 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java @@ -49,8 +49,10 @@ import java.lang.reflect.Field; import java.security.InvalidParameterException; import java.util.ArrayList; +import java.util.HashSet; import java.util.Locale; import java.util.Map; +import java.util.Set; import tv.danmaku.ijk.media.player.annotations.AccessedByNative; import tv.danmaku.ijk.media.player.annotations.CalledByNative; @@ -975,15 +977,37 @@ public void handleMessage(Message msg) { return; } + switch (msg.what) { + case IjkEventListener.FLUSH: + case IjkEventListener.ERROR: + case IjkEventListener.PREPARED: + case IjkEventListener.COMPLETED: + case IjkEventListener.VIDEO_SIZE_CHANGED: + case IjkEventListener.SAR_CHANGED: + case IjkEventListener.VIDEO_RENDERING_START: + case IjkEventListener.AUDIO_RENDERING_START: + case IjkEventListener.VIDEO_ROTATION_CHANGED: + case IjkEventListener.BUFFERING_START: + case IjkEventListener.BUFFERING_END: + case IjkEventListener.BUFFERING_UPDATE: + case IjkEventListener.PLAYBACK_STATE_CHANGED: + for (IjkEventListener listener : player.mEventListeners) { + listener.onEvent(player, msg.what, msg.arg1, msg.arg2, msg.obj); + } + break; + default: + break; + } + switch (msg.what) { case MEDIA_PREPARED: player.notifyOnPrepared(); - return; + break; case MEDIA_PLAYBACK_COMPLETE: player.stayAwake(false); player.notifyOnCompletion(); - return; + break; case MEDIA_BUFFERING_UPDATE: long bufferPosition = msg.arg1; @@ -1002,18 +1026,18 @@ public void handleMessage(Message msg) { // DebugLog.efmt(TAG, "Buffer (%d%%) %d/%d", percent, bufferPosition, duration); player.notifyOnBufferingUpdate((int)percent); - return; + break; case MEDIA_SEEK_COMPLETE: player.notifyOnSeekComplete(); - return; + break; case MEDIA_SET_VIDEO_SIZE: player.mVideoWidth = msg.arg1; player.mVideoHeight = msg.arg2; player.notifyOnVideoSizeChanged(player.mVideoWidth, player.mVideoHeight, player.mVideoSarNum, player.mVideoSarDen); - return; + break; case MEDIA_ERROR: DebugLog.e(TAG, "Error (" + msg.arg1 + "," + msg.arg2 + ")"); @@ -1021,7 +1045,7 @@ public void handleMessage(Message msg) { player.notifyOnCompletion(); } player.stayAwake(false); - return; + break; case MEDIA_INFO: switch (msg.arg1) { @@ -1031,7 +1055,7 @@ public void handleMessage(Message msg) { } player.notifyOnInfo(msg.arg1, msg.arg2); // No real default action so far. - return; + break; case MEDIA_TIMED_TEXT: if (msg.obj == null) { player.notifyOnTimedText(null); @@ -1039,7 +1063,7 @@ public void handleMessage(Message msg) { IjkTimedText text = new IjkTimedText(new Rect(0, 0, 1, 1), (String)msg.obj); player.notifyOnTimedText(text); } - return; + break; case MEDIA_NOP: // interface test message - ignore break; @@ -1193,6 +1217,15 @@ public void setOnMediaCodecSelectListener(OnMediaCodecSelectListener listener) { mOnMediaCodecSelectListener = listener; } + private Set mEventListeners = new HashSet<>(); + public final void addIjkEventListener(IjkEventListener listener){ + mEventListeners.add(listener); + } + + public final void removeIjkEventListener(IjkEventListener listener){ + mEventListeners.remove(listener); + } + public void resetListeners() { super.resetListeners(); mOnMediaCodecSelectListener = null; diff --git a/ijkmedia/ijkplayer/android/ijkplayer_jni.c b/ijkmedia/ijkplayer/android/ijkplayer_jni.c index b5a50e7d6a..7641a50fc6 100755 --- a/ijkmedia/ijkplayer/android/ijkplayer_jni.c +++ b/ijkmedia/ijkplayer/android/ijkplayer_jni.c @@ -912,46 +912,57 @@ static void message_loop_n(JNIEnv *env, IjkMediaPlayer *mp) case FFP_MSG_FLUSH: MPTRACE("FFP_MSG_FLUSH:\n"); post_event(env, weak_thiz, MEDIA_NOP, 0, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_ERROR: MPTRACE("FFP_MSG_ERROR: %d\n", msg.arg1); post_event(env, weak_thiz, MEDIA_ERROR, MEDIA_ERROR_IJK_PLAYER, msg.arg1); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_PREPARED: MPTRACE("FFP_MSG_PREPARED:\n"); post_event(env, weak_thiz, MEDIA_PREPARED, 0, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_COMPLETED: MPTRACE("FFP_MSG_COMPLETED:\n"); post_event(env, weak_thiz, MEDIA_PLAYBACK_COMPLETE, 0, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_VIDEO_SIZE_CHANGED: MPTRACE("FFP_MSG_VIDEO_SIZE_CHANGED: %d, %d\n", msg.arg1, msg.arg2); post_event(env, weak_thiz, MEDIA_SET_VIDEO_SIZE, msg.arg1, msg.arg2); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_SAR_CHANGED: MPTRACE("FFP_MSG_SAR_CHANGED: %d, %d\n", msg.arg1, msg.arg2); post_event(env, weak_thiz, MEDIA_SET_VIDEO_SAR, msg.arg1, msg.arg2); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_VIDEO_RENDERING_START: MPTRACE("FFP_MSG_VIDEO_RENDERING_START:\n"); post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_RENDERING_START, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_AUDIO_RENDERING_START: MPTRACE("FFP_MSG_AUDIO_RENDERING_START:\n"); post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_AUDIO_RENDERING_START, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_VIDEO_ROTATION_CHANGED: MPTRACE("FFP_MSG_VIDEO_ROTATION_CHANGED: %d\n", msg.arg1); post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_ROTATION_CHANGED, msg.arg1); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_AUDIO_DECODED_START: MPTRACE("FFP_MSG_AUDIO_DECODED_START:\n"); post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_AUDIO_DECODED_START, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_VIDEO_DECODED_START: MPTRACE("FFP_MSG_VIDEO_DECODED_START:\n"); post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_DECODED_START, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_OPEN_INPUT: MPTRACE("FFP_MSG_OPEN_INPUT:\n"); @@ -968,14 +979,17 @@ static void message_loop_n(JNIEnv *env, IjkMediaPlayer *mp) case FFP_MSG_BUFFERING_START: MPTRACE("FFP_MSG_BUFFERING_START:\n"); post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_BUFFERING_START, msg.arg1); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_BUFFERING_END: MPTRACE("FFP_MSG_BUFFERING_END:\n"); post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_BUFFERING_END, msg.arg1); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_BUFFERING_UPDATE: // MPTRACE("FFP_MSG_BUFFERING_UPDATE: %d, %d", msg.arg1, msg.arg2); post_event(env, weak_thiz, MEDIA_BUFFERING_UPDATE, msg.arg1, msg.arg2); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_BUFFERING_BYTES_UPDATE: break; @@ -984,12 +998,15 @@ static void message_loop_n(JNIEnv *env, IjkMediaPlayer *mp) case FFP_MSG_SEEK_COMPLETE: MPTRACE("FFP_MSG_SEEK_COMPLETE:\n"); post_event(env, weak_thiz, MEDIA_SEEK_COMPLETE, 0, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_ACCURATE_SEEK_COMPLETE: MPTRACE("FFP_MSG_ACCURATE_SEEK_COMPLETE:\n"); post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_MEDIA_ACCURATE_SEEK_COMPLETE, msg.arg1); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_PLAYBACK_STATE_CHANGED: + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_TIMED_TEXT: if (msg.obj) { diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index 8ea4d4748e..73e1fe65ab 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -110,8 +110,9 @@ void ijkmp_io_stat_complete_register(void (*cb)(const char *url, void ijkmp_change_state_l(IjkMediaPlayer *mp, int new_state) { + int old_state = mp->mp_state; mp->mp_state = new_state; - ffp_notify_msg1(mp->ffplayer, FFP_MSG_PLAYBACK_STATE_CHANGED); + ffp_notify_msg3(mp->ffplayer, FFP_MSG_PLAYBACK_STATE_CHANGED, new_state, old_state); } IjkMediaPlayer *ijkmp_create(int (*msg_loop)(void*)) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index 93e5740d33..e411dce45e 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -25,16 +25,41 @@ NS_ASSUME_NONNULL_BEGIN -@interface IJKFFMediaPlayer : NSObject +typedef NS_ENUM(NSInteger, IJKMPEventType) { + IJKMPET_FLUSH = 0, + IJKMPET_ERROR = 100, + IJKMPET_PREPARED = 200, + IJKMPET_COMPLETED = 300, + IJKMPET_VIDEO_SIZE_CHANGED = 400, + IJKMPET_SAR_CHANGED = 401, + IJKMPET_VIDEO_RENDERING_START = 402, + IJKMPET_AUDIO_RENDERING_START = 403, + IJKMPET_VIDEO_ROTATION_CHANGED = 404, + IJKMPET_BUFFERING_START = 500, + IJKMPET_BUFFERING_END = 501, + IJKMPET_BUFFERING_UPDATE = 502, + IJKMPET_PLAYBACK_STATE_CHANGED = 700, +}; -- (IJKFFMediaPlayer *)init; +@class IJKFFMediaPlayer; + +@protocol IJKMPEventHandler + +@required +- (void) onEvent4Player:(IJKFFMediaPlayer *)player withType:(int)waht andArg1:(int)arg1 andArg2:(int)arg2 andExtra:(void *)extra; + +@end + +@interface IJKFFMediaPlayer : NSObject @property (readonly, nonatomic) int videoWidth; @property (readonly, nonatomic) int videoHeight; @property (readonly, nonatomic) int videoSarNum; @property (readonly, nonatomic) int videoSarDen; +- (IJKFFMediaPlayer *)init; + - (void) setDataSource:(NSString *)url; - (void) prepareAsync; - (void) start; @@ -51,6 +76,10 @@ NS_ASSUME_NONNULL_BEGIN forKey:(NSString *)key ofCategory:(IJKFFOptionCategory)category; + +- (void) addIJKMPEventHandler:(id) handler; +- (void) removeIJKMPEventHandler:(id) handler; + @end NS_ASSUME_NONNULL_END diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 65e2b71e7e..055b30b3ec 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -40,6 +40,8 @@ @implementation IJKFFMediaPlayer { IjkMediaPlayer* _nativeMediaPlayer; IJKFFMoviePlayerMessagePool *_msgPool; + NSMutableSet> *_eventHandlers; + NSString *_dataSource; int _videoWidth; int _videoHeight; @@ -88,7 +90,7 @@ - (IJKFFMediaPlayer *)init if (self) { ijkmp_global_init(); _msgPool = [[IJKFFMoviePlayerMessagePool alloc] init]; - + _eventHandlers = [[NSMutableSet alloc] init]; [self nativeSetup]; ijkmp_set_option(_nativeMediaPlayer, IJKMP_OPT_CATEGORY_PLAYER, "overlay-format", "fcc-_es2"); @@ -117,13 +119,24 @@ - (void)postEvent: (IJKFFMoviePlayerMessage *)msg AVMessage *avmsg = &msg->_msg; switch (avmsg->what) { - case FFP_MSG_FLUSH: - break; - case FFP_MSG_ERROR: - break; - case FFP_MSG_PREPARED: + case IJKMPET_FLUSH: + case IJKMPET_ERROR: + case IJKMPET_PREPARED: + case IJKMPET_COMPLETED: + case IJKMPET_VIDEO_SIZE_CHANGED: + case IJKMPET_SAR_CHANGED: + case IJKMPET_VIDEO_RENDERING_START: + case IJKMPET_AUDIO_RENDERING_START: + case IJKMPET_VIDEO_ROTATION_CHANGED: + case IJKMPET_BUFFERING_START: + case IJKMPET_BUFFERING_END: + case IJKMPET_BUFFERING_UPDATE: + case IJKMPET_PLAYBACK_STATE_CHANGED: + + for (id handler in _eventHandlers) { + [handler onEvent4Player:self withType:avmsg->what andArg1:avmsg->arg1 andArg2:avmsg->arg2 andExtra:avmsg->obj]; + } break; - default: break; } @@ -191,6 +204,7 @@ - (void) shutdown __unused id weakPlayer = (__bridge_transfer IJKFFMediaPlayer*)ijkmp_set_weak_thiz(_nativeMediaPlayer, NULL); __unused id weakHolder = (__bridge_transfer IJKFFWeakHolder*)ijkmp_set_inject_opaque(_nativeMediaPlayer, NULL); __unused id weakijkHolder = (__bridge_transfer IJKFFWeakHolder*)ijkmp_set_ijkio_inject_opaque(_nativeMediaPlayer, NULL); + ijkmp_dec_ref_p(&_nativeMediaPlayer); } @@ -216,4 +230,15 @@ - (void)setOptionIntValue:(int64_t)value } + +- (void) addIJKMPEventHandler:(id) handler +{ + [_eventHandlers addObject:handler]; +} + +- (void) removeIJKMPEventHandler:(id) handler +{ + [_eventHandlers removeObject:handler]; +} + @end From ca032a7898ee10fd103ab5c2fafa98431c090386 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 26 Jun 2019 09:25:19 +0800 Subject: [PATCH 005/163] set android min SDK version to 16, change msg_queue_start earlier --- android/ijkplayer/ijkplayer-arm64/build.gradle | 2 +- .../java/tv/danmaku/ijk/media/player/IjkEventListener.java | 2 +- .../main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java | 3 ++- android/ijkplayer/ijkplayer-x86_64/build.gradle | 2 +- ijkmedia/ijkplayer/ijkplayer.c | 4 ++-- ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h | 1 + ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m | 1 + 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/android/ijkplayer/ijkplayer-arm64/build.gradle b/android/ijkplayer/ijkplayer-arm64/build.gradle index 91b35571d2..2307a09fb3 100644 --- a/android/ijkplayer/ijkplayer-arm64/build.gradle +++ b/android/ijkplayer/ijkplayer-arm64/build.gradle @@ -8,7 +8,7 @@ android { buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 + minSdkVersion 16 targetSdkVersion rootProject.ext.targetSdkVersion } buildTypes { diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java index 5455712ab5..6f727811b6 100644 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java @@ -1,6 +1,6 @@ package tv.danmaku.ijk.media.player; -interface IjkEventListener { +public interface IjkEventListener { int FLUSH = 0; int ERROR = 100; diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java index b929cdf894..c6f5a156ce 100755 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java @@ -991,6 +991,7 @@ public void handleMessage(Message msg) { case IjkEventListener.BUFFERING_END: case IjkEventListener.BUFFERING_UPDATE: case IjkEventListener.PLAYBACK_STATE_CHANGED: + // DebugLog.dfmt("onEvent", "what %d arg1 %d arg2 %d", msg.what, msg.arg1, msg.arg2); for (IjkEventListener listener : player.mEventListeners) { listener.onEvent(player, msg.what, msg.arg1, msg.arg2, msg.obj); } @@ -1075,7 +1076,7 @@ public void handleMessage(Message msg) { break; default: - DebugLog.e(TAG, "Unknown message type " + msg.what); + // DebugLog.e(TAG, "Unknown message type " + msg.what); } } } diff --git a/android/ijkplayer/ijkplayer-x86_64/build.gradle b/android/ijkplayer/ijkplayer-x86_64/build.gradle index 91b35571d2..2307a09fb3 100644 --- a/android/ijkplayer/ijkplayer-x86_64/build.gradle +++ b/android/ijkplayer/ijkplayer-x86_64/build.gradle @@ -8,7 +8,7 @@ android { buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - minSdkVersion 21 + minSdkVersion 16 targetSdkVersion rootProject.ext.targetSdkVersion } buildTypes { diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index 73e1fe65ab..82efae8817 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -130,6 +130,8 @@ IjkMediaPlayer *ijkmp_create(int (*msg_loop)(void*)) ijkmp_inc_ref(mp); pthread_mutex_init(&mp->mutex, NULL); + msg_queue_start(&mp->ffplayer->msg_queue); + return mp; fail: @@ -403,8 +405,6 @@ static int ijkmp_prepare_async_l(IjkMediaPlayer *mp) ijkmp_change_state_l(mp, MP_STATE_ASYNC_PREPARING); - msg_queue_start(&mp->ffplayer->msg_queue); - // released in msg_loop ijkmp_inc_ref(mp); mp->msg_thread = SDL_CreateThreadEx(&mp->_msg_thread, ijkmp_msg_loop, mp, "ff_msg_loop"); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index e411dce45e..55d1e0e13b 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -65,6 +65,7 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { - (void) start; - (void) stop; - (void) pause; +- (void) reset; - (BOOL) isPlaying; - (void) shutdown; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 055b30b3ec..61443a8c6b 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -205,6 +205,7 @@ - (void) shutdown __unused id weakHolder = (__bridge_transfer IJKFFWeakHolder*)ijkmp_set_inject_opaque(_nativeMediaPlayer, NULL); __unused id weakijkHolder = (__bridge_transfer IJKFFWeakHolder*)ijkmp_set_ijkio_inject_opaque(_nativeMediaPlayer, NULL); + [_eventHandlers removeAllObjects]; ijkmp_dec_ref_p(&_nativeMediaPlayer); } From 255d47e0fe56ee19a9e8b24b0e7d82785c87e391 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 26 Jun 2019 14:58:29 +0800 Subject: [PATCH 006/163] add android module ijkplayer-full, update bintray config --- android/ijkplayer/gradle.properties | 24 ++++----- android/ijkplayer/ijkplayer-full/.gitignore | 1 + android/ijkplayer/ijkplayer-full/build.gradle | 50 +++++++++++++++++++ .../ijkplayer-full/gradle.properties | 3 ++ .../ijkplayer-full/proguard-rules.pro | 21 ++++++++ .../src/main/AndroidManifest.xml | 2 + android/ijkplayer/settings.gradle | 5 +- .../tools/gradle-bintray-upload.gradle | 12 +++-- 8 files changed, 102 insertions(+), 16 deletions(-) create mode 100644 android/ijkplayer/ijkplayer-full/.gitignore create mode 100644 android/ijkplayer/ijkplayer-full/build.gradle create mode 100644 android/ijkplayer/ijkplayer-full/gradle.properties create mode 100644 android/ijkplayer/ijkplayer-full/proguard-rules.pro create mode 100644 android/ijkplayer/ijkplayer-full/src/main/AndroidManifest.xml diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 19a69a9278..82b8f36c82 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,20 +17,20 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.8.8 -VERSION_CODE=800800 -GROUP=tv.danmaku.ijk.media +VERSION_NAME=0.1.0 +VERSION_CODE=000100 +GROUP=com.befovy.ijkplayer # http://central.sonatype.org/pages/requirements.html -POM_USER_ORG=bilibili -POM_DESCRIPTION=Video player based on FFmpeg n3.1 -POM_URL=https://github.com/Bilibili/ijkplayer -POM_SCM_URL=https://github.com/Bilibili/ijkplayer -POM_SCM_CONNECTION=scm:git:git@github.com:Bilibili/ijkplayer.git -POM_SCM_DEV_CONNECTION=scm:git:git@github.com:Bilibili/ijkplayer.git +POM_USER_ORG=baishuai +POM_DESCRIPTION=Video player based on FFmpeg n3.2 +POM_URL=https://github.com/befovy/ijkplayer +POM_SCM_URL=https://github.com/befovy/ijkplayer +POM_SCM_CONNECTION=scm:git:git@github.com:befovy/ijkplayer.git +POM_SCM_DEV_CONNECTION=scm:git:git@github.com:befovy/ijkplayer.git POM_LICENSE_NAME=LGPL-2.1 POM_LICENSE_URL=https://www.gnu.org/licenses/lgpl-2.1.html POM_LICENSE_DIST=repo -POM_DEVELOPER_ID=bbcallen -POM_DEVELOPER_NAME=Zhang Rui -POM_DEVELOPER_EMAIL=bbcallen@gmail.com +POM_DEVELOPER_ID=befovy +POM_DEVELOPER_NAME=Befovy +POM_DEVELOPER_EMAIL=befovy@gmail.com diff --git a/android/ijkplayer/ijkplayer-full/.gitignore b/android/ijkplayer/ijkplayer-full/.gitignore new file mode 100644 index 0000000000..796b96d1c4 --- /dev/null +++ b/android/ijkplayer/ijkplayer-full/.gitignore @@ -0,0 +1 @@ +/build diff --git a/android/ijkplayer/ijkplayer-full/build.gradle b/android/ijkplayer/ijkplayer-full/build.gradle new file mode 100644 index 0000000000..992c5f9d72 --- /dev/null +++ b/android/ijkplayer/ijkplayer-full/build.gradle @@ -0,0 +1,50 @@ +apply plugin: 'com.android.library' + +// this module equals to the combination of the following module +// include ':ijkplayer-armv5' +// include ':ijkplayer-x86_64' +// include ':ijkplayer-armv7a' +// include ':ijkplayer-arm64' +// include ':ijkplayer-x86' +// include ':ijkplayer-java' + +android { + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion + + lintOptions { + abortOnError false + } + + defaultConfig { + minSdkVersion 16 + targetSdkVersion rootProject.ext.targetSdkVersion + + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + sourceSets.main { + java.srcDirs = ["$rootProject.rootDir/ijkplayer-java/src/main/java/"] + jniLibs.srcDirs 'src/main/libs' + jni.srcDirs = [] // This prevents the auto generation of Android.mk + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + + // implementation 'com.android.support:appcompat-v7:28.0.0' + //testImplementation 'junit:junit:4.12' + //androidTestImplementation 'com.android.support.test:runner:1.0.2' + //androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' +} + +apply from: new File(rootProject.projectDir, "tools/gradle-on-demand.gradle"); + diff --git a/android/ijkplayer/ijkplayer-full/gradle.properties b/android/ijkplayer/ijkplayer-full/gradle.properties new file mode 100644 index 0000000000..35e365a564 --- /dev/null +++ b/android/ijkplayer/ijkplayer-full/gradle.properties @@ -0,0 +1,3 @@ +POM_NAME=ijkplayer-full +POM_ARTIFACT_ID=ijkplayer-full +POM_PACKAGING=aar \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-full/proguard-rules.pro b/android/ijkplayer/ijkplayer-full/proguard-rules.pro new file mode 100644 index 0000000000..f1b424510d --- /dev/null +++ b/android/ijkplayer/ijkplayer-full/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/android/ijkplayer/ijkplayer-full/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-full/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..916150cfa3 --- /dev/null +++ b/android/ijkplayer/ijkplayer-full/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + diff --git a/android/ijkplayer/settings.gradle b/android/ijkplayer/settings.gradle index 758234a4df..f137022bd7 100644 --- a/android/ijkplayer/settings.gradle +++ b/android/ijkplayer/settings.gradle @@ -1,4 +1,5 @@ -include ':ijkplayer-armv5', ':ijkplayer-x86_64' +include ':ijkplayer-armv5' +include ':ijkplayer-x86_64' include ':ijkplayer-armv7a' include ':ijkplayer-arm64' include ':ijkplayer-x86' @@ -6,5 +7,7 @@ include ':ijkplayer-x86' include ':ijkplayer-java' include ':ijkplayer-exo' +include ':ijkplayer-full' + include ':ijkplayer-example' diff --git a/android/ijkplayer/tools/gradle-bintray-upload.gradle b/android/ijkplayer/tools/gradle-bintray-upload.gradle index 28540b5e33..88729d935d 100644 --- a/android/ijkplayer/tools/gradle-bintray-upload.gradle +++ b/android/ijkplayer/tools/gradle-bintray-upload.gradle @@ -20,9 +20,15 @@ apply plugin: 'com.jfrog.bintray' group = GROUP version = VERSION_NAME + +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) +def bintray_user = properties.getProperty('BINTRAY_USER') +def bintray_apikey = properties.getProperty('BINTRAY_APIKEY') + bintray { - user = project.hasProperty('BINTRAY_USER') ? BINTRAY_USER : System.getenv('BINTRAY_USER') - key = project.hasProperty('BINTRAY_APIKEY') ? BINTRAY_APIKEY : System.getenv('BINTRAY_APIKEY') + user = bintray_user ? bintray_user : project.hasProperty('BINTRAY_USER') ? BINTRAY_USER : System.getenv('BINTRAY_USER') + key = bintray_apikey ? bintray_apikey : project.hasProperty('BINTRAY_APIKEY') ? BINTRAY_APIKEY : System.getenv('BINTRAY_APIKEY') configurations = ['archives'] @@ -30,7 +36,7 @@ bintray { publish = true pkg { - repo = 'maven' + repo = 'ijkplayer' name = POM_NAME userOrg = POM_USER_ORG desc = POM_DESCRIPTION From 15162cc2253bef51ab0896682dc2835d8b6e30c3 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 26 Jun 2019 23:41:29 +0800 Subject: [PATCH 007/163] publish ijkplayer to bintray.com as fijkplayer --- android/ijkplayer/gradle.properties | 4 ++-- android/ijkplayer/ijkplayer-full/build.gradle | 2 +- android/ijkplayer/tools/gradle-bintray-upload.gradle | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 82b8f36c82..614d5d126a 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -19,10 +19,10 @@ VERSION_NAME=0.1.0 VERSION_CODE=000100 -GROUP=com.befovy.ijkplayer +GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html -POM_USER_ORG=baishuai +POM_USER_ORG=befovytray POM_DESCRIPTION=Video player based on FFmpeg n3.2 POM_URL=https://github.com/befovy/ijkplayer POM_SCM_URL=https://github.com/befovy/ijkplayer diff --git a/android/ijkplayer/ijkplayer-full/build.gradle b/android/ijkplayer/ijkplayer-full/build.gradle index 992c5f9d72..043c6e7bef 100644 --- a/android/ijkplayer/ijkplayer-full/build.gradle +++ b/android/ijkplayer/ijkplayer-full/build.gradle @@ -40,7 +40,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - // implementation 'com.android.support:appcompat-v7:28.0.0' + //implementation 'com.android.support:appcompat-v7:28.0.0' //testImplementation 'junit:junit:4.12' //androidTestImplementation 'com.android.support.test:runner:1.0.2' //androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' diff --git a/android/ijkplayer/tools/gradle-bintray-upload.gradle b/android/ijkplayer/tools/gradle-bintray-upload.gradle index 88729d935d..91481d24d5 100644 --- a/android/ijkplayer/tools/gradle-bintray-upload.gradle +++ b/android/ijkplayer/tools/gradle-bintray-upload.gradle @@ -36,7 +36,7 @@ bintray { publish = true pkg { - repo = 'ijkplayer' + repo = 'fijkplayer' name = POM_NAME userOrg = POM_USER_ORG desc = POM_DESCRIPTION From ed02e9bec1a14332a0eabbec0467f212ddbed721 Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 27 Jun 2019 00:15:43 +0800 Subject: [PATCH 008/163] add podspec config, publish ad FIJKPlayer --- ios/.gitignore | 2 +- ios/CocoaPodsPub/.gitignore | 3 + ios/CocoaPodsPub/FIJKPlayer.podspec | 139 +++++ ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h | 64 +++ ios/IJKMediaPlayer/FIJKPlayer/Info.plist | 26 + .../IJKMediaPlayer.xcodeproj/project.pbxproj | 485 +++++++++++++++++- .../contents.xcworkspacedata | 3 + ios/IJKMediaPlayer/universal-framework.sh | 38 ++ 8 files changed, 757 insertions(+), 3 deletions(-) create mode 100644 ios/CocoaPodsPub/.gitignore create mode 100644 ios/CocoaPodsPub/FIJKPlayer.podspec create mode 100644 ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h create mode 100644 ios/IJKMediaPlayer/FIJKPlayer/Info.plist create mode 100755 ios/IJKMediaPlayer/universal-framework.sh diff --git a/ios/.gitignore b/ios/.gitignore index 40bae9cecf..ae7ec2667c 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -1,3 +1,3 @@ xcuserdata -xcshareddata +# xcshareddata *.xccheckout diff --git a/ios/CocoaPodsPub/.gitignore b/ios/CocoaPodsPub/.gitignore new file mode 100644 index 0000000000..8ba4683d46 --- /dev/null +++ b/ios/CocoaPodsPub/.gitignore @@ -0,0 +1,3 @@ +*.framework +*.gz +LICENSE diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec new file mode 100644 index 0000000000..8e51049aeb --- /dev/null +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -0,0 +1,139 @@ +# +# Be sure to run `pod spec lint MyLib.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |spec| + + # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # These will help people to find your library, and whilst it + # can feel like a chore to fill in it's definitely to your advantage. The + # summary should be tweet-length, and the description more in depth. + # + + spec.name = "FIJKPlayer" + spec.version = "0.1.1" + spec.summary = "ijkplayer iOS video player SDK" + + spec.author = { "befovy" => "befovy@gmail.com" } + + # This description is used to generate tags and improve search results. + # * Think: What does it do? Why did you write it? What is the focus? + # * Try to keep it short, snappy and to the point. + # * Write the description between the DESC delimiters below. + # * Finally, don't worry about the indent, CocoaPods strips it! + spec.description = "iOS video player based on FFmpeg n3.4, with VideoToolbox support." + + + spec.homepage = "https://github.com/befovy/ijkplayer" + + + # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Licensing your code is important. See https://choosealicense.com for more info. + # CocoaPods will detect a license file if there is a named LICENSE* + # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. + # + + spec.license = { :type => "GNU Lesser General Public License v3.0", :file => "LICENSE" } + # spec.license = { :type => "MIT", :file => "FILE_LICENSE" } + + + # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the authors of the library, with email addresses. Email addresses + # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also + # accepts just a name if you'd rather not provide an email address. + # + # Specify a social_media_url where others can refer to, for example a twitter + # profile URL. + # + + + # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If this Pod runs only on iOS or OS X, then specify the platform and + # the deployment target. You can optionally include the target after the platform. + # + + spec.platform = :ios + spec.ios.deployment_target = '8.0' + + # When using multiple platforms + # spec.ios.deployment_target = "5.0" + # spec.osx.deployment_target = "10.7" + # spec.watchos.deployment_target = "2.0" + # spec.tvos.deployment_target = "9.0" + + + # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the location from where the source should be retrieved. + # Supports git, hg, bzr, svn and HTTP. + # + + # spec.source = { :git => "https://github.com/befovy/ijkplayer.git", :tag => "b0.1.0-alpha" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/b0.1.1-alpha/FIJKMediaPlayer.tar.gz" } + + # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # CocoaPods is smart about how it includes source code. For source files + # giving a folder will include any swift, h, m, mm, c & cpp files. + # For header files it will include any header in the folder. + # Not including the public_header_files will make all headers public. + # + + # spec.source_files = "Classes", "Classes/**/*.{h,m}" + # spec.exclude_files = "Classes/Exclude" + spec.vendored_frameworks = 'FIJKPlayer.framework' + spec.resource = 'FIJKPlayer.framework' + + # spec.public_header_files = "Classes/**/*.h" + + + # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # A list of resources included with the Pod. These are copied into the + # target bundle with a build phase script. Anything else will be cleaned. + # You can preserve files from being cleaned, please don't preserve + # non-essential files like tests, examples and documentation. + # + + # spec.resource = "icon.png" + # spec.resources = "Resources/*.png" + + # spec.preserve_paths = "FilesToSave", "MoreFilesToSave" + + + # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Link your library with frameworks, or libraries. Libraries do not include + # the lib prefix of their name. + # + spec.frameworks = "AudioToolbox", "AVFoundation", "CoreGraphics", "CoreMedia", "CoreVideo", "MobileCoreServices", "OpenGLES", "QuartzCore", "VideoToolbox", "Foundation", "UIKit", "MediaPlayer" + spec.libraries = "bz2", "z", "stdc++" + + # spec.library = "iconv" + # spec.libraries = "iconv", "xml2" + + spec.prepare_command = <<-CMD + tar xvzf FIJKPlayer.tar.gz + CMD + + + # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If your library depends on compiler flags you can set them in the xcconfig hash + # where they will only apply to your library. If you depend on other Podspecs + # you can include multiple dependencies to ensure it works. + + # spec.requires_arc = true + + # spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } + # spec.dependency "JSONKit", "~> 1.4" + +end diff --git a/ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h b/ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h new file mode 100644 index 0000000000..26be4a796b --- /dev/null +++ b/ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h @@ -0,0 +1,64 @@ +/* + * IJKMediaFramework.h + * + * Copyright (c) 2013 Bilibili + * Copyright (c) 2013 Zhang Rui + * + * 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 + +//! Project version number for IJKMediaFramework. +FOUNDATION_EXPORT double FIJKPlayerVersionNumber; + +//! Project version string for IJKMediaFramework. +FOUNDATION_EXPORT const unsigned char FIJKPlayerVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +// backward compatible for old names +#define IJKMediaPlaybackIsPreparedToPlayDidChangeNotification IJKMPMediaPlaybackIsPreparedToPlayDidChangeNotification +#define IJKMoviePlayerLoadStateDidChangeNotification IJKMPMoviePlayerLoadStateDidChangeNotification +#define IJKMoviePlayerPlaybackDidFinishNotification IJKMPMoviePlayerPlaybackDidFinishNotification +#define IJKMoviePlayerPlaybackDidFinishReasonUserInfoKey IJKMPMoviePlayerPlaybackDidFinishReasonUserInfoKey +#define IJKMoviePlayerPlaybackStateDidChangeNotification IJKMPMoviePlayerPlaybackStateDidChangeNotification +#define IJKMoviePlayerIsAirPlayVideoActiveDidChangeNotification IJKMPMoviePlayerIsAirPlayVideoActiveDidChangeNotification +#define IJKMoviePlayerVideoDecoderOpenNotification IJKMPMoviePlayerVideoDecoderOpenNotification +#define IJKMoviePlayerFirstVideoFrameRenderedNotification IJKMPMoviePlayerFirstVideoFrameRenderedNotification +#define IJKMoviePlayerFirstAudioFrameRenderedNotification IJKMPMoviePlayerFirstAudioFrameRenderedNotification +#define IJKMoviePlayerFirstAudioFrameDecodedNotification IJKMPMoviePlayerFirstAudioFrameDecodedNotification +#define IJKMoviePlayerFirstVideoFrameDecodedNotification IJKMPMoviePlayerFirstVideoFrameDecodedNotification +#define IJKMoviePlayerOpenInputNotification IJKMPMoviePlayerOpenInputNotification +#define IJKMoviePlayerFindStreamInfoNotification IJKMPMoviePlayerFindStreamInfoNotification +#define IJKMoviePlayerComponentOpenNotification IJKMPMoviePlayerComponentOpenNotification + +#define IJKMPMoviePlayerAccurateSeekCompleteNotification IJKMPMoviePlayerAccurateSeekCompleteNotification +#define IJKMoviePlayerSeekAudioStartNotification IJKMPMoviePlayerSeekAudioStartNotification +#define IJKMoviePlayerSeekVideoStartNotification IJKMPMoviePlayerSeekVideoStartNotification + diff --git a/ios/IJKMediaPlayer/FIJKPlayer/Info.plist b/ios/IJKMediaPlayer/FIJKPlayer/Info.plist new file mode 100644 index 0000000000..d3de8eefb6 --- /dev/null +++ b/ios/IJKMediaPlayer/FIJKPlayer/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 6fef8f9a23..32f0ea1cb5 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -12,10 +12,140 @@ 215FF44D22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 215FF44E22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 215FF44F22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; + 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */; }; + 217D1C5422C457720046FB63 /* universal-framework.sh in Resources */ = {isa = PBXBuildFile; fileRef = 217D1C5322C457720046FB63 /* universal-framework.sh */; }; 21DAA1592298FEBB007B0784 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8B1E63E59300568494 /* libcrypto.a */; }; 21DAA15A2298FEBE007B0784 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8C1E63E59300568494 /* libssl.a */; }; 21DAA15B2298FEC7007B0784 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8F1E63E59800568494 /* libz.tbd */; }; 21DAA15D2298FED6007B0784 /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 21DAA15C2298FED6007B0784 /* libbz2.tbd */; }; + 21E6F47C22C39D0500611D3D /* IJKKVOController.m in Sources */ = {isa = PBXBuildFile; fileRef = E65DC3B819D93D5F004F8A08 /* IJKKVOController.m */; }; + 21E6F47D22C39D0500611D3D /* ijksdl_vout.c in Sources */ = {isa = PBXBuildFile; fileRef = E690401117EAFC6100CFD954 /* ijksdl_vout.c */; }; + 21E6F47E22C39D0500611D3D /* yuv444p10le.fsh.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C4598A1C7030B6004831EC /* yuv444p10le.fsh.c */; }; + 21E6F47F22C39D0500611D3D /* allformats.c in Sources */ = {isa = PBXBuildFile; fileRef = E69BE54A1B93FED300AFBA3F /* allformats.c */; }; + 21E6F48022C39D0500611D3D /* ffpipenode_ffplay_vdec.c in Sources */ = {isa = PBXBuildFile; fileRef = E67B91B41A3801E600717EA9 /* ffpipenode_ffplay_vdec.c */; }; + 21E6F48122C39D0500611D3D /* renderer_yuv420p.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C4598D1C7030B6004831EC /* renderer_yuv420p.c */; }; + 21E6F48222C39D0500611D3D /* ijkthreadpool.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A431E15287D00309DD5 /* ijkthreadpool.c */; }; + 21E6F48322C39D0500611D3D /* IJKAVMoviePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = E67C4E0719D15EEA00415CEE /* IJKAVMoviePlayerController.m */; }; + 21E6F48422C39D0500611D3D /* IJKFFMoviePlayerDef.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F727BA17F2D9D30043623F /* IJKFFMoviePlayerDef.m */; }; + 21E6F48522C39D0500611D3D /* ijkplayer_ios.m in Sources */ = {isa = PBXBuildFile; fileRef = E66F8E0117EFEEA400354D80 /* ijkplayer_ios.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 21E6F48622C39D0500611D3D /* ffpipeline_ios.c in Sources */ = {isa = PBXBuildFile; fileRef = 454316201A66493700676070 /* ffpipeline_ios.c */; }; + 21E6F48722C39D0500611D3D /* ijkioprotocol.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A301E1526F800309DD5 /* ijkioprotocol.c */; }; + 21E6F48822C39D0500611D3D /* ijksdl_vout_dummy.c in Sources */ = {isa = PBXBuildFile; fileRef = E63FC27417F013DE003551EB /* ijksdl_vout_dummy.c */; }; + 21E6F48922C39D0500611D3D /* renderer_yuv420sp.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C459CA1C70967F004831EC /* renderer_yuv420sp.c */; }; + 21E6F48A22C39D0500611D3D /* yuv420p.fsh.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C459891C7030B6004831EC /* yuv420p.fsh.c */; }; + 21E6F48B22C39D0500611D3D /* ijksdl_error.c in Sources */ = {isa = PBXBuildFile; fileRef = E690400417EAFC6100CFD954 /* ijksdl_error.c */; }; + 21E6F48C22C39D0500611D3D /* IJKDeviceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E607FFDF1B7B60F9005F11A6 /* IJKDeviceModel.m */; }; + 21E6F48D22C39D0500611D3D /* ijkiocache.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A2C1E1526F800309DD5 /* ijkiocache.c */; }; + 21E6F48E22C39D0500611D3D /* ijksdl_egl.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C459B81C706A13004831EC /* ijksdl_egl.c */; }; + 21E6F48F22C39D0500611D3D /* ijkio.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A291E1526F800309DD5 /* ijkio.c */; }; + 21E6F49022C39D0500611D3D /* IJKAudioKit.m in Sources */ = {isa = PBXBuildFile; fileRef = E6EE92A2187810C5009EAB56 /* IJKAudioKit.m */; }; + 21E6F49122C39D0500611D3D /* IJKMPMoviePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = E66F8DC017EEC65200354D80 /* IJKMPMoviePlayerController.m */; }; + 21E6F49222C39D0500611D3D /* IJKSDLHudViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E68B7ACE1C1E97B0001DE241 /* IJKSDLHudViewCell.m */; }; + 21E6F49322C39D0500611D3D /* ijksdl_vout_overlay_videotoolbox.m in Sources */ = {isa = PBXBuildFile; fileRef = 45DB4AA81A5D52AE005CAD41 /* ijksdl_vout_overlay_videotoolbox.m */; }; + 21E6F49422C39D0500611D3D /* ff_ffpipenode.c in Sources */ = {isa = PBXBuildFile; fileRef = E67B91AD1A3801DB00717EA9 /* ff_ffpipenode.c */; }; + 21E6F49522C39D0500611D3D /* ijksdl_stdinc.c in Sources */ = {isa = PBXBuildFile; fileRef = E690400A17EAFC6100CFD954 /* ijksdl_stdinc.c */; }; + 21E6F49622C39D0500611D3D /* IJKVideoToolBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 5407EC281DF7F93B00457BFE /* IJKVideoToolBox.m */; }; + 21E6F49722C39D0500611D3D /* ijksegment.c in Sources */ = {isa = PBXBuildFile; fileRef = 54A029B41D4700E6001C61C1 /* ijksegment.c */; }; + 21E6F49822C39D0500611D3D /* IJKMediaUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = E6716E4A1807E5FC00B3FBC1 /* IJKMediaUtils.m */; }; + 21E6F49922C39D0500611D3D /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C459871C7030B6004831EC /* common.c */; }; + 21E6F49A22C39D0500611D3D /* ijksdl_aout_ios_audiounit.m in Sources */ = {isa = PBXBuildFile; fileRef = E6EE92A71878230C009EAB56 /* ijksdl_aout_ios_audiounit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 21E6F49B22C39D0500611D3D /* ijklivehook.c in Sources */ = {isa = PBXBuildFile; fileRef = E69BE5701B946FF600AFBA3F /* ijklivehook.c */; }; + 21E6F49C22C39D0500611D3D /* ijkurlhook.c in Sources */ = {isa = PBXBuildFile; fileRef = 54A029B51D4700E6001C61C1 /* ijkurlhook.c */; }; + 21E6F49D22C39D0500611D3D /* IJKVideoToolBoxSync.m in Sources */ = {isa = PBXBuildFile; fileRef = 5407EC2C1DF81D2600457BFE /* IJKVideoToolBoxSync.m */; }; + 21E6F49E22C39D0500611D3D /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; + 21E6F49F22C39D0500611D3D /* IJKMediaPlayback.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F727C117F7C9B90043623F /* IJKMediaPlayback.m */; }; + 21E6F4A022C39D0500611D3D /* ijkdict.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A3D1E15287D00309DD5 /* ijkdict.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 21E6F4A122C39D0500611D3D /* ff_ffpipeline.c in Sources */ = {isa = PBXBuildFile; fileRef = E67B91AB1A3801DB00717EA9 /* ff_ffpipeline.c */; }; + 21E6F4A222C39D0500611D3D /* ijkiourlhook.c in Sources */ = {isa = PBXBuildFile; fileRef = 4DA7F6881F2B1E270032A499 /* ijkiourlhook.c */; }; + 21E6F4A322C39D0500611D3D /* IJKSDLAudioKit.m in Sources */ = {isa = PBXBuildFile; fileRef = E6EE92C718782770009EAB56 /* IJKSDLAudioKit.m */; }; + 21E6F4A422C39D0500611D3D /* mvp.vsh.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C459911C7030B6004831EC /* mvp.vsh.c */; }; + 21E6F4A522C39D0500611D3D /* NSString+IJKMedia.m in Sources */ = {isa = PBXBuildFile; fileRef = E698089A1C7EB13A0048A46C /* NSString+IJKMedia.m */; }; + 21E6F4A622C39D0500611D3D /* ijksdl_vout_overlay_ffmpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = E6903FFB17EAFC6100CFD954 /* ijksdl_vout_overlay_ffmpeg.c */; }; + 21E6F4A722C39D0500611D3D /* ijksdl_mutex.c in Sources */ = {isa = PBXBuildFile; fileRef = E690400817EAFC6100CFD954 /* ijksdl_mutex.c */; }; + 21E6F4A822C39D0500611D3D /* ijktree.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A451E15287D00309DD5 /* ijktree.c */; }; + 21E6F4A922C39D0500611D3D /* IJKSDLAudioQueueController.m in Sources */ = {isa = PBXBuildFile; fileRef = E6EE92C11878236A009EAB56 /* IJKSDLAudioQueueController.m */; }; + 21E6F4AA22C39D0500611D3D /* ijksdl_thread.c in Sources */ = {isa = PBXBuildFile; fileRef = E690400C17EAFC6100CFD954 /* ijksdl_thread.c */; }; + 21E6F4AB22C39D0500611D3D /* yuv420sp.fsh.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C459C61C7095E5004831EC /* yuv420sp.fsh.c */; }; + 21E6F4AC22C39D0500611D3D /* ff_ffplay.c in Sources */ = {isa = PBXBuildFile; fileRef = E6903FDB17EAFC6100CFD954 /* ff_ffplay.c */; }; + 21E6F4AD22C39D0500611D3D /* ijksdl_aout.c in Sources */ = {isa = PBXBuildFile; fileRef = E6903FFF17EAFC6100CFD954 /* ijksdl_aout.c */; }; + 21E6F4AE22C39D0500611D3D /* color.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C459861C7030B6004831EC /* color.c */; }; + 21E6F4AF22C39D0500611D3D /* ijksdl_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = E63FC27017F01143003551EB /* ijksdl_audio.c */; }; + 21E6F4B022C39D0500611D3D /* ijksdl_thread_ios.m in Sources */ = {isa = PBXBuildFile; fileRef = E6EE92AA1878230C009EAB56 /* ijksdl_thread_ios.m */; }; + 21E6F4B122C39D0500611D3D /* ijkmeta.c in Sources */ = {isa = PBXBuildFile; fileRef = E6FAD9551A515CE300725002 /* ijkmeta.c */; }; + 21E6F4B222C39D0500611D3D /* ijkasync.c in Sources */ = {isa = PBXBuildFile; fileRef = 54A029B11D4700E6001C61C1 /* ijkasync.c */; }; + 21E6F4B322C39D0500611D3D /* renderer_yuv420sp_vtb.m in Sources */ = {isa = PBXBuildFile; fileRef = E6E1B9A71C741F72000C6C72 /* renderer_yuv420sp_vtb.m */; }; + 21E6F4B422C39D0500611D3D /* ijkutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A471E15287D00309DD5 /* ijkutils.c */; }; + 21E6F4B522C39D0500611D3D /* IJKSDLGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = E6EE92B71878230C009EAB56 /* IJKSDLGLView.m */; }; + 21E6F4B622C39D0500611D3D /* ijksdl_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = E690400E17EAFC6100CFD954 /* ijksdl_timer.c */; }; + 21E6F4B722C39D0500611D3D /* ijkfifo.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A3F1E15287D00309DD5 /* ijkfifo.c */; settings = {COMPILER_FLAGS = "-w"; }; }; + 21E6F4B822C39D0500611D3D /* shader.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C4598F1C7030B6004831EC /* shader.c */; }; + 21E6F4B922C39D0500611D3D /* ijkioffio.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A2D1E1526F800309DD5 /* ijkioffio.c */; }; + 21E6F4BA22C39D0500611D3D /* renderer.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C4598C1C7030B6004831EC /* renderer.c */; }; + 21E6F4BB22C39D0500611D3D /* ijkioapplication.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A2A1E1526F800309DD5 /* ijkioapplication.c */; }; + 21E6F4BC22C39D0500611D3D /* ijkiomanager.c in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A2E1E1526F800309DD5 /* ijkiomanager.c */; }; + 21E6F4BD22C39D0500611D3D /* ijkplayer.c in Sources */ = {isa = PBXBuildFile; fileRef = E66F8DEF17EFEA9400354D80 /* ijkplayer.c */; }; + 21E6F4BE22C39D0500611D3D /* IJKFFOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = E62139BD180FA89A00553533 /* IJKFFOptions.m */; }; + 21E6F4BF22C39D0500611D3D /* IJKSDLAudioUnitController.m in Sources */ = {isa = PBXBuildFile; fileRef = E6EE92AE1878230C009EAB56 /* IJKSDLAudioUnitController.m */; }; + 21E6F4C022C39D0500611D3D /* IJKFFMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = E6DBD3881C8941EB0058E4FB /* IJKFFMonitor.m */; }; + 21E6F4C122C39D0500611D3D /* IJKFFMoviePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = E66F8DE617EFD9C300354D80 /* IJKFFMoviePlayerController.m */; }; + 21E6F4C222C39D0500611D3D /* IJKNotificationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E698089F1C7EB2040048A46C /* IJKNotificationManager.m */; }; + 21E6F4C322C39D0500611D3D /* IJKMediaModule.m in Sources */ = {isa = PBXBuildFile; fileRef = E672D6F218D3445100C51FF9 /* IJKMediaModule.m */; }; + 21E6F4C422C39D0500611D3D /* ff_cmdutils.c in Sources */ = {isa = PBXBuildFile; fileRef = E6903FD517EAFC6100CFD954 /* ff_cmdutils.c */; }; + 21E6F4C522C39D0500611D3D /* IJKVideoToolBoxAsync.m in Sources */ = {isa = PBXBuildFile; fileRef = 4543162A1A66497900676070 /* IJKVideoToolBoxAsync.m */; }; + 21E6F4C622C39D0500611D3D /* renderer_yuv444p10le.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C4598E1C7030B6004831EC /* renderer_yuv444p10le.c */; }; + 21E6F4C722C39D0500611D3D /* ijkstl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 54CF8A411E15287D00309DD5 /* ijkstl.cpp */; settings = {COMPILER_FLAGS = "-w"; }; }; + 21E6F4C822C39D0500611D3D /* image_convert.c in Sources */ = {isa = PBXBuildFile; fileRef = E6903FF117EAFC6100CFD954 /* image_convert.c */; }; + 21E6F4C922C39D0500611D3D /* rgb.fsh.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C459C21C708E60004831EC /* rgb.fsh.c */; }; + 21E6F4CA22C39D0500611D3D /* ffpipenode_ios_videotoolbox_vdec.m in Sources */ = {isa = PBXBuildFile; fileRef = 454316231A66493700676070 /* ffpipenode_ios_videotoolbox_vdec.m */; }; + 21E6F4CB22C39D0500611D3D /* IJKAVPlayerLayerView.m in Sources */ = {isa = PBXBuildFile; fileRef = E67C4E0419D15B3200415CEE /* IJKAVPlayerLayerView.m */; }; + 21E6F4CC22C39D0500611D3D /* IJKSDLHudViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E68B7AC41C1E7F20001DE241 /* IJKSDLHudViewController.m */; }; + 21E6F4CD22C39D0500611D3D /* ijksdl_vout_ios_gles2.m in Sources */ = {isa = PBXBuildFile; fileRef = E6EE92AC1878230C009EAB56 /* ijksdl_vout_ios_gles2.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 21E6F4CE22C39D0500611D3D /* ijklongurl.c in Sources */ = {isa = PBXBuildFile; fileRef = 54A029B31D4700E6001C61C1 /* ijklongurl.c */; }; + 21E6F4CF22C39D0500611D3D /* renderer_rgb.c in Sources */ = {isa = PBXBuildFile; fileRef = E6C459BE1C708CAF004831EC /* renderer_rgb.c */; }; + 21E6F4D022C39D0500611D3D /* ffpipeline_ffplay.c in Sources */ = {isa = PBXBuildFile; fileRef = E67B91B21A3801E600717EA9 /* ffpipeline_ffplay.c */; }; + 21E6F4D222C39D0500611D3D /* libbz2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 21DAA15C2298FED6007B0784 /* libbz2.tbd */; }; + 21E6F4D322C39D0500611D3D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8F1E63E59800568494 /* libz.tbd */; }; + 21E6F4D422C39D0500611D3D /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8C1E63E59300568494 /* libssl.a */; }; + 21E6F4D522C39D0500611D3D /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8B1E63E59300568494 /* libcrypto.a */; }; + 21E6F4D622C39D0500611D3D /* libavcodec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E653C6EF1BCE5A750016835A /* libavcodec.a */; }; + 21E6F4D722C39D0500611D3D /* libavfilter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E653C6F01BCE5A750016835A /* libavfilter.a */; }; + 21E6F4D822C39D0500611D3D /* libavformat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E653C6F11BCE5A750016835A /* libavformat.a */; }; + 21E6F4D922C39D0500611D3D /* libavutil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E653C6F21BCE5A750016835A /* libavutil.a */; }; + 21E6F4DA22C39D0500611D3D /* libswresample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E653C6F31BCE5A750016835A /* libswresample.a */; }; + 21E6F4DB22C39D0500611D3D /* libswscale.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E653C6F41BCE5A750016835A /* libswscale.a */; }; + 21E6F4DD22C39D0500611D3D /* IJKFFMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = E6DBD3871C8941EB0058E4FB /* IJKFFMonitor.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4DE22C39D0500611D3D /* ijkiourl.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A321E1526F800309DD5 /* ijkiourl.h */; }; + 21E6F4DF22C39D0500611D3D /* IJKFFMoviePlayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = E66F8DE517EFD9C300354D80 /* IJKFFMoviePlayerController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4E022C39D0500611D3D /* IJKSDLHudViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E68B7AC31C1E7F20001DE241 /* IJKSDLHudViewController.h */; }; + 21E6F4E122C39D0500611D3D /* IJKFFOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = E62139BC180FA89A00553533 /* IJKFFOptions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4E222C39D0500611D3D /* ijkutils.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A481E15287D00309DD5 /* ijkutils.h */; }; + 21E6F4E322C39D0500611D3D /* ijkdict.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A3E1E15287D00309DD5 /* ijkdict.h */; }; + 21E6F4E422C39D0500611D3D /* IJKAVMoviePlayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = E67C4E0619D15EEA00415CEE /* IJKAVMoviePlayerController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4E522C39D0500611D3D /* ijksdl_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = E6C459831C7030AA004831EC /* ijksdl_gles2.h */; }; + 21E6F4E622C39D0500611D3D /* ijksdl_egl.h in Headers */ = {isa = PBXBuildFile; fileRef = E6C459B91C706A13004831EC /* ijksdl_egl.h */; }; + 21E6F4E722C39D0500611D3D /* IJKFFMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 215FF44922B7E83500FAAD0E /* IJKFFMediaPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4E822C39D0500611D3D /* ff_ffplay_options.h in Headers */ = {isa = PBXBuildFile; fileRef = E6C459BC1C7089AB004831EC /* ff_ffplay_options.h */; }; + 21E6F4EA22C39D0500611D3D /* IJKKVOController.h in Headers */ = {isa = PBXBuildFile; fileRef = E65DC3B719D93D5F004F8A08 /* IJKKVOController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4EB22C39D0500611D3D /* IJKNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E698089E1C7EB2040048A46C /* IJKNotificationManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4EC22C39D0500611D3D /* ijkthreadpool.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A441E15287D00309DD5 /* ijkthreadpool.h */; }; + 21E6F4ED22C39D0500611D3D /* ijkiomanager.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A2F1E1526F800309DD5 /* ijkiomanager.h */; }; + 21E6F4EE22C39D0500611D3D /* ijkstl.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A421E15287D00309DD5 /* ijkstl.h */; }; + 21E6F4EF22C39D0500611D3D /* IJKSDLGLViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D32BC801F906E3600CE9F03 /* IJKSDLGLViewProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4F022C39D0500611D3D /* IJKMediaModule.h in Headers */ = {isa = PBXBuildFile; fileRef = E672D6F118D3445100C51FF9 /* IJKMediaModule.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4F122C39D0500611D3D /* ijkfifo.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A401E15287D00309DD5 /* ijkfifo.h */; }; + 21E6F4F222C39D0500611D3D /* ijktree.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A461E15287D00309DD5 /* ijktree.h */; }; + 21E6F4F322C39D0500611D3D /* opt.h in Headers */ = {isa = PBXBuildFile; fileRef = E69BE54F1B93FED300AFBA3F /* opt.h */; }; + 21E6F4F422C39D0500611D3D /* ijkioapplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A2B1E1526F800309DD5 /* ijkioapplication.h */; }; + 21E6F4F522C39D0500611D3D /* ijkioprotocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 54CF8A311E1526F800309DD5 /* ijkioprotocol.h */; }; + 21E6F4F622C39D0500611D3D /* IJKMediaPlayback.h in Headers */ = {isa = PBXBuildFile; fileRef = E6903EC117EAF6C500CFD954 /* IJKMediaPlayback.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4F722C39D0500611D3D /* IJKMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = E66F8DC217EECB1E00354D80 /* IJKMediaPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4F822C39D0500611D3D /* internal.h in Headers */ = {isa = PBXBuildFile; fileRef = E6C4598B1C7030B6004831EC /* internal.h */; }; + 21E6F4F922C39D0500611D3D /* IJKVideoToolBoxSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 5407EC2B1DF81D2600457BFE /* IJKVideoToolBoxSync.h */; }; + 21E6F4FA22C39D0500611D3D /* IJKMPMoviePlayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = E66F8DBF17EEC65200354D80 /* IJKMPMoviePlayerController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21E6F4FB22C39D0500611D3D /* ijkavformat.h in Headers */ = {isa = PBXBuildFile; fileRef = 54A029B21D4700E6001C61C1 /* ijkavformat.h */; }; + 21E6F4FC22C39D0500611D3D /* IJKSDLHudViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E68B7ACD1C1E97B0001DE241 /* IJKSDLHudViewCell.h */; }; + 21E6F4FD22C39D0500611D3D /* IJKVideoToolBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 5407EC271DF7F93B00457BFE /* IJKVideoToolBox.h */; }; + 21E6F4FE22C39D0500611D3D /* NSString+IJKMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = E69808991C7EB13A0048A46C /* NSString+IJKMedia.h */; }; 4D32BC811F906E3A00CE9F03 /* IJKSDLGLViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D32BC801F906E3600CE9F03 /* IJKSDLGLViewProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4D32BC821F906E3B00CE9F03 /* IJKSDLGLViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D32BC801F906E3600CE9F03 /* IJKSDLGLViewProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4DA7F6891F2B1E270032A499 /* ijkiourlhook.c in Sources */ = {isa = PBXBuildFile; fileRef = 4DA7F6881F2B1E270032A499 /* ijkiourlhook.c */; }; @@ -282,7 +412,11 @@ /* Begin PBXFileReference section */ 215FF44922B7E83500FAAD0E /* IJKFFMediaPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IJKFFMediaPlayer.h; sourceTree = ""; }; 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IJKFFMediaPlayer.m; sourceTree = ""; }; + 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FIJKPlayer.h; sourceTree = ""; }; + 217D1C5022C4567C0046FB63 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 217D1C5322C457720046FB63 /* universal-framework.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "universal-framework.sh"; sourceTree = SOURCE_ROOT; }; 21DAA15C2298FED6007B0784 /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; }; + 21E6F50322C39D0500611D3D /* FIJKPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FIJKPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 454316201A66493700676070 /* ffpipeline_ios.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffpipeline_ios.c; path = ijkmedia/ijkplayer/ios/pipeline/ffpipeline_ios.c; sourceTree = ""; }; 454316211A66493700676070 /* ffpipeline_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipeline_ios.h; path = ijkmedia/ijkplayer/ios/pipeline/ffpipeline_ios.h; sourceTree = ""; }; 454316221A66493700676070 /* ffpipenode_ios_videotoolbox_vdec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipenode_ios_videotoolbox_vdec.h; path = ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.h; sourceTree = ""; }; @@ -479,6 +613,23 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 21E6F4D122C39D0500611D3D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 21E6F4D222C39D0500611D3D /* libbz2.tbd in Frameworks */, + 21E6F4D322C39D0500611D3D /* libz.tbd in Frameworks */, + 21E6F4D422C39D0500611D3D /* libssl.a in Frameworks */, + 21E6F4D522C39D0500611D3D /* libcrypto.a in Frameworks */, + 21E6F4D622C39D0500611D3D /* libavcodec.a in Frameworks */, + 21E6F4D722C39D0500611D3D /* libavfilter.a in Frameworks */, + 21E6F4D822C39D0500611D3D /* libavformat.a in Frameworks */, + 21E6F4D922C39D0500611D3D /* libavutil.a in Frameworks */, + 21E6F4DA22C39D0500611D3D /* libswresample.a in Frameworks */, + 21E6F4DB22C39D0500611D3D /* libswscale.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5450B0171E63EA4300568494 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -523,6 +674,16 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 217D1C4E22C4567C0046FB63 /* FIJKPlayer */ = { + isa = PBXGroup; + children = ( + 217D1C5322C457720046FB63 /* universal-framework.sh */, + 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */, + 217D1C5022C4567C0046FB63 /* Info.plist */, + ); + path = FIJKPlayer; + sourceTree = ""; + }; 4543161F1A66481600676070 /* pipeline */ = { isa = PBXGroup; children = ( @@ -654,6 +815,7 @@ E654EA8B1B6B27E600B0F2D0 /* IJKMediaFramework */, E654EA981B6B27E600B0F2D0 /* IJKMediaFrameworkTests */, 5450AF9A1E63E65700568494 /* IJKMediaFrameworkWithSSL */, + 217D1C4E22C4567C0046FB63 /* FIJKPlayer */, E6903EBB17EAF6C500CFD954 /* Frameworks */, E6903EBA17EAF6C500CFD954 /* Products */, ); @@ -665,6 +827,7 @@ E654EA8A1B6B27E600B0F2D0 /* IJKMediaFramework.framework */, E654EA941B6B27E600B0F2D0 /* IJKMediaFrameworkTests.xctest */, 5450B0431E63EA4300568494 /* IJKMediaFrameworkWithSSL.framework */, + 21E6F50322C39D0500611D3D /* FIJKPlayer.framework */, ); name = Products; sourceTree = ""; @@ -973,6 +1136,47 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 21E6F4DC22C39D0500611D3D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 21E6F4DD22C39D0500611D3D /* IJKFFMonitor.h in Headers */, + 21E6F4DE22C39D0500611D3D /* ijkiourl.h in Headers */, + 21E6F4DF22C39D0500611D3D /* IJKFFMoviePlayerController.h in Headers */, + 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */, + 21E6F4E022C39D0500611D3D /* IJKSDLHudViewController.h in Headers */, + 21E6F4E122C39D0500611D3D /* IJKFFOptions.h in Headers */, + 21E6F4E222C39D0500611D3D /* ijkutils.h in Headers */, + 21E6F4E322C39D0500611D3D /* ijkdict.h in Headers */, + 21E6F4E422C39D0500611D3D /* IJKAVMoviePlayerController.h in Headers */, + 21E6F4E522C39D0500611D3D /* ijksdl_gles2.h in Headers */, + 21E6F4E622C39D0500611D3D /* ijksdl_egl.h in Headers */, + 21E6F4E722C39D0500611D3D /* IJKFFMediaPlayer.h in Headers */, + 21E6F4E822C39D0500611D3D /* ff_ffplay_options.h in Headers */, + 21E6F4EA22C39D0500611D3D /* IJKKVOController.h in Headers */, + 21E6F4EB22C39D0500611D3D /* IJKNotificationManager.h in Headers */, + 21E6F4EC22C39D0500611D3D /* ijkthreadpool.h in Headers */, + 21E6F4ED22C39D0500611D3D /* ijkiomanager.h in Headers */, + 21E6F4EE22C39D0500611D3D /* ijkstl.h in Headers */, + 21E6F4EF22C39D0500611D3D /* IJKSDLGLViewProtocol.h in Headers */, + 21E6F4F022C39D0500611D3D /* IJKMediaModule.h in Headers */, + 21E6F4F122C39D0500611D3D /* ijkfifo.h in Headers */, + 21E6F4F222C39D0500611D3D /* ijktree.h in Headers */, + 21E6F4F322C39D0500611D3D /* opt.h in Headers */, + 21E6F4F422C39D0500611D3D /* ijkioapplication.h in Headers */, + 21E6F4F522C39D0500611D3D /* ijkioprotocol.h in Headers */, + 21E6F4F622C39D0500611D3D /* IJKMediaPlayback.h in Headers */, + 21E6F4F722C39D0500611D3D /* IJKMediaPlayer.h in Headers */, + 21E6F4F822C39D0500611D3D /* internal.h in Headers */, + 21E6F4F922C39D0500611D3D /* IJKVideoToolBoxSync.h in Headers */, + 21E6F4FA22C39D0500611D3D /* IJKMPMoviePlayerController.h in Headers */, + 21E6F4FB22C39D0500611D3D /* ijkavformat.h in Headers */, + 21E6F4FC22C39D0500611D3D /* IJKSDLHudViewCell.h in Headers */, + 21E6F4FD22C39D0500611D3D /* IJKVideoToolBox.h in Headers */, + 21E6F4FE22C39D0500611D3D /* NSString+IJKMedia.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5450B01E1E63EA4300568494 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1058,6 +1262,25 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 21E6F47922C39D0500611D3D /* FIJKPlayer */ = { + isa = PBXNativeTarget; + buildConfigurationList = 21E6F50022C39D0500611D3D /* Build configuration list for PBXNativeTarget "FIJKPlayer" */; + buildPhases = ( + 21E6F47A22C39D0500611D3D /* ijkversion.h */, + 21E6F47B22C39D0500611D3D /* Sources */, + 21E6F4D122C39D0500611D3D /* Frameworks */, + 21E6F4DC22C39D0500611D3D /* Headers */, + 21E6F4FF22C39D0500611D3D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FIJKPlayer; + productName = IJKMediaFramework; + productReference = 21E6F50322C39D0500611D3D /* FIJKPlayer.framework */; + productType = "com.apple.product-type.framework"; + }; 5450AFC11E63EA4300568494 /* IJKMediaFrameworkWithSSL */ = { isa = PBXNativeTarget; buildConfigurationList = 5450B0401E63EA4300568494 /* Build configuration list for PBXNativeTarget "IJKMediaFrameworkWithSSL" */; @@ -1123,8 +1346,12 @@ LastUpgradeCheck = 0700; ORGANIZATIONNAME = bilibili; TargetAttributes = { + 21E6F47922C39D0500611D3D = { + DevelopmentTeam = H6E8P88Q4E; + }; E654EA891B6B27E600B0F2D0 = { CreatedOnToolsVersion = 6.4; + DevelopmentTeam = H6E8P88Q4E; }; E654EA931B6B27E600B0F2D0 = { CreatedOnToolsVersion = 6.4; @@ -1136,7 +1363,9 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, + Base, ); mainGroup = E6903EB017EAF6C500CFD954; productRefGroup = E6903EBA17EAF6C500CFD954 /* Products */; @@ -1146,11 +1375,20 @@ E654EA891B6B27E600B0F2D0 /* IJKMediaFramework */, 5450AFC11E63EA4300568494 /* IJKMediaFrameworkWithSSL */, E654EA931B6B27E600B0F2D0 /* IJKMediaFrameworkTests */, + 21E6F47922C39D0500611D3D /* FIJKPlayer */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 21E6F4FF22C39D0500611D3D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 217D1C5422C457720046FB63 /* universal-framework.sh in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5450B03F1E63EA4300568494 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -1175,6 +1413,20 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 21E6F47A22C39D0500611D3D /* ijkversion.h */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = ijkversion.h; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "sh \"${PROJECT_DIR}/../../ijkmedia/ijkplayer/version.sh\" \"${PROJECT_DIR}/../../ijkmedia/ijkplayer\" \"ijkversion.h\""; + }; 544E73271D93DEF4005CA5D9 /* ijkversion.h */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1206,6 +1458,98 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 21E6F47B22C39D0500611D3D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 21E6F47C22C39D0500611D3D /* IJKKVOController.m in Sources */, + 21E6F47D22C39D0500611D3D /* ijksdl_vout.c in Sources */, + 21E6F47E22C39D0500611D3D /* yuv444p10le.fsh.c in Sources */, + 21E6F47F22C39D0500611D3D /* allformats.c in Sources */, + 21E6F48022C39D0500611D3D /* ffpipenode_ffplay_vdec.c in Sources */, + 21E6F48122C39D0500611D3D /* renderer_yuv420p.c in Sources */, + 21E6F48222C39D0500611D3D /* ijkthreadpool.c in Sources */, + 21E6F48322C39D0500611D3D /* IJKAVMoviePlayerController.m in Sources */, + 21E6F48422C39D0500611D3D /* IJKFFMoviePlayerDef.m in Sources */, + 21E6F48522C39D0500611D3D /* ijkplayer_ios.m in Sources */, + 21E6F48622C39D0500611D3D /* ffpipeline_ios.c in Sources */, + 21E6F48722C39D0500611D3D /* ijkioprotocol.c in Sources */, + 21E6F48822C39D0500611D3D /* ijksdl_vout_dummy.c in Sources */, + 21E6F48922C39D0500611D3D /* renderer_yuv420sp.c in Sources */, + 21E6F48A22C39D0500611D3D /* yuv420p.fsh.c in Sources */, + 21E6F48B22C39D0500611D3D /* ijksdl_error.c in Sources */, + 21E6F48C22C39D0500611D3D /* IJKDeviceModel.m in Sources */, + 21E6F48D22C39D0500611D3D /* ijkiocache.c in Sources */, + 21E6F48E22C39D0500611D3D /* ijksdl_egl.c in Sources */, + 21E6F48F22C39D0500611D3D /* ijkio.c in Sources */, + 21E6F49022C39D0500611D3D /* IJKAudioKit.m in Sources */, + 21E6F49122C39D0500611D3D /* IJKMPMoviePlayerController.m in Sources */, + 21E6F49222C39D0500611D3D /* IJKSDLHudViewCell.m in Sources */, + 21E6F49322C39D0500611D3D /* ijksdl_vout_overlay_videotoolbox.m in Sources */, + 21E6F49422C39D0500611D3D /* ff_ffpipenode.c in Sources */, + 21E6F49522C39D0500611D3D /* ijksdl_stdinc.c in Sources */, + 21E6F49622C39D0500611D3D /* IJKVideoToolBox.m in Sources */, + 21E6F49722C39D0500611D3D /* ijksegment.c in Sources */, + 21E6F49822C39D0500611D3D /* IJKMediaUtils.m in Sources */, + 21E6F49922C39D0500611D3D /* common.c in Sources */, + 21E6F49A22C39D0500611D3D /* ijksdl_aout_ios_audiounit.m in Sources */, + 21E6F49B22C39D0500611D3D /* ijklivehook.c in Sources */, + 21E6F49C22C39D0500611D3D /* ijkurlhook.c in Sources */, + 21E6F49D22C39D0500611D3D /* IJKVideoToolBoxSync.m in Sources */, + 21E6F49E22C39D0500611D3D /* IJKFFMediaPlayer.m in Sources */, + 21E6F49F22C39D0500611D3D /* IJKMediaPlayback.m in Sources */, + 21E6F4A022C39D0500611D3D /* ijkdict.c in Sources */, + 21E6F4A122C39D0500611D3D /* ff_ffpipeline.c in Sources */, + 21E6F4A222C39D0500611D3D /* ijkiourlhook.c in Sources */, + 21E6F4A322C39D0500611D3D /* IJKSDLAudioKit.m in Sources */, + 21E6F4A422C39D0500611D3D /* mvp.vsh.c in Sources */, + 21E6F4A522C39D0500611D3D /* NSString+IJKMedia.m in Sources */, + 21E6F4A622C39D0500611D3D /* ijksdl_vout_overlay_ffmpeg.c in Sources */, + 21E6F4A722C39D0500611D3D /* ijksdl_mutex.c in Sources */, + 21E6F4A822C39D0500611D3D /* ijktree.c in Sources */, + 21E6F4A922C39D0500611D3D /* IJKSDLAudioQueueController.m in Sources */, + 21E6F4AA22C39D0500611D3D /* ijksdl_thread.c in Sources */, + 21E6F4AB22C39D0500611D3D /* yuv420sp.fsh.c in Sources */, + 21E6F4AC22C39D0500611D3D /* ff_ffplay.c in Sources */, + 21E6F4AD22C39D0500611D3D /* ijksdl_aout.c in Sources */, + 21E6F4AE22C39D0500611D3D /* color.c in Sources */, + 21E6F4AF22C39D0500611D3D /* ijksdl_audio.c in Sources */, + 21E6F4B022C39D0500611D3D /* ijksdl_thread_ios.m in Sources */, + 21E6F4B122C39D0500611D3D /* ijkmeta.c in Sources */, + 21E6F4B222C39D0500611D3D /* ijkasync.c in Sources */, + 21E6F4B322C39D0500611D3D /* renderer_yuv420sp_vtb.m in Sources */, + 21E6F4B422C39D0500611D3D /* ijkutils.c in Sources */, + 21E6F4B522C39D0500611D3D /* IJKSDLGLView.m in Sources */, + 21E6F4B622C39D0500611D3D /* ijksdl_timer.c in Sources */, + 21E6F4B722C39D0500611D3D /* ijkfifo.c in Sources */, + 21E6F4B822C39D0500611D3D /* shader.c in Sources */, + 21E6F4B922C39D0500611D3D /* ijkioffio.c in Sources */, + 21E6F4BA22C39D0500611D3D /* renderer.c in Sources */, + 21E6F4BB22C39D0500611D3D /* ijkioapplication.c in Sources */, + 21E6F4BC22C39D0500611D3D /* ijkiomanager.c in Sources */, + 21E6F4BD22C39D0500611D3D /* ijkplayer.c in Sources */, + 21E6F4BE22C39D0500611D3D /* IJKFFOptions.m in Sources */, + 21E6F4BF22C39D0500611D3D /* IJKSDLAudioUnitController.m in Sources */, + 21E6F4C022C39D0500611D3D /* IJKFFMonitor.m in Sources */, + 21E6F4C122C39D0500611D3D /* IJKFFMoviePlayerController.m in Sources */, + 21E6F4C222C39D0500611D3D /* IJKNotificationManager.m in Sources */, + 21E6F4C322C39D0500611D3D /* IJKMediaModule.m in Sources */, + 21E6F4C422C39D0500611D3D /* ff_cmdutils.c in Sources */, + 21E6F4C522C39D0500611D3D /* IJKVideoToolBoxAsync.m in Sources */, + 21E6F4C622C39D0500611D3D /* renderer_yuv444p10le.c in Sources */, + 21E6F4C722C39D0500611D3D /* ijkstl.cpp in Sources */, + 21E6F4C822C39D0500611D3D /* image_convert.c in Sources */, + 21E6F4C922C39D0500611D3D /* rgb.fsh.c in Sources */, + 21E6F4CA22C39D0500611D3D /* ffpipenode_ios_videotoolbox_vdec.m in Sources */, + 21E6F4CB22C39D0500611D3D /* IJKAVPlayerLayerView.m in Sources */, + 21E6F4CC22C39D0500611D3D /* IJKSDLHudViewController.m in Sources */, + 21E6F4CD22C39D0500611D3D /* ijksdl_vout_ios_gles2.m in Sources */, + 21E6F4CE22C39D0500611D3D /* ijklongurl.c in Sources */, + 21E6F4CF22C39D0500611D3D /* renderer_rgb.c in Sources */, + 21E6F4D022C39D0500611D3D /* ffpipeline_ffplay.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5450AFC31E63EA4300568494 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1410,6 +1754,118 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + 21E6F50122C39D0500611D3D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 0.8.8; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = H6E8P88Q4E; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + ../build/universal/include, + IJKMediaPlayer/ijkmedia, + ../../ijkmedia, + ); + INFOPLIST_FILE = "${SRCROOT}/FIJKPLayer/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../build/universal/lib\"", + ); + MACH_O_TYPE = mh_dylib; + MTL_ENABLE_DEBUG_INFO = YES; + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( + "-read_only_relocs", + suppress, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.befovy.ios.fijkplayer; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 21E6F50222C39D0500611D3D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_MODULES = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 0.8.8; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = H6E8P88Q4E; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + ../build/universal/include, + IJKMediaPlayer/ijkmedia, + ../../ijkmedia, + ); + INFOPLIST_FILE = "${SRCROOT}/FIJKPLayer/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../build/universal/lib\"", + ); + MACH_O_TYPE = mh_dylib; + MTL_ENABLE_DEBUG_INFO = NO; + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( + "-read_only_relocs", + suppress, + ); + PRODUCT_BUNDLE_IDENTIFIER = com.befovy.ios.fijkplayer; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; 5450B0411E63EA4300568494 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1519,14 +1975,17 @@ E654EA9D1B6B27E600B0F2D0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 0.8.8; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = H6E8P88Q4E; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1555,12 +2014,18 @@ "$(inherited)", "\"$(SRCROOT)/../build/universal/lib\"", ); - MACH_O_TYPE = staticlib; + MACH_O_TYPE = mh_dylib; MTL_ENABLE_DEBUG_INFO = YES; + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( + "-read_only_relocs", + suppress, + ); PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1569,6 +2034,7 @@ E654EA9E1B6B27E600B0F2D0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; @@ -1576,6 +2042,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 0.8.8; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = H6E8P88Q4E; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1601,12 +2068,17 @@ "$(inherited)", "\"$(SRCROOT)/../build/universal/lib\"", ); - MACH_O_TYPE = staticlib; + MACH_O_TYPE = mh_dylib; MTL_ENABLE_DEBUG_INFO = NO; + "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( + "-read_only_relocs", + suppress, + ); PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1748,6 +2220,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 21E6F50022C39D0500611D3D /* Build configuration list for PBXNativeTarget "FIJKPlayer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 21E6F50122C39D0500611D3D /* Debug */, + 21E6F50222C39D0500611D3D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 5450B0401E63EA4300568494 /* Build configuration list for PBXNativeTarget "IJKMediaFrameworkWithSSL" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 94b2795e22..919434a625 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -1,4 +1,7 @@ + + diff --git a/ios/IJKMediaPlayer/universal-framework.sh b/ios/IJKMediaPlayer/universal-framework.sh new file mode 100755 index 0000000000..41e526d36d --- /dev/null +++ b/ios/IJKMediaPlayer/universal-framework.sh @@ -0,0 +1,38 @@ +# Type a script or drag a script file from your workspace to insert its path. +# Type a script or drag a script file from your workspace to insert its path. +#!/bin/sh + +UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal + +# make sure the output directory exists +mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" + +# Step 1. Build Device and Simulator versions +xcodebuild -target "${TARGET_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos -arch armv7 -arch armv7s -arch arm64 -project ${PROJECT_DIR}/${PROJECT_NAME}.xcodeproj BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build +xcodebuild -target "${TARGET_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator -project ${PROJECT_DIR}/${PROJECT_NAME}.xcodeproj ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build + + +# Step 2. Copy the framework structure (from iphoneos build) to the universal folder +cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${TARGET_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/" + +# Step 3. Copy Swift modules from iphonesimulator build (if it exists) to the copied framework directory +SIMULATOR_SWIFT_MODULES_DIR="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule/." +if [ -d "${SIMULATOR_SWIFT_MODULES_DIR}" ]; then +cp -R "${SIMULATOR_SWIFT_MODULES_DIR}" "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule" +fi + +# Step 4. Create universal binary file using lipo and place the combined executable in the copied framework directory +lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework/${TARGET_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${TARGET_NAME}.framework/${TARGET_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${TARGET_NAME}.framework/${TARGET_NAME}" + +# Step 5. Convenience step to copy the framework to the project's directory +cp -R "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework" "${PROJECT_DIR}/../CocoaPodsPub" + +rm "${PROJECT_DIR}/../CocoaPodsPub/FIJKPlayer.tar.gz" || true +cp -v "${PROJECT_DIR}/../../COPYING.LGPLv3" "${PROJECT_DIR}/../CocoaPodsPub/LICENSE" +cd "${PROJECT_DIR}/../CocoaPodsPub" +tar -zcvf "${PROJECT_DIR}/../${TARGET_NAME}.tar.gz" ./ +mv "${PROJECT_DIR}/../${TARGET_NAME}.tar.gz" "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.tar.gz" + + +# Step 6. Convenience step to open the project's directory in Finder +open "${PROJECT_DIR}/../CocoaPodsPub" From d9899d3f8bc4a3d458995178d67b69c57d96d530 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 29 Jun 2019 16:41:38 +0800 Subject: [PATCH 009/163] add android ndk cmake support, debug native c code in android studio delete two assert error. --- README.md | 20 +++ android/.gitignore | 3 +- android/ijkplayer/build.gradle | 3 +- .../ijkplayer/ijkplayer-example/build.gradle | 29 ++-- .../src/main/AndroidManifest.xml | 1 + android/ijkplayer/ijkplayer-exo/build.gradle | 4 +- android/ijkplayer/ijkplayer-full/build.gradle | 47 +++++- .../ijkplayer-full/src/main/CMakeLists.txt | 89 ++++++++++ extra/CMakeLists.txt.soundtouch | 51 ++++++ extra/CMakeLists.txt.yuv | 155 ++++++++++++++++++ ijkmedia/CMakeLists.txt | 45 +++++ ijkmedia/ijkj4a/CMakeLists.txt | 45 +++++ ijkmedia/ijkplayer/CMakeLists.txt | 125 ++++++++++++++ ijkmedia/ijksdl/CMakeLists.txt | 131 +++++++++++++++ .../ijksdl/android/android_nativewindow.c | 2 +- ijkmedia/ijksdl/ijksdl_thread.c | 2 +- .../jni/CMakeLists.txt | 25 +++ ios/CocoaPodsPub/FIJKPlayer.podspec | 9 +- 18 files changed, 760 insertions(+), 26 deletions(-) create mode 100644 android/ijkplayer/ijkplayer-full/src/main/CMakeLists.txt create mode 100644 extra/CMakeLists.txt.soundtouch create mode 100644 extra/CMakeLists.txt.yuv create mode 100644 ijkmedia/CMakeLists.txt create mode 100644 ijkmedia/ijkj4a/CMakeLists.txt create mode 100644 ijkmedia/ijkplayer/CMakeLists.txt create mode 100644 ijkmedia/ijksdl/CMakeLists.txt create mode 100644 ijkprof/android-ndk-profiler-dummy/jni/CMakeLists.txt diff --git a/README.md b/README.md index a670aa4b17..2a33e38ca9 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,26 @@ cd .. # gradle ``` +### Build Android via Cmake + +Tested on ndk r15c. + +``` +git clone https://github.com/befovy/ijkplayer.git ijkplayer-android +cd ijkplayer-android + +./init-android.sh + +cp extra/CMakeLists.txt.yuv ijkmedia/ijkyuv/CMakeLists.txt +cp extra/CMakeLists.txt.soundtouch ijkmedia/ijksoundtouch/CMakeLists.txt + +cd android/contrib +./compile-ffmpeg.sh clean +./compile-ffmpeg.sh all + +cd ../ijkplayer +./gradlew :ijkplayer-full:assembleDebug +./gradlew :ijkplayer-example:assembleDebug ### Build iOS diff --git a/android/.gitignore b/android/.gitignore index 06e3b7af50..f76a8ac5ec 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -49,7 +49,8 @@ gradle-app.setting #-------------------- # Built application files /*/build/ - +.externalNativeBuild/ + # Crashlytics configuations com_crashlytics_export_strings.xml diff --git a/android/ijkplayer/build.gradle b/android/ijkplayer/build.gradle index 49fa890af0..17569b163f 100644 --- a/android/ijkplayer/build.gradle +++ b/android/ijkplayer/build.gradle @@ -4,14 +4,13 @@ apply plugin: 'idea' idea.module { - //excludeDirs += file('ijkplayer-armv7a/src/') + excludeDirs += file('ijkplayer-armv7a/src/') excludeDirs += file('ijkplayer-arm64/src/') excludeDirs += file('ijkplayer-armv5/src/') excludeDirs += file('ijkplayer-x86/src/') excludeDirs += file('ijkplayer-x86_64/src/') } - buildscript { repositories { jcenter() diff --git a/android/ijkplayer/ijkplayer-example/build.gradle b/android/ijkplayer/ijkplayer-example/build.gradle index 25e4871f82..e9a5431b87 100644 --- a/android/ijkplayer/ijkplayer-example/build.gradle +++ b/android/ijkplayer/ijkplayer-example/build.gradle @@ -15,6 +15,13 @@ android { targetSdkVersion rootProject.ext.targetSdkVersion versionCode rootProject.ext.versionCode versionName rootProject.ext.versionName + minSdkVersion 16 + + ndk { + // Specifies the ABI configurations of your native + // libraries Gradle should build and package with your APK. + abiFilters 'armeabi-v7a'//, 'arm64-v8a', 'armeabi', 'x86', 'x86_64' + } } buildTypes { release { @@ -24,10 +31,11 @@ android { } flavorDimensions "ndkabi" + /* productFlavors { all32 { dimension "ndkabi" - minSdkVersion 14 + minSdkVersion 16 } all64 { dimension "ndkabi" @@ -38,6 +46,7 @@ android { // arm64 { minSdkVersion 21 } // x86 {} } + */ } dependencies { @@ -48,20 +57,20 @@ dependencies { implementation 'com.squareup:otto:1.3.8' - implementation project(':ijkplayer-java') + implementation project(':ijkplayer-full') implementation project(':ijkplayer-exo') //all32Implementation - all32Implementation project(':ijkplayer-armv5') - all32Implementation project(':ijkplayer-armv7a') - all32Implementation project(':ijkplayer-x86') + //all32Implementation project(':ijkplayer-armv5') + //all32Implementation project(':ijkplayer-armv7a') + //all32Implementation project(':ijkplayer-x86') //all64Implementation - all64Implementation project(':ijkplayer-armv5') - all64Implementation project(':ijkplayer-armv7a') - all64Implementation project(':ijkplayer-arm64') - all64Implementation project(':ijkplayer-x86') - all64Implementation project(':ijkplayer-x86_64') + //all64Implementation project(':ijkplayer-armv5') + //all64Implementation project(':ijkplayer-armv7a') + //all64Implementation project(':ijkplayer-arm64') + //all64Implementation project(':ijkplayer-x86') + //all64Implementation project(':ijkplayer-x86_64') // compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8' // compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8' diff --git a/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml index 84ec25f6bb..921c8095da 100644 --- a/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml +++ b/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml @@ -3,6 +3,7 @@ package="tv.danmaku.ijk.media.example"> + diff --git a/android/ijkplayer/ijkplayer-exo/build.gradle b/android/ijkplayer/ijkplayer-exo/build.gradle index f6e7a6ca87..e983089522 100644 --- a/android/ijkplayer/ijkplayer-exo/build.gradle +++ b/android/ijkplayer/ijkplayer-exo/build.gradle @@ -11,7 +11,7 @@ android { abortOnError false } defaultConfig { - minSdkVersion 9 + minSdkVersion 16 targetSdkVersion rootProject.ext.targetSdkVersion } buildTypes { @@ -27,7 +27,7 @@ dependencies { implementation 'com.google.android.exoplayer:exoplayer:r1.5.11' - implementation project(':ijkplayer-java') + implementation project(':ijkplayer-full') // compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8' } diff --git a/android/ijkplayer/ijkplayer-full/build.gradle b/android/ijkplayer/ijkplayer-full/build.gradle index 043c6e7bef..aecd745478 100644 --- a/android/ijkplayer/ijkplayer-full/build.gradle +++ b/android/ijkplayer/ijkplayer-full/build.gradle @@ -20,6 +20,20 @@ android { minSdkVersion 16 targetSdkVersion rootProject.ext.targetSdkVersion + externalNativeBuild { + cmake { + // use ndk 15c + arguments '-DANDROID_STL=c++_static', "-DANDROID_TOOLCHAIN=gcc" + targets "ijkplayer" + } + } + + ndk { + // Specifies the ABI configurations of your native + // libraries Gradle should build and package with your APK. + abiFilters 'arm64-v8a', 'armeabi-v7a', 'armeabi', 'x86', 'x86_64' + + } testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } @@ -35,12 +49,43 @@ android { jniLibs.srcDirs 'src/main/libs' jni.srcDirs = [] // This prevents the auto generation of Android.mk } + + externalNativeBuild { + cmake { + path 'src/main/CMakeLists.txt' + } + } + + + /* + flavorDimensions "ndkabi" + + productFlavors { + armv5 { + dimension "ndkabi" + + } + armv7a { + dimension "ndkabi" + + } + arm64 { + dimension "ndkabi" + // minSdkVersion 21 + } + x86 { + dimension "ndkabi" + } + x86_64 { + dimension "ndkabi" + } + } + */ } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - //implementation 'com.android.support:appcompat-v7:28.0.0' //testImplementation 'junit:junit:4.12' //androidTestImplementation 'com.android.support.test:runner:1.0.2' //androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' diff --git a/android/ijkplayer/ijkplayer-full/src/main/CMakeLists.txt b/android/ijkplayer/ijkplayer-full/src/main/CMakeLists.txt new file mode 100644 index 0000000000..0b4e676352 --- /dev/null +++ b/android/ijkplayer/ijkplayer-full/src/main/CMakeLists.txt @@ -0,0 +1,89 @@ +# +# Copyright (c) 2019 befovy +# +# This file is part of fijkPlayer. +# +# fijkPlayer 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. +# +# fijkPlayer 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 +# + +cmake_minimum_required(VERSION 3.6) + +project("FijkPlayer") + +set(CMAKE_C_STANDARD 11) +set(CMAKE_CXX_STANDARD 11) +set(ANDROID_PLATFORM_LEVEL 16) + + +add_definitions(-DANDROID) + + +message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") +message(STATUS "ANDROID_PLATFORM_LEVEL:${ANDROID_PLATFORM_LEVEL}") +message(STATUS "ANDROID_ABI:${ANDROID_ABI}") +message(STATUS "PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR}") + +set(FIJKROOT_PATH "${PROJECT_SOURCE_DIR}/../../../../..") +get_filename_component(FIJKROOT_PATH ${FIJKROOT_PATH} ABSOLUTE) +message(STATUS "FIJKROOT_PATH ${FIJKROOT_PATH}") + + +if (${CMAKE_BUILD_TYPE} STREQUAL "Release") + add_definitions(-DNDEBUG) +elseif (${CMAKE_BUILD_TYPE} STREQUAL "Debug") + add_definitions(-DDEBUG) +endif () + + +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + +set(ANDROID_CONTRIB_PATH ${FIJKROOT_PATH}/android/contrib/build) +message(STATUS "ANDROID_CONTRIB_PATH:${ANDROID_CONTRIB_PATH}") + +if (${ANDROID_ABI} STREQUAL "arm64-v8a") + set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-arm64/output) +elseif (${ANDROID_ABI} STREQUAL "armeabi-v7a") + set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-armv7a/output) +elseif (${ANDROID_ABI} STREQUAL "armeabi") + set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-armv5/output) +elseif (${ANDROID_ABI} STREQUAL "x86") + set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-x86/output) +elseif (${ANDROID_ABI} STREQUAL "x86_64") + set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-x86_64/output) +endif () + +if (NOT DEFINED FFMPAG_SHARED_DIR) + message(FATAL_ERROR "Can not find ffmpeg build output: ${FFMPAG_SHARED_DIR}") +else () + message(STATUS "FFMPAG_SHARED_DIR:${FFMPAG_SHARED_DIR}") +endif () + +add_library(ijkffmpeg SHARED IMPORTED) +set_target_properties( # Specifies the target library. + ijkffmpeg + PROPERTIES + IMPORTED_LOCATION ${FFMPAG_SHARED_DIR}/libijkffmpeg.so + ) + +add_custom_target(cpffmpeg + COMMAND mkdir -p ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} + COMMAND cp ${FFMPAG_SHARED_DIR}/libijkffmpeg.so ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} +) + +add_dependencies(ijkffmpeg cpffmpeg) + +message(STATUE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${PROJECT_BINARY_DIR}") +add_subdirectory(${FIJKROOT_PATH}/ijkmedia ijkmedia) diff --git a/extra/CMakeLists.txt.soundtouch b/extra/CMakeLists.txt.soundtouch new file mode 100644 index 0000000000..808bfba26c --- /dev/null +++ b/extra/CMakeLists.txt.soundtouch @@ -0,0 +1,51 @@ +# +# Copyright (c) 2019 Befovy +# +# This file is part of fijkPlayer. +# +# hijkPlayer 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. +# +# hijkPlayer 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 +# + + +cmake_minimum_required(VERSION 3.6) + + +include_directories(${CMAKE_CURRENT_LIST_DIR}) +include_directories(${CMAKE_CURRENT_LIST_DIR}/..) +include_directories(${CMAKE_CURRENT_LIST_DIR}/include/) + +set(SOUND_THOCH_SOURCES + source/SoundTouch/AAFilter.cpp + source/SoundTouch/FIFOSampleBuffer.cpp + source/SoundTouch/FIRFilter.cpp + source/SoundTouch/cpu_detect_x86.cpp + source/SoundTouch/sse_optimized.cpp + source/SoundTouch/RateTransposer.cpp + source/SoundTouch/InterpolateCubic.cpp + source/SoundTouch/InterpolateLinear.cpp + source/SoundTouch/InterpolateShannon.cpp + source/SoundTouch/TDStretch.cpp + source/SoundTouch/BPMDetect.cpp + source/SoundTouch/PeakFinder.cpp + source/SoundTouch/SoundTouch.cpp + source/SoundTouch/mmx_optimized.cpp + ijksoundtouch_wrap.cpp +) + +add_library(ijksoundtouch STATIC ${SOUND_THOCH_SOURCES}) + + + + diff --git a/extra/CMakeLists.txt.yuv b/extra/CMakeLists.txt.yuv new file mode 100644 index 0000000000..f86a15b97d --- /dev/null +++ b/extra/CMakeLists.txt.yuv @@ -0,0 +1,155 @@ +cmake_minimum_required(VERSION 2.8) + +# CMakeLists for libyuv +# Originally created for "roxlu build system" to compile libyuv on windows +# Run with -DTEST=ON to build unit tests +option(TEST "Built unit tests" OFF) + +set(ly_base_dir ${CMAKE_CURRENT_LIST_DIR}) +set(ly_src_dir ${ly_base_dir}/source/) +set(ly_inc_dir ${ly_base_dir}/include) +set(ly_lib_name "yuv") + +if(ANDROID) + set(ly_lib_name "yuv_static") +endif() + + +set(ly_source_files + ${ly_src_dir}/compare.cc + ${ly_src_dir}/compare_common.cc + # ${ly_src_dir}/compare_neon.cc + ${ly_src_dir}/compare_posix.cc + # ${ly_src_dir}/compare_win.cc + ${ly_src_dir}/convert.cc + ${ly_src_dir}/convert_argb.cc + ${ly_src_dir}/convert_from.cc + ${ly_src_dir}/convert_from_argb.cc + # ${ly_src_dir}/convert_jpeg.cc + ${ly_src_dir}/convert_to_argb.cc + ${ly_src_dir}/convert_to_i420.cc + ${ly_src_dir}/cpu_id.cc + ${ly_src_dir}/format_conversion.cc + # ${ly_src_dir}/mjpeg_decoder.cc + # ${ly_src_dir}/mjpeg_validate.cc + ${ly_src_dir}/planar_functions.cc + ${ly_src_dir}/rotate.cc + ${ly_src_dir}/rotate_argb.cc + ${ly_src_dir}/rotate_mips.cc + # ${ly_src_dir}/rotate_neon.cc + ${ly_src_dir}/row_any.cc + ${ly_src_dir}/row_common.cc + ${ly_src_dir}/row_mips.cc + # ${ly_src_dir}/row_neon.cc + ${ly_src_dir}/row_posix.cc + # ${ly_src_dir}/row_win.cc + ${ly_src_dir}/scale.cc + ${ly_src_dir}/scale_argb.cc + ${ly_src_dir}/scale_common.cc + ${ly_src_dir}/scale_mips.cc + # ${ly_src_dir}/scale_neon.cc + ${ly_src_dir}/scale_posix.cc + # ${ly_src_dir}/scale_win.cc + ${ly_src_dir}/video_common.cc +) + +if(ANDROID) + if(${ANDROID_ABI} STREQUAL "armeabi-va7") + add_definitions(-DLIBYUV_NEON) + list(APPEND ly_source_files + source/compare_neon.cc.neon + source/rotate_neon.cc.neon + source/row_neon.cc.neon + source/scale_neon.cc.neon + ) + elseif(${ANDROID_ABI} STREQUAL "arm64-v8a") + add_definitions(-DLIBYUV_NEON) + list(APPEND ly_source_files + source/compare_neon64.cc + source/rotate_neon64.cc + source/row_neon64.cc + source/scale_neon64.cc + ) + endif() +endif() + +set(ly_unittest_sources + ${ly_base_dir}/unit_test/basictypes_test.cc + ${ly_base_dir}/unit_test/compare_test.cc + ${ly_base_dir}/unit_test/convert_test.cc + ${ly_base_dir}/unit_test/cpu_test.cc + ${ly_base_dir}/unit_test/math_test.cc + ${ly_base_dir}/unit_test/planar_test.cc + ${ly_base_dir}/unit_test/rotate_argb_test.cc + ${ly_base_dir}/unit_test/rotate_test.cc + ${ly_base_dir}/unit_test/scale_argb_test.cc + ${ly_base_dir}/unit_test/scale_test.cc + ${ly_base_dir}/unit_test/unit_test.cc + ${ly_base_dir}/unit_test/video_common_test.cc + ${ly_base_dir}/unit_test/version_test.cc +) + +set(ly_header_files + ${ly_inc_dir}/libyuv/basic_types.h + ${ly_inc_dir}/libyuv/compare.h + ${ly_inc_dir}/libyuv/convert.h + ${ly_inc_dir}/libyuv/convert_argb.h + ${ly_inc_dir}/libyuv/convert_from.h + ${ly_inc_dir}/libyuv/convert_from_argb.h + ${ly_inc_dir}/libyuv/cpu_id.h + ${ly_inc_dir}/libyuv/format_conversion.h + ${ly_inc_dir}/libyuv/planar_functions.h + ${ly_inc_dir}/libyuv/rotate.h + ${ly_inc_dir}/libyuv/rotate_argb.h + ${ly_inc_dir}/libyuv/row.h + ${ly_inc_dir}/libyuv/scale.h + ${ly_inc_dir}/libyuv/scale_argb.h + ${ly_inc_dir}/libyuv/scale_row.h + ${ly_inc_dir}/libyuv/version.h + ${ly_inc_dir}/libyuv/video_common.h + ${ly_inc_dir}/libyuv/mjpeg_decoder.h +) + +include_directories(${ly_inc_dir}) + +add_library(${ly_lib_name} STATIC ${ly_source_files}) + +add_executable(convert ${ly_base_dir}/util/convert.cc) +target_link_libraries(convert ${ly_lib_name}) + +include(FindJPEG) +if (JPEG_FOUND) + include_directories(${JPEG_INCLUDE_DIR}) + target_link_libraries(convert ${JPEG_LIBRARY}) + add_definitions(-DHAVE_JPEG) +endif() + +if(TEST) + find_library(GTEST_LIBRARY gtest) + if(GTEST_LIBRARY STREQUAL "GTEST_LIBRARY-NOTFOUND") + set(GTEST_SRC_DIR /usr/src/gtest) + if(EXISTS ${GTEST_SRC_DIR}/src/gtest-all.cc) + message(STATUS "building gtest from sources in ${GTEST_SRC_DIR}") + set(gtest_sources ${GTEST_SRC_DIR}/src/gtest-all.cc) + add_library(gtest STATIC ${gtest_sources}) + include_directories(${GTEST_SRC_DIR}) + set(GTEST_LIBRARY gtest) + else() + message(FATAL_ERROR "TEST is set but unable to find gtest library") + endif() + endif() + + add_executable(libyuv_unittest ${ly_unittest_sources}) + target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY} pthread) + if (JPEG_FOUND) + target_link_libraries(libyuv_unittest ${JPEG_LIBRARY}) + endif() +endif() + +if(NACL AND NACL_LIBC STREQUAL "newlib") + target_link_libraries(libyuv_unittest glibc-compat) +endif() + +install(TARGETS ${ly_lib_name} DESTINATION lib) +install(FILES ${ly_header_files} DESTINATION include/libyuv) +install(FILES ${ly_inc_dir}/libyuv.h DESTINATION include/) diff --git a/ijkmedia/CMakeLists.txt b/ijkmedia/CMakeLists.txt new file mode 100644 index 0000000000..0b3a764916 --- /dev/null +++ b/ijkmedia/CMakeLists.txt @@ -0,0 +1,45 @@ +# +# Copyright (c) 2019 Befovy +# +# This file is part of fijkPlayer. +# +# fijkPlayer 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. +# +# fijkPlayer 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 +# + +cmake_minimum_required(VERSION 3.5) + +if (NOT DEFINED FIJKROOT_PATH) + set(FIJKROOT_PATH ${CMAKE_CURRENT_LIST_DIR}/../) +endif () + +add_subdirectory(ijksdl) +add_subdirectory(ijkplayer) + +if (ANDROID) + add_subdirectory(ijksoundtouch) + add_subdirectory(ijkyuv) + add_subdirectory(ijkj4a) + # just a dummy android ndk prifiler + option(ANDROID_NDK_PROFILER OFF) + if (NDK_PROFILER) + # not implemented yet + message(FATAL_ERROR "not implemented yet, android-ndk-profiler") + add_subdirectory(../ijkprof/android-ndk-profiler/jni ijkprof) + else () + add_subdirectory(../ijkprof/android-ndk-profiler-dummy/jni ijkprof) + endif (NDK_PROFILER) + + # add_dependencies(ijkplayer android-ndk-profiler) +endif () diff --git a/ijkmedia/ijkj4a/CMakeLists.txt b/ijkmedia/ijkj4a/CMakeLists.txt new file mode 100644 index 0000000000..9f7e2b037c --- /dev/null +++ b/ijkmedia/ijkj4a/CMakeLists.txt @@ -0,0 +1,45 @@ +# +# Copyright (c) 2019 Befovy +# +# This file is part of fijkPlayer. +# +# fijkPlayer 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. +# +# fijkPlayer 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 +# + + +cmake_minimum_required(VERSION 3.6) + +include_directories(${CMAKE_CURRENT_LIST_DIR}) + +set(J4A_SOURCES + j4a/j4a_allclasses.c + j4a/j4a_base.c + j4a/class/android/media/AudioTrack.c + j4a/class/android/media/MediaCodec.c + j4a/class/android/media/MediaFormat.c + j4a/class/android/media/PlaybackParams.c + j4a/class/android/os/Build.c + j4a/class/android/os/Bundle.c + j4a/class/java/nio/Buffer.c + j4a/class/java/nio/ByteBuffer.c + j4a/class/java/util/ArrayList.c + j4a/class/tv/danmaku/ijk/media/player/misc/IMediaDataSource.c + j4a/class/tv/danmaku/ijk/media/player/misc/IAndroidIO.c + j4a/class/tv/danmaku/ijk/media/player/IjkMediaPlayer.c + j4au/class/android/media/AudioTrack.util.c + j4au/class/java/nio/ByteBuffer.util.c +) + +add_library(ijkj4a STATIC ${J4A_SOURCES}) diff --git a/ijkmedia/ijkplayer/CMakeLists.txt b/ijkmedia/ijkplayer/CMakeLists.txt new file mode 100644 index 0000000000..338a57051d --- /dev/null +++ b/ijkmedia/ijkplayer/CMakeLists.txt @@ -0,0 +1,125 @@ +# +# Copyright (c) 2019 Befovy +# +# This file is part of fijkPlayer. +# +# fijkPlayer 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. +# +# fijkPlayer 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 +# + +if (ANDROID) + if (${ANDROID_ABI} STREQUAL "armeabi-v7a") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=soft") + endif () +endif () + + +set(BUILD_SOURCES + ff_fferror.h + ff_ffinc.h + ff_ffmsg.h + ff_ffmsg_queue.h + + ff_cmdutils.c + ff_cmdutils.h + ff_ffplay.c + ff_ffplay.h + ff_ffplay_debug.h + ff_ffplay_def.h + ff_ffplay_options.h + + ff_ffpipeline.c + ff_ffpipeline.h + ff_ffpipenode.c + ff_ffpipenode.h + ijkmeta.c + ijkmeta.h + + ijkplayer.c + ijkplayer.h + ijkplayer_internal.h + + pipeline/ffpipeline_ffplay.c + pipeline/ffpipeline_ffplay.h + pipeline/ffpipenode_ffplay_vdec.c + pipeline/ffpipenode_ffplay_vdec.h + + ijkavformat/allformats.c + ijkavformat/ijklivehook.c + ijkavformat/ijkmediadatasource.c + ijkavformat/ijkio.c + ijkavformat/ijkiomanager.c + ijkavformat/ijkiocache.c + ijkavformat/ijkioffio.c + ijkavformat/ijkioprotocol.c + ijkavformat/ijkioapplication.c + ijkavformat/ijkiourlhook.c + + ijkavformat/ijkasync.c + ijkavformat/ijkurlhook.c + ijkavformat/ijklongurl.c + ijkavformat/ijksegment.c + + ijkavutil/ijkdict.c + ijkavutil/ijkutils.c + ijkavutil/ijkthreadpool.c + ijkavutil/ijktree.c + ijkavutil/ijkfifo.c + ijkavutil/ijkstl.cpp +) + +set(ANDROID_IJKPLAYER_SOURCES + + ijkavformat/ijkioandroidio.c + + android/ffmpeg_api_jni.c + android/ijkplayer_android.c + android/ijkplayer_jni.c + + android/pipeline/ffpipeline_android.c + android/pipeline/ffpipenode_android_mediacodec_vdec.c +) + + +if (ANDROID) + set(BUILD_SOURCES ${BUILD_SOURCES} ${ANDROID_IJKPLAYER_SOURCES}) +endif () + + +add_library(ijkplayer SHARED ${BUILD_SOURCES}) + + +target_include_directories(ijkplayer PRIVATE ${CMAKE_CURRENT_LIST_DIR}) +target_include_directories(ijkplayer PRIVATE ${CMAKE_CURRENT_LIST_DIR}/..) +target_include_directories(ijkplayer PRIVATE ${FFMPAG_SHARED_DIR}/include) +target_include_directories(ijkplayer PRIVATE ijkavformat) +target_include_directories(ijkplayer PRIVATE ijkavutil) +target_include_directories(ijkplayer PRIVATE pipeline) +target_include_directories(ijkplayer PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkj4a) + +target_link_libraries(ijkplayer ijksdl) + +if (ANDROID) + target_link_libraries(ijkplayer ijksoundtouch) + target_link_libraries(ijkplayer ijkffmpeg) + target_link_libraries(ijkplayer android-ndk-profiler) + target_link_libraries(ijkplayer log) + target_link_libraries(ijkplayer android) +endif () + + +add_custom_command(TARGET ijkplayer + PRE_BUILD + COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/version.sh ${CMAKE_CURRENT_LIST_DIR} ijkversion.h +) diff --git a/ijkmedia/ijksdl/CMakeLists.txt b/ijkmedia/ijksdl/CMakeLists.txt new file mode 100644 index 0000000000..ba3b0a5daf --- /dev/null +++ b/ijkmedia/ijksdl/CMakeLists.txt @@ -0,0 +1,131 @@ +# +# Copyright (c) 2019 Befovy +# +# This file is part of fijkPlayer. +# +# fijkPlayer 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. +# +# fijkPlayer 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 +# + +cmake_minimum_required(VERSION 3.6) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + +set(BASE_SOURCES + ijksdl_class.h + ijksdl_container.h + ijksdl_log.h + + ijksdl_misc.h + ijksdl_stdinc.h + ijksdl_inc_internal.h + ijksdl_aout.c + ijksdl_aout.h + ijksdl_aout_internal.h + ijksdl_audio.c + ijksdl_audio.h + ijksdl_error.c + ijksdl_error.h + ijksdl_mutex.c + ijksdl_mutex.h + ijksdl_stdinc.c + ijksdl_stdinc.h + ijksdl_thread.c + ijksdl_thread.h + ijksdl_timer.c + ijksdl_timer.h + ijksdl_vout.c + ijksdl_vout.h + ijksdl_vout_internal.h + + ffmpeg/ijksdl_vout_overlay_ffmpeg.c + ffmpeg/ijksdl_vout_overlay_ffmpeg.h + ffmpeg/ijksdl_image_convert.h + ffmpeg/ijksdl_inc_ffmpeg.h + ffmpeg/abi_all/image_convert.c + + dummy/ijksdl_vout_dummy.c + dummy/ijksdl_vout_dummy.h + dummy/ijksdl_dummy.h +) + +set(SDL_ANDROID_EXTRA_SOURCES + ijksdl_extra_log.c + ijksdl_extra_log.h + android/android_audiotrack.c + android/android_nativewindow.c + android/ijksdl_android_jni.c + android/ijksdl_aout_android_audiotrack.c + android/ijksdl_aout_android_opensles.c + android/ijksdl_codec_android_mediacodec_dummy.c + android/ijksdl_codec_android_mediacodec_internal.c + android/ijksdl_codec_android_mediacodec_java.c + android/ijksdl_codec_android_mediacodec.c + android/ijksdl_codec_android_mediadef.c + android/ijksdl_codec_android_mediaformat_java.c + android/ijksdl_codec_android_mediaformat.c + android/ijksdl_vout_android_nativewindow.c + android/ijksdl_vout_android_surface.c + android/ijksdl_vout_overlay_android_mediacodec.c +) + +set(GLES2_SOURCES + ijksdl_egl.c + gles2/color.c + gles2/common.c + gles2/renderer.c + gles2/renderer_rgb.c + gles2/renderer_yuv420p.c + gles2/renderer_yuv444p10le.c + gles2/shader.c + gles2/fsh/rgb.fsh.c + gles2/fsh/yuv420p.fsh.c + gles2/fsh/yuv444p10le.fsh.c + gles2/vsh/mvp.vsh.c +) + +set(IJK_SDL_SOURCES ${BASE_SOURCES}) + +if (ANDROID) + set(IJK_SDL_SOURCES ${IJK_SDL_SOURCES} ${SDL_ANDROID_EXTRA_SOURCES} ${GLES2_SOURCES}) +endif () + +add_library(ijksdl SHARED ${IJK_SDL_SOURCES}) + +target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}) +target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}/..) + + +#include ffmpeg header files +target_include_directories(ijksdl PRIVATE ${FFMPAG_SHARED_DIR}/include) + +if (ANDROID) + # build cpufeatures as a static lib + # add_library(cpufeatures STATIC + # ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c) + + # include(AndroidNdkModules) + # android_ndk_import_module_cpufeatures() + target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkyuv/include) + target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkj4a) +endif () + +if (ANDROID) + target_link_libraries(ijksdl ijkffmpeg) + target_link_libraries(ijksdl ijkj4a) + # target_link_libraries(ijksdl cpufeatures) + target_link_libraries(ijksdl yuv_static) + target_link_libraries(ijksdl log android OpenSLES EGL GLESv2) +endif () + diff --git a/ijkmedia/ijksdl/android/android_nativewindow.c b/ijkmedia/ijksdl/android/android_nativewindow.c index b9fb3458c0..91f9e5bc2c 100644 --- a/ijkmedia/ijksdl/android/android_nativewindow.c +++ b/ijkmedia/ijksdl/android/android_nativewindow.c @@ -99,7 +99,7 @@ static int android_render_on_yv12(ANativeWindow_Buffer *out_buffer, const SDL_Vo static int android_render_rgb_on_rgb(ANativeWindow_Buffer *out_buffer, const SDL_VoutOverlay *overlay, int bpp) { // SDLTRACE("SDL_VoutAndroid: android_render_rgb_on_rgb(%p)", overlay); - assert(overlay->format == SDL_FCC_RV16); + // assert(overlay->format == SDL_FCC_RV16); assert(overlay->planes == 1); int min_height = IJKMIN(out_buffer->height, overlay->h); diff --git a/ijkmedia/ijksdl/ijksdl_thread.c b/ijkmedia/ijksdl/ijksdl_thread.c index ae36798721..24fa122eb2 100644 --- a/ijkmedia/ijksdl/ijksdl_thread.c +++ b/ijkmedia/ijksdl/ijksdl_thread.c @@ -86,7 +86,7 @@ int SDL_SetThreadPriority(SDL_ThreadPriority priority) void SDL_WaitThread(SDL_Thread *thread, int *status) { - assert(thread); + // assert(thread); if (!thread) return; diff --git a/ijkprof/android-ndk-profiler-dummy/jni/CMakeLists.txt b/ijkprof/android-ndk-profiler-dummy/jni/CMakeLists.txt new file mode 100644 index 0000000000..444ac7992c --- /dev/null +++ b/ijkprof/android-ndk-profiler-dummy/jni/CMakeLists.txt @@ -0,0 +1,25 @@ +# +# Copyright (c) 2019 Befovy +# +# This file is part of fijkPlayer. +# +# fijkPlayer 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. +# +# fijkPlayer 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 +# + +cmake_minimum_required(VERSION 3.5) + +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +add_library(android-ndk-profiler STATIC prof.c) diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 8e51049aeb..a158e3f8b1 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -20,7 +20,6 @@ Pod::Spec.new do |spec| spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } - # This description is used to generate tags and improve search results. # * Think: What does it do? Why did you write it? What is the focus? # * Try to keep it short, snappy and to the point. @@ -76,9 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - # spec.source = { :git => "https://github.com/befovy/ijkplayer.git", :tag => "b0.1.0-alpha" } - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/b0.1.1-alpha/FIJKMediaPlayer.tar.gz" } - + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/b0.1.1-alpha/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files @@ -120,10 +117,6 @@ Pod::Spec.new do |spec| # spec.library = "iconv" # spec.libraries = "iconv", "xml2" - spec.prepare_command = <<-CMD - tar xvzf FIJKPlayer.tar.gz - CMD - # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # From e08539cb7be825025a1dc656702192a70b7166df Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 1 Jul 2019 12:48:11 +0800 Subject: [PATCH 010/163] rename module ijkplayer-full to fijkplayer-full --- README.md | 10 ++++------ .../{ijkplayer-full => fijkplayer-full}/.gitignore | 0 .../{ijkplayer-full => fijkplayer-full}/build.gradle | 0 .../gradle.properties | 0 .../proguard-rules.pro | 4 ++++ .../src/main/AndroidManifest.xml | 0 .../src/main/CMakeLists.txt | 0 android/ijkplayer/gradle.properties | 4 ++-- android/ijkplayer/ijkplayer-example/build.gradle | 2 +- android/ijkplayer/ijkplayer-exo/build.gradle | 2 +- android/ijkplayer/settings.gradle | 2 +- init-android.sh | 3 +++ 12 files changed, 16 insertions(+), 11 deletions(-) rename android/ijkplayer/{ijkplayer-full => fijkplayer-full}/.gitignore (100%) rename android/ijkplayer/{ijkplayer-full => fijkplayer-full}/build.gradle (100%) rename android/ijkplayer/{ijkplayer-full => fijkplayer-full}/gradle.properties (100%) rename android/ijkplayer/{ijkplayer-full => fijkplayer-full}/proguard-rules.pro (93%) rename android/ijkplayer/{ijkplayer-full => fijkplayer-full}/src/main/AndroidManifest.xml (100%) rename android/ijkplayer/{ijkplayer-full => fijkplayer-full}/src/main/CMakeLists.txt (100%) diff --git a/README.md b/README.md index 2a33e38ca9..d395ea1a4b 100644 --- a/README.md +++ b/README.md @@ -195,17 +195,15 @@ cd ijkplayer-android ./init-android.sh -cp extra/CMakeLists.txt.yuv ijkmedia/ijkyuv/CMakeLists.txt -cp extra/CMakeLists.txt.soundtouch ijkmedia/ijksoundtouch/CMakeLists.txt - cd android/contrib ./compile-ffmpeg.sh clean ./compile-ffmpeg.sh all +``` -cd ../ijkplayer -./gradlew :ijkplayer-full:assembleDebug -./gradlew :ijkplayer-example:assembleDebug +just run/debug ijkplayer-example in Android Studio +To get a released aar +run `./gradlew :fijkplayer-full:assembleRelease` ### Build iOS ``` diff --git a/android/ijkplayer/ijkplayer-full/.gitignore b/android/ijkplayer/fijkplayer-full/.gitignore similarity index 100% rename from android/ijkplayer/ijkplayer-full/.gitignore rename to android/ijkplayer/fijkplayer-full/.gitignore diff --git a/android/ijkplayer/ijkplayer-full/build.gradle b/android/ijkplayer/fijkplayer-full/build.gradle similarity index 100% rename from android/ijkplayer/ijkplayer-full/build.gradle rename to android/ijkplayer/fijkplayer-full/build.gradle diff --git a/android/ijkplayer/ijkplayer-full/gradle.properties b/android/ijkplayer/fijkplayer-full/gradle.properties similarity index 100% rename from android/ijkplayer/ijkplayer-full/gradle.properties rename to android/ijkplayer/fijkplayer-full/gradle.properties diff --git a/android/ijkplayer/ijkplayer-full/proguard-rules.pro b/android/ijkplayer/fijkplayer-full/proguard-rules.pro similarity index 93% rename from android/ijkplayer/ijkplayer-full/proguard-rules.pro rename to android/ijkplayer/fijkplayer-full/proguard-rules.pro index f1b424510d..07efb75b6c 100644 --- a/android/ijkplayer/ijkplayer-full/proguard-rules.pro +++ b/android/ijkplayer/fijkplayer-full/proguard-rules.pro @@ -19,3 +19,7 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + +-keep class tv.danmaku.ijk.media.player.** { + *; +} \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-full/src/main/AndroidManifest.xml b/android/ijkplayer/fijkplayer-full/src/main/AndroidManifest.xml similarity index 100% rename from android/ijkplayer/ijkplayer-full/src/main/AndroidManifest.xml rename to android/ijkplayer/fijkplayer-full/src/main/AndroidManifest.xml diff --git a/android/ijkplayer/ijkplayer-full/src/main/CMakeLists.txt b/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt similarity index 100% rename from android/ijkplayer/ijkplayer-full/src/main/CMakeLists.txt rename to android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 614d5d126a..d261116b72 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.1.0 -VERSION_CODE=000100 +VERSION_NAME=0.1.2 +VERSION_CODE=000102 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/android/ijkplayer/ijkplayer-example/build.gradle b/android/ijkplayer/ijkplayer-example/build.gradle index e9a5431b87..db3c246566 100644 --- a/android/ijkplayer/ijkplayer-example/build.gradle +++ b/android/ijkplayer/ijkplayer-example/build.gradle @@ -57,7 +57,7 @@ dependencies { implementation 'com.squareup:otto:1.3.8' - implementation project(':ijkplayer-full') + implementation project(':fijkplayer-full') implementation project(':ijkplayer-exo') //all32Implementation diff --git a/android/ijkplayer/ijkplayer-exo/build.gradle b/android/ijkplayer/ijkplayer-exo/build.gradle index e983089522..4d93bdc2b8 100644 --- a/android/ijkplayer/ijkplayer-exo/build.gradle +++ b/android/ijkplayer/ijkplayer-exo/build.gradle @@ -27,7 +27,7 @@ dependencies { implementation 'com.google.android.exoplayer:exoplayer:r1.5.11' - implementation project(':ijkplayer-full') + implementation project(':fijkplayer-full') // compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8' } diff --git a/android/ijkplayer/settings.gradle b/android/ijkplayer/settings.gradle index f137022bd7..e04ecbcc2c 100644 --- a/android/ijkplayer/settings.gradle +++ b/android/ijkplayer/settings.gradle @@ -7,7 +7,7 @@ include ':ijkplayer-x86' include ':ijkplayer-java' include ':ijkplayer-exo' -include ':ijkplayer-full' +include ':fijkplayer-full' include ':ijkplayer-example' diff --git a/init-android.sh b/init-android.sh index a654e17f6b..0de272b58a 100755 --- a/init-android.sh +++ b/init-android.sh @@ -48,3 +48,6 @@ pull_fork "x86_64" ./init-config.sh ./init-android-libyuv.sh ./init-android-soundtouch.sh + +cp extra/CMakeLists.txt.yuv ijkmedia/ijkyuv/CMakeLists.txt +cp extra/CMakeLists.txt.soundtouch ijkmedia/ijksoundtouch/CMakeLists.txt From d954e565f14918313b85bfdf65863e6629eb9096 Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 2 Jul 2019 23:37:29 +0800 Subject: [PATCH 011/163] fix xcode build error for armv7 --- ios/tools/do-compile-ffmpeg.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ios/tools/do-compile-ffmpeg.sh b/ios/tools/do-compile-ffmpeg.sh index 66ba2e3c34..28db9677e2 100755 --- a/ios/tools/do-compile-ffmpeg.sh +++ b/ios/tools/do-compile-ffmpeg.sh @@ -186,6 +186,13 @@ echo "--------------------" FF_XCRUN_SDK=`echo $FF_XCRUN_PLATFORM | tr '[:upper:]' '[:lower:]'` FF_XCRUN_CC="xcrun -sdk $FF_XCRUN_SDK clang" +if [ "$FF_ARCH" = "arm64" ] +then + FF_AS="gas-preprocessor.pl -arch aarch64 -- $FF_XCRUN_CC" +else + FF_AS="gas-preprocessor.pl -- $FF_XCRUN_CC" +fi + FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_CPU" FFMPEG_CFLAGS= @@ -236,6 +243,7 @@ else ./configure \ $FFMPEG_CFG_FLAGS \ --cc="$FF_XCRUN_CC" \ + --as="$FF_AS" \ $FFMPEG_CFG_CPU \ --extra-cflags="$FFMPEG_CFLAGS" \ --extra-cxxflags="$FFMPEG_CFLAGS" \ From 47256a54e3d27a0e5ee6d27aef8d20420934c6da Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 4 Jul 2019 00:21:35 +0800 Subject: [PATCH 012/163] add FIJKPlayer.h to pubulic headers --- android/ijkplayer/fijkplayer-full/gradle.properties | 6 +++--- ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h | 13 ++++++------- .../IJKMediaPlayer.xcodeproj/project.pbxproj | 4 ++-- .../IJKMediaPlayer/IJKFFMediaPlayer.h | 2 +- .../IJKMediaPlayer/IJKFFMediaPlayer.m | 2 +- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/android/ijkplayer/fijkplayer-full/gradle.properties b/android/ijkplayer/fijkplayer-full/gradle.properties index 35e365a564..d7c3b7e6d0 100644 --- a/android/ijkplayer/fijkplayer-full/gradle.properties +++ b/android/ijkplayer/fijkplayer-full/gradle.properties @@ -1,3 +1,3 @@ -POM_NAME=ijkplayer-full -POM_ARTIFACT_ID=ijkplayer-full -POM_PACKAGING=aar \ No newline at end of file +POM_NAME=fijkplayer-full +POM_ARTIFACT_ID=fijkplayer-full +POM_PACKAGING=aar diff --git a/ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h b/ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h index 26be4a796b..95d43a27a4 100644 --- a/ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h +++ b/ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h @@ -1,10 +1,9 @@ /* - * IJKMediaFramework.h + * FIJKPlayer.h * - * Copyright (c) 2013 Bilibili - * Copyright (c) 2013 Zhang Rui + * Copyright (c) 2019 Befovy * - * This file is part of ijkPlayer. + * This file is part of fijkPlayer. * * ijkPlayer is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,13 +22,13 @@ #import -//! Project version number for IJKMediaFramework. +//! Project version number for FIJKPlayer. FOUNDATION_EXPORT double FIJKPlayerVersionNumber; -//! Project version string for IJKMediaFramework. +//! Project version string for FIJKPlayer. FOUNDATION_EXPORT const unsigned char FIJKPlayerVersionString[]; -// In this header, you should import all the public headers of your framework using statements like #import +// In this header, you should import all the public headers of your framework using statements like #import #import #import #import diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 32f0ea1cb5..e34c78f0a0 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -12,7 +12,7 @@ 215FF44D22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 215FF44E22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 215FF44F22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; - 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */; }; + 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 217D1C5422C457720046FB63 /* universal-framework.sh in Resources */ = {isa = PBXBuildFile; fileRef = 217D1C5322C457720046FB63 /* universal-framework.sh */; }; 21DAA1592298FEBB007B0784 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8B1E63E59300568494 /* libcrypto.a */; }; 21DAA15A2298FEBE007B0784 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8C1E63E59300568494 /* libssl.a */; }; @@ -1140,10 +1140,10 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */, 21E6F4DD22C39D0500611D3D /* IJKFFMonitor.h in Headers */, 21E6F4DE22C39D0500611D3D /* ijkiourl.h in Headers */, 21E6F4DF22C39D0500611D3D /* IJKFFMoviePlayerController.h in Headers */, - 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */, 21E6F4E022C39D0500611D3D /* IJKSDLHudViewController.h in Headers */, 21E6F4E122C39D0500611D3D /* IJKFFOptions.h in Headers */, 21E6F4E222C39D0500611D3D /* ijkutils.h in Headers */, diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index 55d1e0e13b..b0e8699b1c 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -3,7 +3,7 @@ * * Copyright (c) 2019 Befovy * - * This file is part of ijkPlayer. + * This file is part of fijkPlayer. * * ijkPlayer is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 61443a8c6b..de1cdb3ed7 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -3,7 +3,7 @@ * * Copyright (c) 2019 Befovy * - * This file is part of ijkPlayer. + * This file is part of fijkPlayer. * * ijkPlayer is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public From b60a4802c7979650ebd8e15a3a04135a80c09362 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 10 Jul 2019 11:20:34 +0800 Subject: [PATCH 013/163] add IJKCVPBViewProtocol to get pixelBuffer from ijkplayer. use IJKSDLGLViewProtocol in vout_ios_gles2 instead of IJKSDLGLView. add fcc_bgra overlay-format in VideoToolbox --- .../ijkplayer/fijkplayer-full/build.gradle | 1 - .../fijkplayer-full/src/main/CMakeLists.txt | 2 +- ijkmedia/ijkplayer/ff_ffplay_options.h | 1 + ijkmedia/ijksdl/ijksdl_fourcc.h | 2 + .../IJKMediaPlayer/IJKFFMediaPlayer.h | 5 +- .../IJKMediaPlayer/IJKFFMediaPlayer.m | 26 ++++++++ .../IJKFFMoviePlayerController.m | 56 +++++++++-------- .../IJKMediaPlayer/IJKSDLGLViewProtocol.h | 5 ++ .../ijkmedia/ijkplayer/ios/ijkplayer_ios.h | 2 +- .../ijkmedia/ijkplayer/ios/ijkplayer_ios.m | 4 +- .../ios/pipeline/IJKVideoToolBoxAsync.m | 15 ++++- .../ios/pipeline/IJKVideoToolBoxSync.m | 13 +++- .../ijksdl/ios/ijksdl_vout_ios_gles2.h | 3 +- .../ijksdl/ios/ijksdl_vout_ios_gles2.m | 61 +++++++++++++------ 14 files changed, 138 insertions(+), 58 deletions(-) diff --git a/android/ijkplayer/fijkplayer-full/build.gradle b/android/ijkplayer/fijkplayer-full/build.gradle index aecd745478..fcbf88fcd5 100644 --- a/android/ijkplayer/fijkplayer-full/build.gradle +++ b/android/ijkplayer/fijkplayer-full/build.gradle @@ -46,7 +46,6 @@ android { sourceSets.main { java.srcDirs = ["$rootProject.rootDir/ijkplayer-java/src/main/java/"] - jniLibs.srcDirs 'src/main/libs' jni.srcDirs = [] // This prevents the auto generation of Android.mk } diff --git a/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt b/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt index 0b4e676352..11b3277afe 100644 --- a/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt +++ b/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt @@ -76,7 +76,7 @@ set_target_properties( # Specifies the target library. ijkffmpeg PROPERTIES IMPORTED_LOCATION ${FFMPAG_SHARED_DIR}/libijkffmpeg.so - ) +) add_custom_target(cpffmpeg COMMAND mkdir -p ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} diff --git a/ijkmedia/ijkplayer/ff_ffplay_options.h b/ijkmedia/ijkplayer/ff_ffplay_options.h index b23afac16c..3f9305cd3b 100644 --- a/ijkmedia/ijkplayer/ff_ffplay_options.h +++ b/ijkmedia/ijkplayer/ff_ffplay_options.h @@ -112,6 +112,7 @@ static const AVOption ffp_context_options[] = { { "fcc-rv16", "", 0, OPTION_CONST(SDL_FCC_RV16), .unit = "overlay-format" }, { "fcc-rv24", "", 0, OPTION_CONST(SDL_FCC_RV24), .unit = "overlay-format" }, { "fcc-rv32", "", 0, OPTION_CONST(SDL_FCC_RV32), .unit = "overlay-format" }, + { "fcc-bgra", "", 0, OPTION_CONST(SDL_FCC_BGRA), .unit = "overlay-format" }, { "start-on-prepared", "automatically start playing on prepared", OPTION_OFFSET(start_on_prepared), OPTION_INT(1, 0, 1) }, diff --git a/ijkmedia/ijksdl/ijksdl_fourcc.h b/ijkmedia/ijksdl/ijksdl_fourcc.h index 3510966033..35d772fdc9 100644 --- a/ijkmedia/ijksdl/ijksdl_fourcc.h +++ b/ijkmedia/ijksdl/ijksdl_fourcc.h @@ -63,6 +63,8 @@ #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 */ diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index b0e8699b1c..097d3baca0 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -22,6 +22,7 @@ #import #import "IJKFFOptions.h" +#import "IJKSDLGLViewProtocol.h" NS_ASSUME_NONNULL_BEGIN @@ -51,7 +52,7 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { @end -@interface IJKFFMediaPlayer : NSObject +@interface IJKFFMediaPlayer : NSObject @property (readonly, nonatomic) int videoWidth; @property (readonly, nonatomic) int videoHeight; @@ -69,6 +70,8 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { - (BOOL) isPlaying; - (void) shutdown; +- (void) setupCVPixelBufferView:(id) view; + - (void)setOptionValue:(NSString *)value forKey:(NSString *)key ofCategory:(IJKFFOptionCategory)category; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index de1cdb3ed7..e955a3ab45 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -41,6 +41,7 @@ @implementation IJKFFMediaPlayer { IJKFFMoviePlayerMessagePool *_msgPool; NSMutableSet> *_eventHandlers; + id _cvPBView; NSString *_dataSource; int _videoWidth; @@ -49,6 +50,10 @@ @implementation IJKFFMediaPlayer { int _videoSarDen; } +@synthesize fps = _fps; +@synthesize isThirdGLView = _isThirdGLView; +@synthesize scaleFactor = _scaleFactor; + - (IJKFFMoviePlayerMessage *) obtainMessage { return [_msgPool obtain]; } @@ -96,6 +101,9 @@ - (IJKFFMediaPlayer *)init ijkmp_set_option(_nativeMediaPlayer, IJKMP_OPT_CATEGORY_PLAYER, "overlay-format", "fcc-_es2"); [[IJKAudioKit sharedInstance] setupAudioSession]; + _isThirdGLView = true; + _scaleFactor = 1.0f; + _fps = 1.0f; } return self; } @@ -242,4 +250,22 @@ - (void) removeIJKMPEventHandler:(id) handler [_eventHandlers removeObject:handler]; } +- (void) display_pixels:(IJKOverlay *)overlay +{ + if (overlay->pixel_buffer != nil && _cvPBView != nil) { + [_cvPBView display_pixelbuffer:overlay->pixel_buffer]; + } +} + +- (void) setupCVPixelBufferView:(id) cvPBView +{ + _cvPBView = cvPBView; + ijkmp_ios_set_glview(_nativeMediaPlayer, self); +} + +- (UIImage *)snapshot +{ + return nil; +} + @end diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m index 5263daae27..7c8949949d 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m @@ -28,6 +28,7 @@ #import "IJKFFMoviePlayerDef.h" #import "IJKMediaPlayback.h" #import "IJKMediaModule.h" +#import "IJKSDLGLViewProtocol.h" #import "IJKAudioKit.h" #import "IJKNotificationManager.h" #import "NSString+IJKMedia.h" @@ -50,7 +51,7 @@ @interface IJKFFMoviePlayerController() @implementation IJKFFMoviePlayerController { IjkMediaPlayer *_mediaPlayer; - IJKSDLGLView *_glView; + id _glView; IJKFFMoviePlayerMessagePool *_msgPool; NSString *_urlString; @@ -213,11 +214,12 @@ - (id)initWithContentURLString:(NSString *)aUrlString ijkmp_set_option_int(_mediaPlayer, IJKMP_OPT_CATEGORY_PLAYER, "start-on-prepared", _shouldAutoplay ? 1 : 0); // init video sink - _glView = [[IJKSDLGLView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - _glView.isThirdGLView = NO; - _view = _glView; + IJKSDLGLView *glView = [[IJKSDLGLView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + glView.isThirdGLView = NO; + _glView = glView; + _view = glView; _hudViewController = [[IJKSDLHudViewController alloc] init]; - [_hudViewController setRect:_glView.frame]; + [_hudViewController setRect:glView.frame]; _shouldShowHudView = NO; _hudViewController.tableView.hidden = YES; [_view addSubview:_hudViewController.tableView]; @@ -318,26 +320,30 @@ - (id)initWithMoreContentString:(NSString *)aUrlString self.shouldShowHudView = options.showHudView; glView.isThirdGLView = YES; - _view = _glView = (IJKSDLGLView *)glView; - _hudViewController = [[IJKSDLHudViewController alloc] init]; - [_hudViewController setRect:_glView.frame]; - _shouldShowHudView = NO; - _hudViewController.tableView.hidden = YES; - [_view addSubview:_hudViewController.tableView]; - - [self setHudValue:nil forKey:@"scheme"]; - [self setHudValue:nil forKey:@"host"]; - [self setHudValue:nil forKey:@"path"]; - [self setHudValue:nil forKey:@"ip"]; - [self setHudValue:nil forKey:@"tcp-info"]; - [self setHudValue:nil forKey:@"http"]; - [self setHudValue:nil forKey:@"tcp-spd"]; - [self setHudValue:nil forKey:@"t-prepared"]; - [self setHudValue:nil forKey:@"t-render"]; - [self setHudValue:nil forKey:@"t-preroll"]; - [self setHudValue:nil forKey:@"t-http-open"]; - [self setHudValue:nil forKey:@"t-http-seek"]; - self.shouldShowHudView = options.showHudView; + _glView = glView; + + if ([glView isMemberOfClass:[UIView class]]) { + _view = (UIView *)glView; + _hudViewController = [[IJKSDLHudViewController alloc] init]; + [_hudViewController setRect:_view.frame]; + _shouldShowHudView = NO; + _hudViewController.tableView.hidden = YES; + [_view addSubview:_hudViewController.tableView]; + + [self setHudValue:nil forKey:@"scheme"]; + [self setHudValue:nil forKey:@"host"]; + [self setHudValue:nil forKey:@"path"]; + [self setHudValue:nil forKey:@"ip"]; + [self setHudValue:nil forKey:@"tcp-info"]; + [self setHudValue:nil forKey:@"http"]; + [self setHudValue:nil forKey:@"tcp-spd"]; + [self setHudValue:nil forKey:@"t-prepared"]; + [self setHudValue:nil forKey:@"t-render"]; + [self setHudValue:nil forKey:@"t-preroll"]; + [self setHudValue:nil forKey:@"t-http-open"]; + [self setHudValue:nil forKey:@"t-http-seek"]; + self.shouldShowHudView = options.showHudView; + } ijkmp_ios_set_glview(_mediaPlayer, _glView); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h index 0f27f267e2..283df09530 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h @@ -47,4 +47,9 @@ struct IJKOverlay { - (void) display_pixels: (IJKOverlay *) overlay; @end +@protocol IJKCVPBViewProtocol +@required +- (void) display_pixelbuffer: (CVPixelBufferRef) pixelbuffer; +@end + #endif /* IJKSDLGLViewProtocol_h */ diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h index ff9fe98ce3..9b093d58ac 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h @@ -27,5 +27,5 @@ // ref_count is 1 after open IjkMediaPlayer *ijkmp_ios_create(int (*msg_loop)(void*)); -void ijkmp_ios_set_glview(IjkMediaPlayer *mp, IJKSDLGLView *glView); +void ijkmp_ios_set_glview(IjkMediaPlayer *mp, id glView); bool ijkmp_ios_is_videotoolbox_open(IjkMediaPlayer *mp); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.m index e2084f3669..c392181796 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.m @@ -54,7 +54,7 @@ return NULL; } -void ijkmp_ios_set_glview_l(IjkMediaPlayer *mp, IJKSDLGLView *glView) +void ijkmp_ios_set_glview_l(IjkMediaPlayer *mp, id glView) { assert(mp); assert(mp->ffplayer); @@ -63,7 +63,7 @@ void ijkmp_ios_set_glview_l(IjkMediaPlayer *mp, IJKSDLGLView *glView) SDL_VoutIos_SetGLView(mp->ffplayer->vout, glView); } -void ijkmp_ios_set_glview(IjkMediaPlayer *mp, IJKSDLGLView *glView) +void ijkmp_ios_set_glview(IjkMediaPlayer *mp, id glView) { assert(mp); MPTRACE("ijkmp_ios_set_view(glView=%p)\n", (void*)glView); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m index baa8c5da77..0c4d10fd0e 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m @@ -86,6 +86,8 @@ AVCodecParameters *codecpar; VTBFormatDesc fmt_desc; VTDecompressionSessionRef vt_session; + OSType required_format_type; + pthread_mutex_t m_queue_mutex; volatile sort_queue *m_sort_queue; volatile int32_t m_queue_depth; @@ -404,7 +406,7 @@ static void VTDecoderCallback(void *decompressionOutputRefCon, #endif OSType format_type = CVPixelBufferGetPixelFormatType(imageBuffer); - if (format_type != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange) { + if (format_type != ctx->required_format_type) { ALOGI("format_type error \n"); goto failed; } @@ -554,8 +556,15 @@ static VTDecompressionSessionRef vtbsession_create(Ijk_VideoToolBox_Opaque* cont 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFDictionarySetSInt32(destinationPixelBufferAttributes, - kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange); + if (ffp->overlay_format == SDL_FCC_BGRA) { + CFDictionarySetSInt32(destinationPixelBufferAttributes, + kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_32BGRA); + context->required_format_type = kCVPixelFormatType_32BGRA; + } else { + CFDictionarySetSInt32(destinationPixelBufferAttributes, + kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange); + context->required_format_type = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange; + } CFDictionarySetSInt32(destinationPixelBufferAttributes, kCVPixelBufferWidthKey, width); CFDictionarySetSInt32(destinationPixelBufferAttributes, diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m index f7c40cdf11..1816c7fac9 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m @@ -78,7 +78,7 @@ AVCodecParameters *codecpar; VTBFormatDesc fmt_desc; - + OSType required_format_type; volatile bool refresh_request; volatile bool new_seg_flag; @@ -311,7 +311,7 @@ static void VTDecoderCallback(void *decompressionOutputRefCon, #endif OSType format_type = CVPixelBufferGetPixelFormatType(imageBuffer); - if (format_type != kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange) { + if (format_type != ctx->required_format_type) { ALOGI("format_type error \n"); goto failed; } @@ -436,8 +436,15 @@ static VTDecompressionSessionRef vtbsession_create(Ijk_VideoToolBox_Opaque* cont 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFDictionarySetSInt32(destinationPixelBufferAttributes, + if (ffp->overlay_format == SDL_FCC_BGRA) { + CFDictionarySetSInt32(destinationPixelBufferAttributes, + kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_32BGRA); + context->required_format_type = kCVPixelFormatType_32BGRA; + } else { + CFDictionarySetSInt32(destinationPixelBufferAttributes, kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange); + context->required_format_type = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange; + } CFDictionarySetSInt32(destinationPixelBufferAttributes, kCVPixelBufferWidthKey, width); CFDictionarySetSInt32(destinationPixelBufferAttributes, diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.h index 1cbd04e29a..22ccdbc706 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.h @@ -25,6 +25,7 @@ #include "ijksdl/ijksdl_vout.h" @class IJKSDLGLView; +@protocol IJKSDLGLViewProtocol; SDL_Vout *SDL_VoutIos_CreateForGLES2(); -void SDL_VoutIos_SetGLView(SDL_Vout *vout, IJKSDLGLView *view); +void SDL_VoutIos_SetGLView(SDL_Vout *vout, id view); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m index ac81e1fb1a..e06364d316 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m @@ -35,7 +35,11 @@ } SDL_VoutSurface_Opaque; struct SDL_Vout_Opaque { + id gl_viewp; IJKSDLGLView *gl_view; + BOOL response_display_pixels; + BOOL third_part; + int no_glview_warning; }; static SDL_VoutOverlay *vout_create_overlay_l(int width, int height, int frame_format, SDL_Vout *vout) @@ -63,11 +67,12 @@ static void vout_free_l(SDL_Vout *vout) SDL_Vout_Opaque *opaque = vout->opaque; if (opaque) { - if (opaque->gl_view) { + if (opaque->gl_viewp) { // TODO: post to MainThread? - [opaque->gl_view release]; - opaque->gl_view = nil; + [opaque->gl_viewp release]; + opaque->gl_viewp = nil; } + opaque->gl_view = nil; } SDL_Vout_FreeInternal(vout); @@ -76,10 +81,13 @@ static void vout_free_l(SDL_Vout *vout) static int vout_display_overlay_l(SDL_Vout *vout, SDL_VoutOverlay *overlay) { SDL_Vout_Opaque *opaque = vout->opaque; - IJKSDLGLView *gl_view = opaque->gl_view; + id gl_viewp = opaque->gl_viewp; - if (!gl_view) { - ALOGE("vout_display_overlay_l: NULL gl_view\n"); + if (!gl_viewp) { + if (opaque->no_glview_warning < 10) { + opaque->no_glview_warning ++; + ALOGE("vout_display_overlay_l: NULL gl_view\n"); + } return -1; } @@ -93,7 +101,7 @@ static int vout_display_overlay_l(SDL_Vout *vout, SDL_VoutOverlay *overlay) return -1; } - if (gl_view.isThirdGLView) { + if (opaque->third_part) { IJKOverlay ijk_overlay; ijk_overlay.w = overlay->w; @@ -109,11 +117,11 @@ static int vout_display_overlay_l(SDL_Vout *vout, SDL_VoutOverlay *overlay) ijk_overlay.pixel_buffer = SDL_VoutOverlayVideoToolBox_GetCVPixelBufferRef(overlay); } #endif - if ([gl_view respondsToSelector:@selector(display_pixels:)]) { - [gl_view display_pixels:&ijk_overlay]; + if (opaque->response_display_pixels) { + [gl_viewp display_pixels:&ijk_overlay]; } - } else { - [gl_view display:overlay]; + } else if (opaque->gl_view){ + [opaque->gl_view display:overlay]; } return 0; } @@ -135,7 +143,12 @@ static int vout_display_overlay(SDL_Vout *vout, SDL_VoutOverlay *overlay) return NULL; SDL_Vout_Opaque *opaque = vout->opaque; + opaque->gl_viewp = nil; opaque->gl_view = nil; + opaque->third_part = NO; + opaque->response_display_pixels = NO; + opaque->no_glview_warning = 0; + vout->create_overlay = vout_create_overlay; vout->free_l = vout_free_l; vout->display_overlay = vout_display_overlay; @@ -143,23 +156,31 @@ static int vout_display_overlay(SDL_Vout *vout, SDL_VoutOverlay *overlay) return vout; } -static void SDL_VoutIos_SetGLView_l(SDL_Vout *vout, IJKSDLGLView *view) +static void SDL_VoutIos_SetGLView_l(SDL_Vout *vout, id view) { SDL_Vout_Opaque *opaque = vout->opaque; - if (opaque->gl_view == view) + if (opaque->gl_viewp == view) return; - if (opaque->gl_view) { - [opaque->gl_view release]; - opaque->gl_view = nil; + if (opaque->gl_viewp) { + [opaque->gl_viewp release]; + opaque->gl_viewp = nil; + } + opaque->gl_view = nil; + opaque->no_glview_warning = 0; + if (view) { + opaque->gl_viewp = [view retain]; + opaque->third_part = view.isThirdGLView; + if ([opaque->gl_viewp respondsToSelector:@selector(display_pixels:)]) + opaque->response_display_pixels = YES; + if ([opaque->gl_viewp isKindOfClass:[IJKSDLGLView class] ]){ + opaque->gl_view = (IJKSDLGLView *)opaque->gl_viewp; + } } - - if (view) - opaque->gl_view = [view retain]; } -void SDL_VoutIos_SetGLView(SDL_Vout *vout, IJKSDLGLView *view) +void SDL_VoutIos_SetGLView(SDL_Vout *vout, id view) { SDL_LockMutex(vout->mutex); SDL_VoutIos_SetGLView_l(vout, view); From 189da391d567d1443236d0fd86153c2f420faf30 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 10 Jul 2019 12:00:08 +0800 Subject: [PATCH 014/163] add software decode format fcc_bgra --- .../ffmpeg/ijksdl_vout_overlay_ffmpeg.c | 9 +++++ .../IJKMediaPlayer/IJKFFMediaPlayer.m | 34 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c b/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c index 452f9a1c3e..c87360f9d3 100644 --- a/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c +++ b/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c @@ -201,6 +201,9 @@ static int func_fill_frame(SDL_VoutOverlay *overlay, const AVFrame *frame) case SDL_FCC_RV16: dst_format = AV_PIX_FMT_RGB565; break; + case SDL_FCC_BGRA: + dst_format = AV_PIX_FMT_BGRA; + break; default: ALOGE("SDL_VoutFFmpeg_ConvertPicture: unexpected overlay format %s(%d)", (char*)&overlay->format, overlay->format); @@ -392,6 +395,12 @@ SDL_VoutOverlay *SDL_VoutFFmpeg_CreateOverlay(int width, int height, int frame_f opaque->planes = 1; break; } + case SDL_FCC_BGRA: { + ff_format = AV_PIX_FMT_BGRA; + buf_width = IJKALIGN(width, 4); // 4 bytes per pixel + opaque->planes = 1; + break; + } default: ALOGE("SDL_VoutFFmpeg_CreateOverlay(...): unknown format %.4s(0x%x)\n", (char*)&overlay_format, overlay_format); goto fail; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index e955a3ab45..81885cf29d 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -48,8 +48,11 @@ @implementation IJKFFMediaPlayer { int _videoHeight; int _videoSarNum; int _videoSarDen; + + CFDictionaryRef _optionsDictionary; } + @synthesize fps = _fps; @synthesize isThirdGLView = _isThirdGLView; @synthesize scaleFactor = _scaleFactor; @@ -101,6 +104,7 @@ - (IJKFFMediaPlayer *)init ijkmp_set_option(_nativeMediaPlayer, IJKMP_OPT_CATEGORY_PLAYER, "overlay-format", "fcc-_es2"); [[IJKAudioKit sharedInstance] setupAudioSession]; + _optionsDictionary = nil; _isThirdGLView = true; _scaleFactor = 1.0f; _fps = 1.0f; @@ -213,6 +217,9 @@ - (void) shutdown __unused id weakHolder = (__bridge_transfer IJKFFWeakHolder*)ijkmp_set_inject_opaque(_nativeMediaPlayer, NULL); __unused id weakijkHolder = (__bridge_transfer IJKFFWeakHolder*)ijkmp_set_ijkio_inject_opaque(_nativeMediaPlayer, NULL); + if (_optionsDictionary) + CFRelease(_optionsDictionary); + [_eventHandlers removeAllObjects]; ijkmp_dec_ref_p(&_nativeMediaPlayer); } @@ -254,12 +261,39 @@ - (void) display_pixels:(IJKOverlay *)overlay { if (overlay->pixel_buffer != nil && _cvPBView != nil) { [_cvPBView display_pixelbuffer:overlay->pixel_buffer]; + } else if (_cvPBView != nil && overlay->format == SDL_FCC_BGRA){ + CVPixelBufferRef pixelBuffer; + int retval = CVPixelBufferCreateWithBytes( + kCFAllocatorDefault, + (size_t) overlay->w, + (size_t) overlay->h, + kCVPixelFormatType_32BGRA, + overlay->pixels[0], + overlay->pitches[0], + NULL, NULL, _optionsDictionary, + &pixelBuffer); + if (retval == kCVReturnSuccess) { + [_cvPBView display_pixelbuffer:pixelBuffer]; + CVPixelBufferRelease(pixelBuffer); + } } } - (void) setupCVPixelBufferView:(id) cvPBView { _cvPBView = cvPBView; + + const void *keys[] = { + kCVPixelBufferOpenGLESCompatibilityKey, + kCVPixelBufferIOSurfacePropertiesKey, + }; + const void *values[] = { + (__bridge const void *) (@YES), + (__bridge const void *) ([NSDictionary dictionary]), + }; + + _optionsDictionary = CFDictionaryCreate(kCFAllocatorDefault, keys, values, 2, + &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); ijkmp_ios_set_glview(_nativeMediaPlayer, self); } From 313ea5e0c34e18f9ab08e94fc7a8c4ecc7a79e29 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 10 Jul 2019 16:20:54 +0800 Subject: [PATCH 015/163] update ff_avpacket_i_or_idr, fix #873 --- .../ijkmedia/ijkplayer/ios/pipeline/h264_sps_parser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/h264_sps_parser.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/h264_sps_parser.h index f0f731cdec..d451fa1398 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/h264_sps_parser.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/h264_sps_parser.h @@ -322,7 +322,7 @@ static bool ff_avpacket_is_key(const AVPacket* pkt) { static bool ff_avpacket_i_or_idr(const AVPacket* pkt,bool isIdr) { if (isIdr == true) { - return ff_avpacket_is_idr(pkt); + return ff_avpacket_is_idr(pkt) || ff_avpacket_is_key(pkt); } else { return ff_avpacket_is_key(pkt); } From 54ff3bb9936c8694bc06f490398413f2511306ca Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 11 Jul 2019 00:07:08 +0800 Subject: [PATCH 016/163] update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d395ea1a4b..e319334895 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ run `./gradlew :fijkplayer-full:assembleRelease` ### Build iOS ``` -git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-ios +git clone https://github.com/befovy/ijkplayer.git ijkplayer-ios cd ijkplayer-ios git checkout -B latest k0.8.8 @@ -249,7 +249,7 @@ cd ios ### Support (支持) ### - Please do not send e-mail to me. Public technical discussion on github is preferred. -- 请尽量在 github 上公开讨论[技术问题](https://github.com/bilibili/ijkplayer/issues),不要以邮件方式私下询问,恕不一一回复。 +- 请尽量在 github 上公开讨论[技术问题](https://github.com/befovy/ijkplayer/issues),不要以邮件方式私下询问,恕不一一回复。 ### License From 644b121cc215a06ab6e6d8ff230d2a78eff587f2 Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 11 Jul 2019 00:12:29 +0800 Subject: [PATCH 017/163] update release 0.2.0, add news --- NEWS.md | 6 ++++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index e723d62ef3..9fe5c37629 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,12 @@ tag next -------------------------------- +tag b0.2.0 +-------------------------------- +- ios: add support for flutter texture +- ios: fix some vtb errors #873 +- ijkplayer: new release bintary and CocoaPods + tag k0.8.8 -------------------------------- - ffmpeg: upgrade to 3.4 diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index d261116b72..befd7f8d10 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.1.2 -VERSION_CODE=000102 +VERSION_NAME=0.2.0 +VERSION_CODE=000200 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index a158e3f8b1..8daf8f5bbb 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.1.1" + spec.version = "0.2.0" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/b0.1.1-alpha/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/b0.2.0/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files From 72ad8f87a4e744c540cb035d27fd1149ca990eda Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 14 Jul 2019 12:57:34 +0800 Subject: [PATCH 018/163] rm xcode code sign --- .../IJKMediaDemo.xcodeproj/project.pbxproj | 99 ++++++++++++++++--- .../IJKMediaDemo/IJKMediaDemo-Info.plist | 4 +- .../IJKMediaPlayer.xcodeproj/project.pbxproj | 30 ++++-- 3 files changed, 111 insertions(+), 22 deletions(-) diff --git a/ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj b/ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj index ad6c84104c..08c24eb8a0 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj +++ b/ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj @@ -7,6 +7,9 @@ objects = { /* Begin PBXBuildFile section */ + 21B5D5B322D8A6CC00A1D26D /* IJKMediaFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E654EAD71B6B28B100B0F2D0 /* IJKMediaFramework.framework */; }; + 21B5D5B822D8A6EA00A1D26D /* IJKMediaFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E654EAD71B6B28B100B0F2D0 /* IJKMediaFramework.framework */; }; + 21B5D5B922D8A6EA00A1D26D /* IJKMediaFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E654EAD71B6B28B100B0F2D0 /* IJKMediaFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 45D57D611A53233200BDD389 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45D57D601A53233200BDD389 /* CoreVideo.framework */; }; 45D57D631A53233800BDD389 /* VideoToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45D57D621A53233800BDD389 /* VideoToolbox.framework */; }; 546736C41E2371AE00FEE0DF /* libstdc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 546736C31E2371AE00FEE0DF /* libstdc++.tbd */; }; @@ -28,7 +31,6 @@ E63FC2B417F172EA003551EB /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E63FC2B317F172E9003551EB /* OpenGLES.framework */; }; E64D4F4E1938CCCC00F1C75D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E64D4F4D1938CCCC00F1C75D /* CoreGraphics.framework */; }; E64D4F4F1938CD2100F1C75D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E63FC2B717F17362003551EB /* QuartzCore.framework */; }; - E654EAF01B6B2A7900B0F2D0 /* IJKMediaFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E654EAD71B6B28B100B0F2D0 /* IJKMediaFramework.framework */; }; E66F8DCB17EEDD8B00354D80 /* IJKMediaControl.m in Sources */ = {isa = PBXBuildFile; fileRef = E66F8DCA17EEDD8B00354D80 /* IJKMediaControl.m */; }; E67323A71B69E6F800CB9036 /* AppIcons.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E67323A51B69E6F800CB9036 /* AppIcons.xcassets */; }; E67323A81B69E6F800CB9036 /* LaunchImages.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E67323A61B69E6F800CB9036 /* LaunchImages.xcassets */; }; @@ -50,29 +52,64 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - E654EAD61B6B28B100B0F2D0 /* PBXContainerItemProxy */ = { + 21B5D5AF22D8A5E500A1D26D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E6D74F2918A5F94B00165BFD /* IJKMediaPlayer.xcodeproj */; proxyType = 2; - remoteGlobalIDString = E654EA8A1B6B27E600B0F2D0; - remoteInfo = IJKMediaFramework; + remoteGlobalIDString = 5450B0431E63EA4300568494; + remoteInfo = IJKMediaFrameworkWithSSL; }; - E654EAD81B6B28B100B0F2D0 /* PBXContainerItemProxy */ = { + 21B5D5B122D8A5E500A1D26D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E6D74F2918A5F94B00165BFD /* IJKMediaPlayer.xcodeproj */; proxyType = 2; - remoteGlobalIDString = E654EA941B6B27E600B0F2D0; - remoteInfo = IJKMediaFrameworkTests; + remoteGlobalIDString = 21E6F50322C39D0500611D3D; + remoteInfo = FIJKPlayer; + }; + 21B5D5B522D8A6CC00A1D26D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E6D74F2918A5F94B00165BFD /* IJKMediaPlayer.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = E654EA891B6B27E600B0F2D0; + remoteInfo = IJKMediaFramework; }; - E654EAEE1B6B2A1500B0F2D0 /* PBXContainerItemProxy */ = { + 21B5D5BA22D8A6EA00A1D26D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = E6D74F2918A5F94B00165BFD /* IJKMediaPlayer.xcodeproj */; proxyType = 1; remoteGlobalIDString = E654EA891B6B27E600B0F2D0; remoteInfo = IJKMediaFramework; }; + E654EAD61B6B28B100B0F2D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E6D74F2918A5F94B00165BFD /* IJKMediaPlayer.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E654EA8A1B6B27E600B0F2D0; + remoteInfo = IJKMediaFramework; + }; + E654EAD81B6B28B100B0F2D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E6D74F2918A5F94B00165BFD /* IJKMediaPlayer.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = E654EA941B6B27E600B0F2D0; + remoteInfo = IJKMediaFrameworkTests; + }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 21B5D5BC22D8A6EA00A1D26D /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 21B5D5B922D8A6EA00A1D26D /* IJKMediaFramework.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 45D57D601A53233200BDD389 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; 45D57D621A53233800BDD389 /* VideoToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoToolbox.framework; path = System/Library/Frameworks/VideoToolbox.framework; sourceTree = SDKROOT; }; @@ -137,12 +174,13 @@ 546736C41E2371AE00FEE0DF /* libstdc++.tbd in Frameworks */, E63FC29117F04C83003551EB /* AudioToolbox.framework in Frameworks */, E61B45AE19EF7021002792EC /* AVFoundation.framework in Frameworks */, + 21B5D5B822D8A6EA00A1D26D /* IJKMediaFramework.framework in Frameworks */, + 21B5D5B322D8A6CC00A1D26D /* IJKMediaFramework.framework in Frameworks */, E64D4F4E1938CCCC00F1C75D /* CoreGraphics.framework in Frameworks */, E60E8C2A19EF70BB005B5B6E /* CoreMedia.framework in Frameworks */, 45D57D611A53233200BDD389 /* CoreVideo.framework in Frameworks */, E6F1D4C01D38F29D00E8665B /* libbz2.tbd in Frameworks */, E6F1D4BE1D38F29800E8665B /* libz.tbd in Frameworks */, - E654EAF01B6B2A7900B0F2D0 /* IJKMediaFramework.framework in Frameworks */, E612EAE517F7E0F800BEE660 /* MediaPlayer.framework in Frameworks */, E67323B11B69ECF500CB9036 /* MobileCoreServices.framework in Frameworks */, E63FC2B417F172EA003551EB /* OpenGLES.framework in Frameworks */, @@ -274,7 +312,9 @@ isa = PBXGroup; children = ( E654EAD71B6B28B100B0F2D0 /* IJKMediaFramework.framework */, + 21B5D5B022D8A5E500A1D26D /* IJKMediaFrameworkWithSSL.framework */, E654EAD91B6B28B100B0F2D0 /* IJKMediaFrameworkTests.xctest */, + 21B5D5B222D8A5E500A1D26D /* FIJKPlayer.framework */, ); name = Products; sourceTree = ""; @@ -289,11 +329,13 @@ E6903EF817EAF70200CFD954 /* Sources */, E6903EF917EAF70200CFD954 /* Frameworks */, E6903EFA17EAF70200CFD954 /* Resources */, + 21B5D5BC22D8A6EA00A1D26D /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( - E654EAEF1B6B2A1500B0F2D0 /* PBXTargetDependency */, + 21B5D5B622D8A6CC00A1D26D /* PBXTargetDependency */, + 21B5D5BB22D8A6EA00A1D26D /* PBXTargetDependency */, ); name = IJKMediaDemo; productName = IJKMediaDemo; @@ -309,12 +351,18 @@ CLASSPREFIX = IJK; LastUpgradeCheck = 0700; ORGANIZATIONNAME = bilibili; + TargetAttributes = { + E6903EFB17EAF70200CFD954 = { + DevelopmentTeam = 7SUQ9UM9P2; + }; + }; }; buildConfigurationList = E6903EF717EAF70200CFD954 /* Build configuration list for PBXProject "IJKMediaDemo" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = E6903EF317EAF70200CFD954; @@ -334,6 +382,20 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ + 21B5D5B022D8A5E500A1D26D /* IJKMediaFrameworkWithSSL.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = IJKMediaFrameworkWithSSL.framework; + remoteRef = 21B5D5AF22D8A5E500A1D26D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 21B5D5B222D8A5E500A1D26D /* FIJKPlayer.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = FIJKPlayer.framework; + remoteRef = 21B5D5B122D8A5E500A1D26D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; E654EAD71B6B28B100B0F2D0 /* IJKMediaFramework.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; @@ -396,10 +458,15 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - E654EAEF1B6B2A1500B0F2D0 /* PBXTargetDependency */ = { + 21B5D5B622D8A6CC00A1D26D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = IJKMediaFramework; + targetProxy = 21B5D5B522D8A6CC00A1D26D /* PBXContainerItemProxy */; + }; + 21B5D5BB22D8A6EA00A1D26D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = IJKMediaFramework; - targetProxy = E654EAEE1B6B2A1500B0F2D0 /* PBXContainerItemProxy */; + targetProxy = 21B5D5BA22D8A6EA00A1D26D /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -481,12 +548,14 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = 7SUQ9UM9P2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "IJKMediaDemo/IJKMediaDemo-Prefix.pch"; INFOPLIST_FILE = "IJKMediaDemo/IJKMediaDemo-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_BUNDLE_IDENTIFIER = tv.danmaku.IJKMediaDemo.demo; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; TARGETED_DEVICE_FAMILY = 1; @@ -501,12 +570,14 @@ ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEVELOPMENT_TEAM = 7SUQ9UM9P2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "IJKMediaDemo/IJKMediaDemo-Prefix.pch"; INFOPLIST_FILE = "IJKMediaDemo/IJKMediaDemo-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_BUNDLE_IDENTIFIER = tv.danmaku.IJKMediaDemo.demo; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; TARGETED_DEVICE_FAMILY = 1; diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index dcc8282088..adc636b403 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.4.2 + 0.2.0 CFBundleSignature ???? CFBundleVersion - 402 + 000200 LSRequiresIPhoneOS UIFileSharingEnabled diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index e34c78f0a0..c1ea583db3 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -1347,14 +1347,16 @@ ORGANIZATIONNAME = bilibili; TargetAttributes = { 21E6F47922C39D0500611D3D = { - DevelopmentTeam = H6E8P88Q4E; + ProvisioningStyle = Manual; }; E654EA891B6B27E600B0F2D0 = { CreatedOnToolsVersion = 6.4; - DevelopmentTeam = H6E8P88Q4E; + ProvisioningStyle = Manual; }; E654EA931B6B27E600B0F2D0 = { CreatedOnToolsVersion = 6.4; + DevelopmentTeam = 7SUQ9UM9P2; + ProvisioningStyle = Automatic; }; }; }; @@ -1764,10 +1766,11 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 0.8.8; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = H6E8P88Q4E; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1804,6 +1807,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.befovy.ios.fijkplayer; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1822,9 +1826,10 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 0.8.8; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = H6E8P88Q4E; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1858,6 +1863,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.befovy.ios.fijkplayer; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; @@ -1982,10 +1988,11 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 0.8.8; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = H6E8P88Q4E; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2022,6 +2029,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2040,9 +2048,10 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 0.8.8; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = H6E8P88Q4E; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2076,6 +2085,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; @@ -2091,8 +2101,11 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 7SUQ9UM9P2; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", @@ -2114,6 +2127,7 @@ MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Debug; }; @@ -2124,8 +2138,11 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = 7SUQ9UM9P2; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -2144,6 +2161,7 @@ MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Release; }; From 82c4190795acfe58d35ed84f1159af344b8c1dbe Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 14 Jul 2019 16:45:48 +0800 Subject: [PATCH 019/163] iOS: fix podspec error, change FIJKPlayer build type to static lib --- ios/CocoaPodsPub/FIJKPlayer.podspec | 2 +- .../IJKMediaPlayer.xcodeproj/project.pbxproj | 7 +++---- ios/IJKMediaPlayer/universal-framework.sh | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 8daf8f5bbb..c5387b022f 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -87,7 +87,7 @@ Pod::Spec.new do |spec| # spec.source_files = "Classes", "Classes/**/*.{h,m}" # spec.exclude_files = "Classes/Exclude" spec.vendored_frameworks = 'FIJKPlayer.framework' - spec.resource = 'FIJKPlayer.framework' + # spec.resource = 'FIJKPlayer.framework' # spec.public_header_files = "Classes/**/*.h" diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index c1ea583db3..19aca0cff0 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -13,7 +13,6 @@ 215FF44E22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 215FF44F22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 217D1C5422C457720046FB63 /* universal-framework.sh in Resources */ = {isa = PBXBuildFile; fileRef = 217D1C5322C457720046FB63 /* universal-framework.sh */; }; 21DAA1592298FEBB007B0784 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8B1E63E59300568494 /* libcrypto.a */; }; 21DAA15A2298FEBE007B0784 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8C1E63E59300568494 /* libssl.a */; }; 21DAA15B2298FEC7007B0784 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8F1E63E59800568494 /* libz.tbd */; }; @@ -1387,7 +1386,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 217D1C5422C457720046FB63 /* universal-framework.sh in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1799,7 +1797,7 @@ "$(inherited)", "\"$(SRCROOT)/../build/universal/lib\"", ); - MACH_O_TYPE = mh_dylib; + MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = YES; "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( "-read_only_relocs", @@ -1825,6 +1823,7 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 0.8.8; @@ -1855,7 +1854,7 @@ "$(inherited)", "\"$(SRCROOT)/../build/universal/lib\"", ); - MACH_O_TYPE = mh_dylib; + MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = NO; "OTHER_LDFLAGS[sdk=iphonesimulator*]" = ( "-read_only_relocs", diff --git a/ios/IJKMediaPlayer/universal-framework.sh b/ios/IJKMediaPlayer/universal-framework.sh index 41e526d36d..cd6c01faa6 100755 --- a/ios/IJKMediaPlayer/universal-framework.sh +++ b/ios/IJKMediaPlayer/universal-framework.sh @@ -9,7 +9,7 @@ mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" # Step 1. Build Device and Simulator versions xcodebuild -target "${TARGET_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos -arch armv7 -arch armv7s -arch arm64 -project ${PROJECT_DIR}/${PROJECT_NAME}.xcodeproj BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build -xcodebuild -target "${TARGET_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator -project ${PROJECT_DIR}/${PROJECT_NAME}.xcodeproj ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build +xcodebuild -target "${TARGET_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphonesimulator -project ${PROJECT_DIR}/${PROJECT_NAME}.xcodeproj BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build # Step 2. Copy the framework structure (from iphoneos build) to the universal folder From 9e91160beb2b4e95c7ebe5813ee5d7c6d8d7a2bd Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 15 Jul 2019 12:38:12 +0800 Subject: [PATCH 020/163] update xcode build and cocoapods settings --- ios/.gitignore | 4 ++++ ios/CocoaPodsPub/.gitignore | 3 --- ios/CocoaPodsPub/FIJKPlayer.podspec | 7 ++++++- .../IJKMediaPlayer.xcodeproj/project.pbxproj | 6 ++++-- ios/IJKMediaPlayer/universal-framework.sh | 16 +++++++++++++--- 5 files changed, 27 insertions(+), 9 deletions(-) delete mode 100644 ios/CocoaPodsPub/.gitignore diff --git a/ios/.gitignore b/ios/.gitignore index ae7ec2667c..bcd2f11b48 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -1,3 +1,7 @@ xcuserdata # xcshareddata *.xccheckout +CocoaPodsPub/FIJKPlayer.framework +CocoaPodsPub/FIJKPlayer.tar.gz +CocoaPodsPub/FIJKPlayer.tar.xz +CocoaPodsPub/LICENSE diff --git a/ios/CocoaPodsPub/.gitignore b/ios/CocoaPodsPub/.gitignore deleted file mode 100644 index 8ba4683d46..0000000000 --- a/ios/CocoaPodsPub/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.framework -*.gz -LICENSE diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index c5387b022f..6b23991895 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -114,6 +114,12 @@ Pod::Spec.new do |spec| spec.frameworks = "AudioToolbox", "AVFoundation", "CoreGraphics", "CoreMedia", "CoreVideo", "MobileCoreServices", "OpenGLES", "QuartzCore", "VideoToolbox", "Foundation", "UIKit", "MediaPlayer" spec.libraries = "bz2", "z", "stdc++" + spec.requires_arc = true + + spec.prepare_command = <<-CMD + tar -xvf ./FIJKPlayer.tar.xz + CMD + # spec.library = "iconv" # spec.libraries = "iconv", "xml2" @@ -124,7 +130,6 @@ Pod::Spec.new do |spec| # where they will only apply to your library. If you depend on other Podspecs # you can include multiple dependencies to ensure it works. - # spec.requires_arc = true # spec.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } # spec.dependency "JSONKit", "~> 1.4" diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 19aca0cff0..10286abc0d 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -1808,8 +1808,9 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; + STRIP_INSTALLED_PRODUCT = NO; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; + VALID_ARCHS = "arm64 x86_64 i386 armv7s armv7"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1864,8 +1865,9 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; + STRIP_INSTALLED_PRODUCT = NO; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; + VALID_ARCHS = "arm64 x86_64 i386 armv7s armv7"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; diff --git a/ios/IJKMediaPlayer/universal-framework.sh b/ios/IJKMediaPlayer/universal-framework.sh index cd6c01faa6..ea999014c7 100755 --- a/ios/IJKMediaPlayer/universal-framework.sh +++ b/ios/IJKMediaPlayer/universal-framework.sh @@ -25,13 +25,23 @@ fi lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework/${TARGET_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${TARGET_NAME}.framework/${TARGET_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${TARGET_NAME}.framework/${TARGET_NAME}" # Step 5. Convenience step to copy the framework to the project's directory -cp -R "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework" "${PROJECT_DIR}/../CocoaPodsPub" +cp -R "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework" "${PROJECT_DIR}/../" + +rm "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.tar.xz" || true +rm "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.tar.gz" || true +rm "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.framework" || true + -rm "${PROJECT_DIR}/../CocoaPodsPub/FIJKPlayer.tar.gz" || true cp -v "${PROJECT_DIR}/../../COPYING.LGPLv3" "${PROJECT_DIR}/../CocoaPodsPub/LICENSE" -cd "${PROJECT_DIR}/../CocoaPodsPub" +cd "${PROJECT_DIR}/.." + +tar vcfJ "CocoaPodsPub/${TARGET_NAME}.tar.xz" "${TARGET_NAME}.framework" + +cd CocoaPodsPub + tar -zcvf "${PROJECT_DIR}/../${TARGET_NAME}.tar.gz" ./ mv "${PROJECT_DIR}/../${TARGET_NAME}.tar.gz" "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.tar.gz" +mv "${PROJECT_DIR}/../${TARGET_NAME}.framework" "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.framework" # Step 6. Convenience step to open the project's directory in Finder From f8dfbf3a788ff86f7837001ce88af2846edf9657 Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 15 Jul 2019 12:45:39 +0800 Subject: [PATCH 021/163] update version code --- NEWS.md | 6 ++++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 9fe5c37629..3158765087 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,12 @@ tag next -------------------------------- +tag f0.3.0 +-------------------------------- +- change prefix for fijkplayer release tag names `f` +- ios: build static lib FIJKPlayer.framework +- ios: fix FIJKPlayer.podspec error + tag b0.2.0 -------------------------------- - ios: add support for flutter texture diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index befd7f8d10..6334f6c6e7 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.2.0 -VERSION_CODE=000200 +VERSION_NAME=0.3.0 +VERSION_CODE=000300 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 6b23991895..0ee9f89b2a 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.2.0" + spec.version = "0.3.0" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/b0.2.0/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.0/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index adc636b403..0c384a88b8 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.2.0 + 0.3.0 CFBundleSignature ???? CFBundleVersion - 000200 + 000300 LSRequiresIPhoneOS UIFileSharingEnabled From c873efcecd7bd9a68caab2d317497b46646d887d Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 15 Jul 2019 12:59:54 +0800 Subject: [PATCH 022/163] update shell of build universal framework --- ios/IJKMediaPlayer/universal-framework.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ios/IJKMediaPlayer/universal-framework.sh b/ios/IJKMediaPlayer/universal-framework.sh index ea999014c7..94c838a3f4 100755 --- a/ios/IJKMediaPlayer/universal-framework.sh +++ b/ios/IJKMediaPlayer/universal-framework.sh @@ -27,9 +27,9 @@ lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework/${TARGE # Step 5. Convenience step to copy the framework to the project's directory cp -R "${UNIVERSAL_OUTPUTFOLDER}/${TARGET_NAME}.framework" "${PROJECT_DIR}/../" -rm "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.tar.xz" || true -rm "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.tar.gz" || true -rm "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.framework" || true +rm -v "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.tar.xz" +rm -v "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.tar.gz" +rm -v -rf "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.framework" cp -v "${PROJECT_DIR}/../../COPYING.LGPLv3" "${PROJECT_DIR}/../CocoaPodsPub/LICENSE" @@ -39,6 +39,7 @@ tar vcfJ "CocoaPodsPub/${TARGET_NAME}.tar.xz" "${TARGET_NAME}.framework" cd CocoaPodsPub +tree ./ tar -zcvf "${PROJECT_DIR}/../${TARGET_NAME}.tar.gz" ./ mv "${PROJECT_DIR}/../${TARGET_NAME}.tar.gz" "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.tar.gz" mv "${PROJECT_DIR}/../${TARGET_NAME}.framework" "${PROJECT_DIR}/../CocoaPodsPub/${TARGET_NAME}.framework" From 884a415306b198c3a47191df3a090df000bd970d Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 17 Jul 2019 09:35:10 +0800 Subject: [PATCH 023/163] change state to started when prepared and start-on-prepared is true. --- ijkmedia/ijkplayer/ijkplayer.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index 82efae8817..c290f0faa3 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -450,14 +450,19 @@ static int ikjmp_chkst_start_l(int mp_state) static int ijkmp_start_l(IjkMediaPlayer *mp) { assert(mp); - - MP_RET_IF_FAILED(ikjmp_chkst_start_l(mp->mp_state)); - - ffp_remove_msg(mp->ffplayer, FFP_REQ_START); - ffp_remove_msg(mp->ffplayer, FFP_REQ_PAUSE); - ffp_notify_msg1(mp->ffplayer, FFP_REQ_START); - - return 0; + int retval = 0; + if (mp->mp_state == MP_STATE_ASYNC_PREPARING) { + mp->ffplayer->start_on_prepared = 1; + retval = 0; + } else { + retval = ikjmp_chkst_start_l(mp->mp_state); + if (retval == 0) { + ffp_remove_msg(mp->ffplayer, FFP_REQ_START); + ffp_remove_msg(mp->ffplayer, FFP_REQ_PAUSE); + ffp_notify_msg1(mp->ffplayer, FFP_REQ_START); + } + } + return retval; } int ijkmp_start(IjkMediaPlayer *mp) @@ -708,6 +713,8 @@ int ijkmp_get_msg(IjkMediaPlayer *mp, AVMessage *msg, int block) } if (!mp->ffplayer->start_on_prepared) { ijkmp_change_state_l(mp, MP_STATE_PAUSED); + } else { + ijkmp_change_state_l(mp, MP_STATE_STARTED); } pthread_mutex_unlock(&mp->mutex); break; From d11c1693deb6413cfab1e45f5df9d0b3f3669e17 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 17 Jul 2019 09:35:42 +0800 Subject: [PATCH 024/163] iOS: add int return type for mp API --- .../IJKMediaPlayer/IJKFFMediaPlayer.h | 12 ++++----- .../IJKMediaPlayer/IJKFFMediaPlayer.m | 25 +++++++++---------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index 097d3baca0..180d836be2 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -61,12 +61,12 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { - (IJKFFMediaPlayer *)init; -- (void) setDataSource:(NSString *)url; -- (void) prepareAsync; -- (void) start; -- (void) stop; -- (void) pause; -- (void) reset; +- (int) setDataSource:(NSString *)url; +- (int) prepareAsync; +- (int) start; +- (int) stop; +- (int) pause; +- (int) reset; - (BOOL) isPlaying; - (void) shutdown; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 81885cf29d..56a13244fa 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -161,34 +161,32 @@ - (void) setSurface } -- (void) prepareAsync +- (int) prepareAsync { - ijkmp_prepare_async(_nativeMediaPlayer); + return ijkmp_prepare_async(_nativeMediaPlayer); } -- (void) setDataSource:(NSString *)url +- (int) setDataSource:(NSString *)url { _dataSource = url; - ijkmp_set_data_source(_nativeMediaPlayer, [url UTF8String]); + return ijkmp_set_data_source(_nativeMediaPlayer, [url UTF8String]); } - -- (void) start +- (int) start { - ijkmp_start(_nativeMediaPlayer); + return ijkmp_start(_nativeMediaPlayer); } -- (void) stop +- (int) stop { - ijkmp_stop(_nativeMediaPlayer); + return ijkmp_stop(_nativeMediaPlayer); } -- (void) pause +- (int) pause { - ijkmp_pause(_nativeMediaPlayer); + return ijkmp_pause(_nativeMediaPlayer); } - - (BOOL) isPlaying { return ijkmp_is_playing(_nativeMediaPlayer); @@ -224,10 +222,11 @@ - (void) shutdown ijkmp_dec_ref_p(&_nativeMediaPlayer); } -- (void) reset +- (int) reset { [self shutdown]; [self nativeSetup]; + return 0; } From 80cf01b8f97fc4051f008193b6d57c4b658d4641 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 19 Jul 2019 12:42:40 +0800 Subject: [PATCH 025/163] iOS: add position API for IJKFFMediaPlayer --- ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h | 9 +++++++-- ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index 180d836be2..2dd19c5a05 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -70,13 +70,18 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { - (BOOL) isPlaying; - (void) shutdown; +- (long) getCurrentPosition; +- (long) getDuration; +- (int) seekTo:(long) msec; + + - (void) setupCVPixelBufferView:(id) view; -- (void)setOptionValue:(NSString *)value +- (void) setOptionValue:(NSString *)value forKey:(NSString *)key ofCategory:(IJKFFOptionCategory)category; -- (void)setOptionIntValue:(int64_t)value +- (void) setOptionIntValue:(int64_t)value forKey:(NSString *)key ofCategory:(IJKFFOptionCategory)category; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 56a13244fa..6516cf776a 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -202,9 +202,9 @@ - (long) getDuration return ijkmp_get_duration(_nativeMediaPlayer); } -- (void) seekTo:(long) msec +- (int) seekTo:(long) msec { - ijkmp_seek_to(_nativeMediaPlayer, msec); + return ijkmp_seek_to(_nativeMediaPlayer, msec); } - (void) shutdown From eba747d74a77338703be545ceb76c191db9d0b3f Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 19 Jul 2019 12:45:33 +0800 Subject: [PATCH 026/163] android: change msg id same as native, transfer to MediaPlayer in Java --- .../ijk/media/player/IMediaPlayer.java | 5 +- .../ijk/media/player/IjkMediaPlayer.java | 128 ++++++++++++------ ijkmedia/ijkplayer/android/ijkplayer_jni.c | 52 ++++--- 3 files changed, 115 insertions(+), 70 deletions(-) diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IMediaPlayer.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IMediaPlayer.java index da668efe3d..8978b20905 100644 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IMediaPlayer.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IMediaPlayer.java @@ -32,9 +32,10 @@ import tv.danmaku.ijk.media.player.misc.ITrackInfo; public interface IMediaPlayer { - /* + /** * Do not change these values without updating their counterparts in native - */ + * These constant values equal to valued defined in {@link android.media.MediaPlayer} + **/ int MEDIA_INFO_UNKNOWN = 1; int MEDIA_INFO_STARTED_AS_NEXT = 2; int MEDIA_INFO_VIDEO_RENDERING_START = 3; diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java index c6f5a156ce..fc1b97d553 100755 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java @@ -70,18 +70,6 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer { private final static String TAG = IjkMediaPlayer.class.getName(); - private static final int MEDIA_NOP = 0; // interface test message - private static final int MEDIA_PREPARED = 1; - private static final int MEDIA_PLAYBACK_COMPLETE = 2; - private static final int MEDIA_BUFFERING_UPDATE = 3; - private static final int MEDIA_SEEK_COMPLETE = 4; - private static final int MEDIA_SET_VIDEO_SIZE = 5; - private static final int MEDIA_TIMED_TEXT = 99; - private static final int MEDIA_ERROR = 100; - private static final int MEDIA_INFO = 200; - - protected static final int MEDIA_SET_VIDEO_SAR = 10001; - //---------------------------------------- // options public static final int IJK_LOG_UNKNOWN = 0; @@ -105,6 +93,33 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer { public static final int SDL_FCC_RV32 = 0x32335652; // RGBX8888 //---------------------------------------- + + // IjkMediaPlayer Post Message + public static final int IJK_MSG_NOP = 0; + public static final int IJK_MSG_ERROR = 100; + public static final int IJK_MSG_PREPARED = 200; + public static final int IJK_MSG_COMPLETED = 300; + public static final int IJK_MSG_VIDEO_SIZE_CHANGED = 400; + public static final int IJK_MSG_SAR_CHANGED = 401; + public static final int IJK_MSG_VIDEO_RENDERING_START = 402; + public static final int IJK_MSG_AUDIO_RENDERING_START = 403; + public static final int IJK_MSG_VIDEO_ROTATION_CHANGED = 404; + public static final int IJK_MSG_AUDIO_DECODED_START = 405; + public static final int IJK_MSG_VIDEO_DECODED_START = 406; + public static final int IJK_MSG_OPEN_INPUT = 407; + public static final int IJK_MSG_FIND_STREAM_INFO = 408; + public static final int IJK_MSG_COMPONENT_OPEN = 409; + public static final int IJK_MSG_VIDEO_SEEK_RENDERING_START = 410; + public static final int IJK_MSG_AUDIO_SEEK_RENDERING_START = 411; + + public static final int IJK_MSG_BUFFERING_START = 500; + public static final int IJK_MSG_BUFFERING_END = 501; + public static final int IJK_MSG_BUFFERING_UPDATE = 502; + public static final int IJK_MSG_SEEK_COMPLETE = 600; + public static final int IJK_MSG_TIMED_TEXT = 800; + public static final int IJK_MSG_ACCURATE_SEEK_COMPLETE = 900; + + //---------------------------------------- // properties public static final int PROP_FLOAT_VIDEO_DECODE_FRAMES_PER_SECOND = 10001; @@ -1001,16 +1016,15 @@ public void handleMessage(Message msg) { } switch (msg.what) { - case MEDIA_PREPARED: + case IJK_MSG_PREPARED: player.notifyOnPrepared(); break; - - case MEDIA_PLAYBACK_COMPLETE: + case IJK_MSG_COMPLETED: player.stayAwake(false); player.notifyOnCompletion(); break; - case MEDIA_BUFFERING_UPDATE: + case IJK_MSG_BUFFERING_UPDATE: long bufferPosition = msg.arg1; if (bufferPosition < 0) { bufferPosition = 0; @@ -1029,18 +1043,25 @@ public void handleMessage(Message msg) { player.notifyOnBufferingUpdate((int)percent); break; - case MEDIA_SEEK_COMPLETE: + case IJK_MSG_SEEK_COMPLETE: player.notifyOnSeekComplete(); break; - case MEDIA_SET_VIDEO_SIZE: + case IJK_MSG_VIDEO_SIZE_CHANGED: player.mVideoWidth = msg.arg1; player.mVideoHeight = msg.arg2; player.notifyOnVideoSizeChanged(player.mVideoWidth, player.mVideoHeight, player.mVideoSarNum, player.mVideoSarDen); break; - case MEDIA_ERROR: + case IJK_MSG_SAR_CHANGED: + player.mVideoSarNum = msg.arg1; + player.mVideoSarDen = msg.arg2; + player.notifyOnVideoSizeChanged(player.mVideoWidth, player.mVideoHeight, + player.mVideoSarNum, player.mVideoSarDen); + break; + + case IJK_MSG_ERROR: DebugLog.e(TAG, "Error (" + msg.arg1 + "," + msg.arg2 + ")"); if (!player.notifyOnError(msg.arg1, msg.arg2)) { player.notifyOnCompletion(); @@ -1048,16 +1069,47 @@ public void handleMessage(Message msg) { player.stayAwake(false); break; - case MEDIA_INFO: - switch (msg.arg1) { - case MEDIA_INFO_VIDEO_RENDERING_START: - DebugLog.i(TAG, "Info: MEDIA_INFO_VIDEO_RENDERING_START\n"); - break; - } - player.notifyOnInfo(msg.arg1, msg.arg2); - // No real default action so far. + case IJK_MSG_VIDEO_RENDERING_START: + player.notifyOnInfo(MEDIA_INFO_VIDEO_RENDERING_START, 0); + DebugLog.i(TAG, "Info: MEDIA_INFO_VIDEO_RENDERING_START\n"); + break; + case IJK_MSG_AUDIO_RENDERING_START: + player.notifyOnInfo(MEDIA_INFO_AUDIO_RENDERING_START, 0); + break; + case IJK_MSG_VIDEO_ROTATION_CHANGED: + player.notifyOnInfo(MEDIA_INFO_VIDEO_ROTATION_CHANGED, 0); + break; + case IJK_MSG_AUDIO_DECODED_START: + player.notifyOnInfo(MEDIA_INFO_AUDIO_DECODED_START, 0); break; - case MEDIA_TIMED_TEXT: + case IJK_MSG_VIDEO_DECODED_START: + player.notifyOnInfo(MEDIA_INFO_VIDEO_DECODED_START, 0); + break; + case IJK_MSG_OPEN_INPUT: + player.notifyOnInfo(MEDIA_INFO_OPEN_INPUT, 0); + break; + case IJK_MSG_FIND_STREAM_INFO: + player.notifyOnInfo(MEDIA_INFO_FIND_STREAM_INFO, 0); + break; + case IJK_MSG_COMPONENT_OPEN: + player.notifyOnInfo(MEDIA_INFO_COMPONENT_OPEN, 0); + break; + case IJK_MSG_BUFFERING_START: + player.notifyOnInfo(MEDIA_INFO_BUFFERING_START, msg.arg1); + break; + case IJK_MSG_BUFFERING_END: + player.notifyOnInfo(MEDIA_INFO_BUFFERING_END, msg.arg1); + break; + case IJK_MSG_VIDEO_SEEK_RENDERING_START: + player.notifyOnInfo(MEDIA_INFO_VIDEO_SEEK_RENDERING_START, msg.arg1); + break; + case IJK_MSG_AUDIO_SEEK_RENDERING_START: + player.notifyOnInfo(MEDIA_INFO_AUDIO_SEEK_RENDERING_START, msg.arg1); + break; + case IJK_MSG_ACCURATE_SEEK_COMPLETE: + player.notifyOnInfo(MEDIA_INFO_MEDIA_ACCURATE_SEEK_COMPLETE, msg.arg1); + break; + case IJK_MSG_TIMED_TEXT: if (msg.obj == null) { player.notifyOnTimedText(null); } else { @@ -1065,14 +1117,7 @@ public void handleMessage(Message msg) { player.notifyOnTimedText(text); } break; - case MEDIA_NOP: // interface test message - ignore - break; - - case MEDIA_SET_VIDEO_SAR: - player.mVideoSarNum = msg.arg1; - player.mVideoSarDen = msg.arg2; - player.notifyOnVideoSizeChanged(player.mVideoWidth, player.mVideoHeight, - player.mVideoSarNum, player.mVideoSarDen); + case IJK_MSG_NOP: // interface test message - ignore break; default: @@ -1100,11 +1145,12 @@ private static void postEventFromNative(Object weakThiz, int what, return; } - if (what == MEDIA_INFO && arg1 == MEDIA_INFO_STARTED_AS_NEXT) { - // this acquires the wakelock if needed, and sets the client side - // state - mp.start(); - } + // native ijkplayer never post this message + // if (what == MEDIA_INFO && arg1 == MEDIA_INFO_STARTED_AS_NEXT) { + // // this acquires the wakelock if needed, and sets the client side + // // state + // mp.start(); + // } if (mp.mEventHandler != null) { Message m = mp.mEventHandler.obtainMessage(what, arg1, arg2, obj); mp.mEventHandler.sendMessage(m); diff --git a/ijkmedia/ijkplayer/android/ijkplayer_jni.c b/ijkmedia/ijkplayer/android/ijkplayer_jni.c index 7641a50fc6..318f8335c9 100755 --- a/ijkmedia/ijkplayer/android/ijkplayer_jni.c +++ b/ijkmedia/ijkplayer/android/ijkplayer_jni.c @@ -911,84 +911,80 @@ static void message_loop_n(JNIEnv *env, IjkMediaPlayer *mp) switch (msg.what) { case FFP_MSG_FLUSH: MPTRACE("FFP_MSG_FLUSH:\n"); - post_event(env, weak_thiz, MEDIA_NOP, 0, 0); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_ERROR: MPTRACE("FFP_MSG_ERROR: %d\n", msg.arg1); - post_event(env, weak_thiz, MEDIA_ERROR, MEDIA_ERROR_IJK_PLAYER, msg.arg1); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_PREPARED: MPTRACE("FFP_MSG_PREPARED:\n"); - post_event(env, weak_thiz, MEDIA_PREPARED, 0, 0); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_COMPLETED: MPTRACE("FFP_MSG_COMPLETED:\n"); - post_event(env, weak_thiz, MEDIA_PLAYBACK_COMPLETE, 0, 0); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_VIDEO_SIZE_CHANGED: MPTRACE("FFP_MSG_VIDEO_SIZE_CHANGED: %d, %d\n", msg.arg1, msg.arg2); - post_event(env, weak_thiz, MEDIA_SET_VIDEO_SIZE, msg.arg1, msg.arg2); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_SAR_CHANGED: MPTRACE("FFP_MSG_SAR_CHANGED: %d, %d\n", msg.arg1, msg.arg2); - post_event(env, weak_thiz, MEDIA_SET_VIDEO_SAR, msg.arg1, msg.arg2); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_VIDEO_RENDERING_START: MPTRACE("FFP_MSG_VIDEO_RENDERING_START:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_RENDERING_START, 0); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_RENDERING_START, 0); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_AUDIO_RENDERING_START: MPTRACE("FFP_MSG_AUDIO_RENDERING_START:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_AUDIO_RENDERING_START, 0); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_AUDIO_RENDERING_START, 0); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_VIDEO_ROTATION_CHANGED: MPTRACE("FFP_MSG_VIDEO_ROTATION_CHANGED: %d\n", msg.arg1); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_ROTATION_CHANGED, msg.arg1); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_ROTATION_CHANGED, msg.arg1); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_AUDIO_DECODED_START: MPTRACE("FFP_MSG_AUDIO_DECODED_START:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_AUDIO_DECODED_START, 0); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_AUDIO_DECODED_START, 0); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_VIDEO_DECODED_START: MPTRACE("FFP_MSG_VIDEO_DECODED_START:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_DECODED_START, 0); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_DECODED_START, 0); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_OPEN_INPUT: MPTRACE("FFP_MSG_OPEN_INPUT:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_OPEN_INPUT, 0); + //post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_OPEN_INPUT, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_FIND_STREAM_INFO: MPTRACE("FFP_MSG_FIND_STREAM_INFO:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_FIND_STREAM_INFO, 0); - break; + //post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_FIND_STREAM_INFO, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2);break; case FFP_MSG_COMPONENT_OPEN: MPTRACE("FFP_MSG_COMPONENT_OPEN:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_COMPONENT_OPEN, 0); + //post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_COMPONENT_OPEN, 0); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_BUFFERING_START: MPTRACE("FFP_MSG_BUFFERING_START:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_BUFFERING_START, msg.arg1); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_BUFFERING_START, msg.arg1); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_BUFFERING_END: MPTRACE("FFP_MSG_BUFFERING_END:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_BUFFERING_END, msg.arg1); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_BUFFERING_END, msg.arg1); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_BUFFERING_UPDATE: // MPTRACE("FFP_MSG_BUFFERING_UPDATE: %d, %d", msg.arg1, msg.arg2); - post_event(env, weak_thiz, MEDIA_BUFFERING_UPDATE, msg.arg1, msg.arg2); + // post_event(env, weak_thiz, MEDIA_BUFFERING_UPDATE, msg.arg1, msg.arg2); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_BUFFERING_BYTES_UPDATE: @@ -997,12 +993,12 @@ static void message_loop_n(JNIEnv *env, IjkMediaPlayer *mp) break; case FFP_MSG_SEEK_COMPLETE: MPTRACE("FFP_MSG_SEEK_COMPLETE:\n"); - post_event(env, weak_thiz, MEDIA_SEEK_COMPLETE, 0, 0); + // post_event(env, weak_thiz, MEDIA_SEEK_COMPLETE, 0, 0); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_ACCURATE_SEEK_COMPLETE: MPTRACE("FFP_MSG_ACCURATE_SEEK_COMPLETE:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_MEDIA_ACCURATE_SEEK_COMPLETE, msg.arg1); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_MEDIA_ACCURATE_SEEK_COMPLETE, msg.arg1); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_PLAYBACK_STATE_CHANGED: @@ -1010,31 +1006,33 @@ static void message_loop_n(JNIEnv *env, IjkMediaPlayer *mp) break; case FFP_MSG_TIMED_TEXT: if (msg.obj) { - jstring text = (*env)->NewStringUTF(env, (char *)msg.obj); - post_event2(env, weak_thiz, MEDIA_TIMED_TEXT, 0, 0, text); + jstring text = (*env)->NewStringUTF(env, (const char *)msg.obj); + post_event2(env, weak_thiz, FFP_MSG_TIMED_TEXT, 0, 0, text); J4A_DeleteLocalRef__p(env, &text); } else { - post_event2(env, weak_thiz, MEDIA_TIMED_TEXT, 0, 0, NULL); + post_event2(env, weak_thiz, FFP_MSG_TIMED_TEXT, 0, 0, NULL); } break; case FFP_MSG_GET_IMG_STATE: if (msg.obj) { jstring file_name = (*env)->NewStringUTF(env, (char *)msg.obj); - post_event2(env, weak_thiz, MEDIA_GET_IMG_STATE, msg.arg1, msg.arg2, file_name); + post_event2(env, weak_thiz, FFP_MSG_GET_IMG_STATE, msg.arg1, msg.arg2, file_name); J4A_DeleteLocalRef__p(env, &file_name); } else { - post_event2(env, weak_thiz, MEDIA_GET_IMG_STATE, msg.arg1, msg.arg2, NULL); + post_event2(env, weak_thiz, FFP_MSG_GET_IMG_STATE, msg.arg1, msg.arg2, NULL); } break; case FFP_MSG_VIDEO_SEEK_RENDERING_START: MPTRACE("FFP_MSG_VIDEO_SEEK_RENDERING_START:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_SEEK_RENDERING_START, msg.arg1); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_VIDEO_SEEK_RENDERING_START, msg.arg1); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_AUDIO_SEEK_RENDERING_START: MPTRACE("FFP_MSG_AUDIO_SEEK_RENDERING_START:\n"); - post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_AUDIO_SEEK_RENDERING_START, msg.arg1); + // post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_AUDIO_SEEK_RENDERING_START, msg.arg1); + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; default: ALOGE("unknown FFP_MSG_xxx(%d)\n", msg.what); From d62b13a2b497c2f5789c2ea6e5b68868ea9a0abd Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 19 Jul 2019 12:46:17 +0800 Subject: [PATCH 027/163] android demo: change FileExploer default path to ExternalStorage --- .../ijk/media/example/activities/FileExplorerActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/activities/FileExplorerActivity.java b/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/activities/FileExplorerActivity.java index 7ff800c20e..de4048a4c2 100644 --- a/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/activities/FileExplorerActivity.java +++ b/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/activities/FileExplorerActivity.java @@ -18,6 +18,7 @@ package tv.danmaku.ijk.media.example.activities; import android.os.Bundle; +import android.os.Environment; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.text.TextUtils; @@ -46,9 +47,9 @@ protected void onCreate(Bundle savedInstanceState) { String lastDirectory = mSettings.getLastDirectory(); if (!TextUtils.isEmpty(lastDirectory) && new File(lastDirectory).isDirectory()) - doOpenDirectory(lastDirectory, false); + doOpenDirectory(Environment.getExternalStorageDirectory().getPath(), false); else - doOpenDirectory("/", false); + doOpenDirectory(Environment.getExternalStorageDirectory().getPath(), false); } @Override From 7b5e05d639e206dc635d61fd6678ee1b278c7e12 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 20 Jul 2019 22:13:55 +0800 Subject: [PATCH 028/163] iOS: IJKFFMediaPlayer add setVolume support --- .../IJKMediaPlayer/IJKFFMediaPlayer.h | 7 ++---- .../IJKMediaPlayer/IJKFFMediaPlayer.m | 24 +++++++++++++------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index 2dd19c5a05..6432e742e6 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -54,11 +54,6 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { @interface IJKFFMediaPlayer : NSObject -@property (readonly, nonatomic) int videoWidth; -@property (readonly, nonatomic) int videoHeight; -@property (readonly, nonatomic) int videoSarNum; -@property (readonly, nonatomic) int videoSarDen; - - (IJKFFMediaPlayer *)init; - (int) setDataSource:(NSString *)url; @@ -74,6 +69,8 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { - (long) getDuration; - (int) seekTo:(long) msec; +- (void) setPlaybackVolume:(float)volume; +- (float) playbackVolume; - (void) setupCVPixelBufferView:(id) view; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 6516cf776a..27a403ee25 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -39,16 +39,12 @@ @implementation IJKFFWeakHolder @implementation IJKFFMediaPlayer { IjkMediaPlayer* _nativeMediaPlayer; IJKFFMoviePlayerMessagePool *_msgPool; - + NSMutableSet> *_eventHandlers; id _cvPBView; - + NSString *_dataSource; - int _videoWidth; - int _videoHeight; - int _videoSarNum; - int _videoSarDen; - + CFDictionaryRef _optionsDictionary; } @@ -207,6 +203,20 @@ - (int) seekTo:(long) msec return ijkmp_seek_to(_nativeMediaPlayer, msec); } +- (void)setPlaybackVolume:(float)volume +{ + if (!_nativeMediaPlayer) + return; + ijkmp_set_playback_volume(_nativeMediaPlayer, volume); +} + +- (float)playbackVolume +{ + if (!_nativeMediaPlayer) + return 0.0f; + return ijkmp_get_property_float(_nativeMediaPlayer, FFP_PROP_FLOAT_PLAYBACK_VOLUME, 1.0f); +} + - (void) shutdown { ijkmp_shutdown(_nativeMediaPlayer); From f27b66d01696691832f08245045c68d32e25fbf8 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 20 Jul 2019 22:20:19 +0800 Subject: [PATCH 029/163] change version to f0.3.1 --- NEWS.md | 6 ++++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 3158765087..1771b0942b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,12 @@ tag next -------------------------------- +tag f0.3.1 +-------------------------------- +- ios: IJKFFMediaPlayer add volume and position api +- android: update Mesage id +- ijkplayer: make sure change to state started + tag f0.3.0 -------------------------------- - change prefix for fijkplayer release tag names `f` diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 6334f6c6e7..312ba2e3ec 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.3.0 -VERSION_CODE=000300 +VERSION_NAME=0.3.1 +VERSION_CODE=000301 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 0ee9f89b2a..6f34954162 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.3.0" + spec.version = "0.3.1" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.0/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.1/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 0c384a88b8..dda094dd18 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.0 + 0.3.1 CFBundleSignature ???? CFBundleVersion - 000300 + 000301 LSRequiresIPhoneOS UIFileSharingEnabled From 4d02337b02f67d289d3d893810d0a53f9f97f1de Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 31 Jul 2019 13:32:01 +0800 Subject: [PATCH 030/163] export all event to listener. add bintray upload javadoc and sources --- .gitignore | 3 ++ android/ijkplayer/.gitignore | 4 ++ android/ijkplayer/build.gradle | 2 +- .../ijk/media/player/IjkEventListener.java | 43 +++++++++++++------ .../ijk/media/player/IjkMediaPlayer.java | 28 +++--------- .../tools/gradle-bintray-upload.gradle | 32 ++++++++++++++ .../IJKMediaPlayer/IJKFFMediaPlayer.m | 29 +------------ 7 files changed, 77 insertions(+), 64 deletions(-) diff --git a/.gitignore b/.gitignore index 6fd00bbcec..3e95540d46 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,6 @@ xcuserdata xcshareddata *.xccheckout + +# osx +osx/ diff --git a/android/ijkplayer/.gitignore b/android/ijkplayer/.gitignore index eac8754c15..ee09a97799 100644 --- a/android/ijkplayer/.gitignore +++ b/android/ijkplayer/.gitignore @@ -6,3 +6,7 @@ /build /captures android-ndk-prof + +.project +.classpath +.settings/ \ No newline at end of file diff --git a/android/ijkplayer/build.gradle b/android/ijkplayer/build.gradle index 17569b163f..aacb2f94c4 100644 --- a/android/ijkplayer/build.gradle +++ b/android/ijkplayer/build.gradle @@ -17,7 +17,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' + classpath 'com.android.tools.build:gradle:3.4.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java index 6f727811b6..1274036d65 100644 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java @@ -2,19 +2,36 @@ public interface IjkEventListener { - int FLUSH = 0; - int ERROR = 100; - int PREPARED = 200; - int COMPLETED = 300; - int VIDEO_SIZE_CHANGED = 400; - int SAR_CHANGED = 401; - int VIDEO_RENDERING_START = 402; - int AUDIO_RENDERING_START = 403; - int VIDEO_ROTATION_CHANGED = 404; - int BUFFERING_START = 500; - int BUFFERING_END = 501; - int BUFFERING_UPDATE = 502; - int PLAYBACK_STATE_CHANGED = 700; + int FLUSH = 0; + int ERROR = 100; + int PREPARED = 200; + int COMPLETED = 300; + int VIDEO_SIZE_CHANGED = 400; + int SAR_CHANGED = 401; + int VIDEO_RENDERING_START = 402; + int AUDIO_RENDERING_START = 403; + int VIDEO_ROTATION_CHANGED = 404; + int AUDIO_DECODED_START = 405; + int VIDEO_DECODED_START = 406; + int OPEN_INPUT = 407; + int FIND_STREAM_INFO = 408; + int COMPONENT_OPEN = 409; + int VIDEO_SEEK_RENDERING_START = 410; + int AUDIO_SEEK_RENDERING_START = 411; + + int BUFFERING_START = 500; + int BUFFERING_END = 501; + int BUFFERING_UPDATE = 502; + int BUFFERING_BYTES_UPDATE = 503; + int BUFFERING_TIME_UPDATE = 504; + + int SEEK_COMPLETE = 600; + int PLAYBACK_STATE_CHANGED = 700; + int TIMED_TEXT = 800; + int ACCURATE_SEEK_COMPLETE = 900; + int GET_IMG_STATE = 1000; + + void onEvent(IjkMediaPlayer mp, int what, int arg1, int arg2, Object extra); } diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java index fc1b97d553..34847e06e8 100755 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java @@ -444,9 +444,9 @@ public void setDataSource(String path, Map headers) if (!TextUtils.isEmpty(value)) sb.append(entry.getValue()); sb.append("\r\n"); - setOption(OPT_CATEGORY_FORMAT, "headers", sb.toString()); - setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "protocol_whitelist", "async,cache,crypto,file,http,https,ijkhttphook,ijkinject,ijklivehook,ijklongurl,ijksegment,ijktcphook,pipe,rtp,tcp,tls,udp,ijkurlhook,data"); } + setOption(OPT_CATEGORY_FORMAT, "headers", sb.toString()); + setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "protocol_whitelist", "async,cache,crypto,file,http,https,ijkhttphook,ijkinject,ijklivehook,ijklongurl,ijksegment,ijktcphook,pipe,rtp,tcp,tls,udp,ijkurlhook,data"); } setDataSource(path); } @@ -992,27 +992,9 @@ public void handleMessage(Message msg) { return; } - switch (msg.what) { - case IjkEventListener.FLUSH: - case IjkEventListener.ERROR: - case IjkEventListener.PREPARED: - case IjkEventListener.COMPLETED: - case IjkEventListener.VIDEO_SIZE_CHANGED: - case IjkEventListener.SAR_CHANGED: - case IjkEventListener.VIDEO_RENDERING_START: - case IjkEventListener.AUDIO_RENDERING_START: - case IjkEventListener.VIDEO_ROTATION_CHANGED: - case IjkEventListener.BUFFERING_START: - case IjkEventListener.BUFFERING_END: - case IjkEventListener.BUFFERING_UPDATE: - case IjkEventListener.PLAYBACK_STATE_CHANGED: - // DebugLog.dfmt("onEvent", "what %d arg1 %d arg2 %d", msg.what, msg.arg1, msg.arg2); - for (IjkEventListener listener : player.mEventListeners) { - listener.onEvent(player, msg.what, msg.arg1, msg.arg2, msg.obj); - } - break; - default: - break; + // DebugLog.dfmt("onEvent", "what %d arg1 %d arg2 %d", msg.what, msg.arg1, msg.arg2); + for (IjkEventListener listener : player.mEventListeners) { + listener.onEvent(player, msg.what, msg.arg1, msg.arg2, msg.obj); } switch (msg.what) { diff --git a/android/ijkplayer/tools/gradle-bintray-upload.gradle b/android/ijkplayer/tools/gradle-bintray-upload.gradle index 91481d24d5..756047b338 100644 --- a/android/ijkplayer/tools/gradle-bintray-upload.gradle +++ b/android/ijkplayer/tools/gradle-bintray-upload.gradle @@ -87,3 +87,35 @@ install { } } } + +// generate source.jar +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +//generate java doc +task javadoc(type: Javadoc) { + source = android.sourceSets.main.java.srcDirs + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + failOnError false +} + +//generate javadoc.jar +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +javadoc { + options{ + encoding 'UTF-8' + charSet 'UTF-8' + author true + } +} + +artifacts { + archives javadocJar + archives sourcesJar +} \ No newline at end of file diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 27a403ee25..723f1810b0 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -126,37 +126,12 @@ - (void)postEvent: (IJKFFMoviePlayerMessage *)msg return; AVMessage *avmsg = &msg->_msg; - switch (avmsg->what) { - case IJKMPET_FLUSH: - case IJKMPET_ERROR: - case IJKMPET_PREPARED: - case IJKMPET_COMPLETED: - case IJKMPET_VIDEO_SIZE_CHANGED: - case IJKMPET_SAR_CHANGED: - case IJKMPET_VIDEO_RENDERING_START: - case IJKMPET_AUDIO_RENDERING_START: - case IJKMPET_VIDEO_ROTATION_CHANGED: - case IJKMPET_BUFFERING_START: - case IJKMPET_BUFFERING_END: - case IJKMPET_BUFFERING_UPDATE: - case IJKMPET_PLAYBACK_STATE_CHANGED: - - for (id handler in _eventHandlers) { - [handler onEvent4Player:self withType:avmsg->what andArg1:avmsg->arg1 andArg2:avmsg->arg2 andExtra:avmsg->obj]; - } - break; - default: - break; + for (id handler in _eventHandlers) { + [handler onEvent4Player:self withType:avmsg->what andArg1:avmsg->arg1 andArg2:avmsg->arg2 andExtra:avmsg->obj]; } [_msgPool recycle:msg]; } - -- (void) setSurface -{ - -} - - (int) prepareAsync { return ijkmp_prepare_async(_nativeMediaPlayer); From ff2c89017fba6580646d8bd305dafa1546480121 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 31 Jul 2019 13:36:27 +0800 Subject: [PATCH 031/163] update version code --- android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 2 +- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 312ba2e3ec..e5e2957be9 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.3.1 -VERSION_CODE=000301 +VERSION_NAME=0.3.2 +VERSION_CODE=000302 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 6f34954162..f6e6d49790 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.3.1" + spec.version = "0.3.2" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index dda094dd18..e642087c50 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.1 + 0.3.2 CFBundleSignature ???? CFBundleVersion - 000301 + 000302 LSRequiresIPhoneOS UIFileSharingEnabled From 7619ff8ea8d251e892f8b4ea3445fdb5a07fadfb Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 31 Jul 2019 14:15:03 +0800 Subject: [PATCH 032/163] update news and version --- NEWS.md | 5 +++++ ios/CocoaPodsPub/FIJKPlayer.podspec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 1771b0942b..dbf2ed404e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,11 @@ tag next -------------------------------- +tag f0.3.2 +-------------------------------- +- android: add javadoc and source to bintray +- expose all player event to fijkplayer + tag f0.3.1 -------------------------------- - ios: IJKFFMediaPlayer add volume and position api diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index f6e6d49790..9f645b9cc1 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.1/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.2/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files From 131eb28b5e037eb3a57286893157cf8fab34a1e2 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 16 Aug 2019 10:45:38 +0800 Subject: [PATCH 033/163] iOS API: add more fijk API, speed loop, getProperty --- .../IJKMediaPlayer/IJKFFMediaPlayer.h | 12 ++++++- .../IJKMediaPlayer/IJKFFMediaPlayer.m | 32 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index 6432e742e6..a1c5864d00 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -67,13 +67,23 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { - (long) getCurrentPosition; - (long) getDuration; -- (int) seekTo:(long) msec; +- (int) seekTo:(long) msec; + +- (void) setLoop:(int) loop; +- (int) getLoop; + +- (void) setSpeed:(float) speed; - (void) setPlaybackVolume:(float)volume; - (float) playbackVolume; - (void) setupCVPixelBufferView:(id) view; +- (void) setStreamSelected:(int) stream selected:(BOOL) selected; + +- (float) getFloatProperty:(int) property defalut:(float) value; +- (int64_t) getLongProperty:(int) property default:(int64_t) value; + - (void) setOptionValue:(NSString *)value forKey:(NSString *)key ofCategory:(IJKFFOptionCategory)category; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 723f1810b0..84703fa9a1 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -178,6 +178,38 @@ - (int) seekTo:(long) msec return ijkmp_seek_to(_nativeMediaPlayer, msec); } + +- (void) setLoop:(int) loop +{ + ijkmp_set_loop(_nativeMediaPlayer, loop); +} + +- (int) getLoop +{ + return ijkmp_get_loop(_nativeMediaPlayer); +} + +- (void) setSpeed:(float) speed +{ + ijkmp_set_property_float(_nativeMediaPlayer, FFP_PROP_FLOAT_PLAYBACK_RATE, speed); +} + +- (void) setStreamSelected:(int) stream selected:(BOOL) selected +{ + ijkmp_set_stream_selected(_nativeMediaPlayer, stream, selected); +} + +- (float) getFloatProperty:(int) property defalut:(float) value +{ + return ijkmp_get_property_float(_nativeMediaPlayer, property, value); +} + +- (int64_t) getLongProperty:(int) property default:(int64_t) value +{ + return ijkmp_get_property_int64(_nativeMediaPlayer, property, value); +} + + - (void)setPlaybackVolume:(float)volume { if (!_nativeMediaPlayer) From 91c17c14f2e9b630c271ec4486eaf76463756b2f Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 16 Aug 2019 17:53:17 +0800 Subject: [PATCH 034/163] ijkplayer: ijkmp_reset update, not recreate player, just wait_stop. --- ijkmedia/ijkplayer/android/ijkplayer_jni.c | 5 +---- ijkmedia/ijkplayer/ijkplayer.c | 12 ++++++++++++ ijkmedia/ijkplayer/ijkplayer.h | 1 + ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m | 4 ++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ijkmedia/ijkplayer/android/ijkplayer_jni.c b/ijkmedia/ijkplayer/android/ijkplayer_jni.c index 318f8335c9..22b58c8ad4 100755 --- a/ijkmedia/ijkplayer/android/ijkplayer_jni.c +++ b/ijkmedia/ijkplayer/android/ijkplayer_jni.c @@ -390,10 +390,7 @@ IjkMediaPlayer_reset(JNIEnv *env, jobject thiz) if (!mp) return; - jobject weak_thiz = (jobject) ijkmp_set_weak_thiz(mp, NULL ); - - IjkMediaPlayer_release(env, thiz); - IjkMediaPlayer_native_setup(env, thiz, weak_thiz); + ijkmp_reset(mp); ijkmp_dec_ref_p(&mp); } diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index c290f0faa3..21dc1661b0 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -553,6 +553,18 @@ int ijkmp_stop(IjkMediaPlayer *mp) return retval; } +int ijkmp_reset(IjkMediaPlayer *mp) +{ + assert(mp); + MPTRACE("ijkmp_reset()\n"); + pthread_mutex_lock(&mp->mutex); + int retval = ffp_wait_stop_l(mp->ffplayer); + pthread_mutex_unlock(&mp->mutex); + MPTRACE("ijkmp_reset()=%d\n", retval); + ijkmp_change_state_l(mp, MP_STATE_IDLE); + return retval; +} + bool ijkmp_is_playing(IjkMediaPlayer *mp) { assert(mp); diff --git a/ijkmedia/ijkplayer/ijkplayer.h b/ijkmedia/ijkplayer/ijkplayer.h index 9e99883dea..5ae884b9b8 100644 --- a/ijkmedia/ijkplayer/ijkplayer.h +++ b/ijkmedia/ijkplayer/ijkplayer.h @@ -201,6 +201,7 @@ int ijkmp_prepare_async(IjkMediaPlayer *mp); int ijkmp_start(IjkMediaPlayer *mp); int ijkmp_pause(IjkMediaPlayer *mp); int ijkmp_stop(IjkMediaPlayer *mp); +int ijkmp_reset(IjkMediaPlayer *mp); int ijkmp_seek_to(IjkMediaPlayer *mp, long msec); int ijkmp_get_state(IjkMediaPlayer *mp); bool ijkmp_is_playing(IjkMediaPlayer *mp); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 84703fa9a1..dea9d76554 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -241,8 +241,8 @@ - (void) shutdown - (int) reset { - [self shutdown]; - [self nativeSetup]; + ijkmp_stop(_nativeMediaPlayer); + ijkmp_reset(_nativeMediaPlayer); return 0; } From 301ff7e8815636f4d7246f3caea886552b23e5ad Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 16 Aug 2019 17:53:41 +0800 Subject: [PATCH 035/163] ijkplayer: msg_queue_abort move to shutdown --- ijkmedia/ijkplayer/ff_ffplay.c | 1 - ijkmedia/ijkplayer/ijkplayer.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index 52aba31f41..8f3d3420fa 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -4363,7 +4363,6 @@ int ffp_stop_l(FFPlayer *ffp) toggle_pause(ffp, 1); } - msg_queue_abort(&ffp->msg_queue); if (ffp->enable_accurate_seek && is && is->accurate_seek_mutex && is->audio_accurate_seek_cond && is->video_accurate_seek_cond) { SDL_LockMutex(is->accurate_seek_mutex); diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index 21dc1661b0..63c38d6656 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -305,6 +305,7 @@ void ijkmp_shutdown_l(IjkMediaPlayer *mp) if (mp->ffplayer) { ffp_stop_l(mp->ffplayer); ffp_wait_stop_l(mp->ffplayer); + msg_queue_abort(&mp->ffplayer->msg_queue); } MPTRACE("ijkmp_shutdown_l()=void\n"); } From ff900b5e5dec590e702b0d177e8051a95a2be8cc Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 16 Aug 2019 19:35:24 +0800 Subject: [PATCH 036/163] ios: IJKFFMediaPlayer CVPixelBufferCreate then copy overlay pixel to pixelbuffer --- .../IJKMediaPlayer/IJKFFMediaPlayer.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index dea9d76554..b918a21580 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -279,6 +279,10 @@ - (void) display_pixels:(IJKOverlay *)overlay [_cvPBView display_pixelbuffer:overlay->pixel_buffer]; } else if (_cvPBView != nil && overlay->format == SDL_FCC_BGRA){ CVPixelBufferRef pixelBuffer; + + // CVPixelBufferCreateWithBytes lead to crash if reset player + // and then setDataSource and play again. + /* int retval = CVPixelBufferCreateWithBytes( kCFAllocatorDefault, (size_t) overlay->w, @@ -288,7 +292,18 @@ - (void) display_pixels:(IJKOverlay *)overlay overlay->pitches[0], NULL, NULL, _optionsDictionary, &pixelBuffer); + */ + int retval = CVPixelBufferCreate(kCFAllocatorDefault, + (size_t) overlay->w, + (size_t) overlay->h, + kCVPixelFormatType_32BGRA, + _optionsDictionary, + &pixelBuffer); if (retval == kCVReturnSuccess) { + CVPixelBufferLockBaseAddress(pixelBuffer, 0); + uint8_t *dst = CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 0); + memcpy(dst, overlay->pixels[0], overlay->pitches[0] * overlay->h); + CVPixelBufferUnlockBaseAddress(pixelBuffer, 0); [_cvPBView display_pixelbuffer:pixelBuffer]; CVPixelBufferRelease(pixelBuffer); } From 9e0d857f8ffe50ac4f19f8e9b524d897753d0826 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 16 Aug 2019 19:48:25 +0800 Subject: [PATCH 037/163] update f0.3.3 code and changelog --- NEWS.md | 7 +++++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index dbf2ed404e..b9e998c88f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,12 @@ tag next + +-------------------------------- + +tag f0.3.3 -------------------------------- +- ijkplayer: msg_queue_abort move to shutdown +- ijkplayer: update ijkmp_reset, just wait_stop_l, no release +- ios: IJKFFMediaPlayer copy overlay memory pixel to CVPixelBuffer tag f0.3.2 -------------------------------- diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index e5e2957be9..2d7bf466bf 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.3.2 -VERSION_CODE=000302 +VERSION_NAME=0.3.3 +VERSION_CODE=000303 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 9f645b9cc1..22855d4c94 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.3.2" + spec.version = "0.3.3" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.2/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.3/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index e642087c50..39b35d2692 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.2 + 0.3.3 CFBundleSignature ???? CFBundleVersion - 000302 + 000303 LSRequiresIPhoneOS UIFileSharingEnabled From dc914636f5155627a83f904ff64c2bbef5a515ac Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 17 Aug 2019 13:14:34 +0800 Subject: [PATCH 038/163] update openssl to OpenSSL_1_0_2r, add rtsp support --- config/module.sh | 276 +++++++++++++++++- init-android-openssl.sh | 2 +- init-ios-openssl.sh | 2 +- .../IJKDemoInputURLViewController.m | 1 + 4 files changed, 278 insertions(+), 3 deletions(-) mode change 120000 => 100755 config/module.sh diff --git a/config/module.sh b/config/module.sh deleted file mode 120000 index 0f16f539b1..0000000000 --- a/config/module.sh +++ /dev/null @@ -1 +0,0 @@ -module-lite.sh \ No newline at end of file diff --git a/config/module.sh b/config/module.sh new file mode 100755 index 0000000000..1ab4b073bb --- /dev/null +++ b/config/module.sh @@ -0,0 +1,275 @@ +#! /usr/bin/env bash + +# ffmpeg module config for build fijkplayer + +#-------------------- +# Standard options: +export COMMON_FF_CFG_FLAGS= +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --prefix=PREFIX" + +# Licensing options: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-gpl" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-version3" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-nonfree" + +# Configuration options: +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-static" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-shared" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-small" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-runtime-cpudetect" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-gray" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-swscale-alpha" + +# Program options: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-programs" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffmpeg" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffplay" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffprobe" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffserver" + +# Documentation options: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-doc" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-htmlpages" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-manpages" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-podpages" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-txtpages" + +# Component options: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-avdevice" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-avcodec" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-avformat" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-avutil" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-swresample" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-swscale" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-postproc" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-avfilter" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-avresample" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-pthreads" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-w32threads" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-os2threads" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-network" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-dct" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-dwt" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-lsp" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-lzo" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mdct" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-rdft" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-fft" + +# Hardware accelerators: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-d3d11va" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-dxva2" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vaapi" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vda" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vdpau" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-videotoolbox" + +# Individual component options: +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-everything" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-encoders" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-encoder=png" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-encoder=mjpeg" + +# ./configure --list-decoders +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-decoders" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=aac" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=aac_latm" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=flv" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=h263" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=h263i" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=h263p" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=h264" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=mp3*" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=vp6" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=vp6a" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=vp6f" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=flac" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=hevc" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=vp8" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=vp9" + +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-hwaccels" + +# ./configure --list-muxers +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-muxers" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-muxer=mpegts" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-muxer=mp4" + +# ./configure --list-demuxers +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-demuxers" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=aac" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=concat" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=data" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=flv" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=hls" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=latm" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=live_flv" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=loas" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=m4v" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mov" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mp3" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpegps" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpegts" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpegvideo" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=flac" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=hevc" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=webm_dash_manifest" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=rtsp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpeg4" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mjpeg" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=avi" + + +# ./configure --list-parsers +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-parsers" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=aac" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=aac_latm" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=ac3" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=h263" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=h264" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=flac" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=hevc" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=mpeg4" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=mpeg4video" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=mpegvideo" + +# ./configure --list-bsf +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-bsfs" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mjpeg2jpeg" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mjpeg2jpeg" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mjpega_dump_header" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mov2textsub" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=text2movsub" + +# ./configure --list-protocols +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocols" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=async" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=bluray" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=concat" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=crypto" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=ffrtmpcrypt" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=ffrtmphttp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=gopher" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=icecast" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=librtmp*" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=libssh" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=md5" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=mmsh" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=mmst" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=rtmp*" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=rtmp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=rtmpt" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=rtsp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=rtp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=udp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=tcp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=sctp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=srtp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=subfile" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=unix" + +# +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-devices" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-filters" + +# External library support: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-iconv" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-audiotoolbox" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-videotoolbox" + +# ... + +# Advanced options (experts only): +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --cross-prefix=${FF_CROSS_PREFIX}-" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-cross-compile" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --sysroot=PATH" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --sysinclude=PATH" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --target-os=TAGET_OS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --target-exec=CMD" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --target-path=DIR" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --toolchain=NAME" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --nm=NM" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --ar=AR" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --as=AS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --yasmexe=EXE" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --cc=CC" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --cxx=CXX" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --dep-cc=DEPCC" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --ld=LD" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-cc=HOSTCC" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-cflags=HCFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-cppflags=HCPPFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-ld=HOSTLD" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-ldflags=HLDFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-libs=HLIBS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-os=OS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-cflags=ECFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-cxxflags=ECFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-ldflags=ELDFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-libs=ELIBS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-version=STRING" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --optflags=OPTFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --build-suffix=SUFFIX" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --malloc-prefix=PREFIX" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --progs-suffix=SUFFIX" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --arch=ARCH" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --cpu=CPU" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-pic" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-sram" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-thumb" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-symver" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-hardcoded-tables" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-safe-bitstream-reader" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-memalign-hack" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-lto" + +# Optimization options (experts only): +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-asm" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-altivec" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-amd3dnow" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-amd3dnowext" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mmx" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mmxext" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse2" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse3" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ssse3" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse4" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse42" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-avx" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-fma4" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-armv5te" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-armv6" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-armv6t2" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vfp" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-neon" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vis" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-inline-asm" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-yasm" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mips32r2" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mipsdspr1" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mipsdspr2" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mipsfpu" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-fast-unaligned" + +# Developer options (useful when working on FFmpeg itself): +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-coverage" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-debug" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-debug=LEVEL" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-optimizations" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-extra-warnings" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-stripping" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --assert-level=level" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-memory-poisoning" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --valgrind=VALGRIND" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-ftrapv" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --samples=PATH" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-xmm-clobber-test" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-random" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-random" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-random=LIST" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-random=LIST" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --random-seed=VALUE" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-linux-perf" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bzlib" + diff --git a/init-android-openssl.sh b/init-android-openssl.sh index 19b87262eb..43a8df7424 100755 --- a/init-android-openssl.sh +++ b/init-android-openssl.sh @@ -19,7 +19,7 @@ #IJK_OPENSSL_UPSTREAM=https://github.com/openssl/openssl IJK_OPENSSL_UPSTREAM=https://github.com/Bilibili/openssl.git IJK_OPENSSL_FORK=https://github.com/Bilibili/openssl.git -IJK_OPENSSL_COMMIT=OpenSSL_1_0_2n +IJK_OPENSSL_COMMIT=b34cf4eb61 #tag: OpenSSL_1_0_2r IJK_OPENSSL_LOCAL_REPO=extra/openssl set -e diff --git a/init-ios-openssl.sh b/init-ios-openssl.sh index 4c067d1e4d..cfda11071a 100755 --- a/init-ios-openssl.sh +++ b/init-ios-openssl.sh @@ -18,7 +18,7 @@ IJK_OPENSSL_UPSTREAM=https://github.com/openssl/openssl IJK_OPENSSL_FORK=https://github.com/Bilibili/openssl.git -IJK_OPENSSL_COMMIT=OpenSSL_1_0_2n +IJK_OPENSSL_COMMIT=b34cf4eb61 #tag: OpenSSL_1_0_2r IJK_OPENSSL_LOCAL_REPO=extra/openssl set -e diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKDemoInputURLViewController.m b/ios/IJKMediaDemo/IJKMediaDemo/IJKDemoInputURLViewController.m index 79f0563491..cc11ada828 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKDemoInputURLViewController.m +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKDemoInputURLViewController.m @@ -45,6 +45,7 @@ - (void)onClickPlayButton { if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] + || [scheme isEqualToString:@"rtsp"] || [scheme isEqualToString:@"rtmp"]) { [IJKVideoViewController presentFromViewController:self withTitle:[NSString stringWithFormat:@"URL: %@", url] URL:url completion:^{ // [self.navigationController popViewControllerAnimated:NO]; From 0b87311cf67bac319a622420ce49a695b549e7b0 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 17 Aug 2019 15:14:59 +0800 Subject: [PATCH 039/163] update version code to 0.3.4 --- NEWS.md | 5 +++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index b9e998c88f..16e8b63f68 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,11 @@ tag next +-------------------------------- + +tag f0.3.4 -------------------------------- +- ffmpeg: add rtsp support +- ios: remove armv7s tag f0.3.3 -------------------------------- diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 2d7bf466bf..1eb552aa7e 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.3.3 -VERSION_CODE=000303 +VERSION_NAME=0.3.4 +VERSION_CODE=000304 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 22855d4c94..e67a26e3f5 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.3.3" + spec.version = "0.3.4" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.3/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.4/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 39b35d2692..b810691152 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.3 + 0.3.4 CFBundleSignature ???? CFBundleVersion - 000303 + 000304 LSRequiresIPhoneOS UIFileSharingEnabled From ede27a5f7cf2aa1e0b81d2191335a5d8723aa85d Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 17 Aug 2019 21:48:01 +0800 Subject: [PATCH 040/163] android: remove unused module from android studio --- .../gradle/wrapper/gradle-wrapper.jar | Bin 49896 -> 54329 bytes .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/ijkplayer/gradlew | 78 ++++++++++-------- android/ijkplayer/gradlew.bat | 14 +--- android/ijkplayer/settings.gradle | 13 +-- 5 files changed, 55 insertions(+), 52 deletions(-) diff --git a/android/ijkplayer/gradle/wrapper/gradle-wrapper.jar b/android/ijkplayer/gradle/wrapper/gradle-wrapper.jar index 8c0fb64a8698b08ecc4158d828ca593c4928e9dd..f6b961fd5a86aa5fbfe90f707c3138408be7c718 100644 GIT binary patch delta 48231 zcmZ6y18`+gw=JBGZQHhO+qP}%bkfO*la6iMCr&!t`;)vy2ezW3jI->zD_YVBHc zRqd)-W6e3nSSR5S9TgDBstOR0m|$SAuwY8pL20u+BgKb~#CjQdsC z#eEG%%qA6df4Yi|kTQ?!4pHHyC+ZZC% zjCB2$ZSR2j)J=9}h94|k$$2W`NNvz+OrWV9TGE}yBVWunCtx9uP~w>2vdZcevAPYIuvwV<~bQtIr? z&fvDic?n2TN~hA|m{%GPN}9lF@#t#NzikWj&)f={9k1 zpa-&ZC{s%+P@}ucN>r${qUh>pgqd`0p;MXqJ=}eyDbre0Y-w5>UeECZccADyavZYz z8sopH9oz7AEaqt@THa7KC=ODLcjKS@-{gg4`i(Y{3m9kzewxy+48g!N_7Z;k)`FGd zW&-Gka71JEmv(Ejck2Q22KRT|>tZ_YOGM|D=b3U@sr1Xd=!(uTzmC5dRfUDAUT$w(l1|{FD zCge5R15QTn7V~P&%8FZFxHVF_QD%@g<s()F|42>1%61yWMcwfyO+@>xt zmu_o8ks`OqUPI#NaELcuubk+889+*0Np$_78EKYi#wo6T-sY7xDE~Dd1w7xcg}Brp z)H}rcuO!xh1;3|h?9z9MjRcDp`Z}-?w9;H+c52yZ1`!&*sHcx1O)R1bmEDO*fav5) z8N-bZs;o$erdUJtG~O-TL4$68UIVT={ffXo%DaRSiO9j?z7uKP zn7n*ywnNf!3w$?m^j}2s5;=|u5q6b+1e%)h6uos%Kps28_OC8MQ4j?8OQ>=#z#U4QL&h5H ziT12ipp1ayJdbN3AM2;%dKVF}l-m_)bUp%PckCtfb~_6q0yszN21me#0XN8XT^iF5 zVIBL5btwO}us)wd@;+P$sH?;cHK@LcGJL+Z8=~s+A|{H~#!M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@e?up5t*-h#T ziEb7ASr&dz(tF!W?s;(vzVqUIg#LH@zuN--wEo5)iYJGlP9kIcR@VNSaz7e=3iTiW zau*`Q2rl(+h)OcCqD;vQ=p``&?ox+g6x>{D^H}x2!1zoZ)EMBA@h7Fhw$e>+n=d^Z>;DZ zXS?9e4%mm_KLrNbolNnD7MSl)2l?)i7~VoOr$m2u>Rvzd9`?56&Vbki&hPktyBmL| xtZMlk{><(ETi|EG`qhAf8X&o6 \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -30,6 +48,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +59,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +89,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -114,6 +113,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -154,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/android/ijkplayer/gradlew.bat b/android/ijkplayer/gradlew.bat index aec99730b4..e95643d6a2 100644 --- a/android/ijkplayer/gradlew.bat +++ b/android/ijkplayer/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +46,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/android/ijkplayer/settings.gradle b/android/ijkplayer/settings.gradle index e04ecbcc2c..7022625859 100644 --- a/android/ijkplayer/settings.gradle +++ b/android/ijkplayer/settings.gradle @@ -1,10 +1,11 @@ -include ':ijkplayer-armv5' -include ':ijkplayer-x86_64' -include ':ijkplayer-armv7a' -include ':ijkplayer-arm64' -include ':ijkplayer-x86' +//include ':ijkplayer-armv5' +//include ':ijkplayer-x86_64' +//include ':ijkplayer-armv7a' +//include ':ijkplayer-arm64' +//include ':ijkplayer-x86' + +//include ':ijkplayer-java' -include ':ijkplayer-java' include ':ijkplayer-exo' include ':fijkplayer-full' From 7f74f96e483be7a8b84ea7ca7937de240f1df79e Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 17 Aug 2019 21:51:21 +0800 Subject: [PATCH 041/163] iOS: IJKFFMediaPlayer remove armv7s support --- ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 10286abc0d..d48bdde137 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -1810,7 +1810,7 @@ SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 x86_64 i386 armv7s armv7"; + VALID_ARCHS = "arm64 x86_64 i386 armv7"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1867,7 +1867,7 @@ SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; TARGETED_DEVICE_FAMILY = "1,2"; - VALID_ARCHS = "arm64 x86_64 i386 armv7s armv7"; + VALID_ARCHS = "arm64 x86_64 i386 armv7"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; From 1f7e01824fb3225e216629e0b25ec04e6cc065ac Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 23 Aug 2019 22:08:11 +0800 Subject: [PATCH 042/163] ijkplayer: notify error message ans change state error --- NEWS.md | 5 +++++ android/ijkplayer/gradle.properties | 4 ++-- .../ijk/media/player/IjkMediaPlayer.java | 20 ++++++++++++++++++- ijkmedia/ijkplayer/android/ijkplayer_jni.c | 11 ++++++++-- ijkmedia/ijkplayer/ff_ffmsg_queue.h | 2 +- ijkmedia/ijkplayer/ff_ffplay.c | 11 ++++++++-- ijkmedia/ijkplayer/ijkplayer.c | 6 ++++++ ios/CocoaPodsPub/FIJKPlayer.podspec | 2 +- .../IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 9 files changed, 54 insertions(+), 11 deletions(-) diff --git a/NEWS.md b/NEWS.md index 16e8b63f68..42032406a7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,11 @@ tag next -------------------------------- +tag f0.3.5 +-------------------------------- +- fijkplayer: change to state error when notify error +- fijkplayer: add error msg when notify error +- android: add set/get loopCount api tag f0.3.4 -------------------------------- diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 1eb552aa7e..142fb7bc62 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.3.4 -VERSION_CODE=000304 +VERSION_NAME=0.3.5 +VERSION_CODE=000305 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java index 34847e06e8..9554de6cc8 100755 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java @@ -748,6 +748,16 @@ public void setLooping(boolean looping) { _setLoopCount(loopCount); } + /** + * Sets the player's loop count + * @param loopCount 1 for noo-loop, 0 for infinity loop, or other positive loop count + * + */ + public void setLoopCount(int loopCount) { + setOption(OPT_CATEGORY_PLAYER, "loop", loopCount); + _setLoopCount(loopCount); + } + private native void _setLoopCount(int loopCount); /** @@ -761,6 +771,14 @@ public boolean isLooping() { return loopCount != 1; } + /** + * Get player's remaining loop count + * @return the player's remaining loop count + */ + public int getLoopCount() { + return _getLoopCount(); + } + private native int _getLoopCount(); public void setSpeed(float speed) { @@ -1044,7 +1062,7 @@ public void handleMessage(Message msg) { break; case IJK_MSG_ERROR: - DebugLog.e(TAG, "Error (" + msg.arg1 + "," + msg.arg2 + ")"); + DebugLog.e(TAG, "Error (" + msg.arg1 + "," + msg.arg2 + "," + msg.obj + ")"); if (!player.notifyOnError(msg.arg1, msg.arg2)) { player.notifyOnCompletion(); } diff --git a/ijkmedia/ijkplayer/android/ijkplayer_jni.c b/ijkmedia/ijkplayer/android/ijkplayer_jni.c index 22b58c8ad4..e0bb7ab1a6 100755 --- a/ijkmedia/ijkplayer/android/ijkplayer_jni.c +++ b/ijkmedia/ijkplayer/android/ijkplayer_jni.c @@ -912,7 +912,13 @@ static void message_loop_n(JNIEnv *env, IjkMediaPlayer *mp) break; case FFP_MSG_ERROR: MPTRACE("FFP_MSG_ERROR: %d\n", msg.arg1); - post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); + if (msg.obj) { + jstring text = (*env)->NewStringUTF(env, (const char *)msg.obj); + post_event2(env, weak_thiz, msg.what, msg.arg1, msg.arg2, text); + J4A_DeleteLocalRef__p(env, &text); + } else { + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); + } break; case FFP_MSG_PREPARED: MPTRACE("FFP_MSG_PREPARED:\n"); @@ -963,7 +969,8 @@ static void message_loop_n(JNIEnv *env, IjkMediaPlayer *mp) case FFP_MSG_FIND_STREAM_INFO: MPTRACE("FFP_MSG_FIND_STREAM_INFO:\n"); //post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_FIND_STREAM_INFO, 0); - post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2);break; + post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); + break; case FFP_MSG_COMPONENT_OPEN: MPTRACE("FFP_MSG_COMPONENT_OPEN:\n"); //post_event(env, weak_thiz, MEDIA_INFO, MEDIA_INFO_COMPONENT_OPEN, 0); diff --git a/ijkmedia/ijkplayer/ff_ffmsg_queue.h b/ijkmedia/ijkplayer/ff_ffmsg_queue.h index d8bef768a0..1eb1d0e36f 100644 --- a/ijkmedia/ijkplayer/ff_ffmsg_queue.h +++ b/ijkmedia/ijkplayer/ff_ffmsg_queue.h @@ -76,7 +76,7 @@ inline static int msg_queue_put_private(MessageQueue *q, AVMessage *msg) q->recycle_count++; } else { q->alloc_count++; - msg1 = av_malloc(sizeof(AVMessage)); + msg1 = (AVMessage *)av_malloc(sizeof(AVMessage)); } #ifdef FFP_SHOW_MSG_RECYCLE int total_count = q->recycle_count + q->alloc_count; diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index 8f3d3420fa..abdbb81042 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -3120,6 +3120,7 @@ static int read_thread(void *arg) if (err < 0) { print_error(is->filename, err); ret = -1; + last_error = err; goto fail; } ffp_notify_msg1(ffp, FFP_MSG_OPEN_INPUT); @@ -3175,6 +3176,7 @@ static int read_thread(void *arg) av_log(NULL, AV_LOG_WARNING, "%s: could not find codec parameters\n", is->filename); ret = -1; + last_error = err; goto fail; } } @@ -3305,6 +3307,7 @@ static int read_thread(void *arg) av_log(NULL, AV_LOG_FATAL, "Failed to open file '%s' or configure filtergraph\n", is->filename); ret = -1; + last_error = AVERROR_STREAM_NOT_FOUND; goto fail; } if (is->audio_stream >= 0) { @@ -3503,7 +3506,9 @@ static int read_thread(void *arg) toggle_pause(ffp, 1); if (ffp->error) { av_log(ffp, AV_LOG_INFO, "ffp_toggle_buffering: error: %d\n", ffp->error); - ffp_notify_msg1(ffp, FFP_MSG_ERROR); + char error_msg[AV_ERROR_MAX_STRING_SIZE]; + av_strerror(ffp->error, error_msg, AV_ERROR_MAX_STRING_SIZE); + ffp_notify_msg4(ffp, FFP_MSG_ERROR, ffp->error, 0, error_msg, AV_ERROR_MAX_STRING_SIZE); } else { av_log(ffp, AV_LOG_INFO, "ffp_toggle_buffering: completed: OK\n"); ffp_notify_msg1(ffp, FFP_MSG_COMPLETED); @@ -3629,7 +3634,9 @@ static int read_thread(void *arg) if (!ffp->prepared || !is->abort_request) { ffp->last_error = last_error; - ffp_notify_msg2(ffp, FFP_MSG_ERROR, last_error); + char error_msg[AV_ERROR_MAX_STRING_SIZE]; + av_strerror(ffp->last_error, error_msg, AV_ERROR_MAX_STRING_SIZE); + ffp_notify_msg4(ffp, FFP_MSG_ERROR, ffp->last_error, 0, error_msg, AV_ERROR_MAX_STRING_SIZE); } SDL_DestroyMutex(wait_mutex); return 0; diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index 63c38d6656..8ccdf13822 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -806,7 +806,13 @@ int ijkmp_get_msg(IjkMediaPlayer *mp, AVMessage *msg, int block) } pthread_mutex_unlock(&mp->mutex); break; + case FFP_MSG_ERROR: + pthread_mutex_lock(&mp->mutex); + ijkmp_change_state_l(mp, MP_STATE_ERROR); + pthread_mutex_unlock(&mp->mutex); + break; } + if (continue_wait_next_msg) { msg_free_res(msg); continue; diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index e67a26e3f5..de455e8b1f 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.3.4" + spec.version = "0.3.5" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index b810691152..2d58b80918 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.4 + 0.3.5 CFBundleSignature ???? CFBundleVersion - 000304 + 000305 LSRequiresIPhoneOS UIFileSharingEnabled From aab16fdae03b475f74a126890dd01362768eaad9 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 23 Aug 2019 23:33:34 +0800 Subject: [PATCH 043/163] version: update missing version code --- ios/CocoaPodsPub/FIJKPlayer.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index de455e8b1f..16ea98270b 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.4/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.5/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files From 8106498626e31c45d5cd8ff26849725a63750fda Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 29 Aug 2019 18:52:20 +0800 Subject: [PATCH 044/163] =?UTF-8?q?ffplayer:=20add=20ffp=5Freset.=20reset?= =?UTF-8?q?=20and=20release=20some=20inner=20flag=E3=80=81=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ijkmedia/ijkplayer/ff_ffplay.c | 32 ++++++++++++++++++++++++++++++++ ijkmedia/ijkplayer/ijkplayer.c | 1 + 2 files changed, 33 insertions(+) diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index abdbb81042..3ac5853cc1 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -4004,6 +4004,38 @@ FFPlayer *ffp_create() return ffp; } +void ffp_reset(FFPlayer *ffp) +{ + if (!ffp) + return; + + ffp->start_time = AV_NOPTS_VALUE; + ffp->duration = AV_NOPTS_VALUE; + ffp->error = 0; + ffp->loop = 1; + ffp->first_audio_frame_rendered = 0; + ffp->first_video_frame_rendered = 0; + av_freep(&ffp->input_filename); + + memset(ffp->wanted_stream_spec, 0, sizeof(ffp->wanted_stream_spec)); + + + av_freep(&ffp->video_codec_info); + av_freep(&ffp->audio_codec_info); + av_freep(&ffp->subtitle_codec_info); + + ijkmeta_reset(ffp->meta); + + SDL_SpeedSamplerReset(&ffp->vfps_sampler); + SDL_SpeedSamplerReset(&ffp->vdps_sampler); + + ffp_reset_statistic(&ffp->stat); + ffp_reset_demux_cache_control(&ffp->dcc); + + //ffp_reset_internal(NULL); +} + + void ffp_destroy(FFPlayer *ffp) { if (!ffp) diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index 8ccdf13822..e27c7878b3 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -560,6 +560,7 @@ int ijkmp_reset(IjkMediaPlayer *mp) MPTRACE("ijkmp_reset()\n"); pthread_mutex_lock(&mp->mutex); int retval = ffp_wait_stop_l(mp->ffplayer); + ffp_reset(mp->ffplayer); pthread_mutex_unlock(&mp->mutex); MPTRACE("ijkmp_reset()=%d\n", retval); ijkmp_change_state_l(mp, MP_STATE_IDLE); From ca72042e12dd733c97148e5141886f32325d7854 Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 29 Aug 2019 21:17:10 +0800 Subject: [PATCH 045/163] version: update version to f0.3.6 --- NEWS.md | 4 ++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index 42032406a7..c29808df4f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,10 @@ tag next -------------------------------- +tag f0.3.6 +-------------------------------- +- ijkplayer: add ffp_reset, call ffp_reset in ijkmp_reset + tag f0.3.5 -------------------------------- - fijkplayer: change to state error when notify error diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 142fb7bc62..416fbd26e3 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.3.5 -VERSION_CODE=000305 +VERSION_NAME=0.3.6 +VERSION_CODE=000306 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 16ea98270b..5d92c3961e 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.3.5" + spec.version = "0.3.6" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.5/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.6/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files From 10e6c1a0015b223786bb1ddcc98c82dab0b28cce Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 4 Sep 2019 09:32:42 +0800 Subject: [PATCH 046/163] ffmpeg module: protocol + concat and crypto --- config/module.sh | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 5 +++-- ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/module.sh b/config/module.sh index 1ab4b073bb..4aec36f1eb 100755 --- a/config/module.sh +++ b/config/module.sh @@ -145,8 +145,8 @@ export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=text2movsub" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocols" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=async" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=bluray" -export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=concat" -export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=crypto" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=concat" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=crypto" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=ffrtmpcrypt" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=ffrtmphttp" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=gopher" diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 2d58b80918..45561a4663 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.5 + 0.3.6 CFBundleSignature ???? CFBundleVersion - 000305 + 000306 LSRequiresIPhoneOS UIFileSharingEnabled @@ -40,6 +40,7 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortrait UISupportedInterfaceOrientations~ipad diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index d48bdde137..902af5f5fd 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -1765,6 +1765,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; + CONFIGURATION_BUILD_DIR = "$(HOME)/Flutter/fijkplayer/ios/Frameworks"; CURRENT_PROJECT_VERSION = 0.8.8; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; From a75c5fbd3ca4adf34188f13754423c9456d33fdd Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 4 Sep 2019 10:19:21 +0800 Subject: [PATCH 047/163] release code 0.3.7 --- NEWS.md | 4 ++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index c29808df4f..0175456c05 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,10 @@ tag next -------------------------------- +tag f0.3.6 +-------------------------------- +- ffmpeg: enable concat and crypto protocol + tag f0.3.6 -------------------------------- - ijkplayer: add ffp_reset, call ffp_reset in ijkmp_reset diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 416fbd26e3..d788b8da0a 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.3.6 -VERSION_CODE=000306 +VERSION_NAME=0.3.7 +VERSION_CODE=000307 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 5d92c3961e..e352ad228e 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.3.6" + spec.version = "0.3.7" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.6/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.7/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 45561a4663..18c88f802e 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.6 + 0.3.7 CFBundleSignature ???? CFBundleVersion - 000306 + 000307 LSRequiresIPhoneOS UIFileSharingEnabled From 65f32f8bc811ad59e72c7a6039f7f56fde78f269 Mon Sep 17 00:00:00 2001 From: befovy <51129600+befovy@users.noreply.github.com> Date: Tue, 24 Sep 2019 13:11:44 +0800 Subject: [PATCH 048/163] feat: iOS off screen buffer renderer (#7) Add off screen glrender Render frame texture to CVPixelBuffer which can be passed to Flutter --- .../IJKMediaPlayer.xcodeproj/project.pbxproj | 16 + .../IJKMediaPlayer/IJKFFMediaPlayer.h | 6 +- .../IJKMediaPlayer/IJKFFMediaPlayer.m | 129 +++-- .../ijkmedia/ijkplayer/ios/ijkplayer_ios.h | 1 + .../ijkmedia/ijksdl/ios/IJKSDLFboGLView.h | 41 ++ .../ijkmedia/ijksdl/ios/IJKSDLFboGLView.m | 520 ++++++++++++++++++ .../ijkmedia/ijksdl/ios/IJKSDLGLView.h | 6 + .../ijkmedia/ijksdl/ios/IJKSDLGLView.m | 6 - .../ijksdl/ios/ijksdl_vout_ios_gles2.m | 6 + 9 files changed, 674 insertions(+), 57 deletions(-) create mode 100644 ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLFboGLView.h create mode 100644 ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLFboGLView.m diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 902af5f5fd..80e3f766c2 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -13,6 +13,12 @@ 215FF44E22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 215FF44F22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21B62DA12334C3FA005E1C40 /* IJKSDLFboGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 21B62D9F2334C3FA005E1C40 /* IJKSDLFboGLView.h */; }; + 21B62DA22334C3FA005E1C40 /* IJKSDLFboGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 21B62D9F2334C3FA005E1C40 /* IJKSDLFboGLView.h */; }; + 21B62DA32334C3FA005E1C40 /* IJKSDLFboGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 21B62D9F2334C3FA005E1C40 /* IJKSDLFboGLView.h */; }; + 21B62DA42334C3FA005E1C40 /* IJKSDLFboGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 21B62DA02334C3FA005E1C40 /* IJKSDLFboGLView.m */; }; + 21B62DA52334C3FA005E1C40 /* IJKSDLFboGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 21B62DA02334C3FA005E1C40 /* IJKSDLFboGLView.m */; }; + 21B62DA62334C3FA005E1C40 /* IJKSDLFboGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 21B62DA02334C3FA005E1C40 /* IJKSDLFboGLView.m */; }; 21DAA1592298FEBB007B0784 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8B1E63E59300568494 /* libcrypto.a */; }; 21DAA15A2298FEBE007B0784 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8C1E63E59300568494 /* libssl.a */; }; 21DAA15B2298FEC7007B0784 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5450AF8F1E63E59800568494 /* libz.tbd */; }; @@ -414,6 +420,8 @@ 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FIJKPlayer.h; sourceTree = ""; }; 217D1C5022C4567C0046FB63 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 217D1C5322C457720046FB63 /* universal-framework.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "universal-framework.sh"; sourceTree = SOURCE_ROOT; }; + 21B62D9F2334C3FA005E1C40 /* IJKSDLFboGLView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IJKSDLFboGLView.h; sourceTree = ""; }; + 21B62DA02334C3FA005E1C40 /* IJKSDLFboGLView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IJKSDLFboGLView.m; sourceTree = ""; }; 21DAA15C2298FED6007B0784 /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; }; 21E6F50322C39D0500611D3D /* FIJKPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FIJKPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 454316201A66493700676070 /* ffpipeline_ios.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffpipeline_ios.c; path = ijkmedia/ijkplayer/ios/pipeline/ffpipeline_ios.c; sourceTree = ""; }; @@ -1096,6 +1104,8 @@ E6EE92C01878236A009EAB56 /* IJKSDLAudioQueueController.h */, E6EE92C11878236A009EAB56 /* IJKSDLAudioQueueController.m */, E6EE92AD1878230C009EAB56 /* IJKSDLAudioUnitController.h */, + 21B62D9F2334C3FA005E1C40 /* IJKSDLFboGLView.h */, + 21B62DA02334C3FA005E1C40 /* IJKSDLFboGLView.m */, E6EE92AE1878230C009EAB56 /* IJKSDLAudioUnitController.m */, E6EE92B61878230C009EAB56 /* IJKSDLGLView.h */, E6EE92B71878230C009EAB56 /* IJKSDLGLView.m */, @@ -1153,6 +1163,7 @@ 21E6F4E722C39D0500611D3D /* IJKFFMediaPlayer.h in Headers */, 21E6F4E822C39D0500611D3D /* ff_ffplay_options.h in Headers */, 21E6F4EA22C39D0500611D3D /* IJKKVOController.h in Headers */, + 21B62DA32334C3FA005E1C40 /* IJKSDLFboGLView.h in Headers */, 21E6F4EB22C39D0500611D3D /* IJKNotificationManager.h in Headers */, 21E6F4EC22C39D0500611D3D /* ijkthreadpool.h in Headers */, 21E6F4ED22C39D0500611D3D /* ijkiomanager.h in Headers */, @@ -1194,6 +1205,7 @@ 549385C41E640456001AE08D /* IJKMediaFrameworkWithSSL.h in Headers */, 5450B0291E63EA4300568494 /* ff_ffplay_options.h in Headers */, 5450B02B1E63EA4300568494 /* IJKKVOController.h in Headers */, + 21B62DA22334C3FA005E1C40 /* IJKSDLFboGLView.h in Headers */, 5450B02C1E63EA4300568494 /* IJKNotificationManager.h in Headers */, 5450B02D1E63EA4300568494 /* ijkthreadpool.h in Headers */, 5450B02E1E63EA4300568494 /* ijkiomanager.h in Headers */, @@ -1235,6 +1247,7 @@ E6C459BD1C7089AB004831EC /* ff_ffplay_options.h in Headers */, E654EA8F1B6B27E600B0F2D0 /* IJKMediaFramework.h in Headers */, E6C2E7BE1C92BD3600E59229 /* IJKKVOController.h in Headers */, + 21B62DA12334C3FA005E1C40 /* IJKSDLFboGLView.h in Headers */, E69808A01C7EB2040048A46C /* IJKNotificationManager.h in Headers */, 54CF8A501E15287D00309DD5 /* ijkthreadpool.h in Headers */, 54CF8A391E1526F800309DD5 /* ijkiomanager.h in Headers */, @@ -1492,6 +1505,7 @@ 21E6F49722C39D0500611D3D /* ijksegment.c in Sources */, 21E6F49822C39D0500611D3D /* IJKMediaUtils.m in Sources */, 21E6F49922C39D0500611D3D /* common.c in Sources */, + 21B62DA62334C3FA005E1C40 /* IJKSDLFboGLView.m in Sources */, 21E6F49A22C39D0500611D3D /* ijksdl_aout_ios_audiounit.m in Sources */, 21E6F49B22C39D0500611D3D /* ijklivehook.c in Sources */, 21E6F49C22C39D0500611D3D /* ijkurlhook.c in Sources */, @@ -1584,6 +1598,7 @@ 5450AFDF1E63EA4300568494 /* ijksegment.c in Sources */, 5450AFE01E63EA4300568494 /* IJKMediaUtils.m in Sources */, 5450AFE11E63EA4300568494 /* common.c in Sources */, + 21B62DA52334C3FA005E1C40 /* IJKSDLFboGLView.m in Sources */, 5450AFE21E63EA4300568494 /* ijksdl_aout_ios_audiounit.m in Sources */, 5450AFE31E63EA4300568494 /* ijklivehook.c in Sources */, 5450AFE41E63EA4300568494 /* ijkurlhook.c in Sources */, @@ -1676,6 +1691,7 @@ 54A029B91D4700E6001C61C1 /* ijksegment.c in Sources */, E654EAA61B6B283700B0F2D0 /* IJKMediaUtils.m in Sources */, E6C459931C7030B6004831EC /* common.c in Sources */, + 21B62DA42334C3FA005E1C40 /* IJKSDLFboGLView.m in Sources */, E654EAC81B6B288A00B0F2D0 /* ijksdl_aout_ios_audiounit.m in Sources */, E69BE5721B946FF600AFBA3F /* ijklivehook.c in Sources */, 54A029BA1D4700E6001C61C1 /* ijkurlhook.c in Sources */, diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index a1c5864d00..24503ca004 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -52,10 +52,10 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { @end -@interface IJKFFMediaPlayer : NSObject - -- (IJKFFMediaPlayer *)init; +@interface IJKFFMediaPlayer : NSObject +- (instancetype)init; +- (instancetype)initWithFbo; - (int) setDataSource:(NSString *)url; - (int) prepareAsync; - (int) start; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index b918a21580..2a744ac2c8 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -27,6 +27,11 @@ #import "IJKFFOptions.h" #import "ijkplayer/ijkplayer.h" +typedef NS_ENUM(NSInteger, IJKSDLFFPlayrRenderType) { + IJKSDLFFPlayrRenderTypeGlView = 0, + IJKSDLFFPlayrRenderTypeFboView = 1, +}; + @interface IJKFFWeakHolder : NSObject @property (nonatomic, weak) id object; @@ -35,17 +40,16 @@ @interface IJKFFWeakHolder : NSObject @implementation IJKFFWeakHolder @end - @implementation IJKFFMediaPlayer { IjkMediaPlayer* _nativeMediaPlayer; IJKFFMoviePlayerMessagePool *_msgPool; NSMutableSet> *_eventHandlers; - id _cvPBView; - - NSString *_dataSource; - + CFDictionaryRef _optionsDictionary; + IJKSDLFboGLView* _fboView; + id _cvPBView; + IJKSDLFFPlayrRenderType _renderType; } @@ -92,32 +96,45 @@ - (IJKFFMediaPlayer *)init { self = [super init]; if (self) { - ijkmp_global_init(); - _msgPool = [[IJKFFMoviePlayerMessagePool alloc] init]; - _eventHandlers = [[NSMutableSet alloc] init]; + _renderType = IJKSDLFFPlayrRenderTypeGlView; + [self nativeSetup]; + } + return self; +} + +- (instancetype)initWithFbo +{ + self = [super init]; + if (self) { + _renderType = IJKSDLFFPlayrRenderTypeFboView; [self nativeSetup]; - - ijkmp_set_option(_nativeMediaPlayer, IJKMP_OPT_CATEGORY_PLAYER, "overlay-format", "fcc-_es2"); - - [[IJKAudioKit sharedInstance] setupAudioSession]; - _optionsDictionary = nil; - _isThirdGLView = true; - _scaleFactor = 1.0f; - _fps = 1.0f; } return self; } + - (void) nativeSetup { - _nativeMediaPlayer = ijkmp_ios_create(ff_media_player_msg_loop); + ijkmp_global_init(); + _msgPool = [[IJKFFMoviePlayerMessagePool alloc] init]; + _eventHandlers = [[NSMutableSet alloc] init]; + _nativeMediaPlayer = ijkmp_ios_create(ff_media_player_msg_loop); + ijkmp_set_option(_nativeMediaPlayer, IJKMP_OPT_CATEGORY_PLAYER, "overlay-format", "fcc-_es2"); + IJKFFWeakHolder *weakHolder = [[IJKFFWeakHolder alloc] init]; weakHolder.object = self; ijkmp_set_weak_thiz(_nativeMediaPlayer, (__bridge_retained void *) self); ijkmp_set_inject_opaque(_nativeMediaPlayer, (__bridge_retained void *) weakHolder); ijkmp_set_ijkio_inject_opaque(_nativeMediaPlayer, (__bridge_retained void *) weakHolder); + + [[IJKAudioKit sharedInstance] setupAudioSession]; + _optionsDictionary = nil; + _isThirdGLView = true; + _scaleFactor = 1.0f; + _fps = 1.0f; + } - (void)postEvent: (IJKFFMoviePlayerMessage *)msg @@ -139,7 +156,6 @@ - (int) prepareAsync - (int) setDataSource:(NSString *)url { - _dataSource = url; return ijkmp_set_data_source(_nativeMediaPlayer, [url UTF8String]); } @@ -237,6 +253,9 @@ - (void) shutdown [_eventHandlers removeAllObjects]; ijkmp_dec_ref_p(&_nativeMediaPlayer); + + _cvPBView = nil; + _fboView = nil; } - (int) reset @@ -262,7 +281,6 @@ - (void)setOptionIntValue:(int64_t)value } - - (void) addIJKMPEventHandler:(id) handler { [_eventHandlers addObject:handler]; @@ -273,6 +291,36 @@ - (void) removeIJKMPEventHandler:(id) handler [_eventHandlers removeObject:handler]; } + + +- (UIImage *)snapshot { + return nil; +} + +- (void) setupCVPixelBufferView:(id) cvPBView +{ + _cvPBView = cvPBView; + + if (_renderType == IJKSDLFFPlayrRenderTypeFboView) { + _fboView = [[IJKSDLFboGLView alloc] initWithIJKCVPBViewProtocol:self]; + ijkmp_ios_set_glview(_nativeMediaPlayer, _fboView); + } else if (_renderType == IJKSDLFFPlayrRenderTypeGlView) { + const void *keys[] = { + kCVPixelBufferOpenGLESCompatibilityKey, + kCVPixelBufferIOSurfacePropertiesKey, + }; + const void *values[] = { + (__bridge const void *) (@YES), + (__bridge const void *) ([NSDictionary dictionary]), + }; + + _optionsDictionary = CFDictionaryCreate(kCFAllocatorDefault, keys, values, 2, + &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + ijkmp_ios_set_glview(_nativeMediaPlayer, self); + } +} + +// IJKSDL GLview call this when display frame - (void) display_pixels:(IJKOverlay *)overlay { if (overlay->pixel_buffer != nil && _cvPBView != nil) { @@ -283,15 +331,15 @@ - (void) display_pixels:(IJKOverlay *)overlay // CVPixelBufferCreateWithBytes lead to crash if reset player // and then setDataSource and play again. /* - int retval = CVPixelBufferCreateWithBytes( - kCFAllocatorDefault, - (size_t) overlay->w, - (size_t) overlay->h, - kCVPixelFormatType_32BGRA, - overlay->pixels[0], - overlay->pitches[0], - NULL, NULL, _optionsDictionary, - &pixelBuffer); + int retval = CVPixelBufferCreateWithBytes( + kCFAllocatorDefault, + (size_t) overlay->w, + (size_t) overlay->h, + kCVPixelFormatType_32BGRA, + overlay->pixels[0], + overlay->pitches[0], + NULL, NULL, _optionsDictionary, + &pixelBuffer); */ int retval = CVPixelBufferCreate(kCFAllocatorDefault, (size_t) overlay->w, @@ -310,27 +358,12 @@ - (void) display_pixels:(IJKOverlay *)overlay } } -- (void) setupCVPixelBufferView:(id) cvPBView -{ - _cvPBView = cvPBView; - - const void *keys[] = { - kCVPixelBufferOpenGLESCompatibilityKey, - kCVPixelBufferIOSurfacePropertiesKey, - }; - const void *values[] = { - (__bridge const void *) (@YES), - (__bridge const void *) ([NSDictionary dictionary]), - }; - - _optionsDictionary = CFDictionaryCreate(kCFAllocatorDefault, keys, values, 2, - &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - ijkmp_ios_set_glview(_nativeMediaPlayer, self); -} -- (UIImage *)snapshot -{ - return nil; +// IJKSDL Fbo view call this delegate when display frame +- (void)display_pixelbuffer:(CVPixelBufferRef)pixelbuffer { + if (_cvPBView) { + [_cvPBView display_pixelbuffer:pixelbuffer]; + } } @end diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h index 9b093d58ac..fea3ca8ada 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h @@ -23,6 +23,7 @@ #include "ijkplayer/ijkplayer.h" #import "IJKSDLGLView.h" +#import "IJKSDLFboGLView.h" // ref_count is 1 after open IjkMediaPlayer *ijkmp_ios_create(int (*msg_loop)(void*)); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLFboGLView.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLFboGLView.h new file mode 100644 index 0000000000..237d8712c8 --- /dev/null +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLFboGLView.h @@ -0,0 +1,41 @@ +/* + * IJKSDLFboGLView.h + * + * Copyright (c) 2013 Bilibili + * Copyright (c) 2019 Befovy + * + * 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 +#import "IJKSDLGLViewProtocol.h" + +#include "ijksdl/ijksdl_vout.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface IJKSDLFboGLView : NSObject + +- (instancetype)initWithIJKCVPBViewProtocol:(id) cvPBView; + +- (void) display: (SDL_VoutOverlay *) overlay; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLFboGLView.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLFboGLView.m new file mode 100644 index 0000000000..212a901768 --- /dev/null +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLFboGLView.m @@ -0,0 +1,520 @@ +/* + * IJKSDLFboGLView.m + * + * Copyright (c) 2013 Bilibili + * Copyright (c) 2019 Befovy + * + * 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 "IJKSDLFboGLView.h" +#import "IJKSDLGLView.h" +#include "ijksdl/ijksdl_timer.h" +#include "ijksdl/ios/ijksdl_ios.h" +#include "ijksdl/ijksdl_gles2.h" + +@implementation IJKSDLFboGLView { + NSRecursiveLock *_glActiveLock; + BOOL _glActivePaused; + + EAGLContext *_context; + GLuint _framebuffer; + + IJK_GLES2_Renderer *_renderer; + int _rendererGravity; + + int _tryLockErrorCount; + BOOL _didSetupGL; + BOOL _didStopGL; + NSMutableArray *_registeredNotifications; + + IJKSDLGLViewApplicationState _applicationState; + + CVOpenGLESTextureCacheRef _textureCache; + CVOpenGLESTextureRef _texture; + CVPixelBufferRef _target; + CGSize _renderSize; + CGSize _fboSize; + + id _cvPBView; +} + +@synthesize fps = _fps; +@synthesize isThirdGLView = _isThirdGLView; +@synthesize scaleFactor = _scaleFactor; + +- (instancetype)initWithIJKCVPBViewProtocol:(id) cvPBView; +{ + self = [super init]; + if (self) { + _didSetupGL = NO; + _tryLockErrorCount = 0; + _isThirdGLView = false; + _glActiveLock = [[NSRecursiveLock alloc] init]; + _registeredNotifications = [[NSMutableArray alloc] init]; + [self registerApplicationObservers]; + + _fboSize = CGSizeMake(0, 0); + _renderSize = CGSizeMake(720, 720); + _cvPBView = cvPBView; + + if ([self isApplicationActive] == YES) + [self setupGLOnce]; + } + return self; +} + +- (BOOL)createTextureCache:(EAGLContext *)context +{ + CVReturn err = noErr; + if (_textureCache == nil) { + err = CVOpenGLESTextureCacheCreate(kCFAllocatorDefault, NULL, _context, NULL, &_textureCache); + ALOGD("%s ret %d", __func__, (int)err); + } + if (err != noErr) { + ALOGE("Error at CVOpenGLESTextureCacheCreate %d", err); + return NO; + } + return YES; +} + +- (BOOL)createBfo +{ + if (_framebuffer) { + glDeleteFramebuffers(1, &_framebuffer); + _framebuffer = 0; + } + + glGenFramebuffers(1, &_framebuffer); + glBindFramebuffer(GL_FRAMEBUFFER, _framebuffer); + ALOGD("%s glGenFramebuffers", __func__); + + CFDictionaryRef empty; // empty value for attr value. + CFMutableDictionaryRef attrs; + empty = CFDictionaryCreate(kCFAllocatorDefault, // our empty IOSurface properties dictionary + NULL, + NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + attrs = CFDictionaryCreateMutable(kCFAllocatorDefault, 1, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + + CFDictionarySetValue(attrs, kCVPixelBufferIOSurfacePropertiesKey, empty); + + if (_target) { + CFRelease(_target); + _target = nil; + } + + CVPixelBufferCreate(kCFAllocatorDefault, _fboSize.width, _fboSize.height, + kCVPixelFormatType_32BGRA, + attrs, + &_target); + + CFRelease(attrs); + CFRelease(empty); + + ALOGD("CVPixelBufferCreate %f %f\n", _fboSize.width, _fboSize.height); + if (_texture) { + CFRelease(_texture); + } + + CVOpenGLESTextureCacheCreateTextureFromImage (kCFAllocatorDefault, + _textureCache, + _target, + NULL, // texture attributes + GL_TEXTURE_2D, + GL_RGBA, // opengl format + _fboSize.width, + _fboSize.height, + GL_BGRA, // native iOS format + GL_UNSIGNED_BYTE, + 0, + &_texture); + + + + glBindTexture(CVOpenGLESTextureGetTarget(_texture), CVOpenGLESTextureGetName(_texture)); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + + glTexImage2D(GL_TEXTURE_2D, + 0, GL_RGBA, _fboSize.width, _fboSize.height, + 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + + glGenFramebuffers(1, &_framebuffer); + glBindFramebuffer(GL_FRAMEBUFFER, _framebuffer); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, CVOpenGLESTextureGetName(_texture), 0); + + if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { + NSLog(@"failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER)); + return NO; + } + return YES; +} + +- (BOOL)setupEAGLContext:(EAGLContext *)context +{ + if (_renderSize.height <= 0 || _renderSize.width <= 0) + return NO; + + if (![self createTextureCache:context]) + return NO; + + BOOL ret = YES; + if (_renderSize.height != _fboSize.height || _renderSize.width != _fboSize.width) { + _fboSize = _renderSize; + ret = [self createBfo]; + } + return ret; +} + +- (BOOL)setupGL +{ + if (_didSetupGL) + return YES; + _scaleFactor = 1.0f; + _context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; + if (_context == nil) { + NSLog(@"failed to setup EAGLContext\n"); + return NO; + } + + EAGLContext *prevContext = [EAGLContext currentContext]; + [EAGLContext setCurrentContext:_context]; + + _didSetupGL = NO; + if ([self setupEAGLContext:_context]) { + NSLog(@"OK setup GL\n"); + _didSetupGL = YES; + } + + [EAGLContext setCurrentContext:prevContext]; + return _didSetupGL; +} + +- (BOOL)setupGLOnce +{ + if (_didSetupGL) + return YES; + + if (![self tryLockGLActive]) + return NO; + + BOOL didSetupGL = [self setupGL]; + [self unlockGLActive]; + return didSetupGL; +} + +- (BOOL)isApplicationActive +{ + switch (_applicationState) { + case IJKSDLGLViewApplicationForegroundState: + return YES; + case IJKSDLGLViewApplicationBackgroundState: + return NO; + default: { + UIApplicationState appState = [UIApplication sharedApplication].applicationState; + switch (appState) { + case UIApplicationStateActive: + _applicationState = IJKSDLGLViewApplicationForegroundState; + return YES; + case UIApplicationStateInactive: + case UIApplicationStateBackground: + default: + _applicationState = IJKSDLGLViewApplicationBackgroundState; + return NO; + } + } + } +} + +- (void)dealloc +{ + [self lockGLActive]; + + _didStopGL = YES; + + EAGLContext *prevContext = [EAGLContext currentContext]; + [EAGLContext setCurrentContext:_context]; + + IJK_GLES2_Renderer_reset(_renderer); + IJK_GLES2_Renderer_freeP(&_renderer); + + if (_framebuffer) { + glDeleteFramebuffers(1, &_framebuffer); + _framebuffer = 0; + } + + _cvPBView = nil; + + if (_target) { + CFRelease(_target); + _target = nil; + } + + if (_textureCache) { + CFRelease(_textureCache); + _textureCache = nil; + } + + if (_texture) { + CFRelease(_texture); + _texture = nil; + } + + glFinish(); + + [EAGLContext setCurrentContext:prevContext]; + + _context = nil; + + [self unregisterApplicationObservers]; + + [self unlockGLActive]; +} + + + +- (void) setFitmode:(int)x +{ + +} + + +- (BOOL)setupRenderer: (SDL_VoutOverlay *) overlay +{ + if (overlay == nil) + return _renderer != nil; + + if (!IJK_GLES2_Renderer_isValid(_renderer) || + !IJK_GLES2_Renderer_isFormat(_renderer, overlay->format)) { + + IJK_GLES2_Renderer_reset(_renderer); + IJK_GLES2_Renderer_freeP(&_renderer); + + _renderer = IJK_GLES2_Renderer_create(overlay); + if (!IJK_GLES2_Renderer_isValid(_renderer)) + return NO; + + if (!IJK_GLES2_Renderer_use(_renderer)) + return NO; + + IJK_GLES2_Renderer_setGravity(_renderer, _rendererGravity, _renderSize.width, _renderSize.height); + } + + return YES; +} + +- (void) display: (SDL_VoutOverlay *) overlay +{ + if ([self isApplicationActive] == NO) + return; + + if (_didSetupGL == NO) + return; + + if (![self tryLockGLActive]) { + if (0 == (_tryLockErrorCount % 100)) { + NSLog(@"IJKSDLGLView:display: unable to tryLock GL active: %d\n", _tryLockErrorCount); + } + _tryLockErrorCount++; + return; + } + _tryLockErrorCount = 0; + if (_context && !_didStopGL) { + EAGLContext *prevContext = [EAGLContext currentContext]; + [EAGLContext setCurrentContext:_context]; + [self displayInternal:overlay]; + [EAGLContext setCurrentContext:prevContext]; + } + + [self unlockGLActive]; +} + + +// NOTE: overlay could be NULl +- (void)displayInternal: (SDL_VoutOverlay *) overlay +{ + if (overlay != NULL) { + _renderSize.width = overlay->w; + _renderSize.height = overlay->h; + [self setupEAGLContext:_context]; + } + if (![self setupRenderer:overlay]) { + if (!overlay && !_renderer) { + NSLog(@"IJKSDLFboGLView: setupDisplay not ready\n"); + } else { + NSLog(@"IJKSDLFboGLView: setupDisplay failed\n"); + } + return; + } + + IJK_GLES2_Renderer_setGravity(_renderer, 1, _renderSize.width, _renderSize.height); + + glBindFramebuffer(GL_FRAMEBUFFER, _framebuffer); + glClearColor(1, 0, 0, 1.0); + glClear(GL_COLOR_BUFFER_BIT); + glViewport(0, 0, _renderSize.width, _renderSize.height); + + if (!IJK_GLES2_Renderer_renderOverlay(_renderer, overlay)) + ALOGE("[EGL] IJK_GLES2_render failed\n"); + + [_context presentRenderbuffer:GL_RENDERBUFFER]; + + + glFlush(); + glBindFramebuffer(GL_FRAMEBUFFER, 0); + + if (_cvPBView) { + [_cvPBView display_pixelbuffer:_target]; + } +} + +- (void) lockGLActive +{ + [_glActiveLock lock]; +} + +- (void) unlockGLActive +{ + [_glActiveLock unlock]; +} + +- (BOOL) tryLockGLActive +{ + if (![_glActiveLock tryLock]) + return NO; + + if (_glActivePaused) { + [_glActiveLock unlock]; + return NO; + } + + return YES; +} + +- (void)toggleGLPaused:(BOOL)paused +{ + [self lockGLActive]; + if (!_glActivePaused && paused) { + if (_context != nil) { + EAGLContext *prevContext = [EAGLContext currentContext]; + [EAGLContext setCurrentContext:_context]; + glFinish(); + [EAGLContext setCurrentContext:prevContext]; + } + } + _glActivePaused = paused; + [self unlockGLActive]; +} + +- (void)registerApplicationObservers +{ + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(applicationWillEnterForeground) + name:UIApplicationWillEnterForegroundNotification + object:nil]; + [_registeredNotifications addObject:UIApplicationWillEnterForegroundNotification]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(applicationDidBecomeActive) + name:UIApplicationDidBecomeActiveNotification + object:nil]; + [_registeredNotifications addObject:UIApplicationDidBecomeActiveNotification]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(applicationWillResignActive) + name:UIApplicationWillResignActiveNotification + object:nil]; + [_registeredNotifications addObject:UIApplicationWillResignActiveNotification]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(applicationDidEnterBackground) + name:UIApplicationDidEnterBackgroundNotification + object:nil]; + [_registeredNotifications addObject:UIApplicationDidEnterBackgroundNotification]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(applicationWillTerminate) + name:UIApplicationWillTerminateNotification + object:nil]; + [_registeredNotifications addObject:UIApplicationWillTerminateNotification]; +} + +- (void)unregisterApplicationObservers +{ + for (NSString *name in _registeredNotifications) { + [[NSNotificationCenter defaultCenter] removeObserver:self + name:name + object:nil]; + } +} + +- (void)applicationWillEnterForeground +{ + NSLog(@"IJKSDLGLView:applicationWillEnterForeground: %d", (int)[UIApplication sharedApplication].applicationState); + [self setupGLOnce]; + _applicationState = IJKSDLGLViewApplicationForegroundState; + [self toggleGLPaused:NO]; +} + +- (void)applicationDidBecomeActive +{ + NSLog(@"IJKSDLGLView:applicationDidBecomeActive: %d", (int)[UIApplication sharedApplication].applicationState); + [self setupGLOnce]; + [self toggleGLPaused:NO]; +} + +- (void)applicationWillResignActive +{ + NSLog(@"IJKSDLGLView:applicationWillResignActive: %d", (int)[UIApplication sharedApplication].applicationState); + [self toggleGLPaused:YES]; + glFinish(); +} + +- (void)applicationDidEnterBackground +{ + NSLog(@"IJKSDLGLView:applicationDidEnterBackground: %d", (int)[UIApplication sharedApplication].applicationState); + _applicationState = IJKSDLGLViewApplicationBackgroundState; + [self toggleGLPaused:YES]; + glFinish(); +} + +- (void)applicationWillTerminate +{ + NSLog(@"IJKSDLGLView:applicationWillTerminate: %d", (int)[UIApplication sharedApplication].applicationState); + [self toggleGLPaused:YES]; +} + + +- (void)display_pixels:(IJKOverlay *)overlay +{ +} + +- (UIImage *)snapshot { + return nil; +} + +@end diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h index f7ac0ff602..94eafb8b8b 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h @@ -28,6 +28,12 @@ #include "ijksdl/ijksdl_vout.h" +typedef NS_ENUM(NSInteger, IJKSDLGLViewApplicationState) { + IJKSDLGLViewApplicationUnknownState = 0, + IJKSDLGLViewApplicationForegroundState = 1, + IJKSDLGLViewApplicationBackgroundState = 2 +}; + @interface IJKSDLGLView : UIView - (id) initWithFrame:(CGRect)frame; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m index 0a9b15e110..ffecb6b8f5 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m @@ -28,12 +28,6 @@ #include "ijksdl/ios/ijksdl_ios.h" #include "ijksdl/ijksdl_gles2.h" -typedef NS_ENUM(NSInteger, IJKSDLGLViewApplicationState) { - IJKSDLGLViewApplicationUnknownState = 0, - IJKSDLGLViewApplicationForegroundState = 1, - IJKSDLGLViewApplicationBackgroundState = 2 -}; - @interface IJKSDLGLView() @property(atomic,strong) NSRecursiveLock *glActiveLock; @property(atomic) BOOL glActivePaused; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m index e06364d316..f96f0b77fa 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m @@ -29,6 +29,7 @@ #include "ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.h" #include "ijksdl_vout_overlay_videotoolbox.h" #import "IJKSDLGLView.h" +#import "IJKSDLFboGLView.h" typedef struct SDL_VoutSurface_Opaque { SDL_Vout *vout; @@ -37,6 +38,7 @@ struct SDL_Vout_Opaque { id gl_viewp; IJKSDLGLView *gl_view; + IJKSDLFboGLView *fbo_viewl; BOOL response_display_pixels; BOOL third_part; int no_glview_warning; @@ -122,6 +124,8 @@ static int vout_display_overlay_l(SDL_Vout *vout, SDL_VoutOverlay *overlay) } } else if (opaque->gl_view){ [opaque->gl_view display:overlay]; + } else if (opaque->fbo_viewl) { + [opaque->fbo_viewl display:overlay]; } return 0; } @@ -176,6 +180,8 @@ static void SDL_VoutIos_SetGLView_l(SDL_Vout *vout, id vie opaque->response_display_pixels = YES; if ([opaque->gl_viewp isKindOfClass:[IJKSDLGLView class] ]){ opaque->gl_view = (IJKSDLGLView *)opaque->gl_viewp; + } else if ([opaque->gl_viewp isKindOfClass:[IJKSDLFboGLView class] ]) { + opaque->fbo_viewl = (IJKSDLFboGLView *)opaque->gl_viewp; } } } From 9b6dca26091d1f4762ec90821dd13cc0806a0a5e Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 24 Sep 2019 13:20:38 +0800 Subject: [PATCH 049/163] feat: add FileMediaDataSource StreamDataSource --- .../player/misc/FileMediaDataSource.java | 56 +++++++++++++++++++ .../media/player/misc/StreamDataSource.java | 55 ++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/FileMediaDataSource.java create mode 100644 android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/StreamDataSource.java diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/FileMediaDataSource.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/FileMediaDataSource.java new file mode 100644 index 0000000000..025417b3ad --- /dev/null +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/FileMediaDataSource.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2015 Bilibili + * Copyright (C) 2019 Befovy + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package tv.danmaku.ijk.media.player.misc; + +import java.io.File; +import java.io.IOException; +import java.io.RandomAccessFile; + + +public class FileMediaDataSource implements IMediaDataSource { + private RandomAccessFile mFile; + private long mFileSize; + + public FileMediaDataSource(File file) throws IOException { + mFile = new RandomAccessFile(file, "r"); + mFileSize = mFile.length(); + } + + @Override + public int readAt(long position, byte[] buffer, int offset, int size) throws IOException { + if (mFile.getFilePointer() != position) + mFile.seek(position); + + if (size == 0) + return 0; + + return mFile.read(buffer, 0, size); + } + + @Override + public long getSize() throws IOException { + return mFileSize; + } + + @Override + public void close() throws IOException { + mFileSize = 0; + mFile.close(); + mFile = null; + } +} diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/StreamDataSource.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/StreamDataSource.java new file mode 100644 index 0000000000..74734dc7e7 --- /dev/null +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/StreamDataSource.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2015 Bilibili + * Copyright (C) 2019 Befovy + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package tv.danmaku.ijk.media.player.misc; + +import java.io.IOException; +import java.io.InputStream; + +public class StreamDataSource implements IMediaDataSource { + private InputStream mIs; + private long mPosition = 0; + + public StreamDataSource(InputStream mIs) { + this.mIs = mIs; + } + + @Override + public int readAt(long position, byte[] buffer, int offset, int size) throws IOException { + if (size <= 0) + return size; + if (mPosition != position) { + mIs.reset(); + mPosition = mIs.skip(position); + } + int length = mIs.read(buffer, offset, size); + mPosition += length; + return length; + } + + @Override + public long getSize() throws IOException { + return mIs.available(); + } + + @Override + public void close() throws IOException { + if (mIs != null) + mIs.close(); + mIs = null; + } +} From 0cff1b4ca34a4cd293628883fceb72146f5805c1 Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 24 Sep 2019 13:26:39 +0800 Subject: [PATCH 050/163] refactor: check more condition to start play add render_wait_start and start_on_prepared check to start play --- ijkmedia/ijkplayer/ff_ffplay.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index 3ac5853cc1..fc9f47238b 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -3333,7 +3333,8 @@ static int read_thread(void *arg) ffp->prepared = true; ffp_notify_msg1(ffp, FFP_MSG_PREPARED); if (!ffp->render_wait_start && !ffp->start_on_prepared) { - while (is->pause_req && !is->abort_request) { + while (is->pause_req && !is->abort_request && + !ffp->render_wait_start && !ffp->start_on_prepared) { SDL_Delay(20); } } From a0331c72b6c3232da48d8c93f14c3efabba59694 Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 24 Sep 2019 13:30:40 +0800 Subject: [PATCH 051/163] chore: update NEWS.md, add tag f0.3.8 --- NEWS.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 0175456c05..1822c84125 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,11 @@ tag next -------------------------------- +tag f0.3.8 +-------------------------------- +- ijkplayer: ios vout add render to pixelbuffer, off screen buffer +- android: add FileMediaDataSource StreamDataSource -tag f0.3.6 +tag f0.3.7 -------------------------------- - ffmpeg: enable concat and crypto protocol From 6c1f7fce868a815e723486fd2a9cb9b53cacee29 Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 24 Sep 2019 13:33:10 +0800 Subject: [PATCH 052/163] chore: update release number to f0.3.8 --- android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index d788b8da0a..4358a36d80 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.3.7 -VERSION_CODE=000307 +VERSION_NAME=0.3.8 +VERSION_CODE=000308 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index e352ad228e..1ceb6e8bcb 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.3.7" + spec.version = "0.3.8" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.7/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.8/FIJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 18c88f802e..7b74de863d 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.7 + 0.3.8 CFBundleSignature ???? CFBundleVersion - 000307 + 000308 LSRequiresIPhoneOS UIFileSharingEnabled From 2d258bea3567344cf4167733b60fbff8ce3b83b0 Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 24 Sep 2019 14:52:09 +0800 Subject: [PATCH 053/163] chore: add static_framework true for pod spec --- ios/CocoaPodsPub/FIJKPlayer.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 1ceb6e8bcb..9386e9c62b 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -84,6 +84,7 @@ Pod::Spec.new do |spec| # Not including the public_header_files will make all headers public. # + spec.static_framework = true # spec.source_files = "Classes", "Classes/**/*.{h,m}" # spec.exclude_files = "Classes/Exclude" spec.vendored_frameworks = 'FIJKPlayer.framework' From c5ef83610ea338b05b3d006dfd65c9fb3b7fe043 Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 24 Sep 2019 23:59:37 +0800 Subject: [PATCH 054/163] chore: change build name FIJKPlayer.framework to IJKPlayer.framework --- ios/CocoaPodsPub/FIJKPlayer.podspec | 13 +++------ .../FIJKPlayer/{FIJKPlayer.h => IJKPlayer.h} | 28 +++++++++---------- .../IJKMediaPlayer.xcodeproj/project.pbxproj | 24 ++++++++-------- 3 files changed, 30 insertions(+), 35 deletions(-) rename ios/IJKMediaPlayer/FIJKPlayer/{FIJKPlayer.h => IJKPlayer.h} (82%) diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 9386e9c62b..f790287aa7 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.8/FIJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.8/IJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files @@ -84,13 +84,8 @@ Pod::Spec.new do |spec| # Not including the public_header_files will make all headers public. # - spec.static_framework = true - # spec.source_files = "Classes", "Classes/**/*.{h,m}" - # spec.exclude_files = "Classes/Exclude" - spec.vendored_frameworks = 'FIJKPlayer.framework' - # spec.resource = 'FIJKPlayer.framework' - - # spec.public_header_files = "Classes/**/*.h" + spec.vendored_frameworks = 'IJKPlayer.framework' + #spec.public_header_files = "IJKPlayer.framework/Headers/*.h" # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # @@ -118,7 +113,7 @@ Pod::Spec.new do |spec| spec.requires_arc = true spec.prepare_command = <<-CMD - tar -xvf ./FIJKPlayer.tar.xz + tar -xvf ./IJKPlayer.tar.xz CMD # spec.library = "iconv" diff --git a/ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h b/ios/IJKMediaPlayer/FIJKPlayer/IJKPlayer.h similarity index 82% rename from ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h rename to ios/IJKMediaPlayer/FIJKPlayer/IJKPlayer.h index 95d43a27a4..176c58526c 100644 --- a/ios/IJKMediaPlayer/FIJKPlayer/FIJKPlayer.h +++ b/ios/IJKMediaPlayer/FIJKPlayer/IJKPlayer.h @@ -1,5 +1,5 @@ /* - * FIJKPlayer.h + * IJKPlayer.h * * Copyright (c) 2019 Befovy * @@ -23,23 +23,23 @@ #import //! Project version number for FIJKPlayer. -FOUNDATION_EXPORT double FIJKPlayerVersionNumber; +FOUNDATION_EXPORT double IJKPlayerVersionNumber; //! Project version string for FIJKPlayer. -FOUNDATION_EXPORT const unsigned char FIJKPlayerVersionString[]; +FOUNDATION_EXPORT const unsigned char IJKPlayerVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import // backward compatible for old names #define IJKMediaPlaybackIsPreparedToPlayDidChangeNotification IJKMPMediaPlaybackIsPreparedToPlayDidChangeNotification diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 80e3f766c2..1db3aa45fa 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -12,7 +12,7 @@ 215FF44D22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 215FF44E22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; 215FF44F22B7E83500FAAD0E /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */; }; - 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 217D1C5122C4567C0046FB63 /* IJKPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 217D1C4F22C4567C0046FB63 /* IJKPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21B62DA12334C3FA005E1C40 /* IJKSDLFboGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 21B62D9F2334C3FA005E1C40 /* IJKSDLFboGLView.h */; }; 21B62DA22334C3FA005E1C40 /* IJKSDLFboGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 21B62D9F2334C3FA005E1C40 /* IJKSDLFboGLView.h */; }; 21B62DA32334C3FA005E1C40 /* IJKSDLFboGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 21B62D9F2334C3FA005E1C40 /* IJKSDLFboGLView.h */; }; @@ -417,13 +417,13 @@ /* Begin PBXFileReference section */ 215FF44922B7E83500FAAD0E /* IJKFFMediaPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IJKFFMediaPlayer.h; sourceTree = ""; }; 215FF44A22B7E83500FAAD0E /* IJKFFMediaPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IJKFFMediaPlayer.m; sourceTree = ""; }; - 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FIJKPlayer.h; sourceTree = ""; }; + 217D1C4F22C4567C0046FB63 /* IJKPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJKPlayer.h; sourceTree = ""; }; 217D1C5022C4567C0046FB63 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 217D1C5322C457720046FB63 /* universal-framework.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "universal-framework.sh"; sourceTree = SOURCE_ROOT; }; 21B62D9F2334C3FA005E1C40 /* IJKSDLFboGLView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IJKSDLFboGLView.h; sourceTree = ""; }; 21B62DA02334C3FA005E1C40 /* IJKSDLFboGLView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IJKSDLFboGLView.m; sourceTree = ""; }; 21DAA15C2298FED6007B0784 /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; }; - 21E6F50322C39D0500611D3D /* FIJKPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FIJKPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 21E6F50322C39D0500611D3D /* IJKPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IJKPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 454316201A66493700676070 /* ffpipeline_ios.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffpipeline_ios.c; path = ijkmedia/ijkplayer/ios/pipeline/ffpipeline_ios.c; sourceTree = ""; }; 454316211A66493700676070 /* ffpipeline_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipeline_ios.h; path = ijkmedia/ijkplayer/ios/pipeline/ffpipeline_ios.h; sourceTree = ""; }; 454316221A66493700676070 /* ffpipenode_ios_videotoolbox_vdec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipenode_ios_videotoolbox_vdec.h; path = ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.h; sourceTree = ""; }; @@ -685,7 +685,7 @@ isa = PBXGroup; children = ( 217D1C5322C457720046FB63 /* universal-framework.sh */, - 217D1C4F22C4567C0046FB63 /* FIJKPlayer.h */, + 217D1C4F22C4567C0046FB63 /* IJKPlayer.h */, 217D1C5022C4567C0046FB63 /* Info.plist */, ); path = FIJKPlayer; @@ -834,7 +834,7 @@ E654EA8A1B6B27E600B0F2D0 /* IJKMediaFramework.framework */, E654EA941B6B27E600B0F2D0 /* IJKMediaFrameworkTests.xctest */, 5450B0431E63EA4300568494 /* IJKMediaFrameworkWithSSL.framework */, - 21E6F50322C39D0500611D3D /* FIJKPlayer.framework */, + 21E6F50322C39D0500611D3D /* IJKPlayer.framework */, ); name = Products; sourceTree = ""; @@ -1149,7 +1149,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 217D1C5122C4567C0046FB63 /* FIJKPlayer.h in Headers */, + 217D1C5122C4567C0046FB63 /* IJKPlayer.h in Headers */, 21E6F4DD22C39D0500611D3D /* IJKFFMonitor.h in Headers */, 21E6F4DE22C39D0500611D3D /* ijkiourl.h in Headers */, 21E6F4DF22C39D0500611D3D /* IJKFFMoviePlayerController.h in Headers */, @@ -1274,9 +1274,9 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 21E6F47922C39D0500611D3D /* FIJKPlayer */ = { + 21E6F47922C39D0500611D3D /* IJKPlayer */ = { isa = PBXNativeTarget; - buildConfigurationList = 21E6F50022C39D0500611D3D /* Build configuration list for PBXNativeTarget "FIJKPlayer" */; + buildConfigurationList = 21E6F50022C39D0500611D3D /* Build configuration list for PBXNativeTarget "IJKPlayer" */; buildPhases = ( 21E6F47A22C39D0500611D3D /* ijkversion.h */, 21E6F47B22C39D0500611D3D /* Sources */, @@ -1288,9 +1288,9 @@ ); dependencies = ( ); - name = FIJKPlayer; + name = IJKPlayer; productName = IJKMediaFramework; - productReference = 21E6F50322C39D0500611D3D /* FIJKPlayer.framework */; + productReference = 21E6F50322C39D0500611D3D /* IJKPlayer.framework */; productType = "com.apple.product-type.framework"; }; 5450AFC11E63EA4300568494 /* IJKMediaFrameworkWithSSL */ = { @@ -1389,7 +1389,7 @@ E654EA891B6B27E600B0F2D0 /* IJKMediaFramework */, 5450AFC11E63EA4300568494 /* IJKMediaFrameworkWithSSL */, E654EA931B6B27E600B0F2D0 /* IJKMediaFrameworkTests */, - 21E6F47922C39D0500611D3D /* FIJKPlayer */, + 21E6F47922C39D0500611D3D /* IJKPlayer */, ); }; /* End PBXProject section */ @@ -2256,7 +2256,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 21E6F50022C39D0500611D3D /* Build configuration list for PBXNativeTarget "FIJKPlayer" */ = { + 21E6F50022C39D0500611D3D /* Build configuration list for PBXNativeTarget "IJKPlayer" */ = { isa = XCConfigurationList; buildConfigurations = ( 21E6F50122C39D0500611D3D /* Debug */, From 0a0d671c423d67d3c784c76b59dca2ed75220a94 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 24 Jul 2019 22:40:57 +0800 Subject: [PATCH 055/163] add MaxOSX FFmpeg build scripts --- init-osx.sh | 94 ++++++++++++ osx/.gitignore | 2 + osx/compile-ffmpeg.sh | 81 ++++++++++ osx/tools/avconfig.h | 46 ++++++ osx/tools/config.h | 46 ++++++ osx/tools/do-compile-ffmpeg.sh | 262 +++++++++++++++++++++++++++++++++ osx/tools/ffversion.h | 42 ++++++ 7 files changed, 573 insertions(+) create mode 100755 init-osx.sh create mode 100644 osx/.gitignore create mode 100755 osx/compile-ffmpeg.sh create mode 100644 osx/tools/avconfig.h create mode 100644 osx/tools/config.h create mode 100755 osx/tools/do-compile-ffmpeg.sh create mode 100644 osx/tools/ffversion.h diff --git a/init-osx.sh b/init-osx.sh new file mode 100755 index 0000000000..2e2003bb21 --- /dev/null +++ b/init-osx.sh @@ -0,0 +1,94 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2019 Befovy +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# IJK_FFMPEG_UPSTREAM=git://git.videolan.org/ffmpeg.git +IJK_FFMPEG_UPSTREAM=https://github.com/Bilibili/FFmpeg.git +IJK_FFMPEG_FORK=https://github.com/Bilibili/FFmpeg.git +IJK_FFMPEG_COMMIT=ff3.4--ijk0.8.7--20180612--001 +IJK_FFMPEG_LOCAL_REPO=extra/ffmpeg + +IJK_GASP_UPSTREAM=https://github.com/Bilibili/gas-preprocessor.git + +# gas-preprocessor backup +# https://github.com/Bilibili/gas-preprocessor.git + +if [ "$IJK_FFMPEG_REPO_URL" != "" ]; then + IJK_FFMPEG_UPSTREAM=$IJK_FFMPEG_REPO_URL + IJK_FFMPEG_FORK=$IJK_FFMPEG_REPO_URL +fi + +if [ "$IJK_GASP_REPO_URL" != "" ]; then + IJK_GASP_UPSTREAM=$IJK_GASP_REPO_URL +fi + +set -e +TOOLS=tools + +# FF_ALL_ARCHS="i386 x86_64" +FF_ALL_ARCHS="x86_64" +FF_TARGET=$1 + +function echo_ffmpeg_version() { + echo $IJK_FFMPEG_COMMIT +} + +function pull_common() { + git --version + # echo "== pull gas-preprocessor base ==" + # sh $TOOLS/pull-repo-base.sh $IJK_GASP_UPSTREAM extra/gas-preprocessor + + echo "== pull ffmpeg base ==" + sh $TOOLS/pull-repo-base.sh $IJK_FFMPEG_UPSTREAM $IJK_FFMPEG_LOCAL_REPO +} + +function pull_fork() { + echo "== pull ffmpeg fork $1 ==" + mkdir -p osx/contrib + sh $TOOLS/pull-repo-ref.sh $IJK_FFMPEG_FORK osx/contrib/ffmpeg-$1 ${IJK_FFMPEG_LOCAL_REPO} + cd osx/contrib/ffmpeg-$1 + git checkout ${IJK_FFMPEG_COMMIT} -B ijkplayer + cd - +} + +function pull_fork_all() { + for ARCH in $FF_ALL_ARCHS + do + pull_fork $ARCH + done +} + +# function sync_ff_version() { + # sed -i '' "s/static const char \*kIJKFFRequiredFFmpegVersion\ \=\ .*/static const char *kIJKFFRequiredFFmpegVersion = \"${IJK_FFMPEG_COMMIT}\";/g" ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m +# } + +#---------- +case "$FF_TARGET" in + ffmpeg-version) + echo_ffmpeg_version + ;; + i386|x86_64) + pull_common + pull_fork $FF_TARGET + ;; + all|*) + pull_common + pull_fork_all + ;; +esac + +# sync_ff_version + diff --git a/osx/.gitignore b/osx/.gitignore new file mode 100644 index 0000000000..afa84ecb81 --- /dev/null +++ b/osx/.gitignore @@ -0,0 +1,2 @@ +contrib/build/ +contrib/ffmpeg-x86_64/ diff --git a/osx/compile-ffmpeg.sh b/osx/compile-ffmpeg.sh new file mode 100755 index 0000000000..9cccc574e0 --- /dev/null +++ b/osx/compile-ffmpeg.sh @@ -0,0 +1,81 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2013-2014 Bilibili +# Copyright (C) 2013-2014 Zhang Rui +# Copyright (C) 2018-2019 Befovy +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#---------- +# modify for your build tool + +FF_ALL_ARCHS="x86_64" + +#---------- +UNI_BUILD_ROOT=`pwd` +UNI_TMP="$UNI_BUILD_ROOT/tmp" +UNI_TMP_LLVM_VER_FILE="$UNI_TMP/llvm.ver.txt" +FF_TARGET=$1 +FF_TARGET_EXTRA=$2 +set -e + +#---------- +echo_archs() { + echo "====================" + echo "[*] check xcode version" + echo "====================" + echo "FF_ALL_ARCHS = $FF_ALL_ARCHS" +} + +FF_LIBS="lcompat ibavcodec libavfilter libavformat libavutil libswscale libswresample" + + + +#---------- +if [ "$FF_TARGET" = "x86_64" ]; then + echo_archs + sh tools/do-compile-ffmpeg.sh $FF_TARGET $FF_TARGET_EXTRA + do_lipo_all +elif [ "$FF_TARGET" = "all" ]; then + echo_archs + for ARCH in $FF_ALL_ARCHS + do + sh tools/do-compile-ffmpeg.sh $ARCH $FF_TARGET_EXTRA + done +elif [ "$FF_TARGET" = "check" ]; then + echo_archs +elif [ "$FF_TARGET" = "clean" ]; then + echo_archs + echo "==================" + for ARCH in $FF_ALL_ARCHS + do + echo "clean ffmpeg-$ARCH" + echo "==================" + cd contrib/ffmpeg-$ARCH && git clean -xdf && cd - + done + echo "clean build cache" + echo "=================" + rm -rf contrib/build/ffmpeg-* + rm -rf contrib/build/openssl-* + rm -rf contrib/build/universal/include + rm -rf contrib/build/universal/lib + echo "clean success" +else + echo "Usage:" + echo " compile-ffmpeg.sh x86_64" + echo " compile-ffmpeg.sh all" + echo " compile-ffmpeg.sh clean" + echo " compile-ffmpeg.sh check" + exit 1 +fi diff --git a/osx/tools/avconfig.h b/osx/tools/avconfig.h new file mode 100644 index 0000000000..c851904ecc --- /dev/null +++ b/osx/tools/avconfig.h @@ -0,0 +1,46 @@ +/* + * avconfig.h + * + * Copyright (c) 2013 Bilibili + * Copyright (c) 2013 Zhang Rui + * + * 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 + */ + +#if defined(__aarch64__) +# include "arm64/avconfig.h" +#elif defined(__x86_64__) +# include "x86_64/avconfig.h" +#elif defined(__arm__) + +# if defined(__ARM_ARCH_7S__) +# include "armv7s/avconfig.h" +# elif defined(__ARM_ARCH) +# if __ARM_ARCH == 7 +# include "armv7/avconfig.h" +# else +# error Unsupport ARM architecture +# endif +# else +# error Unsupport ARM architecture +# endif + +#elif defined(__i386__) +# include "i386/avconfig.h" +#else +# error Unsupport architecture +#endif diff --git a/osx/tools/config.h b/osx/tools/config.h new file mode 100644 index 0000000000..de2d861be3 --- /dev/null +++ b/osx/tools/config.h @@ -0,0 +1,46 @@ +/* + * config.h + * + * Copyright (c) 2013 Bilibili + * Copyright (c) 2013 Zhang Rui + * + * 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 + */ + +#if defined(__aarch64__) +# include "arm64/config.h" +#elif defined(__x86_64__) +# include "x86_64/config.h" +#elif defined(__arm__) + +# if defined(__ARM_ARCH_7S__) +# include "armv7s/config.h" +# elif defined(__ARM_ARCH) +# if __ARM_ARCH == 7 +# include "armv7/config.h" +# else +# error Unsupport ARM architecture +# endif +# else +# error Unsupport ARM architecture +# endif + +#elif defined(__i386__) +# include "i386/config.h" +#else +# error Unsupport architecture +#endif diff --git a/osx/tools/do-compile-ffmpeg.sh b/osx/tools/do-compile-ffmpeg.sh new file mode 100755 index 0000000000..11e4bfe85e --- /dev/null +++ b/osx/tools/do-compile-ffmpeg.sh @@ -0,0 +1,262 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2013-2014 Bilibili +# Copyright (C) 2013-2014 Zhang Rui +# Copyright (C) 2018-2019 Befovy +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is based on projects below +# https://github.com/kolyvan/kxmovie +# https://github.com/yixia/FFmpeg-Android +# http://git.videolan.org/?p=vlc-ports/android.git;a=summary +# https://github.com/kewlbear/FFmpeg-iOS-build-script/ + +#-------------------- +echo "====================" +echo "[*] check host" +echo "====================" +set -e + +#-------------------- +# include + + +#-------------------- +# common defines +FF_ARCH=$1 +FF_BUILD_OPT=$2 +echo "FF_ARCH=$FF_ARCH" +echo "FF_BUILD_OPT=$FF_BUILD_OPT" +if [ -z "$FF_ARCH" ]; then + echo "You must specific an architecture 'i386, x86_64, ...'.\n" + exit 1 +fi + + +FF_BUILD_ROOT=`pwd`/contrib +FF_TAGET_OS="darwin" + + +# ffmpeg build params +export COMMON_FF_CFG_FLAGS= +source $FF_BUILD_ROOT/../../config/module.sh + +FFMPEG_CFG_FLAGS= +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $COMMON_FF_CFG_FLAGS" + +# Optimization options (experts only): +# FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --disable-armv5te" +# FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --disable-armv6" +# FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --disable-armv6t2" + +# Advanced options (experts only): +# FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-cross-compile" +# --disable-symver may indicate a bug +# FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --disable-symver" + +# Developer options (useful when working on FFmpeg itself): +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --disable-stripping" + +## +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --arch=$FF_ARCH" +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --target-os=$FF_TAGET_OS" +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-static" +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --disable-shared" +FFMPEG_EXTRA_CFLAGS= + +# i386, x86_64 +FFMPEG_CFG_FLAGS_SIMULATOR= +FFMPEG_CFG_FLAGS_SIMULATOR="$FFMPEG_CFG_FLAGS_SIMULATOR --disable-asm" +FFMPEG_CFG_FLAGS_SIMULATOR="$FFMPEG_CFG_FLAGS_SIMULATOR --disable-mmx" +FFMPEG_CFG_FLAGS_SIMULATOR="$FFMPEG_CFG_FLAGS_SIMULATOR --assert-level=2" + +# armv7, armv7s, arm64 +FFMPEG_CFG_FLAGS_ARM= +FFMPEG_CFG_FLAGS_ARM="$FFMPEG_CFG_FLAGS_ARM --enable-pic" +FFMPEG_CFG_FLAGS_ARM="$FFMPEG_CFG_FLAGS_ARM --enable-neon" +case "$FF_BUILD_OPT" in + debug) + FFMPEG_CFG_FLAGS_ARM="$FFMPEG_CFG_FLAGS_ARM --disable-optimizations" + FFMPEG_CFG_FLAGS_ARM="$FFMPEG_CFG_FLAGS_ARM --enable-debug" + FFMPEG_CFG_FLAGS_ARM="$FFMPEG_CFG_FLAGS_ARM --disable-small" + ;; + *) + FFMPEG_CFG_FLAGS_ARM="$FFMPEG_CFG_FLAGS_ARM --enable-optimizations" + FFMPEG_CFG_FLAGS_ARM="$FFMPEG_CFG_FLAGS_ARM --enable-debug" + FFMPEG_CFG_FLAGS_ARM="$FFMPEG_CFG_FLAGS_ARM --enable-small" + ;; +esac + +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-pic" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-pthreads" + +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-yasm" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-asm" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-inline-asm" + + + +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-protocols" +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-decoders" +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-demuxers" +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-encoder=mjpeg" +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-hwaccels" + + +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-videotoolbox" + +echo "build_root: $FF_BUILD_ROOT" + +#-------------------- +echo "====================" +echo "[*] check gas-preprocessor" +echo "====================" +FF_TOOLS_ROOT="$FF_BUILD_ROOT/../extra" +# export PATH="$FF_TOOLS_ROOT/gas-preprocessor:$PATH" +# echo "gasp: $FF_TOOLS_ROOT/gas-preprocessor/gas-preprocessor.pl" + +#-------------------- +echo "====================" +echo "[*] config arch $FF_ARCH" +echo "====================" + +FF_BUILD_NAME="unknown" +FF_XCRUN_PLATFORM="MacOSX" +FF_XCRUN_OSVERSION= +FF_GASPP_EXPORT= +FF_DEP_OPENSSL_INC= +FF_DEP_OPENSSL_LIB= +FF_XCODE_BITCODE= + +if [ "$FF_ARCH" = "i386" ]; then + FF_BUILD_NAME="ffmpeg-i386" + FF_XCRUN_OSVERSION="-mmacosx-version-min=10.10" + FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_SIMULATOR" +elif [ "$FF_ARCH" = "x86_64" ]; then + FF_BUILD_NAME="ffmpeg-x86_64" + FF_XCRUN_OSVERSION="-mmacosx-version-min=10.10" + FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_SIMULATOR" +else + echo "unknown architecture $FF_ARCH"; + exit 1 +fi + +echo "build_name: $FF_BUILD_NAME" +echo "platform: $FF_XCRUN_PLATFORM" +echo "osversion: $FF_XCRUN_OSVERSION" + +#-------------------- +echo "====================" +echo "[*] make osx toolchain $FF_BUILD_NAME" +echo "====================" + +FF_BUILD_SOURCE="$FF_BUILD_ROOT/$FF_BUILD_NAME" +FF_BUILD_PREFIX="$FF_BUILD_ROOT/build/$FF_BUILD_NAME/output" + +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --prefix=$FF_BUILD_PREFIX" + +mkdir -p $FF_BUILD_PREFIX + +echo "build_source: $FF_BUILD_SOURCE" +echo "build_prefix: $FF_BUILD_PREFIX" + +#-------------------- +echo "\n--------------------" +echo "[*] configurate ffmpeg" +echo "--------------------" +FF_XCRUN_SDK=`echo $FF_XCRUN_PLATFORM | tr '[:upper:]' '[:lower:]'` +FF_XCRUN_CC="xcrun -sdk $FF_XCRUN_SDK clang" + +if [ "$FF_ARCH" = "arm64" ] +then + FF_AS="gas-preprocessor.pl -arch aarch64 -- $FF_XCRUN_CC" +else + FF_AS="gas-preprocessor.pl -- $FF_XCRUN_CC" +fi + +FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_CPU" + +FFMPEG_CFLAGS= +FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCRUN_OSVERSION" +FFMPEG_CFLAGS="$FFMPEG_CFLAGS -arch $FF_ARCH" +FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FFMPEG_EXTRA_CFLAGS" +FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCODE_BITCODE" +FFMPEG_LDFLAGS="$FFMPEG_CFLAGS" + + +#-------------------- +echo "\n--------------------" +echo "[*] check OpenSSL" +echo "----------------------" +FFMPEG_DEP_OPENSSL_INC=/usr/local/opt/openssl/include +FFMPEG_DEP_OPENSSL_LIB=/usr/local/opt/openssl/lib +#-------------------- +# with openssl +if [ -f "${FFMPEG_DEP_OPENSSL_LIB}/libssl.a" ]; then + FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-openssl" + + FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I${FFMPEG_DEP_OPENSSL_INC}" + FFMPEG_DEP_LIBS="$FFMPEG_CFLAGS -L${FFMPEG_DEP_OPENSSL_LIB} -lssl -lcrypto" +else + echo "openssl not found" + exit 1; +fi + +#-------------------- +echo "\n--------------------" +echo "[*] configure" +echo "----------------------" + +if [ ! -d $FF_BUILD_SOURCE ]; then + echo "" + echo "!! ERROR" + echo "!! Can not find FFmpeg directory for $FF_BUILD_NAME" + echo "!! Run 'sh init-osx.sh' first" + echo "" + exit 1 +fi + +# xcode configuration +export DEBUG_INFORMATION_FORMAT=dwarf-with-dsym + + +# export CFLAGS="-g -O2 -mmacosx-version-min=10.10 -arch x86_64" + +cd $FF_BUILD_SOURCE +if [ -f "./config.h" ]; then + echo 'reuse configure' +else + echo "config: $FFMPEG_CFG_FLAGS $FF_XCRUN_CC" + echo "extra-cflags ${FFMPEG_CFLAGS} ${FF_EXTRA_CFLAGS}" + echo "cc ${FF_XCRUN_CC}" + ./configure \ + $FFMPEG_CFG_FLAGS \ + --cc="$FF_XCRUN_CC" \ + $FFMPEG_CFG_CPU \ + --extra-cflags="$FFMPEG_CFLAGS $FF_EXTRA_CFLAGS" \ + --extra-cxxflags="$FFMPEG_CFLAGS" \ + --extra-ldflags="$FFMPEG_LDFLAGS $FFMPEG_DEP_LIBS" + make clean +fi + +#-------------------- +echo "\n--------------------" +echo "[*] compile ffmpeg" +echo "--------------------" +cp config.* $FF_BUILD_PREFIX +make -j3 $FF_GASPP_EXPORT +make install +mkdir -p $FF_BUILD_PREFIX/include/libffmpeg +cp -f config.h $FF_BUILD_PREFIX/include/libffmpeg/config.h diff --git a/osx/tools/ffversion.h b/osx/tools/ffversion.h new file mode 100644 index 0000000000..01b6f7bb81 --- /dev/null +++ b/osx/tools/ffversion.h @@ -0,0 +1,42 @@ +/* + * ffversion.h + * + * Copyright (c) 2013 Bilibili + * Copyright (c) 2013 Zhang Rui + * + * 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 + */ + +#if defined(__aarch64__) +# include "arm64/ffversion.h" +#elif defined(__x86_64__) +# include "x86_64/ffversion.h" +#elif defined(__arm__) + +# if defined(__ARM_ARCH_7S__) +# include "armv7s/ffversion.h" +# elif defined(__ARM_ARCH_7__) +# include "armv7/ffversion.h" +# else +# error Unsupport ARM architecture +# endif + +#elif defined(__i386__) +# include "i386/ffversion.h" +#else +# error Unsupport architecture +#endif From 2feb99d4a404d8f3b151dc6112aa1cd052ba88b8 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 24 Jul 2019 23:44:05 +0800 Subject: [PATCH 056/163] add OSX IJKMediaPlayer XCode project --- .../IJKMediaPlayer.xcodeproj/project.pbxproj | 6 + .../IJKMediaPlayer/IJKAudioKit.m | 8 + .../IJKFFMoviePlayerController.h | 4 +- .../IJKFFMoviePlayerController.m | 15 +- .../IJKMediaPlayer/IJKMediaModule.m | 4 + .../IJKMediaPlayer/IJKMediaPlayback.h | 6 + .../IJKMediaPlayer/IJKSDLGLViewProtocol.h | 10 + .../ijkmedia/ijksdl/ios/IJKSDLGLView.h | 14 + .../IJKMediaPlayer.xcodeproj/project.pbxproj | 575 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../IJKMediaPlayer/IJKMediaPlayer.h | 19 + osx/IJKMediaPlayer/IJKMediaPlayer/Info.plist | 24 + .../IJKMediaPlayerTests/IJKMediaPlayerTests.m | 37 ++ .../IJKMediaPlayerTests/Info.plist | 22 + 14 files changed, 745 insertions(+), 6 deletions(-) create mode 100644 osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj create mode 100644 osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h create mode 100644 osx/IJKMediaPlayer/IJKMediaPlayer/Info.plist create mode 100644 osx/IJKMediaPlayer/IJKMediaPlayerTests/IJKMediaPlayerTests.m create mode 100644 osx/IJKMediaPlayer/IJKMediaPlayerTests/Info.plist diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 1db3aa45fa..987a6c4856 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -1794,6 +1794,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", + "IJK_IOS=1", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -1853,6 +1854,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "IJK_IOS=1"; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -1910,6 +1912,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", + "IJK_IOS=1", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -1962,6 +1965,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "IJK_IOS=1"; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -2019,6 +2023,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", + "IJK_IOS=1", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -2076,6 +2081,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "IJK_IOS=1"; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.m index 1b314271db..42c5145de2 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.m @@ -41,6 +41,7 @@ + (IJKAudioKit *)sharedInstance - (void)setupAudioSession { +#if IJK_IOS if (!_audioSessionInitialized) { [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(handleInterruption:) @@ -63,10 +64,12 @@ - (void)setupAudioSession } return ; +#endif } - (BOOL)setActive:(BOOL)active { +#if IJK_IOS if (active != NO) { [[AVAudioSession sharedInstance] setActive:YES error:nil]; } else { @@ -76,10 +79,14 @@ - (BOOL)setActive:(BOOL)active NSLog(@"failed to inactive AVAudioSession\n"); } } + return YES; +#endif + return NO; } - (void)handleInterruption:(NSNotification *)notification { +#if IJK_IOS int reason = [[[notification userInfo] valueForKey:AVAudioSessionInterruptionTypeKey] intValue]; switch (reason) { case AVAudioSessionInterruptionTypeBegan: { @@ -93,6 +100,7 @@ - (void)handleInterruption:(NSNotification *)notification break; } } +#endif } @end diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.h index 004c123aa5..11bcf2e801 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.h @@ -80,11 +80,11 @@ typedef enum IJKLogLevel { - (id)initWithMoreContent:(NSURL *)aUrl withOptions:(IJKFFOptions *)options - withGLView:(UIView *)glView; + withGLView:(id)glView; - (id)initWithMoreContentString:(NSString *)aUrlString withOptions:(IJKFFOptions *)options - withGLView:(UIView *)glView; + withGLView:(id)glView; - (void)prepareToPlay; - (void)play; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m index 7c8949949d..5003992c88 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m @@ -23,8 +23,15 @@ #import "IJKFFMoviePlayerController.h" +#if IJK_OSX +#import +#else #import -#import "IJKSDLHudViewController.h" +#endif + +#if IJK_IOS +#import "ijksdl/ios/IJKSDLHudViewController.h" +#endif #import "IJKFFMoviePlayerDef.h" #import "IJKMediaPlayback.h" #import "IJKMediaModule.h" @@ -32,7 +39,7 @@ #import "IJKAudioKit.h" #import "IJKNotificationManager.h" #import "NSString+IJKMedia.h" -#import "ijkioapplication.h" +#import "ijkplayer/ijkavformat/ijkioapplication.h" #include "string.h" static const char *kIJKFFRequiredFFmpegVersion = "ff3.4--ijk0.8.7--20180103--001"; @@ -264,7 +271,7 @@ - (id)initWithContentURLString:(NSString *)aUrlString - (id)initWithMoreContent:(NSURL *)aUrl withOptions:(IJKFFOptions *)options - withGLView:(UIView *)glView + withGLView:(id)glView { if (aUrl == nil) return nil; @@ -279,7 +286,7 @@ - (id)initWithMoreContent:(NSURL *)aUrl - (id)initWithMoreContentString:(NSString *)aUrlString withOptions:(IJKFFOptions *)options - withGLView:(UIView *)glView + withGLView:(id)glView { if (aUrlString == nil || glView == nil) return nil; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaModule.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaModule.m index 36ac0f68f9..6ff78b0a08 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaModule.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaModule.m @@ -22,7 +22,9 @@ */ #import "IJKMediaModule.h" +#if IJK_IOS #import +#endif @implementation IJKMediaModule @@ -63,11 +65,13 @@ - (BOOL)isMediaModuleIdleTimerDisabled - (void)updateIdleTimer { +#if IJK_IOS if (self.appIdleTimerDisabled || self.mediaModuleIdleTimerDisabled) { [UIApplication sharedApplication].idleTimerDisabled = YES; } else { [UIApplication sharedApplication].idleTimerDisabled = NO; } +#endif } @end diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayback.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayback.h index b5e50e07d6..3aeca7c1c7 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayback.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayback.h @@ -22,7 +22,9 @@ */ #import +#if IJK_IOS #import +#endif typedef NS_ENUM(NSInteger, IJKMPMovieScalingMode) { IJKMPMovieScalingModeNone, // No scaling @@ -75,7 +77,9 @@ typedef NS_ENUM(NSInteger, IJKMPMovieTimeOption) { - (void)shutdown; - (void)setPauseInBackground:(BOOL)pause; +#if IJK_IOS @property(nonatomic, readonly) UIView *view; +#endif @property(nonatomic) NSTimeInterval currentPlaybackTime; @property(nonatomic, readonly) NSTimeInterval duration; @property(nonatomic, readonly) NSTimeInterval playableDuration; @@ -101,7 +105,9 @@ typedef NS_ENUM(NSInteger, IJKMPMovieTimeOption) { @property (nonatomic) float playbackRate; @property (nonatomic) float playbackVolume; +#if IJK_IOS - (UIImage *)thumbnailImageAtCurrentTime; +#endif #pragma mark Notifications diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h index 283df09530..bd753e0262 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h @@ -24,7 +24,11 @@ #ifndef IJKSDLGLViewProtocol_h #define IJKSDLGLViewProtocol_h +#if IJK_OSX +#import +#else #import +#endif typedef struct IJKOverlay IJKOverlay; struct IJKOverlay { @@ -40,7 +44,13 @@ struct IJKOverlay { }; @protocol IJKSDLGLViewProtocol + +#if IJK_OSX +- (NSImage*) snapshot; +#else - (UIImage*) snapshot; +#endif + @property(nonatomic, readonly) CGFloat fps; @property(nonatomic) CGFloat scaleFactor; @property(nonatomic) BOOL isThirdGLView; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h index 94eafb8b8b..20386b3c85 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h @@ -23,7 +23,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#if IJK_OSX +#import +#else #import +#endif + #import "IJKSDLGLViewProtocol.h" #include "ijksdl/ijksdl_vout.h" @@ -34,12 +39,21 @@ typedef NS_ENUM(NSInteger, IJKSDLGLViewApplicationState) { IJKSDLGLViewApplicationBackgroundState = 2 }; +#if IJK_OSX +@interface IJKSDLGLView : NSView +#else @interface IJKSDLGLView : UIView +#endif - (id) initWithFrame:(CGRect)frame; - (void) display: (SDL_VoutOverlay *) overlay; +#if IJK_OSX +- (NSImage*) snapshot; +#else - (UIImage*) snapshot; +#endif + - (void)setShouldLockWhileBeingMovedToWindow:(BOOL)shouldLockWhiteBeingMovedToWindow __attribute__((deprecated("unused"))); @end diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..17b3cbb6bf --- /dev/null +++ b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -0,0 +1,575 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 21287EB922E8A909008BF595 /* IJKMediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21287EAF22E8A908008BF595 /* IJKMediaPlayer.framework */; }; + 21287EBE22E8A909008BF595 /* IJKMediaPlayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EBD22E8A909008BF595 /* IJKMediaPlayerTests.m */; }; + 21287EC022E8A909008BF595 /* IJKMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EB222E8A908008BF595 /* IJKMediaPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21287ED822E8A971008BF595 /* IJKSDLGLViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EC922E8A971008BF595 /* IJKSDLGLViewProtocol.h */; }; + 21287EDA22E8A971008BF595 /* IJKMediaPlayback.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287ECB22E8A971008BF595 /* IJKMediaPlayback.m */; }; + 21287EDB22E8A971008BF595 /* IJKMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ECC22E8A971008BF595 /* IJKMediaPlayer.h */; }; + 21287EDC22E8A971008BF595 /* IJKMediaPlayer-Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 21287ECD22E8A971008BF595 /* IJKMediaPlayer-Prefix.pch */; }; + 21287EDD22E8A971008BF595 /* IJKMediaUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287ECE22E8A971008BF595 /* IJKMediaUtils.m */; }; + 21287EDE22E8A971008BF595 /* NSString+IJKMedia.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287ECF22E8A971008BF595 /* NSString+IJKMedia.m */; }; + 21287EDF22E8A971008BF595 /* IJKMediaModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED022E8A971008BF595 /* IJKMediaModule.h */; }; + 21287EE122E8A971008BF595 /* IJKNotificationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287ED222E8A971008BF595 /* IJKNotificationManager.m */; }; + 21287EE222E8A971008BF595 /* IJKMediaModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287ED322E8A971008BF595 /* IJKMediaModule.m */; }; + 21287EE322E8A971008BF595 /* NSString+IJKMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED422E8A971008BF595 /* NSString+IJKMedia.h */; }; + 21287EE422E8A971008BF595 /* IJKNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED522E8A971008BF595 /* IJKNotificationManager.h */; }; + 21287EE522E8A971008BF595 /* IJKMediaUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED622E8A971008BF595 /* IJKMediaUtils.h */; }; + 21287EE622E8A971008BF595 /* IJKMediaPlayback.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED722E8A971008BF595 /* IJKMediaPlayback.h */; }; + 21287EFB22E8A989008BF595 /* IJKFFOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EE722E8A988008BF595 /* IJKFFOptions.m */; }; + 21287EFC22E8A989008BF595 /* IJKFFMoviePlayerDef.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EE822E8A988008BF595 /* IJKFFMoviePlayerDef.m */; }; + 21287EFF22E8A989008BF595 /* IJKFFMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EEB22E8A988008BF595 /* IJKFFMonitor.m */; }; + 21287F0022E8A989008BF595 /* IJKAudioKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EEC22E8A988008BF595 /* IJKAudioKit.m */; }; + 21287F0122E8A989008BF595 /* IJKDeviceModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EED22E8A989008BF595 /* IJKDeviceModel.h */; }; + 21287F0222E8A989008BF595 /* IJKDeviceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EEE22E8A989008BF595 /* IJKDeviceModel.m */; }; + 21287F0322E8A989008BF595 /* IJKFFOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EEF22E8A989008BF595 /* IJKFFOptions.h */; }; + 21287F0422E8A989008BF595 /* IJKKVOController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF022E8A989008BF595 /* IJKKVOController.h */; }; + 21287F0522E8A989008BF595 /* IJKKVOController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EF122E8A989008BF595 /* IJKKVOController.m */; }; + 21287F0622E8A989008BF595 /* IJKFFMoviePlayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF222E8A989008BF595 /* IJKFFMoviePlayerController.h */; }; + 21287F0822E8A989008BF595 /* IJKFFMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF422E8A989008BF595 /* IJKFFMonitor.h */; }; + 21287F0922E8A989008BF595 /* IJKAudioKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF522E8A989008BF595 /* IJKAudioKit.h */; }; + 21287F0E22E8A989008BF595 /* IJKFFMoviePlayerDef.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EFA22E8A989008BF595 /* IJKFFMoviePlayerDef.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 21287EBA22E8A909008BF595 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 21287EA622E8A908008BF595 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 21287EAE22E8A908008BF595; + remoteInfo = IJKMediaPlayer; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 21287EAF22E8A908008BF595 /* IJKMediaPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IJKMediaPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 21287EB222E8A908008BF595 /* IJKMediaPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IJKMediaPlayer.h; sourceTree = ""; }; + 21287EB322E8A908008BF595 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 21287EB822E8A909008BF595 /* IJKMediaPlayerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IJKMediaPlayerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 21287EBD22E8A909008BF595 /* IJKMediaPlayerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IJKMediaPlayerTests.m; sourceTree = ""; }; + 21287EBF22E8A909008BF595 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 21287EC922E8A971008BF595 /* IJKSDLGLViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLGLViewProtocol.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h; sourceTree = ""; }; + 21287ECB22E8A971008BF595 /* IJKMediaPlayback.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKMediaPlayback.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayback.m; sourceTree = ""; }; + 21287ECC22E8A971008BF595 /* IJKMediaPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKMediaPlayer.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h; sourceTree = ""; }; + 21287ECD22E8A971008BF595 /* IJKMediaPlayer-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "IJKMediaPlayer-Prefix.pch"; path = "../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer-Prefix.pch"; sourceTree = ""; }; + 21287ECE22E8A971008BF595 /* IJKMediaUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKMediaUtils.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaUtils.m; sourceTree = ""; }; + 21287ECF22E8A971008BF595 /* NSString+IJKMedia.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+IJKMedia.m"; path = "../../../ios/IJKMediaPlayer/IJKMediaPlayer/NSString+IJKMedia.m"; sourceTree = ""; }; + 21287ED022E8A971008BF595 /* IJKMediaModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKMediaModule.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaModule.h; sourceTree = ""; }; + 21287ED222E8A971008BF595 /* IJKNotificationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKNotificationManager.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKNotificationManager.m; sourceTree = ""; }; + 21287ED322E8A971008BF595 /* IJKMediaModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKMediaModule.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaModule.m; sourceTree = ""; }; + 21287ED422E8A971008BF595 /* NSString+IJKMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+IJKMedia.h"; path = "../../../ios/IJKMediaPlayer/IJKMediaPlayer/NSString+IJKMedia.h"; sourceTree = ""; }; + 21287ED522E8A971008BF595 /* IJKNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKNotificationManager.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKNotificationManager.h; sourceTree = ""; }; + 21287ED622E8A971008BF595 /* IJKMediaUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKMediaUtils.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaUtils.h; sourceTree = ""; }; + 21287ED722E8A971008BF595 /* IJKMediaPlayback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKMediaPlayback.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayback.h; sourceTree = ""; }; + 21287EE722E8A988008BF595 /* IJKFFOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKFFOptions.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFOptions.m; sourceTree = ""; }; + 21287EE822E8A988008BF595 /* IJKFFMoviePlayerDef.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKFFMoviePlayerDef.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerDef.m; sourceTree = ""; }; + 21287EEB22E8A988008BF595 /* IJKFFMonitor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKFFMonitor.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMonitor.m; sourceTree = ""; }; + 21287EEC22E8A988008BF595 /* IJKAudioKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKAudioKit.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.m; sourceTree = ""; }; + 21287EED22E8A989008BF595 /* IJKDeviceModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKDeviceModel.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKDeviceModel.h; sourceTree = ""; }; + 21287EEE22E8A989008BF595 /* IJKDeviceModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKDeviceModel.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKDeviceModel.m; sourceTree = ""; }; + 21287EEF22E8A989008BF595 /* IJKFFOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFOptions.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFOptions.h; sourceTree = ""; }; + 21287EF022E8A989008BF595 /* IJKKVOController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKKVOController.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKKVOController.h; sourceTree = ""; }; + 21287EF122E8A989008BF595 /* IJKKVOController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKKVOController.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKKVOController.m; sourceTree = ""; }; + 21287EF222E8A989008BF595 /* IJKFFMoviePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFMoviePlayerController.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.h; sourceTree = ""; }; + 21287EF422E8A989008BF595 /* IJKFFMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFMonitor.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMonitor.h; sourceTree = ""; }; + 21287EF522E8A989008BF595 /* IJKAudioKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKAudioKit.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.h; sourceTree = ""; }; + 21287EFA22E8A989008BF595 /* IJKFFMoviePlayerDef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFMoviePlayerDef.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerDef.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 21287EAC22E8A908008BF595 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 21287EB522E8A909008BF595 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 21287EB922E8A909008BF595 /* IJKMediaPlayer.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 21287EA522E8A908008BF595 = { + isa = PBXGroup; + children = ( + 21287EB122E8A908008BF595 /* IJKMediaPlayer */, + 21287EBC22E8A909008BF595 /* IJKMediaPlayerTests */, + 21287EB022E8A908008BF595 /* Products */, + ); + sourceTree = ""; + }; + 21287EB022E8A908008BF595 /* Products */ = { + isa = PBXGroup; + children = ( + 21287EAF22E8A908008BF595 /* IJKMediaPlayer.framework */, + 21287EB822E8A909008BF595 /* IJKMediaPlayerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 21287EB122E8A908008BF595 /* IJKMediaPlayer */ = { + isa = PBXGroup; + children = ( + 21287EF522E8A989008BF595 /* IJKAudioKit.h */, + 21287EEC22E8A988008BF595 /* IJKAudioKit.m */, + 21287EED22E8A989008BF595 /* IJKDeviceModel.h */, + 21287EEE22E8A989008BF595 /* IJKDeviceModel.m */, + 21287EF422E8A989008BF595 /* IJKFFMonitor.h */, + 21287EEB22E8A988008BF595 /* IJKFFMonitor.m */, + 21287EF222E8A989008BF595 /* IJKFFMoviePlayerController.h */, + 21287EFA22E8A989008BF595 /* IJKFFMoviePlayerDef.h */, + 21287EE822E8A988008BF595 /* IJKFFMoviePlayerDef.m */, + 21287EEF22E8A989008BF595 /* IJKFFOptions.h */, + 21287EE722E8A988008BF595 /* IJKFFOptions.m */, + 21287EF022E8A989008BF595 /* IJKKVOController.h */, + 21287EF122E8A989008BF595 /* IJKKVOController.m */, + 21287ECD22E8A971008BF595 /* IJKMediaPlayer-Prefix.pch */, + 21287EB222E8A908008BF595 /* IJKMediaPlayer.h */, + 21287ED022E8A971008BF595 /* IJKMediaModule.h */, + 21287ED322E8A971008BF595 /* IJKMediaModule.m */, + 21287ED722E8A971008BF595 /* IJKMediaPlayback.h */, + 21287ECB22E8A971008BF595 /* IJKMediaPlayback.m */, + 21287ECC22E8A971008BF595 /* IJKMediaPlayer.h */, + 21287ED622E8A971008BF595 /* IJKMediaUtils.h */, + 21287ECE22E8A971008BF595 /* IJKMediaUtils.m */, + 21287ED522E8A971008BF595 /* IJKNotificationManager.h */, + 21287ED222E8A971008BF595 /* IJKNotificationManager.m */, + 21287EC922E8A971008BF595 /* IJKSDLGLViewProtocol.h */, + 21287ED422E8A971008BF595 /* NSString+IJKMedia.h */, + 21287ECF22E8A971008BF595 /* NSString+IJKMedia.m */, + 21287EB322E8A908008BF595 /* Info.plist */, + ); + path = IJKMediaPlayer; + sourceTree = ""; + }; + 21287EBC22E8A909008BF595 /* IJKMediaPlayerTests */ = { + isa = PBXGroup; + children = ( + 21287EBD22E8A909008BF595 /* IJKMediaPlayerTests.m */, + 21287EBF22E8A909008BF595 /* Info.plist */, + ); + path = IJKMediaPlayerTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 21287EAA22E8A908008BF595 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 21287EDC22E8A971008BF595 /* IJKMediaPlayer-Prefix.pch in Headers */, + 21287EE522E8A971008BF595 /* IJKMediaUtils.h in Headers */, + 21287EC022E8A909008BF595 /* IJKMediaPlayer.h in Headers */, + 21287EE622E8A971008BF595 /* IJKMediaPlayback.h in Headers */, + 21287EDF22E8A971008BF595 /* IJKMediaModule.h in Headers */, + 21287F0822E8A989008BF595 /* IJKFFMonitor.h in Headers */, + 21287F0322E8A989008BF595 /* IJKFFOptions.h in Headers */, + 21287F0622E8A989008BF595 /* IJKFFMoviePlayerController.h in Headers */, + 21287EDB22E8A971008BF595 /* IJKMediaPlayer.h in Headers */, + 21287ED822E8A971008BF595 /* IJKSDLGLViewProtocol.h in Headers */, + 21287F0122E8A989008BF595 /* IJKDeviceModel.h in Headers */, + 21287EE422E8A971008BF595 /* IJKNotificationManager.h in Headers */, + 21287F0422E8A989008BF595 /* IJKKVOController.h in Headers */, + 21287F0E22E8A989008BF595 /* IJKFFMoviePlayerDef.h in Headers */, + 21287EE322E8A971008BF595 /* NSString+IJKMedia.h in Headers */, + 21287F0922E8A989008BF595 /* IJKAudioKit.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 21287EAE22E8A908008BF595 /* IJKMediaPlayer */ = { + isa = PBXNativeTarget; + buildConfigurationList = 21287EC322E8A909008BF595 /* Build configuration list for PBXNativeTarget "IJKMediaPlayer" */; + buildPhases = ( + 21287EAA22E8A908008BF595 /* Headers */, + 21287EAB22E8A908008BF595 /* Sources */, + 21287EAC22E8A908008BF595 /* Frameworks */, + 21287EAD22E8A908008BF595 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = IJKMediaPlayer; + productName = IJKMediaPlayer; + productReference = 21287EAF22E8A908008BF595 /* IJKMediaPlayer.framework */; + productType = "com.apple.product-type.framework"; + }; + 21287EB722E8A909008BF595 /* IJKMediaPlayerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 21287EC622E8A909008BF595 /* Build configuration list for PBXNativeTarget "IJKMediaPlayerTests" */; + buildPhases = ( + 21287EB422E8A909008BF595 /* Sources */, + 21287EB522E8A909008BF595 /* Frameworks */, + 21287EB622E8A909008BF595 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 21287EBB22E8A909008BF595 /* PBXTargetDependency */, + ); + name = IJKMediaPlayerTests; + productName = IJKMediaPlayerTests; + productReference = 21287EB822E8A909008BF595 /* IJKMediaPlayerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 21287EA622E8A908008BF595 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = befovy; + TargetAttributes = { + 21287EAE22E8A908008BF595 = { + CreatedOnToolsVersion = 10.2.1; + }; + 21287EB722E8A909008BF595 = { + CreatedOnToolsVersion = 10.2.1; + }; + }; + }; + buildConfigurationList = 21287EA922E8A908008BF595 /* Build configuration list for PBXProject "IJKMediaPlayer" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 21287EA522E8A908008BF595; + productRefGroup = 21287EB022E8A908008BF595 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 21287EAE22E8A908008BF595 /* IJKMediaPlayer */, + 21287EB722E8A909008BF595 /* IJKMediaPlayerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 21287EAD22E8A908008BF595 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 21287EB622E8A909008BF595 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 21287EAB22E8A908008BF595 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 21287EDA22E8A971008BF595 /* IJKMediaPlayback.m in Sources */, + 21287EE222E8A971008BF595 /* IJKMediaModule.m in Sources */, + 21287F0522E8A989008BF595 /* IJKKVOController.m in Sources */, + 21287EDD22E8A971008BF595 /* IJKMediaUtils.m in Sources */, + 21287EE122E8A971008BF595 /* IJKNotificationManager.m in Sources */, + 21287EDE22E8A971008BF595 /* NSString+IJKMedia.m in Sources */, + 21287EFC22E8A989008BF595 /* IJKFFMoviePlayerDef.m in Sources */, + 21287EFF22E8A989008BF595 /* IJKFFMonitor.m in Sources */, + 21287EFB22E8A989008BF595 /* IJKFFOptions.m in Sources */, + 21287F0222E8A989008BF595 /* IJKDeviceModel.m in Sources */, + 21287F0022E8A989008BF595 /* IJKAudioKit.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 21287EB422E8A909008BF595 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 21287EBE22E8A909008BF595 /* IJKMediaPlayerTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 21287EBB22E8A909008BF595 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 21287EAE22E8A908008BF595 /* IJKMediaPlayer */; + targetProxy = 21287EBA22E8A909008BF595 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 21287EC122E8A909008BF595 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 21287EC222E8A909008BF595 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Mac Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 21287EC422E8A909008BF595 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 7SUQ9UM9P2; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + GCC_C_LANGUAGE_STANDARD = c11; + GCC_PREPROCESSOR_DEFINITIONS = ( + "IJK_OSX=1", + "DEBUG=1", + ); + HEADER_SEARCH_PATHS = ( + "$(PROJECT_DIR)/ijkmedia", + "$(PROJECT_DIR)/../../ijkmedia", + "$(PROJECT_DIR)/../contrib/build/ffmpeg-x86_64/output/include", + ); + INFOPLIST_FILE = IJKMediaPlayer/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = com.befovy.www.IJKMediaPlayer; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 21287EC522E8A909008BF595 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 7SUQ9UM9P2; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + GCC_C_LANGUAGE_STANDARD = c11; + GCC_PREPROCESSOR_DEFINITIONS = "IJK_OSX=1"; + HEADER_SEARCH_PATHS = ( + "$(PROJECT_DIR)/ijkmedia", + "$(PROJECT_DIR)/../../ijkmedia", + "$(PROJECT_DIR)/../contrib/build/ffmpeg-x86_64/output/include", + ); + INFOPLIST_FILE = IJKMediaPlayer/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = com.befovy.www.IJKMediaPlayer; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 21287EC722E8A909008BF595 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 7SUQ9UM9P2; + INFOPLIST_FILE = IJKMediaPlayerTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.befovy.www.IJKMediaPlayerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 21287EC822E8A909008BF595 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 7SUQ9UM9P2; + INFOPLIST_FILE = IJKMediaPlayerTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.befovy.www.IJKMediaPlayerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 21287EA922E8A908008BF595 /* Build configuration list for PBXProject "IJKMediaPlayer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 21287EC122E8A909008BF595 /* Debug */, + 21287EC222E8A909008BF595 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 21287EC322E8A909008BF595 /* Build configuration list for PBXNativeTarget "IJKMediaPlayer" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 21287EC422E8A909008BF595 /* Debug */, + 21287EC522E8A909008BF595 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 21287EC622E8A909008BF595 /* Build configuration list for PBXNativeTarget "IJKMediaPlayerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 21287EC722E8A909008BF595 /* Debug */, + 21287EC822E8A909008BF595 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 21287EA622E8A908008BF595 /* Project object */; +} diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..c09f74160e --- /dev/null +++ b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h new file mode 100644 index 0000000000..64a19ab025 --- /dev/null +++ b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h @@ -0,0 +1,19 @@ +// +// IJKMediaPlayer.h +// IJKMediaPlayer +// +// Created by Bai Shuai on 2019/7/24. +// Copyright © 2019 befovy. All rights reserved. +// + +#import + +//! Project version number for IJKMediaPlayer. +FOUNDATION_EXPORT double IJKMediaPlayerVersionNumber; + +//! Project version string for IJKMediaPlayer. +FOUNDATION_EXPORT const unsigned char IJKMediaPlayerVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer/Info.plist b/osx/IJKMediaPlayer/IJKMediaPlayer/Info.plist new file mode 100644 index 0000000000..0b46f5c562 --- /dev/null +++ b/osx/IJKMediaPlayer/IJKMediaPlayer/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2019 befovy. All rights reserved. + + diff --git a/osx/IJKMediaPlayer/IJKMediaPlayerTests/IJKMediaPlayerTests.m b/osx/IJKMediaPlayer/IJKMediaPlayerTests/IJKMediaPlayerTests.m new file mode 100644 index 0000000000..e1f7049005 --- /dev/null +++ b/osx/IJKMediaPlayer/IJKMediaPlayerTests/IJKMediaPlayerTests.m @@ -0,0 +1,37 @@ +// +// IJKMediaPlayerTests.m +// IJKMediaPlayerTests +// +// Created by befovy on 2019/7/24. +// Copyright © 2019 befovy. All rights reserved. +// + +#import + +@interface IJKMediaPlayerTests : XCTestCase + +@end + +@implementation IJKMediaPlayerTests + +- (void)setUp { + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. +} + +- (void)testExample { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git a/osx/IJKMediaPlayer/IJKMediaPlayerTests/Info.plist b/osx/IJKMediaPlayer/IJKMediaPlayerTests/Info.plist new file mode 100644 index 0000000000..6c40a6cd0c --- /dev/null +++ b/osx/IJKMediaPlayer/IJKMediaPlayerTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + From bdc662e1e7dd2334abcef816de0c8375f9db3b3e Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 31 Jul 2019 13:12:33 +0800 Subject: [PATCH 057/163] osx: add podfile --- osx/.gitignore | 1 + osx/IJKMediaPlayer/ijkmedia | 1 + osx/Podfile | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 120000 osx/IJKMediaPlayer/ijkmedia create mode 100644 osx/Podfile diff --git a/osx/.gitignore b/osx/.gitignore index afa84ecb81..a9ad8c94f4 100644 --- a/osx/.gitignore +++ b/osx/.gitignore @@ -1,2 +1,3 @@ contrib/build/ contrib/ffmpeg-x86_64/ +Pods/ diff --git a/osx/IJKMediaPlayer/ijkmedia b/osx/IJKMediaPlayer/ijkmedia new file mode 120000 index 0000000000..da96a2da49 --- /dev/null +++ b/osx/IJKMediaPlayer/ijkmedia @@ -0,0 +1 @@ +../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia \ No newline at end of file diff --git a/osx/Podfile b/osx/Podfile new file mode 100644 index 0000000000..500fe12137 --- /dev/null +++ b/osx/Podfile @@ -0,0 +1,19 @@ +# Uncomment the next line to define a global platform for your project +platform :osx, '10.10' + +workspace 'Runner' + +project 'IJKMediaPlayer/IJKMediaPlayer.xcodeproj' + +target 'IJKMediaPlayer' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for IJKMediaPlayer + + target 'IJKMediaPlayerTests' do + inherit! :search_paths + # Pods for testing + end + +end From 13a3881d4e01c7593d36c26b89644911dec06f33 Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 24 Oct 2019 16:57:24 +0800 Subject: [PATCH 058/163] osx: update Xcode project --- .../ijkmedia/ijksdl/ios/IJKSDLHudViewCell.h | 3 + .../ijkmedia/ijksdl/ios/IJKSDLHudViewCell.m | 2 + .../ijksdl/ios/IJKSDLHudViewController.h | 2 + .../ijksdl/ios/IJKSDLHudViewController.m | 2 + .../IJKMediaPlayer.xcodeproj/project.pbxproj | 328 +++++++++++++++++- 5 files changed, 323 insertions(+), 14 deletions(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.h index ce093f824a..0f549b555c 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.h @@ -6,6 +6,7 @@ // Copyright © 2015年 bilibili. All rights reserved. // +#ifndef IJK_OSX #import @interface IJKSDLHudViewCell : UITableViewCell @@ -15,3 +16,5 @@ - (void)setHudValue:(NSString *)value forKey:(NSString *)key; @end + +#endif diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.m index 0944b7fdfd..d69080e763 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.m @@ -6,6 +6,7 @@ // Copyright © 2015年 bilibili. All rights reserved. // +#ifndef IJK_OSX #import "IJKSDLHudViewCell.h" #define COLUMN_COUNT 2 @@ -65,3 +66,4 @@ - (void)layoutSubviews } @end +#endif diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.h index ae07d5e57c..c7a5a36dc8 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.h @@ -6,6 +6,7 @@ // Copyright © 2015年 bilibili. All rights reserved. // +#ifndef IJK_OSX #import @interface IJKSDLHudViewController : UITableViewController @@ -16,3 +17,4 @@ - (void)setRect:(CGRect) rect; @end +#endif diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.m index 73d87861a9..02d3651637 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.m @@ -6,6 +6,7 @@ // Copyright © 2015年 bilibili. All rights reserved. // +#ifndef IJK_OSX #import "IJKSDLHudViewController.h" #import "IJKSDLHudViewCell.h" @@ -111,3 +112,4 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa } @end +#endif diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 17b3cbb6bf..66f9ba346c 100644 --- a/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 21287EB922E8A909008BF595 /* IJKMediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21287EAF22E8A908008BF595 /* IJKMediaPlayer.framework */; }; + 21287EB922E8A909008BF595 /* IJKPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21287EAF22E8A908008BF595 /* IJKPlayer.framework */; }; 21287EBE22E8A909008BF595 /* IJKMediaPlayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EBD22E8A909008BF595 /* IJKMediaPlayerTests.m */; }; 21287EC022E8A909008BF595 /* IJKMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EB222E8A908008BF595 /* IJKMediaPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21287ED822E8A971008BF595 /* IJKSDLGLViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EC922E8A971008BF595 /* IJKSDLGLViewProtocol.h */; }; @@ -36,6 +36,65 @@ 21287F0822E8A989008BF595 /* IJKFFMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF422E8A989008BF595 /* IJKFFMonitor.h */; }; 21287F0922E8A989008BF595 /* IJKAudioKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF522E8A989008BF595 /* IJKAudioKit.h */; }; 21287F0E22E8A989008BF595 /* IJKFFMoviePlayerDef.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EFA22E8A989008BF595 /* IJKFFMoviePlayerDef.h */; }; + 21C8495F23619A810028AC95 /* ijksdl_mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8493F23619A800028AC95 /* ijksdl_mutex.h */; }; + 21C8496023619A810028AC95 /* ijksdl_aout.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8494023619A800028AC95 /* ijksdl_aout.c */; }; + 21C8496123619A810028AC95 /* ijksdl_log.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494123619A800028AC95 /* ijksdl_log.h */; }; + 21C8496223619A810028AC95 /* ijksdl.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494223619A800028AC95 /* ijksdl.h */; }; + 21C8496323619A810028AC95 /* ijksdl_inc_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494323619A800028AC95 /* ijksdl_inc_internal.h */; }; + 21C8496423619A810028AC95 /* ijksdl_stdinc.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8494423619A800028AC95 /* ijksdl_stdinc.c */; }; + 21C8496523619A810028AC95 /* ijksdl_error.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494523619A800028AC95 /* ijksdl_error.h */; }; + 21C8496623619A810028AC95 /* ijksdl_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494623619A800028AC95 /* ijksdl_gles2.h */; }; + 21C8496723619A810028AC95 /* ijksdl_stdinc.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494723619A800028AC95 /* ijksdl_stdinc.h */; }; + 21C8496823619A810028AC95 /* ijksdl_vout_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494823619A800028AC95 /* ijksdl_vout_internal.h */; }; + 21C8496923619A810028AC95 /* ijksdl_mutex.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8494923619A800028AC95 /* ijksdl_mutex.c */; }; + 21C8496A23619A810028AC95 /* ijksdl_vout.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8494A23619A800028AC95 /* ijksdl_vout.c */; }; + 21C8496B23619A810028AC95 /* ijksdl_fourcc.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494B23619A800028AC95 /* ijksdl_fourcc.h */; }; + 21C8496C23619A810028AC95 /* ijksdl_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494C23619A800028AC95 /* ijksdl_timer.h */; }; + 21C8496D23619A810028AC95 /* ijksdl_egl.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8494D23619A800028AC95 /* ijksdl_egl.c */; }; + 21C8496E23619A810028AC95 /* ijksdl_vout.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494E23619A800028AC95 /* ijksdl_vout.h */; }; + 21C8496F23619A810028AC95 /* ijksdl_misc.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494F23619A800028AC95 /* ijksdl_misc.h */; }; + 21C8497023619A810028AC95 /* ijksdl_aout.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8495023619A810028AC95 /* ijksdl_aout.h */; }; + 21C8497123619A810028AC95 /* ijksdl_aout_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8495123619A810028AC95 /* ijksdl_aout_internal.h */; }; + 21C8497223619A810028AC95 /* ijksdl_egl.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8495223619A810028AC95 /* ijksdl_egl.h */; }; + 21C8497323619A810028AC95 /* ijksdl_thread.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8495323619A810028AC95 /* ijksdl_thread.c */; }; + 21C8497423619A810028AC95 /* ijksdl_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8495423619A810028AC95 /* ijksdl_endian.h */; }; + 21C8497523619A810028AC95 /* ijksdl_class.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8495523619A810028AC95 /* ijksdl_class.h */; }; + 21C8497623619A810028AC95 /* ijksdl_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8495623619A810028AC95 /* ijksdl_timer.c */; }; + 21C8497723619A810028AC95 /* ijksdl_container.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8495723619A810028AC95 /* ijksdl_container.h */; }; + 21C8497823619A820028AC95 /* ijksdl_video.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8495823619A810028AC95 /* ijksdl_video.h */; }; + 21C8497923619A820028AC95 /* ijksdl_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8495923619A810028AC95 /* ijksdl_audio.h */; }; + 21C8497B23619A820028AC95 /* ijksdl_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8495B23619A810028AC95 /* ijksdl_audio.c */; }; + 21C8497D23619A820028AC95 /* ijksdl_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8495D23619A810028AC95 /* ijksdl_thread.h */; }; + 21C8497E23619A820028AC95 /* ijksdl_error.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8495E23619A810028AC95 /* ijksdl_error.c */; }; + 21C8498A23619B010028AC95 /* ijksdl_vout_dummy.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8498723619B010028AC95 /* ijksdl_vout_dummy.c */; }; + 21C8498B23619B010028AC95 /* ijksdl_vout_dummy.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8498823619B010028AC95 /* ijksdl_vout_dummy.h */; }; + 21C8498C23619B010028AC95 /* ijksdl_dummy.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8498923619B010028AC95 /* ijksdl_dummy.h */; }; + 21C8499423619B200028AC95 /* ijksdl_inc_ffmpeg.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8498F23619B1F0028AC95 /* ijksdl_inc_ffmpeg.h */; }; + 21C8499523619B200028AC95 /* ijksdl_image_convert.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8499023619B1F0028AC95 /* ijksdl_image_convert.h */; }; + 21C8499623619B200028AC95 /* ijksdl_vout_overlay_ffmpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8499123619B1F0028AC95 /* ijksdl_vout_overlay_ffmpeg.c */; }; + 21C8499723619B200028AC95 /* ijksdl_vout_overlay_ffmpeg.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8499223619B200028AC95 /* ijksdl_vout_overlay_ffmpeg.h */; }; + 21C8499C23619B580028AC95 /* image_convert.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8499B23619B580028AC95 /* image_convert.c */; }; + 21C849D423619BF30028AC95 /* IJKSDLAudioKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849BF23619BF20028AC95 /* IJKSDLAudioKit.h */; }; + 21C849D523619BF30028AC95 /* IJKSDLAudioUnitController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849C023619BF20028AC95 /* IJKSDLAudioUnitController.h */; }; + 21C849D623619BF30028AC95 /* ijksdl_vout_ios_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849C123619BF20028AC95 /* ijksdl_vout_ios_gles2.h */; }; + 21C849D723619BF30028AC95 /* IJKSDLAudioKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C223619BF20028AC95 /* IJKSDLAudioKit.m */; }; + 21C849D823619BF30028AC95 /* IJKSDLGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849C323619BF20028AC95 /* IJKSDLGLView.h */; }; + 21C849D923619BF30028AC95 /* ijksdl_aout_ios_audiounit.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C423619BF20028AC95 /* ijksdl_aout_ios_audiounit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 21C849DA23619BF30028AC95 /* ijksdl_thread_ios.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C523619BF20028AC95 /* ijksdl_thread_ios.m */; }; + 21C849DB23619BF30028AC95 /* IJKSDLGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C623619BF20028AC95 /* IJKSDLGLView.m */; }; + 21C849DC23619BF30028AC95 /* IJKSDLHudViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849C723619BF20028AC95 /* IJKSDLHudViewCell.h */; }; + 21C849DD23619BF30028AC95 /* IJKSDLHudViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C823619BF20028AC95 /* IJKSDLHudViewController.m */; }; + 21C849DE23619BF30028AC95 /* IJKSDLAudioQueueController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C923619BF20028AC95 /* IJKSDLAudioQueueController.m */; }; + 21C849DF23619BF30028AC95 /* IJKSDLHudViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849CA23619BF20028AC95 /* IJKSDLHudViewCell.m */; }; + 21C849E023619BF30028AC95 /* ijksdl_vout_overlay_videotoolbox.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849CB23619BF20028AC95 /* ijksdl_vout_overlay_videotoolbox.h */; }; + 21C849E123619BF30028AC95 /* IJKSDLAudioQueueController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849CC23619BF20028AC95 /* IJKSDLAudioQueueController.h */; }; + 21C849E223619BF30028AC95 /* ijksdl_thread_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849CD23619BF20028AC95 /* ijksdl_thread_ios.h */; }; + 21C849E323619BF30028AC95 /* ijksdl_aout_ios_audiounit.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849CE23619BF20028AC95 /* ijksdl_aout_ios_audiounit.h */; }; + 21C849E423619BF30028AC95 /* ijksdl_vout_overlay_videotoolbox.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849CF23619BF20028AC95 /* ijksdl_vout_overlay_videotoolbox.m */; }; + 21C849E523619BF30028AC95 /* ijksdl_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849D023619BF30028AC95 /* ijksdl_ios.h */; }; + 21C849E623619BF30028AC95 /* IJKSDLHudViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849D123619BF30028AC95 /* IJKSDLHudViewController.h */; }; + 21C849E723619BF30028AC95 /* IJKSDLAudioUnitController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849D223619BF30028AC95 /* IJKSDLAudioUnitController.m */; }; + 21C849E823619BF30028AC95 /* ijksdl_vout_ios_gles2.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849D323619BF30028AC95 /* ijksdl_vout_ios_gles2.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -49,7 +108,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 21287EAF22E8A908008BF595 /* IJKMediaPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IJKMediaPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 21287EAF22E8A908008BF595 /* IJKPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = IJKPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 21287EB222E8A908008BF595 /* IJKMediaPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IJKMediaPlayer.h; sourceTree = ""; }; 21287EB322E8A908008BF595 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 21287EB822E8A909008BF595 /* IJKMediaPlayerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IJKMediaPlayerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -81,6 +140,65 @@ 21287EF422E8A989008BF595 /* IJKFFMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFMonitor.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMonitor.h; sourceTree = ""; }; 21287EF522E8A989008BF595 /* IJKAudioKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKAudioKit.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.h; sourceTree = ""; }; 21287EFA22E8A989008BF595 /* IJKFFMoviePlayerDef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFMoviePlayerDef.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerDef.h; sourceTree = ""; }; + 21C8493F23619A800028AC95 /* ijksdl_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_mutex.h; path = ../../ijkmedia/ijksdl/ijksdl_mutex.h; sourceTree = ""; }; + 21C8494023619A800028AC95 /* ijksdl_aout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_aout.c; path = ../../ijkmedia/ijksdl/ijksdl_aout.c; sourceTree = ""; }; + 21C8494123619A800028AC95 /* ijksdl_log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_log.h; path = ../../ijkmedia/ijksdl/ijksdl_log.h; sourceTree = ""; }; + 21C8494223619A800028AC95 /* ijksdl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl.h; path = ../../ijkmedia/ijksdl/ijksdl.h; sourceTree = ""; }; + 21C8494323619A800028AC95 /* ijksdl_inc_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_inc_internal.h; path = ../../ijkmedia/ijksdl/ijksdl_inc_internal.h; sourceTree = ""; }; + 21C8494423619A800028AC95 /* ijksdl_stdinc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_stdinc.c; path = ../../ijkmedia/ijksdl/ijksdl_stdinc.c; sourceTree = ""; }; + 21C8494523619A800028AC95 /* ijksdl_error.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_error.h; path = ../../ijkmedia/ijksdl/ijksdl_error.h; sourceTree = ""; }; + 21C8494623619A800028AC95 /* ijksdl_gles2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_gles2.h; path = ../../ijkmedia/ijksdl/ijksdl_gles2.h; sourceTree = ""; }; + 21C8494723619A800028AC95 /* ijksdl_stdinc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_stdinc.h; path = ../../ijkmedia/ijksdl/ijksdl_stdinc.h; sourceTree = ""; }; + 21C8494823619A800028AC95 /* ijksdl_vout_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_vout_internal.h; path = ../../ijkmedia/ijksdl/ijksdl_vout_internal.h; sourceTree = ""; }; + 21C8494923619A800028AC95 /* ijksdl_mutex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_mutex.c; path = ../../ijkmedia/ijksdl/ijksdl_mutex.c; sourceTree = ""; }; + 21C8494A23619A800028AC95 /* ijksdl_vout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_vout.c; path = ../../ijkmedia/ijksdl/ijksdl_vout.c; sourceTree = ""; }; + 21C8494B23619A800028AC95 /* ijksdl_fourcc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_fourcc.h; path = ../../ijkmedia/ijksdl/ijksdl_fourcc.h; sourceTree = ""; }; + 21C8494C23619A800028AC95 /* ijksdl_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_timer.h; path = ../../ijkmedia/ijksdl/ijksdl_timer.h; sourceTree = ""; }; + 21C8494D23619A800028AC95 /* ijksdl_egl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_egl.c; path = ../../ijkmedia/ijksdl/ijksdl_egl.c; sourceTree = ""; }; + 21C8494E23619A800028AC95 /* ijksdl_vout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_vout.h; path = ../../ijkmedia/ijksdl/ijksdl_vout.h; sourceTree = ""; }; + 21C8494F23619A800028AC95 /* ijksdl_misc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_misc.h; path = ../../ijkmedia/ijksdl/ijksdl_misc.h; sourceTree = ""; }; + 21C8495023619A810028AC95 /* ijksdl_aout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_aout.h; path = ../../ijkmedia/ijksdl/ijksdl_aout.h; sourceTree = ""; }; + 21C8495123619A810028AC95 /* ijksdl_aout_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_aout_internal.h; path = ../../ijkmedia/ijksdl/ijksdl_aout_internal.h; sourceTree = ""; }; + 21C8495223619A810028AC95 /* ijksdl_egl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_egl.h; path = ../../ijkmedia/ijksdl/ijksdl_egl.h; sourceTree = ""; }; + 21C8495323619A810028AC95 /* ijksdl_thread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_thread.c; path = ../../ijkmedia/ijksdl/ijksdl_thread.c; sourceTree = ""; }; + 21C8495423619A810028AC95 /* ijksdl_endian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_endian.h; path = ../../ijkmedia/ijksdl/ijksdl_endian.h; sourceTree = ""; }; + 21C8495523619A810028AC95 /* ijksdl_class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_class.h; path = ../../ijkmedia/ijksdl/ijksdl_class.h; sourceTree = ""; }; + 21C8495623619A810028AC95 /* ijksdl_timer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_timer.c; path = ../../ijkmedia/ijksdl/ijksdl_timer.c; sourceTree = ""; }; + 21C8495723619A810028AC95 /* ijksdl_container.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_container.h; path = ../../ijkmedia/ijksdl/ijksdl_container.h; sourceTree = ""; }; + 21C8495823619A810028AC95 /* ijksdl_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_video.h; path = ../../ijkmedia/ijksdl/ijksdl_video.h; sourceTree = ""; }; + 21C8495923619A810028AC95 /* ijksdl_audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_audio.h; path = ../../ijkmedia/ijksdl/ijksdl_audio.h; sourceTree = ""; }; + 21C8495B23619A810028AC95 /* ijksdl_audio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_audio.c; path = ../../ijkmedia/ijksdl/ijksdl_audio.c; sourceTree = ""; }; + 21C8495D23619A810028AC95 /* ijksdl_thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_thread.h; path = ../../ijkmedia/ijksdl/ijksdl_thread.h; sourceTree = ""; }; + 21C8495E23619A810028AC95 /* ijksdl_error.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_error.c; path = ../../ijkmedia/ijksdl/ijksdl_error.c; sourceTree = ""; }; + 21C8498723619B010028AC95 /* ijksdl_vout_dummy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_vout_dummy.c; path = ../../ijkmedia/ijksdl/dummy/ijksdl_vout_dummy.c; sourceTree = ""; }; + 21C8498823619B010028AC95 /* ijksdl_vout_dummy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_vout_dummy.h; path = ../../ijkmedia/ijksdl/dummy/ijksdl_vout_dummy.h; sourceTree = ""; }; + 21C8498923619B010028AC95 /* ijksdl_dummy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_dummy.h; path = ../../ijkmedia/ijksdl/dummy/ijksdl_dummy.h; sourceTree = ""; }; + 21C8498F23619B1F0028AC95 /* ijksdl_inc_ffmpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_inc_ffmpeg.h; path = ../../ijkmedia/ijksdl/ffmpeg/ijksdl_inc_ffmpeg.h; sourceTree = ""; }; + 21C8499023619B1F0028AC95 /* ijksdl_image_convert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_image_convert.h; path = ../../ijkmedia/ijksdl/ffmpeg/ijksdl_image_convert.h; sourceTree = ""; }; + 21C8499123619B1F0028AC95 /* ijksdl_vout_overlay_ffmpeg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_vout_overlay_ffmpeg.c; path = ../../ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c; sourceTree = ""; }; + 21C8499223619B200028AC95 /* ijksdl_vout_overlay_ffmpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_vout_overlay_ffmpeg.h; path = ../../ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.h; sourceTree = ""; }; + 21C8499B23619B580028AC95 /* image_convert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = image_convert.c; path = ../../ijkmedia/ijksdl/ffmpeg/abi_all/image_convert.c; sourceTree = ""; }; + 21C849BF23619BF20028AC95 /* IJKSDLAudioKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLAudioKit.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioKit.h; sourceTree = ""; }; + 21C849C023619BF20028AC95 /* IJKSDLAudioUnitController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLAudioUnitController.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioUnitController.h; sourceTree = ""; }; + 21C849C123619BF20028AC95 /* ijksdl_vout_ios_gles2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_vout_ios_gles2.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.h; sourceTree = ""; }; + 21C849C223619BF20028AC95 /* IJKSDLAudioKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLAudioKit.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioKit.m; sourceTree = ""; }; + 21C849C323619BF20028AC95 /* IJKSDLGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLGLView.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h; sourceTree = ""; }; + 21C849C423619BF20028AC95 /* ijksdl_aout_ios_audiounit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ijksdl_aout_ios_audiounit.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_aout_ios_audiounit.m; sourceTree = ""; }; + 21C849C523619BF20028AC95 /* ijksdl_thread_ios.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ijksdl_thread_ios.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m; sourceTree = ""; }; + 21C849C623619BF20028AC95 /* IJKSDLGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLGLView.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m; sourceTree = ""; }; + 21C849C723619BF20028AC95 /* IJKSDLHudViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLHudViewCell.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.h; sourceTree = ""; }; + 21C849C823619BF20028AC95 /* IJKSDLHudViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLHudViewController.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.m; sourceTree = ""; }; + 21C849C923619BF20028AC95 /* IJKSDLAudioQueueController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLAudioQueueController.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioQueueController.m; sourceTree = ""; }; + 21C849CA23619BF20028AC95 /* IJKSDLHudViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLHudViewCell.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.m; sourceTree = ""; }; + 21C849CB23619BF20028AC95 /* ijksdl_vout_overlay_videotoolbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_vout_overlay_videotoolbox.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_overlay_videotoolbox.h; sourceTree = ""; }; + 21C849CC23619BF20028AC95 /* IJKSDLAudioQueueController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLAudioQueueController.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioQueueController.h; sourceTree = ""; }; + 21C849CD23619BF20028AC95 /* ijksdl_thread_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_thread_ios.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.h; sourceTree = ""; }; + 21C849CE23619BF20028AC95 /* ijksdl_aout_ios_audiounit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_aout_ios_audiounit.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_aout_ios_audiounit.h; sourceTree = ""; }; + 21C849CF23619BF20028AC95 /* ijksdl_vout_overlay_videotoolbox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ijksdl_vout_overlay_videotoolbox.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_overlay_videotoolbox.m; sourceTree = ""; }; + 21C849D023619BF30028AC95 /* ijksdl_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_ios.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_ios.h; sourceTree = ""; }; + 21C849D123619BF30028AC95 /* IJKSDLHudViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLHudViewController.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.h; sourceTree = ""; }; + 21C849D223619BF30028AC95 /* IJKSDLAudioUnitController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLAudioUnitController.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioUnitController.m; sourceTree = ""; }; + 21C849D323619BF30028AC95 /* ijksdl_vout_ios_gles2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ijksdl_vout_ios_gles2.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -95,7 +213,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 21287EB922E8A909008BF595 /* IJKMediaPlayer.framework in Frameworks */, + 21287EB922E8A909008BF595 /* IJKPlayer.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -105,7 +223,7 @@ 21287EA522E8A908008BF595 = { isa = PBXGroup; children = ( - 21287EB122E8A908008BF595 /* IJKMediaPlayer */, + 21C84871236198490028AC95 /* Sources */, 21287EBC22E8A909008BF595 /* IJKMediaPlayerTests */, 21287EB022E8A908008BF595 /* Products */, ); @@ -114,7 +232,7 @@ 21287EB022E8A908008BF595 /* Products */ = { isa = PBXGroup; children = ( - 21287EAF22E8A908008BF595 /* IJKMediaPlayer.framework */, + 21287EAF22E8A908008BF595 /* IJKPlayer.framework */, 21287EB822E8A909008BF595 /* IJKMediaPlayerTests.xctest */, ); name = Products; @@ -164,6 +282,129 @@ path = IJKMediaPlayerTests; sourceTree = ""; }; + 21C84871236198490028AC95 /* Sources */ = { + isa = PBXGroup; + children = ( + 21C848FA236199430028AC95 /* ijkmedia */, + 21287EB122E8A908008BF595 /* IJKMediaPlayer */, + ); + name = Sources; + sourceTree = ""; + }; + 21C848FA236199430028AC95 /* ijkmedia */ = { + isa = PBXGroup; + children = ( + 21C8497F23619ABD0028AC95 /* ijkplayer */, + 21C8493E23619A750028AC95 /* ijksdl */, + ); + name = ijkmedia; + sourceTree = ""; + }; + 21C8493E23619A750028AC95 /* ijksdl */ = { + isa = PBXGroup; + children = ( + 21C849BE23619BD40028AC95 /* osx */, + 21C8498D23619B0D0028AC95 /* ffmpeg */, + 21C8498623619AF30028AC95 /* dummy */, + 21C8495123619A810028AC95 /* ijksdl_aout_internal.h */, + 21C8494023619A800028AC95 /* ijksdl_aout.c */, + 21C8495023619A810028AC95 /* ijksdl_aout.h */, + 21C8495B23619A810028AC95 /* ijksdl_audio.c */, + 21C8495923619A810028AC95 /* ijksdl_audio.h */, + 21C8495523619A810028AC95 /* ijksdl_class.h */, + 21C8495723619A810028AC95 /* ijksdl_container.h */, + 21C8494D23619A800028AC95 /* ijksdl_egl.c */, + 21C8495223619A810028AC95 /* ijksdl_egl.h */, + 21C8495423619A810028AC95 /* ijksdl_endian.h */, + 21C8495E23619A810028AC95 /* ijksdl_error.c */, + 21C8494523619A800028AC95 /* ijksdl_error.h */, + 21C8494B23619A800028AC95 /* ijksdl_fourcc.h */, + 21C8494623619A800028AC95 /* ijksdl_gles2.h */, + 21C8494323619A800028AC95 /* ijksdl_inc_internal.h */, + 21C8494123619A800028AC95 /* ijksdl_log.h */, + 21C8494F23619A800028AC95 /* ijksdl_misc.h */, + 21C8494923619A800028AC95 /* ijksdl_mutex.c */, + 21C8493F23619A800028AC95 /* ijksdl_mutex.h */, + 21C8494423619A800028AC95 /* ijksdl_stdinc.c */, + 21C8494723619A800028AC95 /* ijksdl_stdinc.h */, + 21C8495323619A810028AC95 /* ijksdl_thread.c */, + 21C8495D23619A810028AC95 /* ijksdl_thread.h */, + 21C8495623619A810028AC95 /* ijksdl_timer.c */, + 21C8494C23619A800028AC95 /* ijksdl_timer.h */, + 21C8495823619A810028AC95 /* ijksdl_video.h */, + 21C8494823619A800028AC95 /* ijksdl_vout_internal.h */, + 21C8494A23619A800028AC95 /* ijksdl_vout.c */, + 21C8494E23619A800028AC95 /* ijksdl_vout.h */, + 21C8494223619A800028AC95 /* ijksdl.h */, + ); + name = ijksdl; + sourceTree = ""; + }; + 21C8497F23619ABD0028AC95 /* ijkplayer */ = { + isa = PBXGroup; + children = ( + ); + name = ijkplayer; + sourceTree = ""; + }; + 21C8498623619AF30028AC95 /* dummy */ = { + isa = PBXGroup; + children = ( + 21C8498923619B010028AC95 /* ijksdl_dummy.h */, + 21C8498723619B010028AC95 /* ijksdl_vout_dummy.c */, + 21C8498823619B010028AC95 /* ijksdl_vout_dummy.h */, + ); + name = dummy; + sourceTree = ""; + }; + 21C8498D23619B0D0028AC95 /* ffmpeg */ = { + isa = PBXGroup; + children = ( + 21C8499A23619B4B0028AC95 /* abi_all */, + 21C8499023619B1F0028AC95 /* ijksdl_image_convert.h */, + 21C8498F23619B1F0028AC95 /* ijksdl_inc_ffmpeg.h */, + 21C8499123619B1F0028AC95 /* ijksdl_vout_overlay_ffmpeg.c */, + 21C8499223619B200028AC95 /* ijksdl_vout_overlay_ffmpeg.h */, + ); + name = ffmpeg; + sourceTree = ""; + }; + 21C8499A23619B4B0028AC95 /* abi_all */ = { + isa = PBXGroup; + children = ( + 21C8499B23619B580028AC95 /* image_convert.c */, + ); + name = abi_all; + sourceTree = ""; + }; + 21C849BE23619BD40028AC95 /* osx */ = { + isa = PBXGroup; + children = ( + 21C849CE23619BF20028AC95 /* ijksdl_aout_ios_audiounit.h */, + 21C849C423619BF20028AC95 /* ijksdl_aout_ios_audiounit.m */, + 21C849D023619BF30028AC95 /* ijksdl_ios.h */, + 21C849CD23619BF20028AC95 /* ijksdl_thread_ios.h */, + 21C849C523619BF20028AC95 /* ijksdl_thread_ios.m */, + 21C849C123619BF20028AC95 /* ijksdl_vout_ios_gles2.h */, + 21C849D323619BF30028AC95 /* ijksdl_vout_ios_gles2.m */, + 21C849CB23619BF20028AC95 /* ijksdl_vout_overlay_videotoolbox.h */, + 21C849CF23619BF20028AC95 /* ijksdl_vout_overlay_videotoolbox.m */, + 21C849BF23619BF20028AC95 /* IJKSDLAudioKit.h */, + 21C849C223619BF20028AC95 /* IJKSDLAudioKit.m */, + 21C849CC23619BF20028AC95 /* IJKSDLAudioQueueController.h */, + 21C849C923619BF20028AC95 /* IJKSDLAudioQueueController.m */, + 21C849C023619BF20028AC95 /* IJKSDLAudioUnitController.h */, + 21C849D223619BF30028AC95 /* IJKSDLAudioUnitController.m */, + 21C849C323619BF20028AC95 /* IJKSDLGLView.h */, + 21C849C623619BF20028AC95 /* IJKSDLGLView.m */, + 21C849C723619BF20028AC95 /* IJKSDLHudViewCell.h */, + 21C849CA23619BF20028AC95 /* IJKSDLHudViewCell.m */, + 21C849D123619BF30028AC95 /* IJKSDLHudViewController.h */, + 21C849C823619BF20028AC95 /* IJKSDLHudViewController.m */, + ); + name = osx; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -173,29 +414,66 @@ files = ( 21287EDC22E8A971008BF595 /* IJKMediaPlayer-Prefix.pch in Headers */, 21287EE522E8A971008BF595 /* IJKMediaUtils.h in Headers */, + 21C8498C23619B010028AC95 /* ijksdl_dummy.h in Headers */, + 21C849D623619BF30028AC95 /* ijksdl_vout_ios_gles2.h in Headers */, 21287EC022E8A909008BF595 /* IJKMediaPlayer.h in Headers */, + 21C8496C23619A810028AC95 /* ijksdl_timer.h in Headers */, 21287EE622E8A971008BF595 /* IJKMediaPlayback.h in Headers */, + 21C8495F23619A810028AC95 /* ijksdl_mutex.h in Headers */, 21287EDF22E8A971008BF595 /* IJKMediaModule.h in Headers */, + 21C8496823619A810028AC95 /* ijksdl_vout_internal.h in Headers */, + 21C8496523619A810028AC95 /* ijksdl_error.h in Headers */, + 21C8497123619A810028AC95 /* ijksdl_aout_internal.h in Headers */, 21287F0822E8A989008BF595 /* IJKFFMonitor.h in Headers */, + 21C8497223619A810028AC95 /* ijksdl_egl.h in Headers */, 21287F0322E8A989008BF595 /* IJKFFOptions.h in Headers */, + 21C8496B23619A810028AC95 /* ijksdl_fourcc.h in Headers */, + 21C849E523619BF30028AC95 /* ijksdl_ios.h in Headers */, + 21C8499723619B200028AC95 /* ijksdl_vout_overlay_ffmpeg.h in Headers */, + 21C849D523619BF30028AC95 /* IJKSDLAudioUnitController.h in Headers */, + 21C849D423619BF30028AC95 /* IJKSDLAudioKit.h in Headers */, + 21C8497D23619A820028AC95 /* ijksdl_thread.h in Headers */, + 21C849E623619BF30028AC95 /* IJKSDLHudViewController.h in Headers */, + 21C8496123619A810028AC95 /* ijksdl_log.h in Headers */, 21287F0622E8A989008BF595 /* IJKFFMoviePlayerController.h in Headers */, + 21C8496623619A810028AC95 /* ijksdl_gles2.h in Headers */, + 21C849D823619BF30028AC95 /* IJKSDLGLView.h in Headers */, + 21C8496F23619A810028AC95 /* ijksdl_misc.h in Headers */, 21287EDB22E8A971008BF595 /* IJKMediaPlayer.h in Headers */, 21287ED822E8A971008BF595 /* IJKSDLGLViewProtocol.h in Headers */, + 21C8497423619A810028AC95 /* ijksdl_endian.h in Headers */, 21287F0122E8A989008BF595 /* IJKDeviceModel.h in Headers */, + 21C8499523619B200028AC95 /* ijksdl_image_convert.h in Headers */, 21287EE422E8A971008BF595 /* IJKNotificationManager.h in Headers */, 21287F0422E8A989008BF595 /* IJKKVOController.h in Headers */, + 21C8496E23619A810028AC95 /* ijksdl_vout.h in Headers */, + 21C849E123619BF30028AC95 /* IJKSDLAudioQueueController.h in Headers */, 21287F0E22E8A989008BF595 /* IJKFFMoviePlayerDef.h in Headers */, + 21C8497923619A820028AC95 /* ijksdl_audio.h in Headers */, + 21C849E023619BF30028AC95 /* ijksdl_vout_overlay_videotoolbox.h in Headers */, + 21C8497023619A810028AC95 /* ijksdl_aout.h in Headers */, + 21C8496223619A810028AC95 /* ijksdl.h in Headers */, + 21C849DC23619BF30028AC95 /* IJKSDLHudViewCell.h in Headers */, + 21C8499423619B200028AC95 /* ijksdl_inc_ffmpeg.h in Headers */, + 21C8497823619A820028AC95 /* ijksdl_video.h in Headers */, + 21C849E223619BF30028AC95 /* ijksdl_thread_ios.h in Headers */, + 21C8496723619A810028AC95 /* ijksdl_stdinc.h in Headers */, + 21C849E323619BF30028AC95 /* ijksdl_aout_ios_audiounit.h in Headers */, + 21C8498B23619B010028AC95 /* ijksdl_vout_dummy.h in Headers */, + 21C8497523619A810028AC95 /* ijksdl_class.h in Headers */, + 21C8496323619A810028AC95 /* ijksdl_inc_internal.h in Headers */, 21287EE322E8A971008BF595 /* NSString+IJKMedia.h in Headers */, 21287F0922E8A989008BF595 /* IJKAudioKit.h in Headers */, + 21C8497723619A810028AC95 /* ijksdl_container.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 21287EAE22E8A908008BF595 /* IJKMediaPlayer */ = { + 21287EAE22E8A908008BF595 /* IJKPlayer */ = { isa = PBXNativeTarget; - buildConfigurationList = 21287EC322E8A909008BF595 /* Build configuration list for PBXNativeTarget "IJKMediaPlayer" */; + buildConfigurationList = 21287EC322E8A909008BF595 /* Build configuration list for PBXNativeTarget "IJKPlayer" */; buildPhases = ( 21287EAA22E8A908008BF595 /* Headers */, 21287EAB22E8A908008BF595 /* Sources */, @@ -206,9 +484,9 @@ ); dependencies = ( ); - name = IJKMediaPlayer; + name = IJKPlayer; productName = IJKMediaPlayer; - productReference = 21287EAF22E8A908008BF595 /* IJKMediaPlayer.framework */; + productReference = 21287EAF22E8A908008BF595 /* IJKPlayer.framework */; productType = "com.apple.product-type.framework"; }; 21287EB722E8A909008BF595 /* IJKMediaPlayerTests */ = { @@ -258,7 +536,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 21287EAE22E8A908008BF595 /* IJKMediaPlayer */, + 21287EAE22E8A908008BF595 /* IJKPlayer */, 21287EB722E8A909008BF595 /* IJKMediaPlayerTests */, ); }; @@ -286,17 +564,39 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 21C849DA23619BF30028AC95 /* ijksdl_thread_ios.m in Sources */, 21287EDA22E8A971008BF595 /* IJKMediaPlayback.m in Sources */, + 21C849E823619BF30028AC95 /* ijksdl_vout_ios_gles2.m in Sources */, + 21C8498A23619B010028AC95 /* ijksdl_vout_dummy.c in Sources */, + 21C849D723619BF30028AC95 /* IJKSDLAudioKit.m in Sources */, + 21C849E423619BF30028AC95 /* ijksdl_vout_overlay_videotoolbox.m in Sources */, 21287EE222E8A971008BF595 /* IJKMediaModule.m in Sources */, + 21C8497E23619A820028AC95 /* ijksdl_error.c in Sources */, + 21C8499C23619B580028AC95 /* image_convert.c in Sources */, + 21C8496A23619A810028AC95 /* ijksdl_vout.c in Sources */, 21287F0522E8A989008BF595 /* IJKKVOController.m in Sources */, + 21C8499623619B200028AC95 /* ijksdl_vout_overlay_ffmpeg.c in Sources */, 21287EDD22E8A971008BF595 /* IJKMediaUtils.m in Sources */, + 21C849D923619BF30028AC95 /* ijksdl_aout_ios_audiounit.m in Sources */, + 21C849E723619BF30028AC95 /* IJKSDLAudioUnitController.m in Sources */, + 21C8496D23619A810028AC95 /* ijksdl_egl.c in Sources */, + 21C8497623619A810028AC95 /* ijksdl_timer.c in Sources */, + 21C849DF23619BF30028AC95 /* IJKSDLHudViewCell.m in Sources */, 21287EE122E8A971008BF595 /* IJKNotificationManager.m in Sources */, 21287EDE22E8A971008BF595 /* NSString+IJKMedia.m in Sources */, + 21C8497B23619A820028AC95 /* ijksdl_audio.c in Sources */, + 21C849DE23619BF30028AC95 /* IJKSDLAudioQueueController.m in Sources */, + 21C849DD23619BF30028AC95 /* IJKSDLHudViewController.m in Sources */, + 21C8496423619A810028AC95 /* ijksdl_stdinc.c in Sources */, 21287EFC22E8A989008BF595 /* IJKFFMoviePlayerDef.m in Sources */, + 21C8496923619A810028AC95 /* ijksdl_mutex.c in Sources */, 21287EFF22E8A989008BF595 /* IJKFFMonitor.m in Sources */, 21287EFB22E8A989008BF595 /* IJKFFOptions.m in Sources */, 21287F0222E8A989008BF595 /* IJKDeviceModel.m in Sources */, + 21C849DB23619BF30028AC95 /* IJKSDLGLView.m in Sources */, 21287F0022E8A989008BF595 /* IJKAudioKit.m in Sources */, + 21C8497323619A810028AC95 /* ijksdl_thread.c in Sources */, + 21C8496023619A810028AC95 /* ijksdl_aout.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -313,7 +613,7 @@ /* Begin PBXTargetDependency section */ 21287EBB22E8A909008BF595 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 21287EAE22E8A908008BF595 /* IJKMediaPlayer */; + target = 21287EAE22E8A908008BF595 /* IJKPlayer */; targetProxy = 21287EBA22E8A909008BF595 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -465,7 +765,7 @@ "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MACH_O_TYPE = staticlib; + MACH_O_TYPE = mh_dylib; PRODUCT_BUNDLE_IDENTIFIER = com.befovy.www.IJKMediaPlayer; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -498,7 +798,7 @@ "@executable_path/../Frameworks", "@loader_path/Frameworks", ); - MACH_O_TYPE = staticlib; + MACH_O_TYPE = mh_dylib; PRODUCT_BUNDLE_IDENTIFIER = com.befovy.www.IJKMediaPlayer; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -551,7 +851,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 21287EC322E8A909008BF595 /* Build configuration list for PBXNativeTarget "IJKMediaPlayer" */ = { + 21287EC322E8A909008BF595 /* Build configuration list for PBXNativeTarget "IJKPlayer" */ = { isa = XCConfigurationList; buildConfigurations = ( 21287EC422E8A909008BF595 /* Debug */, From 550de1ef47f1532be6b59ccf7af6f0af6bca6951 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 1 Nov 2019 11:36:11 +0800 Subject: [PATCH 059/163] osx: IJKPlayer build success, audio played but no video render --- .../IJKMediaPlayer/IJKFFMediaPlayer.m | 18 +- .../ijkmedia/ijkplayer/ios/ijkplayer_ios.h | 3 +- .../ijkmedia/ijkplayer/ios/ijkplayer_ios.m | 4 +- .../ios/pipeline/IJKVideoToolBoxAsync.m | 5 + .../ios/pipeline/IJKVideoToolBoxSync.m | 5 + .../ffpipenode_ios_videotoolbox_vdec.m | 6 + .../ijkmedia/ijksdl/ios/IJKSDLAudioKit.m | 5 + .../ijksdl/ios/IJKSDLAudioQueueController.m | 3 +- .../ijksdl/ios/IJKSDLAudioUnitController.m | 2 + .../ijkmedia/ijksdl/ios/IJKSDLGLView.m | 5 + .../ijkmedia/ijksdl/ios/ijksdl_ios.h | 5 +- .../ijksdl/ios/ijksdl_vout_ios_gles2.m | 21 +- .../IJKMediaPlayer.xcodeproj/project.pbxproj | 418 +++++++++++++++++- .../IJKMediaPlayer/IJKMediaPlayer.h | 4 + osx/Podfile | 19 - 15 files changed, 469 insertions(+), 54 deletions(-) delete mode 100644 osx/Podfile diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m index 2a744ac2c8..56cbf64a88 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m @@ -47,7 +47,9 @@ @implementation IJKFFMediaPlayer { NSMutableSet> *_eventHandlers; CFDictionaryRef _optionsDictionary; +#if IJK_IOS IJKSDLFboGLView* _fboView; +#endif id _cvPBView; IJKSDLFFPlayrRenderType _renderType; } @@ -255,7 +257,9 @@ - (void) shutdown ijkmp_dec_ref_p(&_nativeMediaPlayer); _cvPBView = nil; +#if IJK_IOS _fboView = nil; +#endif } - (int) reset @@ -291,22 +295,32 @@ - (void) removeIJKMPEventHandler:(id) handler [_eventHandlers removeObject:handler]; } - - +#if IJK_IOS - (UIImage *)snapshot { return nil; } +#else +- (NSImage *)snapshot { + return nil; +} +#endif - (void) setupCVPixelBufferView:(id) cvPBView { _cvPBView = cvPBView; if (_renderType == IJKSDLFFPlayrRenderTypeFboView) { +#if IJK_IOS _fboView = [[IJKSDLFboGLView alloc] initWithIJKCVPBViewProtocol:self]; ijkmp_ios_set_glview(_nativeMediaPlayer, _fboView); +#endif } else if (_renderType == IJKSDLFFPlayrRenderTypeGlView) { const void *keys[] = { +#if IJK_IOS kCVPixelBufferOpenGLESCompatibilityKey, +#else + kCVPixelBufferOpenGLCompatibilityKey, +#endif kCVPixelBufferIOSurfacePropertiesKey, }; const void *values[] = { diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h index fea3ca8ada..4fe406430a 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h @@ -23,7 +23,8 @@ #include "ijkplayer/ijkplayer.h" #import "IJKSDLGLView.h" -#import "IJKSDLFboGLView.h" + +// #import "IJKSDLFboGLView.h" // ref_count is 1 after open IjkMediaPlayer *ijkmp_ios_create(int (*msg_loop)(void*)); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.m index c392181796..2033a2d779 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.m @@ -66,11 +66,11 @@ void ijkmp_ios_set_glview_l(IjkMediaPlayer *mp, id glView) void ijkmp_ios_set_glview(IjkMediaPlayer *mp, id glView) { assert(mp); - MPTRACE("ijkmp_ios_set_view(glView=%p)\n", (void*)glView); + //MPTRACE("ijkmp_ios_set_view(glView=%p)\n", (void*)glView); pthread_mutex_lock(&mp->mutex); ijkmp_ios_set_glview_l(mp, glView); pthread_mutex_unlock(&mp->mutex); - MPTRACE("ijkmp_ios_set_view(glView=%p)=void\n", (void*)glView); + //MPTRACE("ijkmp_ios_set_view(glView=%p)=void\n", (void*)glView); } bool ijkmp_ios_is_videotoolbox_open_l(IjkMediaPlayer *mp) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m index 0c4d10fd0e..67d7fdb4c0 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m @@ -569,8 +569,13 @@ static VTDecompressionSessionRef vtbsession_create(Ijk_VideoToolBox_Opaque* cont kCVPixelBufferWidthKey, width); CFDictionarySetSInt32(destinationPixelBufferAttributes, kCVPixelBufferHeightKey, height); +#if IJK_IOS CFDictionarySetBoolean(destinationPixelBufferAttributes, kCVPixelBufferOpenGLESCompatibilityKey, YES); +#else + CFDictionarySetBoolean(destinationPixelBufferAttributes, + kCVPixelBufferOpenGLCompatibilityKey, YES); +#endif outputCallback.decompressionOutputCallback = VTDecoderCallback; outputCallback.decompressionOutputRefCon = context ; status = VTDecompressionSessionCreate( diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m index 1816c7fac9..29e7cc3bc0 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m @@ -449,8 +449,13 @@ static VTDecompressionSessionRef vtbsession_create(Ijk_VideoToolBox_Opaque* cont kCVPixelBufferWidthKey, width); CFDictionarySetSInt32(destinationPixelBufferAttributes, kCVPixelBufferHeightKey, height); +#if IJK_IOS CFDictionarySetBoolean(destinationPixelBufferAttributes, kCVPixelBufferOpenGLESCompatibilityKey, YES); +#else + CFDictionarySetBoolean(destinationPixelBufferAttributes, + kCVPixelBufferOpenGLCompatibilityKey, YES); +#endif outputCallback.decompressionOutputCallback = VTDecoderCallback; outputCallback.decompressionOutputRefCon = context ; status = VTDecompressionSessionCreate( diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m index 49f61244ec..6c742d05f6 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m @@ -28,7 +28,11 @@ #include "ijkplayer/ff_ffplay.h" #include "ijksdl_mutex.h" #include "ijksdl_vout_ios_gles2.h" +#if IJK_IOS #import +#else +#import +#endif struct IJKFF_Pipenode_Opaque { IJKFF_Pipeline *pipeline; @@ -95,9 +99,11 @@ static int func_run_sync(IJKFF_Pipenode *node) { if (!ffp || !ffp->is) return NULL; +#if IJK_IOS if ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.0){ return NULL; } +#endif IJKFF_Pipenode *node = ffpipenode_alloc(sizeof(IJKFF_Pipenode_Opaque)); if (!node) return node; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioKit.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioKit.m index 5998a1c8c3..85b744b80c 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioKit.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioKit.m @@ -28,7 +28,12 @@ extern void IJKSDLGetAudioComponentDescriptionFromSpec(const SDL_AudioSpec *spec, AudioComponentDescription *desc) { desc->componentType = kAudioUnitType_Output; +#if IJK_IOS desc->componentSubType = kAudioUnitSubType_RemoteIO; +#else + desc->componentSubType = kAudioUnitSubType_DefaultOutput; +#endif + desc->componentManufacturer = kAudioUnitManufacturer_Apple; desc->componentFlags = 0; desc->componentFlagsMask = 0; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioQueueController.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioQueueController.m index 008ab0f543..e65b01cbe4 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioQueueController.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioQueueController.m @@ -141,10 +141,11 @@ - (void)play @synchronized(_lock) { _isPaused = NO; NSError *error = nil; +#if IJK_IOS if (NO == [[AVAudioSession sharedInstance] setActive:YES error:&error]) { NSLog(@"AudioQueue: AVAudioSession.setActive(YES) failed: %@\n", error ? [error localizedDescription] : @"nil"); } - +#endif OSStatus status = AudioQueueStart(_audioQueueRef, NULL); if (status != noErr) NSLog(@"AudioQueue: AudioQueueStart failed (%d)\n", (int)status); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioUnitController.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioUnitController.m index 0c15b2701c..f5db28f1f0 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioUnitController.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioUnitController.m @@ -153,10 +153,12 @@ - (void)play return; _isPaused = NO; +#if IJK_IOS NSError *error = nil; if (NO == [[AVAudioSession sharedInstance] setActive:YES error:&error]) { NSLog(@"AudioUnit: AVAudioSession.setActive(YES) failed: %@\n", error ? [error localizedDescription] : @"nil"); } +#endif OSStatus status = AudioOutputUnitStart(_auUnit); if (status != noErr) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m index ffecb6b8f5..c474db1748 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m @@ -23,6 +23,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#if IJK_IOS + #import "IJKSDLGLView.h" #include "ijksdl/ijksdl_timer.h" #include "ijksdl/ios/ijksdl_ios.h" @@ -629,3 +631,6 @@ - (void)setShouldLockWhileBeingMovedToWindow:(BOOL)shouldLockWhileBeingMovedToWi _shouldLockWhileBeingMovedToWindow = shouldLockWhileBeingMovedToWindow; } @end + + +#endif diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_ios.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_ios.h index 91e721b572..f8ed6b8ead 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_ios.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_ios.h @@ -24,10 +24,9 @@ #include "ijksdl/ijksdl.h" #include "ijksdl_aout_ios_audiounit.h" #include "ijksdl_vout_ios_gles2.h" +#if IJK_IOS #import - - #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) @@ -53,3 +52,5 @@ inline static BOOL isIOS6OrLater() { return SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0"); } + +#endif // IJK_IOS diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m index f96f0b77fa..ea65aab63c 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m @@ -37,8 +37,10 @@ struct SDL_Vout_Opaque { id gl_viewp; +#if IJK_IOS IJKSDLGLView *gl_view; IJKSDLFboGLView *fbo_viewl; +#endif BOOL response_display_pixels; BOOL third_part; int no_glview_warning; @@ -74,7 +76,9 @@ static void vout_free_l(SDL_Vout *vout) [opaque->gl_viewp release]; opaque->gl_viewp = nil; } +#if IJK_IOS opaque->gl_view = nil; +#endif } SDL_Vout_FreeInternal(vout); @@ -122,11 +126,16 @@ static int vout_display_overlay_l(SDL_Vout *vout, SDL_VoutOverlay *overlay) if (opaque->response_display_pixels) { [gl_viewp display_pixels:&ijk_overlay]; } - } else if (opaque->gl_view){ - [opaque->gl_view display:overlay]; - } else if (opaque->fbo_viewl) { - [opaque->fbo_viewl display:overlay]; } +#if IJK_IOS + if (!opaque->third_part) { + if (opaque->gl_view){ + [opaque->gl_view display:overlay]; + } else if (opaque->fbo_viewl) { + [opaque->fbo_viewl display:overlay]; + } + } +#endif return 0; } @@ -148,7 +157,6 @@ static int vout_display_overlay(SDL_Vout *vout, SDL_VoutOverlay *overlay) SDL_Vout_Opaque *opaque = vout->opaque; opaque->gl_viewp = nil; - opaque->gl_view = nil; opaque->third_part = NO; opaque->response_display_pixels = NO; opaque->no_glview_warning = 0; @@ -171,18 +179,19 @@ static void SDL_VoutIos_SetGLView_l(SDL_Vout *vout, id vie [opaque->gl_viewp release]; opaque->gl_viewp = nil; } - opaque->gl_view = nil; opaque->no_glview_warning = 0; if (view) { opaque->gl_viewp = [view retain]; opaque->third_part = view.isThirdGLView; if ([opaque->gl_viewp respondsToSelector:@selector(display_pixels:)]) opaque->response_display_pixels = YES; +#if IJK_IOS if ([opaque->gl_viewp isKindOfClass:[IJKSDLGLView class] ]){ opaque->gl_view = (IJKSDLGLView *)opaque->gl_viewp; } else if ([opaque->gl_viewp isKindOfClass:[IJKSDLFboGLView class] ]) { opaque->fbo_viewl = (IJKSDLFboGLView *)opaque->gl_viewp; } +#endif } } diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 66f9ba346c..f367343e0b 100644 --- a/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -10,7 +10,7 @@ 21287EB922E8A909008BF595 /* IJKPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 21287EAF22E8A908008BF595 /* IJKPlayer.framework */; }; 21287EBE22E8A909008BF595 /* IJKMediaPlayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EBD22E8A909008BF595 /* IJKMediaPlayerTests.m */; }; 21287EC022E8A909008BF595 /* IJKMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EB222E8A908008BF595 /* IJKMediaPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21287ED822E8A971008BF595 /* IJKSDLGLViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EC922E8A971008BF595 /* IJKSDLGLViewProtocol.h */; }; + 21287ED822E8A971008BF595 /* IJKSDLGLViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EC922E8A971008BF595 /* IJKSDLGLViewProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21287EDA22E8A971008BF595 /* IJKMediaPlayback.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287ECB22E8A971008BF595 /* IJKMediaPlayback.m */; }; 21287EDB22E8A971008BF595 /* IJKMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ECC22E8A971008BF595 /* IJKMediaPlayer.h */; }; 21287EDC22E8A971008BF595 /* IJKMediaPlayer-Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 21287ECD22E8A971008BF595 /* IJKMediaPlayer-Prefix.pch */; }; @@ -22,20 +22,101 @@ 21287EE322E8A971008BF595 /* NSString+IJKMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED422E8A971008BF595 /* NSString+IJKMedia.h */; }; 21287EE422E8A971008BF595 /* IJKNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED522E8A971008BF595 /* IJKNotificationManager.h */; }; 21287EE522E8A971008BF595 /* IJKMediaUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED622E8A971008BF595 /* IJKMediaUtils.h */; }; - 21287EE622E8A971008BF595 /* IJKMediaPlayback.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED722E8A971008BF595 /* IJKMediaPlayback.h */; }; + 21287EE622E8A971008BF595 /* IJKMediaPlayback.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287ED722E8A971008BF595 /* IJKMediaPlayback.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21287EFB22E8A989008BF595 /* IJKFFOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EE722E8A988008BF595 /* IJKFFOptions.m */; }; 21287EFC22E8A989008BF595 /* IJKFFMoviePlayerDef.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EE822E8A988008BF595 /* IJKFFMoviePlayerDef.m */; }; 21287EFF22E8A989008BF595 /* IJKFFMonitor.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EEB22E8A988008BF595 /* IJKFFMonitor.m */; }; 21287F0022E8A989008BF595 /* IJKAudioKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EEC22E8A988008BF595 /* IJKAudioKit.m */; }; 21287F0122E8A989008BF595 /* IJKDeviceModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EED22E8A989008BF595 /* IJKDeviceModel.h */; }; 21287F0222E8A989008BF595 /* IJKDeviceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EEE22E8A989008BF595 /* IJKDeviceModel.m */; }; - 21287F0322E8A989008BF595 /* IJKFFOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EEF22E8A989008BF595 /* IJKFFOptions.h */; }; + 21287F0322E8A989008BF595 /* IJKFFOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EEF22E8A989008BF595 /* IJKFFOptions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21287F0422E8A989008BF595 /* IJKKVOController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF022E8A989008BF595 /* IJKKVOController.h */; }; 21287F0522E8A989008BF595 /* IJKKVOController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21287EF122E8A989008BF595 /* IJKKVOController.m */; }; - 21287F0622E8A989008BF595 /* IJKFFMoviePlayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF222E8A989008BF595 /* IJKFFMoviePlayerController.h */; }; - 21287F0822E8A989008BF595 /* IJKFFMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF422E8A989008BF595 /* IJKFFMonitor.h */; }; + 21287F0622E8A989008BF595 /* IJKFFMoviePlayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF222E8A989008BF595 /* IJKFFMoviePlayerController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21287F0822E8A989008BF595 /* IJKFFMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF422E8A989008BF595 /* IJKFFMonitor.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21287F0922E8A989008BF595 /* IJKAudioKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EF522E8A989008BF595 /* IJKAudioKit.h */; }; 21287F0E22E8A989008BF595 /* IJKFFMoviePlayerDef.h in Headers */ = {isa = PBXBuildFile; fileRef = 21287EFA22E8A989008BF595 /* IJKFFMoviePlayerDef.h */; }; + 21414E6E236B325B00F60AE3 /* ff_ffmsg.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E5E236B325A00F60AE3 /* ff_ffmsg.h */; }; + 21414E6F236B325B00F60AE3 /* ff_ffplay.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E5F236B325B00F60AE3 /* ff_ffplay.h */; }; + 21414E70236B325B00F60AE3 /* ff_cmdutils.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E60236B325B00F60AE3 /* ff_cmdutils.h */; }; + 21414E71236B325B00F60AE3 /* ff_ffpipenode.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E61236B325B00F60AE3 /* ff_ffpipenode.c */; }; + 21414E72236B325B00F60AE3 /* ff_ffmsg_queue.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E62236B325B00F60AE3 /* ff_ffmsg_queue.h */; }; + 21414E73236B325B00F60AE3 /* ff_ffplay.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E63236B325B00F60AE3 /* ff_ffplay.c */; }; + 21414E74236B325B00F60AE3 /* ff_fferror.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E64236B325B00F60AE3 /* ff_fferror.h */; }; + 21414E75236B325B00F60AE3 /* ff_ffpipeline.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E65236B325B00F60AE3 /* ff_ffpipeline.h */; }; + 21414E76236B325B00F60AE3 /* ff_ffpipenode.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E66236B325B00F60AE3 /* ff_ffpipenode.h */; }; + 21414E77236B325B00F60AE3 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E67236B325B00F60AE3 /* config.h */; }; + 21414E78236B325B00F60AE3 /* ff_ffpipeline.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E68236B325B00F60AE3 /* ff_ffpipeline.c */; }; + 21414E79236B325B00F60AE3 /* ff_ffplay_options.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E69236B325B00F60AE3 /* ff_ffplay_options.h */; }; + 21414E7A236B325B00F60AE3 /* ff_cmdutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E6A236B325B00F60AE3 /* ff_cmdutils.c */; }; + 21414E7B236B325B00F60AE3 /* ff_ffplay_debug.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E6B236B325B00F60AE3 /* ff_ffplay_debug.h */; }; + 21414E7C236B325B00F60AE3 /* ff_ffplay_def.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E6C236B325B00F60AE3 /* ff_ffplay_def.h */; }; + 21414E7D236B325B00F60AE3 /* ff_ffinc.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E6D236B325B00F60AE3 /* ff_ffinc.h */; }; + 21414E84236B326600F60AE3 /* ijkplayer.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E7E236B326500F60AE3 /* ijkplayer.c */; }; + 21414E85236B326600F60AE3 /* ijkmeta.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E7F236B326500F60AE3 /* ijkmeta.h */; }; + 21414E86236B326600F60AE3 /* ijkmeta.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E80236B326500F60AE3 /* ijkmeta.c */; }; + 21414E87236B326600F60AE3 /* ijkversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E81236B326500F60AE3 /* ijkversion.h */; }; + 21414E88236B326600F60AE3 /* ijkplayer_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E82236B326600F60AE3 /* ijkplayer_internal.h */; }; + 21414E89236B326600F60AE3 /* ijkplayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E83236B326600F60AE3 /* ijkplayer.h */; }; + 21414E9E236B327200F60AE3 /* ijkiomanager.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E8A236B327100F60AE3 /* ijkiomanager.h */; }; + 21414E9F236B327200F60AE3 /* ijkioprotocol.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E8B236B327100F60AE3 /* ijkioprotocol.c */; }; + 21414EA0236B327200F60AE3 /* ijkavformat.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E8C236B327100F60AE3 /* ijkavformat.h */; }; + 21414EA1236B327200F60AE3 /* ijkiocache.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E8D236B327100F60AE3 /* ijkiocache.c */; }; + 21414EA3236B327200F60AE3 /* allformats.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E8F236B327200F60AE3 /* allformats.c */; }; + 21414EA4236B327200F60AE3 /* ijkiourl.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E90236B327200F60AE3 /* ijkiourl.h */; }; + 21414EA5236B327200F60AE3 /* ijkiourlhook.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E91236B327200F60AE3 /* ijkiourlhook.c */; }; + 21414EA6236B327200F60AE3 /* ijklongurl.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E92236B327200F60AE3 /* ijklongurl.c */; }; + 21414EA7236B327200F60AE3 /* ijkioapplication.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E93236B327200F60AE3 /* ijkioapplication.h */; }; + 21414EA8236B327200F60AE3 /* ijkasync.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E94236B327200F60AE3 /* ijkasync.c */; }; + 21414EA9236B327200F60AE3 /* ijkioapplication.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E95236B327200F60AE3 /* ijkioapplication.c */; }; + 21414EAA236B327200F60AE3 /* ijkioprotocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414E96236B327200F60AE3 /* ijkioprotocol.h */; }; + 21414EAB236B327200F60AE3 /* ijklivehook.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E97236B327200F60AE3 /* ijklivehook.c */; }; + 21414EAC236B327200F60AE3 /* ijksegment.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E98236B327200F60AE3 /* ijksegment.c */; }; + 21414EAD236B327200F60AE3 /* ijkurlhook.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E99236B327200F60AE3 /* ijkurlhook.c */; }; + 21414EAE236B327200F60AE3 /* ijkio.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E9A236B327200F60AE3 /* ijkio.c */; }; + 21414EAF236B327200F60AE3 /* ijkioffio.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E9B236B327200F60AE3 /* ijkioffio.c */; }; + 21414EB0236B327200F60AE3 /* ijkmediadatasource.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E9C236B327200F60AE3 /* ijkmediadatasource.c */; }; + 21414EB1236B327200F60AE3 /* ijkiomanager.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414E9D236B327200F60AE3 /* ijkiomanager.c */; }; + 21414EBF236B327C00F60AE3 /* ijkthreadpool.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EB2236B327C00F60AE3 /* ijkthreadpool.h */; }; + 21414EC0236B327C00F60AE3 /* ijktree.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EB3236B327C00F60AE3 /* ijktree.h */; }; + 21414EC1236B327C00F60AE3 /* ijkutils.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EB4236B327C00F60AE3 /* ijkutils.h */; }; + 21414EC2236B327C00F60AE3 /* opt.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EB5236B327C00F60AE3 /* opt.h */; }; + 21414EC3236B327C00F60AE3 /* ijkutils.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414EB6236B327C00F60AE3 /* ijkutils.c */; }; + 21414EC4236B327C00F60AE3 /* ijkdict.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EB7236B327C00F60AE3 /* ijkdict.h */; }; + 21414EC5236B327C00F60AE3 /* ijkdict.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414EB8236B327C00F60AE3 /* ijkdict.c */; }; + 21414EC6236B327C00F60AE3 /* ijktree.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414EB9236B327C00F60AE3 /* ijktree.c */; }; + 21414EC7236B327C00F60AE3 /* ijkthreadpool.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414EBA236B327C00F60AE3 /* ijkthreadpool.c */; }; + 21414EC8236B327C00F60AE3 /* ijkfifo.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414EBB236B327C00F60AE3 /* ijkfifo.c */; }; + 21414EC9236B327C00F60AE3 /* ijkfifo.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EBC236B327C00F60AE3 /* ijkfifo.h */; }; + 21414ECA236B327C00F60AE3 /* ijkstl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 21414EBD236B327C00F60AE3 /* ijkstl.cpp */; }; + 21414ECB236B327C00F60AE3 /* ijkstl.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EBE236B327C00F60AE3 /* ijkstl.h */; }; + 21414ED0236B328600F60AE3 /* ffpipeline_ffplay.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414ECC236B328600F60AE3 /* ffpipeline_ffplay.c */; }; + 21414ED1236B328600F60AE3 /* ffpipeline_ffplay.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414ECD236B328600F60AE3 /* ffpipeline_ffplay.h */; }; + 21414ED2236B328600F60AE3 /* ffpipenode_ffplay_vdec.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414ECE236B328600F60AE3 /* ffpipenode_ffplay_vdec.c */; }; + 21414ED3236B328600F60AE3 /* ffpipenode_ffplay_vdec.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414ECF236B328600F60AE3 /* ffpipenode_ffplay_vdec.h */; }; + 21414ED7236B32C200F60AE3 /* ijkplayer_ios.m in Sources */ = {isa = PBXBuildFile; fileRef = 21414ED5236B32C200F60AE3 /* ijkplayer_ios.m */; }; + 21414ED8236B32C200F60AE3 /* ijkplayer_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414ED6236B32C200F60AE3 /* ijkplayer_ios.h */; }; + 21414EE5236B32E400F60AE3 /* ffpipeline_ios.c in Sources */ = {isa = PBXBuildFile; fileRef = 21414EDA236B32E400F60AE3 /* ffpipeline_ios.c */; }; + 21414EE6236B32E400F60AE3 /* IJKVideoToolBoxAsync.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EDB236B32E400F60AE3 /* IJKVideoToolBoxAsync.h */; }; + 21414EE7236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.m in Sources */ = {isa = PBXBuildFile; fileRef = 21414EDC236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.m */; }; + 21414EE8236B32E400F60AE3 /* IJKVideoToolBoxSync.m in Sources */ = {isa = PBXBuildFile; fileRef = 21414EDD236B32E400F60AE3 /* IJKVideoToolBoxSync.m */; }; + 21414EE9236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EDE236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.h */; }; + 21414EEA236B32E400F60AE3 /* h264_sps_parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EDF236B32E400F60AE3 /* h264_sps_parser.h */; }; + 21414EEB236B32E400F60AE3 /* IJKVideoToolBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EE0236B32E400F60AE3 /* IJKVideoToolBox.h */; }; + 21414EEC236B32E400F60AE3 /* IJKVideoToolBoxSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EE1236B32E400F60AE3 /* IJKVideoToolBoxSync.h */; }; + 21414EED236B32E400F60AE3 /* ffpipeline_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EE2236B32E400F60AE3 /* ffpipeline_ios.h */; }; + 21414EEE236B32E400F60AE3 /* IJKVideoToolBox.m in Sources */ = {isa = PBXBuildFile; fileRef = 21414EE3236B32E400F60AE3 /* IJKVideoToolBox.m */; }; + 21414EEF236B32E400F60AE3 /* IJKVideoToolBoxAsync.m in Sources */ = {isa = PBXBuildFile; fileRef = 21414EE4236B32E400F60AE3 /* IJKVideoToolBoxAsync.m */; }; + 21414EF1236B331300F60AE3 /* IJKSDLGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414EF0236B331300F60AE3 /* IJKSDLGLView.h */; }; + 21414EF3236B331A00F60AE3 /* IJKSDLGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 21414EF2236B331A00F60AE3 /* IJKSDLGLView.m */; }; + 21414EFD236B35BA00F60AE3 /* libavfilter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 21414EF7236B35BA00F60AE3 /* libavfilter.a */; }; + 21414EFE236B35BA00F60AE3 /* libswresample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 21414EF8236B35BA00F60AE3 /* libswresample.a */; }; + 21414EFF236B35BA00F60AE3 /* libavformat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 21414EF9236B35BA00F60AE3 /* libavformat.a */; }; + 21414F00236B35BA00F60AE3 /* libavcodec.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 21414EFA236B35BA00F60AE3 /* libavcodec.a */; }; + 21414F01236B35BA00F60AE3 /* libavutil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 21414EFB236B35BA00F60AE3 /* libavutil.a */; }; + 21414F02236B35BA00F60AE3 /* libswscale.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 21414EFC236B35BA00F60AE3 /* libswscale.a */; }; + 21414F58236B3CCF00F60AE3 /* IJKFFMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414F56236B3CCF00F60AE3 /* IJKFFMediaPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21414F59236B3CCF00F60AE3 /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 21414F57236B3CCF00F60AE3 /* IJKFFMediaPlayer.m */; }; 21C8495F23619A810028AC95 /* ijksdl_mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8493F23619A800028AC95 /* ijksdl_mutex.h */; }; 21C8496023619A810028AC95 /* ijksdl_aout.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8494023619A800028AC95 /* ijksdl_aout.c */; }; 21C8496123619A810028AC95 /* ijksdl_log.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494123619A800028AC95 /* ijksdl_log.h */; }; @@ -43,7 +124,6 @@ 21C8496323619A810028AC95 /* ijksdl_inc_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494323619A800028AC95 /* ijksdl_inc_internal.h */; }; 21C8496423619A810028AC95 /* ijksdl_stdinc.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8494423619A800028AC95 /* ijksdl_stdinc.c */; }; 21C8496523619A810028AC95 /* ijksdl_error.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494523619A800028AC95 /* ijksdl_error.h */; }; - 21C8496623619A810028AC95 /* ijksdl_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494623619A800028AC95 /* ijksdl_gles2.h */; }; 21C8496723619A810028AC95 /* ijksdl_stdinc.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494723619A800028AC95 /* ijksdl_stdinc.h */; }; 21C8496823619A810028AC95 /* ijksdl_vout_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494823619A800028AC95 /* ijksdl_vout_internal.h */; }; 21C8496923619A810028AC95 /* ijksdl_mutex.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8494923619A800028AC95 /* ijksdl_mutex.c */; }; @@ -78,10 +158,8 @@ 21C849D523619BF30028AC95 /* IJKSDLAudioUnitController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849C023619BF20028AC95 /* IJKSDLAudioUnitController.h */; }; 21C849D623619BF30028AC95 /* ijksdl_vout_ios_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849C123619BF20028AC95 /* ijksdl_vout_ios_gles2.h */; }; 21C849D723619BF30028AC95 /* IJKSDLAudioKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C223619BF20028AC95 /* IJKSDLAudioKit.m */; }; - 21C849D823619BF30028AC95 /* IJKSDLGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849C323619BF20028AC95 /* IJKSDLGLView.h */; }; 21C849D923619BF30028AC95 /* ijksdl_aout_ios_audiounit.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C423619BF20028AC95 /* ijksdl_aout_ios_audiounit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 21C849DA23619BF30028AC95 /* ijksdl_thread_ios.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C523619BF20028AC95 /* ijksdl_thread_ios.m */; }; - 21C849DB23619BF30028AC95 /* IJKSDLGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C623619BF20028AC95 /* IJKSDLGLView.m */; }; 21C849DC23619BF30028AC95 /* IJKSDLHudViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849C723619BF20028AC95 /* IJKSDLHudViewCell.h */; }; 21C849DD23619BF30028AC95 /* IJKSDLHudViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C823619BF20028AC95 /* IJKSDLHudViewController.m */; }; 21C849DE23619BF30028AC95 /* IJKSDLAudioQueueController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849C923619BF20028AC95 /* IJKSDLAudioQueueController.m */; }; @@ -94,7 +172,7 @@ 21C849E523619BF30028AC95 /* ijksdl_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849D023619BF30028AC95 /* ijksdl_ios.h */; }; 21C849E623619BF30028AC95 /* IJKSDLHudViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C849D123619BF30028AC95 /* IJKSDLHudViewController.h */; }; 21C849E723619BF30028AC95 /* IJKSDLAudioUnitController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849D223619BF30028AC95 /* IJKSDLAudioUnitController.m */; }; - 21C849E823619BF30028AC95 /* ijksdl_vout_ios_gles2.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849D323619BF30028AC95 /* ijksdl_vout_ios_gles2.m */; }; + 21C849E823619BF30028AC95 /* ijksdl_vout_ios_gles2.m in Sources */ = {isa = PBXBuildFile; fileRef = 21C849D323619BF30028AC95 /* ijksdl_vout_ios_gles2.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -140,6 +218,87 @@ 21287EF422E8A989008BF595 /* IJKFFMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFMonitor.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMonitor.h; sourceTree = ""; }; 21287EF522E8A989008BF595 /* IJKAudioKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKAudioKit.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.h; sourceTree = ""; }; 21287EFA22E8A989008BF595 /* IJKFFMoviePlayerDef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFMoviePlayerDef.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerDef.h; sourceTree = ""; }; + 21414E5E236B325A00F60AE3 /* ff_ffmsg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_ffmsg.h; path = ../../ijkmedia/ijkplayer/ff_ffmsg.h; sourceTree = ""; }; + 21414E5F236B325B00F60AE3 /* ff_ffplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_ffplay.h; path = ../../ijkmedia/ijkplayer/ff_ffplay.h; sourceTree = ""; }; + 21414E60236B325B00F60AE3 /* ff_cmdutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_cmdutils.h; path = ../../ijkmedia/ijkplayer/ff_cmdutils.h; sourceTree = ""; }; + 21414E61236B325B00F60AE3 /* ff_ffpipenode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ff_ffpipenode.c; path = ../../ijkmedia/ijkplayer/ff_ffpipenode.c; sourceTree = ""; }; + 21414E62236B325B00F60AE3 /* ff_ffmsg_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_ffmsg_queue.h; path = ../../ijkmedia/ijkplayer/ff_ffmsg_queue.h; sourceTree = ""; }; + 21414E63236B325B00F60AE3 /* ff_ffplay.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ff_ffplay.c; path = ../../ijkmedia/ijkplayer/ff_ffplay.c; sourceTree = ""; }; + 21414E64236B325B00F60AE3 /* ff_fferror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_fferror.h; path = ../../ijkmedia/ijkplayer/ff_fferror.h; sourceTree = ""; }; + 21414E65236B325B00F60AE3 /* ff_ffpipeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_ffpipeline.h; path = ../../ijkmedia/ijkplayer/ff_ffpipeline.h; sourceTree = ""; }; + 21414E66236B325B00F60AE3 /* ff_ffpipenode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_ffpipenode.h; path = ../../ijkmedia/ijkplayer/ff_ffpipenode.h; sourceTree = ""; }; + 21414E67236B325B00F60AE3 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../../ijkmedia/ijkplayer/config.h; sourceTree = ""; }; + 21414E68236B325B00F60AE3 /* ff_ffpipeline.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ff_ffpipeline.c; path = ../../ijkmedia/ijkplayer/ff_ffpipeline.c; sourceTree = ""; }; + 21414E69236B325B00F60AE3 /* ff_ffplay_options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_ffplay_options.h; path = ../../ijkmedia/ijkplayer/ff_ffplay_options.h; sourceTree = ""; }; + 21414E6A236B325B00F60AE3 /* ff_cmdutils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ff_cmdutils.c; path = ../../ijkmedia/ijkplayer/ff_cmdutils.c; sourceTree = ""; }; + 21414E6B236B325B00F60AE3 /* ff_ffplay_debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_ffplay_debug.h; path = ../../ijkmedia/ijkplayer/ff_ffplay_debug.h; sourceTree = ""; }; + 21414E6C236B325B00F60AE3 /* ff_ffplay_def.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_ffplay_def.h; path = ../../ijkmedia/ijkplayer/ff_ffplay_def.h; sourceTree = ""; }; + 21414E6D236B325B00F60AE3 /* ff_ffinc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ff_ffinc.h; path = ../../ijkmedia/ijkplayer/ff_ffinc.h; sourceTree = ""; }; + 21414E7E236B326500F60AE3 /* ijkplayer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkplayer.c; path = ../../ijkmedia/ijkplayer/ijkplayer.c; sourceTree = ""; }; + 21414E7F236B326500F60AE3 /* ijkmeta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkmeta.h; path = ../../ijkmedia/ijkplayer/ijkmeta.h; sourceTree = ""; }; + 21414E80236B326500F60AE3 /* ijkmeta.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkmeta.c; path = ../../ijkmedia/ijkplayer/ijkmeta.c; sourceTree = ""; }; + 21414E81236B326500F60AE3 /* ijkversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkversion.h; path = ../../ijkmedia/ijkplayer/ijkversion.h; sourceTree = ""; }; + 21414E82236B326600F60AE3 /* ijkplayer_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkplayer_internal.h; path = ../../ijkmedia/ijkplayer/ijkplayer_internal.h; sourceTree = ""; }; + 21414E83236B326600F60AE3 /* ijkplayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkplayer.h; path = ../../ijkmedia/ijkplayer/ijkplayer.h; sourceTree = ""; }; + 21414E8A236B327100F60AE3 /* ijkiomanager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkiomanager.h; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkiomanager.h; sourceTree = ""; }; + 21414E8B236B327100F60AE3 /* ijkioprotocol.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkioprotocol.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkioprotocol.c; sourceTree = ""; }; + 21414E8C236B327100F60AE3 /* ijkavformat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkavformat.h; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkavformat.h; sourceTree = ""; }; + 21414E8D236B327100F60AE3 /* ijkiocache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkiocache.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkiocache.c; sourceTree = ""; }; + 21414E8F236B327200F60AE3 /* allformats.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = allformats.c; path = ../../ijkmedia/ijkplayer/ijkavformat/allformats.c; sourceTree = ""; }; + 21414E90236B327200F60AE3 /* ijkiourl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkiourl.h; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkiourl.h; sourceTree = ""; }; + 21414E91236B327200F60AE3 /* ijkiourlhook.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkiourlhook.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkiourlhook.c; sourceTree = ""; }; + 21414E92236B327200F60AE3 /* ijklongurl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijklongurl.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijklongurl.c; sourceTree = ""; }; + 21414E93236B327200F60AE3 /* ijkioapplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkioapplication.h; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkioapplication.h; sourceTree = ""; }; + 21414E94236B327200F60AE3 /* ijkasync.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkasync.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkasync.c; sourceTree = ""; }; + 21414E95236B327200F60AE3 /* ijkioapplication.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkioapplication.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkioapplication.c; sourceTree = ""; }; + 21414E96236B327200F60AE3 /* ijkioprotocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkioprotocol.h; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkioprotocol.h; sourceTree = ""; }; + 21414E97236B327200F60AE3 /* ijklivehook.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijklivehook.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijklivehook.c; sourceTree = ""; }; + 21414E98236B327200F60AE3 /* ijksegment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksegment.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijksegment.c; sourceTree = ""; }; + 21414E99236B327200F60AE3 /* ijkurlhook.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkurlhook.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkurlhook.c; sourceTree = ""; }; + 21414E9A236B327200F60AE3 /* ijkio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkio.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkio.c; sourceTree = ""; }; + 21414E9B236B327200F60AE3 /* ijkioffio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkioffio.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkioffio.c; sourceTree = ""; }; + 21414E9C236B327200F60AE3 /* ijkmediadatasource.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkmediadatasource.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkmediadatasource.c; sourceTree = ""; }; + 21414E9D236B327200F60AE3 /* ijkiomanager.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkiomanager.c; path = ../../ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c; sourceTree = ""; }; + 21414EB2236B327C00F60AE3 /* ijkthreadpool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkthreadpool.h; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkthreadpool.h; sourceTree = ""; }; + 21414EB3236B327C00F60AE3 /* ijktree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijktree.h; path = ../../ijkmedia/ijkplayer/ijkavutil/ijktree.h; sourceTree = ""; }; + 21414EB4236B327C00F60AE3 /* ijkutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkutils.h; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkutils.h; sourceTree = ""; }; + 21414EB5236B327C00F60AE3 /* opt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = opt.h; path = ../../ijkmedia/ijkplayer/ijkavutil/opt.h; sourceTree = ""; }; + 21414EB6236B327C00F60AE3 /* ijkutils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkutils.c; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkutils.c; sourceTree = ""; }; + 21414EB7236B327C00F60AE3 /* ijkdict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkdict.h; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkdict.h; sourceTree = ""; }; + 21414EB8236B327C00F60AE3 /* ijkdict.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkdict.c; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkdict.c; sourceTree = ""; }; + 21414EB9236B327C00F60AE3 /* ijktree.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijktree.c; path = ../../ijkmedia/ijkplayer/ijkavutil/ijktree.c; sourceTree = ""; }; + 21414EBA236B327C00F60AE3 /* ijkthreadpool.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkthreadpool.c; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkthreadpool.c; sourceTree = ""; }; + 21414EBB236B327C00F60AE3 /* ijkfifo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijkfifo.c; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkfifo.c; sourceTree = ""; }; + 21414EBC236B327C00F60AE3 /* ijkfifo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkfifo.h; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkfifo.h; sourceTree = ""; }; + 21414EBD236B327C00F60AE3 /* ijkstl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ijkstl.cpp; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkstl.cpp; sourceTree = ""; }; + 21414EBE236B327C00F60AE3 /* ijkstl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkstl.h; path = ../../ijkmedia/ijkplayer/ijkavutil/ijkstl.h; sourceTree = ""; }; + 21414ECC236B328600F60AE3 /* ffpipeline_ffplay.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffpipeline_ffplay.c; path = ../../ijkmedia/ijkplayer/pipeline/ffpipeline_ffplay.c; sourceTree = ""; }; + 21414ECD236B328600F60AE3 /* ffpipeline_ffplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipeline_ffplay.h; path = ../../ijkmedia/ijkplayer/pipeline/ffpipeline_ffplay.h; sourceTree = ""; }; + 21414ECE236B328600F60AE3 /* ffpipenode_ffplay_vdec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffpipenode_ffplay_vdec.c; path = ../../ijkmedia/ijkplayer/pipeline/ffpipenode_ffplay_vdec.c; sourceTree = ""; }; + 21414ECF236B328600F60AE3 /* ffpipenode_ffplay_vdec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipenode_ffplay_vdec.h; path = ../../ijkmedia/ijkplayer/pipeline/ffpipenode_ffplay_vdec.h; sourceTree = ""; }; + 21414ED5236B32C200F60AE3 /* ijkplayer_ios.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ijkplayer_ios.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.m; sourceTree = ""; }; + 21414ED6236B32C200F60AE3 /* ijkplayer_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijkplayer_ios.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h; sourceTree = ""; }; + 21414EDA236B32E400F60AE3 /* ffpipeline_ios.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ffpipeline_ios.c; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipeline_ios.c; sourceTree = ""; }; + 21414EDB236B32E400F60AE3 /* IJKVideoToolBoxAsync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKVideoToolBoxAsync.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.h; sourceTree = ""; }; + 21414EDC236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ffpipenode_ios_videotoolbox_vdec.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m; sourceTree = ""; }; + 21414EDD236B32E400F60AE3 /* IJKVideoToolBoxSync.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKVideoToolBoxSync.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m; sourceTree = ""; }; + 21414EDE236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipenode_ios_videotoolbox_vdec.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.h; sourceTree = ""; }; + 21414EDF236B32E400F60AE3 /* h264_sps_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = h264_sps_parser.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/h264_sps_parser.h; sourceTree = ""; }; + 21414EE0236B32E400F60AE3 /* IJKVideoToolBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKVideoToolBox.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBox.h; sourceTree = ""; }; + 21414EE1236B32E400F60AE3 /* IJKVideoToolBoxSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKVideoToolBoxSync.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.h; sourceTree = ""; }; + 21414EE2236B32E400F60AE3 /* ffpipeline_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ffpipeline_ios.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipeline_ios.h; sourceTree = ""; }; + 21414EE3236B32E400F60AE3 /* IJKVideoToolBox.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKVideoToolBox.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBox.m; sourceTree = ""; }; + 21414EE4236B32E400F60AE3 /* IJKVideoToolBoxAsync.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKVideoToolBoxAsync.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m; sourceTree = ""; }; + 21414EF0236B331300F60AE3 /* IJKSDLGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLGLView.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h; sourceTree = ""; }; + 21414EF2236B331A00F60AE3 /* IJKSDLGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLGLView.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m; sourceTree = ""; }; + 21414EF7236B35BA00F60AE3 /* libavfilter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavfilter.a; path = "../contrib/build/ffmpeg-x86_64/output/lib/libavfilter.a"; sourceTree = ""; }; + 21414EF8236B35BA00F60AE3 /* libswresample.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libswresample.a; path = "../contrib/build/ffmpeg-x86_64/output/lib/libswresample.a"; sourceTree = ""; }; + 21414EF9236B35BA00F60AE3 /* libavformat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavformat.a; path = "../contrib/build/ffmpeg-x86_64/output/lib/libavformat.a"; sourceTree = ""; }; + 21414EFA236B35BA00F60AE3 /* libavcodec.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavcodec.a; path = "../contrib/build/ffmpeg-x86_64/output/lib/libavcodec.a"; sourceTree = ""; }; + 21414EFB236B35BA00F60AE3 /* libavutil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavutil.a; path = "../contrib/build/ffmpeg-x86_64/output/lib/libavutil.a"; sourceTree = ""; }; + 21414EFC236B35BA00F60AE3 /* libswscale.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libswscale.a; path = "../contrib/build/ffmpeg-x86_64/output/lib/libswscale.a"; sourceTree = ""; }; + 21414F56236B3CCF00F60AE3 /* IJKFFMediaPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFMediaPlayer.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h; sourceTree = ""; }; + 21414F57236B3CCF00F60AE3 /* IJKFFMediaPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKFFMediaPlayer.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m; sourceTree = ""; }; 21C8493F23619A800028AC95 /* ijksdl_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_mutex.h; path = ../../ijkmedia/ijksdl/ijksdl_mutex.h; sourceTree = ""; }; 21C8494023619A800028AC95 /* ijksdl_aout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_aout.c; path = ../../ijkmedia/ijksdl/ijksdl_aout.c; sourceTree = ""; }; 21C8494123619A800028AC95 /* ijksdl_log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_log.h; path = ../../ijkmedia/ijksdl/ijksdl_log.h; sourceTree = ""; }; @@ -182,10 +341,8 @@ 21C849C023619BF20028AC95 /* IJKSDLAudioUnitController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLAudioUnitController.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioUnitController.h; sourceTree = ""; }; 21C849C123619BF20028AC95 /* ijksdl_vout_ios_gles2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_vout_ios_gles2.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.h; sourceTree = ""; }; 21C849C223619BF20028AC95 /* IJKSDLAudioKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLAudioKit.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioKit.m; sourceTree = ""; }; - 21C849C323619BF20028AC95 /* IJKSDLGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLGLView.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.h; sourceTree = ""; }; 21C849C423619BF20028AC95 /* ijksdl_aout_ios_audiounit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ijksdl_aout_ios_audiounit.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_aout_ios_audiounit.m; sourceTree = ""; }; 21C849C523619BF20028AC95 /* ijksdl_thread_ios.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ijksdl_thread_ios.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m; sourceTree = ""; }; - 21C849C623619BF20028AC95 /* IJKSDLGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLGLView.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLGLView.m; sourceTree = ""; }; 21C849C723619BF20028AC95 /* IJKSDLHudViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKSDLHudViewCell.h; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.h; sourceTree = ""; }; 21C849C823619BF20028AC95 /* IJKSDLHudViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLHudViewController.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.m; sourceTree = ""; }; 21C849C923619BF20028AC95 /* IJKSDLAudioQueueController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKSDLAudioQueueController.m; path = ../../ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLAudioQueueController.m; sourceTree = ""; }; @@ -206,6 +363,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 21414F02236B35BA00F60AE3 /* libswscale.a in Frameworks */, + 21414F01236B35BA00F60AE3 /* libavutil.a in Frameworks */, + 21414EFF236B35BA00F60AE3 /* libavformat.a in Frameworks */, + 21414EFE236B35BA00F60AE3 /* libswresample.a in Frameworks */, + 21414EFD236B35BA00F60AE3 /* libavfilter.a in Frameworks */, + 21414F00236B35BA00F60AE3 /* libavcodec.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -223,6 +386,7 @@ 21287EA522E8A908008BF595 = { isa = PBXGroup; children = ( + 21414EF6236B35A000F60AE3 /* Libraries */, 21C84871236198490028AC95 /* Sources */, 21287EBC22E8A909008BF595 /* IJKMediaPlayerTests */, 21287EB022E8A908008BF595 /* Products */, @@ -247,6 +411,8 @@ 21287EEE22E8A989008BF595 /* IJKDeviceModel.m */, 21287EF422E8A989008BF595 /* IJKFFMonitor.h */, 21287EEB22E8A988008BF595 /* IJKFFMonitor.m */, + 21414F56236B3CCF00F60AE3 /* IJKFFMediaPlayer.h */, + 21414F57236B3CCF00F60AE3 /* IJKFFMediaPlayer.m */, 21287EF222E8A989008BF595 /* IJKFFMoviePlayerController.h */, 21287EFA22E8A989008BF595 /* IJKFFMoviePlayerDef.h */, 21287EE822E8A988008BF595 /* IJKFFMoviePlayerDef.m */, @@ -282,6 +448,104 @@ path = IJKMediaPlayerTests; sourceTree = ""; }; + 21414E5B236B323600F60AE3 /* pipeline */ = { + isa = PBXGroup; + children = ( + 21414ECC236B328600F60AE3 /* ffpipeline_ffplay.c */, + 21414ECD236B328600F60AE3 /* ffpipeline_ffplay.h */, + 21414ECE236B328600F60AE3 /* ffpipenode_ffplay_vdec.c */, + 21414ECF236B328600F60AE3 /* ffpipenode_ffplay_vdec.h */, + ); + name = pipeline; + sourceTree = ""; + }; + 21414E5C236B324200F60AE3 /* ijkavutil */ = { + isa = PBXGroup; + children = ( + 21414EB8236B327C00F60AE3 /* ijkdict.c */, + 21414EB7236B327C00F60AE3 /* ijkdict.h */, + 21414EBB236B327C00F60AE3 /* ijkfifo.c */, + 21414EBC236B327C00F60AE3 /* ijkfifo.h */, + 21414EBD236B327C00F60AE3 /* ijkstl.cpp */, + 21414EBE236B327C00F60AE3 /* ijkstl.h */, + 21414EBA236B327C00F60AE3 /* ijkthreadpool.c */, + 21414EB2236B327C00F60AE3 /* ijkthreadpool.h */, + 21414EB9236B327C00F60AE3 /* ijktree.c */, + 21414EB3236B327C00F60AE3 /* ijktree.h */, + 21414EB6236B327C00F60AE3 /* ijkutils.c */, + 21414EB4236B327C00F60AE3 /* ijkutils.h */, + 21414EB5236B327C00F60AE3 /* opt.h */, + ); + name = ijkavutil; + sourceTree = ""; + }; + 21414E5D236B324A00F60AE3 /* ijkavformat */ = { + isa = PBXGroup; + children = ( + 21414E8F236B327200F60AE3 /* allformats.c */, + 21414E94236B327200F60AE3 /* ijkasync.c */, + 21414E8C236B327100F60AE3 /* ijkavformat.h */, + 21414E9A236B327200F60AE3 /* ijkio.c */, + 21414E95236B327200F60AE3 /* ijkioapplication.c */, + 21414E93236B327200F60AE3 /* ijkioapplication.h */, + 21414E8D236B327100F60AE3 /* ijkiocache.c */, + 21414E9B236B327200F60AE3 /* ijkioffio.c */, + 21414E9D236B327200F60AE3 /* ijkiomanager.c */, + 21414E8A236B327100F60AE3 /* ijkiomanager.h */, + 21414E8B236B327100F60AE3 /* ijkioprotocol.c */, + 21414E96236B327200F60AE3 /* ijkioprotocol.h */, + 21414E90236B327200F60AE3 /* ijkiourl.h */, + 21414E91236B327200F60AE3 /* ijkiourlhook.c */, + 21414E97236B327200F60AE3 /* ijklivehook.c */, + 21414E92236B327200F60AE3 /* ijklongurl.c */, + 21414E9C236B327200F60AE3 /* ijkmediadatasource.c */, + 21414E98236B327200F60AE3 /* ijksegment.c */, + 21414E99236B327200F60AE3 /* ijkurlhook.c */, + ); + name = ijkavformat; + sourceTree = ""; + }; + 21414ED4236B329500F60AE3 /* osx */ = { + isa = PBXGroup; + children = ( + 21414ED9236B32D900F60AE3 /* pipeline */, + 21414ED6236B32C200F60AE3 /* ijkplayer_ios.h */, + 21414ED5236B32C200F60AE3 /* ijkplayer_ios.m */, + ); + name = osx; + sourceTree = ""; + }; + 21414ED9236B32D900F60AE3 /* pipeline */ = { + isa = PBXGroup; + children = ( + 21414EDA236B32E400F60AE3 /* ffpipeline_ios.c */, + 21414EE2236B32E400F60AE3 /* ffpipeline_ios.h */, + 21414EDE236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.h */, + 21414EDC236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.m */, + 21414EDF236B32E400F60AE3 /* h264_sps_parser.h */, + 21414EE0236B32E400F60AE3 /* IJKVideoToolBox.h */, + 21414EE3236B32E400F60AE3 /* IJKVideoToolBox.m */, + 21414EDB236B32E400F60AE3 /* IJKVideoToolBoxAsync.h */, + 21414EE4236B32E400F60AE3 /* IJKVideoToolBoxAsync.m */, + 21414EE1236B32E400F60AE3 /* IJKVideoToolBoxSync.h */, + 21414EDD236B32E400F60AE3 /* IJKVideoToolBoxSync.m */, + ); + name = pipeline; + sourceTree = ""; + }; + 21414EF6236B35A000F60AE3 /* Libraries */ = { + isa = PBXGroup; + children = ( + 21414EFA236B35BA00F60AE3 /* libavcodec.a */, + 21414EF7236B35BA00F60AE3 /* libavfilter.a */, + 21414EF9236B35BA00F60AE3 /* libavformat.a */, + 21414EFB236B35BA00F60AE3 /* libavutil.a */, + 21414EF8236B35BA00F60AE3 /* libswresample.a */, + 21414EFC236B35BA00F60AE3 /* libswscale.a */, + ); + name = Libraries; + sourceTree = ""; + }; 21C84871236198490028AC95 /* Sources */ = { isa = PBXGroup; children = ( @@ -343,6 +607,32 @@ 21C8497F23619ABD0028AC95 /* ijkplayer */ = { isa = PBXGroup; children = ( + 21414E5B236B323600F60AE3 /* pipeline */, + 21414E5C236B324200F60AE3 /* ijkavutil */, + 21414E5D236B324A00F60AE3 /* ijkavformat */, + 21414ED4236B329500F60AE3 /* osx */, + 21414E67236B325B00F60AE3 /* config.h */, + 21414E6A236B325B00F60AE3 /* ff_cmdutils.c */, + 21414E60236B325B00F60AE3 /* ff_cmdutils.h */, + 21414E64236B325B00F60AE3 /* ff_fferror.h */, + 21414E6D236B325B00F60AE3 /* ff_ffinc.h */, + 21414E62236B325B00F60AE3 /* ff_ffmsg_queue.h */, + 21414E5E236B325A00F60AE3 /* ff_ffmsg.h */, + 21414E68236B325B00F60AE3 /* ff_ffpipeline.c */, + 21414E65236B325B00F60AE3 /* ff_ffpipeline.h */, + 21414E61236B325B00F60AE3 /* ff_ffpipenode.c */, + 21414E66236B325B00F60AE3 /* ff_ffpipenode.h */, + 21414E6B236B325B00F60AE3 /* ff_ffplay_debug.h */, + 21414E6C236B325B00F60AE3 /* ff_ffplay_def.h */, + 21414E69236B325B00F60AE3 /* ff_ffplay_options.h */, + 21414E63236B325B00F60AE3 /* ff_ffplay.c */, + 21414E5F236B325B00F60AE3 /* ff_ffplay.h */, + 21414E80236B326500F60AE3 /* ijkmeta.c */, + 21414E7F236B326500F60AE3 /* ijkmeta.h */, + 21414E82236B326600F60AE3 /* ijkplayer_internal.h */, + 21414E7E236B326500F60AE3 /* ijkplayer.c */, + 21414E83236B326600F60AE3 /* ijkplayer.h */, + 21414E81236B326500F60AE3 /* ijkversion.h */, ); name = ijkplayer; sourceTree = ""; @@ -391,12 +681,12 @@ 21C849CF23619BF20028AC95 /* ijksdl_vout_overlay_videotoolbox.m */, 21C849BF23619BF20028AC95 /* IJKSDLAudioKit.h */, 21C849C223619BF20028AC95 /* IJKSDLAudioKit.m */, + 21414EF2236B331A00F60AE3 /* IJKSDLGLView.m */, + 21414EF0236B331300F60AE3 /* IJKSDLGLView.h */, 21C849CC23619BF20028AC95 /* IJKSDLAudioQueueController.h */, 21C849C923619BF20028AC95 /* IJKSDLAudioQueueController.m */, 21C849C023619BF20028AC95 /* IJKSDLAudioUnitController.h */, 21C849D223619BF30028AC95 /* IJKSDLAudioUnitController.m */, - 21C849C323619BF20028AC95 /* IJKSDLGLView.h */, - 21C849C623619BF20028AC95 /* IJKSDLGLView.m */, 21C849C723619BF20028AC95 /* IJKSDLHudViewCell.h */, 21C849CA23619BF20028AC95 /* IJKSDLHudViewCell.m */, 21C849D123619BF30028AC95 /* IJKSDLHudViewController.h */, @@ -412,58 +702,95 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 21287ED822E8A971008BF595 /* IJKSDLGLViewProtocol.h in Headers */, + 21414F58236B3CCF00F60AE3 /* IJKFFMediaPlayer.h in Headers */, 21287EDC22E8A971008BF595 /* IJKMediaPlayer-Prefix.pch in Headers */, + 21287F0622E8A989008BF595 /* IJKFFMoviePlayerController.h in Headers */, + 21287F0822E8A989008BF595 /* IJKFFMonitor.h in Headers */, + 21287F0322E8A989008BF595 /* IJKFFOptions.h in Headers */, + 21287EE622E8A971008BF595 /* IJKMediaPlayback.h in Headers */, + 21414E9E236B327200F60AE3 /* ijkiomanager.h in Headers */, + 21414E88236B326600F60AE3 /* ijkplayer_internal.h in Headers */, 21287EE522E8A971008BF595 /* IJKMediaUtils.h in Headers */, + 21414E87236B326600F60AE3 /* ijkversion.h in Headers */, + 21414EEB236B32E400F60AE3 /* IJKVideoToolBox.h in Headers */, + 21414E75236B325B00F60AE3 /* ff_ffpipeline.h in Headers */, 21C8498C23619B010028AC95 /* ijksdl_dummy.h in Headers */, + 21414E85236B326600F60AE3 /* ijkmeta.h in Headers */, + 21414EC4236B327C00F60AE3 /* ijkdict.h in Headers */, + 21414EED236B32E400F60AE3 /* ffpipeline_ios.h in Headers */, + 21414E89236B326600F60AE3 /* ijkplayer.h in Headers */, + 21414E74236B325B00F60AE3 /* ff_fferror.h in Headers */, 21C849D623619BF30028AC95 /* ijksdl_vout_ios_gles2.h in Headers */, + 21414EE9236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.h in Headers */, + 21414EF1236B331300F60AE3 /* IJKSDLGLView.h in Headers */, 21287EC022E8A909008BF595 /* IJKMediaPlayer.h in Headers */, 21C8496C23619A810028AC95 /* ijksdl_timer.h in Headers */, - 21287EE622E8A971008BF595 /* IJKMediaPlayback.h in Headers */, 21C8495F23619A810028AC95 /* ijksdl_mutex.h in Headers */, 21287EDF22E8A971008BF595 /* IJKMediaModule.h in Headers */, 21C8496823619A810028AC95 /* ijksdl_vout_internal.h in Headers */, + 21414E6E236B325B00F60AE3 /* ff_ffmsg.h in Headers */, 21C8496523619A810028AC95 /* ijksdl_error.h in Headers */, 21C8497123619A810028AC95 /* ijksdl_aout_internal.h in Headers */, - 21287F0822E8A989008BF595 /* IJKFFMonitor.h in Headers */, + 21414E72236B325B00F60AE3 /* ff_ffmsg_queue.h in Headers */, 21C8497223619A810028AC95 /* ijksdl_egl.h in Headers */, - 21287F0322E8A989008BF595 /* IJKFFOptions.h in Headers */, 21C8496B23619A810028AC95 /* ijksdl_fourcc.h in Headers */, 21C849E523619BF30028AC95 /* ijksdl_ios.h in Headers */, + 21414EA0236B327200F60AE3 /* ijkavformat.h in Headers */, 21C8499723619B200028AC95 /* ijksdl_vout_overlay_ffmpeg.h in Headers */, 21C849D523619BF30028AC95 /* IJKSDLAudioUnitController.h in Headers */, 21C849D423619BF30028AC95 /* IJKSDLAudioKit.h in Headers */, 21C8497D23619A820028AC95 /* ijksdl_thread.h in Headers */, 21C849E623619BF30028AC95 /* IJKSDLHudViewController.h in Headers */, + 21414E70236B325B00F60AE3 /* ff_cmdutils.h in Headers */, 21C8496123619A810028AC95 /* ijksdl_log.h in Headers */, - 21287F0622E8A989008BF595 /* IJKFFMoviePlayerController.h in Headers */, - 21C8496623619A810028AC95 /* ijksdl_gles2.h in Headers */, - 21C849D823619BF30028AC95 /* IJKSDLGLView.h in Headers */, + 21414EE6236B32E400F60AE3 /* IJKVideoToolBoxAsync.h in Headers */, 21C8496F23619A810028AC95 /* ijksdl_misc.h in Headers */, 21287EDB22E8A971008BF595 /* IJKMediaPlayer.h in Headers */, - 21287ED822E8A971008BF595 /* IJKSDLGLViewProtocol.h in Headers */, + 21414EAA236B327200F60AE3 /* ijkioprotocol.h in Headers */, + 21414EC2236B327C00F60AE3 /* opt.h in Headers */, + 21414EC9236B327C00F60AE3 /* ijkfifo.h in Headers */, + 21414E7C236B325B00F60AE3 /* ff_ffplay_def.h in Headers */, 21C8497423619A810028AC95 /* ijksdl_endian.h in Headers */, + 21414ED8236B32C200F60AE3 /* ijkplayer_ios.h in Headers */, 21287F0122E8A989008BF595 /* IJKDeviceModel.h in Headers */, 21C8499523619B200028AC95 /* ijksdl_image_convert.h in Headers */, 21287EE422E8A971008BF595 /* IJKNotificationManager.h in Headers */, 21287F0422E8A989008BF595 /* IJKKVOController.h in Headers */, 21C8496E23619A810028AC95 /* ijksdl_vout.h in Headers */, + 21414EA7236B327200F60AE3 /* ijkioapplication.h in Headers */, + 21414E76236B325B00F60AE3 /* ff_ffpipenode.h in Headers */, 21C849E123619BF30028AC95 /* IJKSDLAudioQueueController.h in Headers */, + 21414ED3236B328600F60AE3 /* ffpipenode_ffplay_vdec.h in Headers */, + 21414EC0236B327C00F60AE3 /* ijktree.h in Headers */, + 21414EC1236B327C00F60AE3 /* ijkutils.h in Headers */, 21287F0E22E8A989008BF595 /* IJKFFMoviePlayerDef.h in Headers */, + 21414E79236B325B00F60AE3 /* ff_ffplay_options.h in Headers */, 21C8497923619A820028AC95 /* ijksdl_audio.h in Headers */, + 21414E6F236B325B00F60AE3 /* ff_ffplay.h in Headers */, 21C849E023619BF30028AC95 /* ijksdl_vout_overlay_videotoolbox.h in Headers */, + 21414EEA236B32E400F60AE3 /* h264_sps_parser.h in Headers */, 21C8497023619A810028AC95 /* ijksdl_aout.h in Headers */, + 21414ED1236B328600F60AE3 /* ffpipeline_ffplay.h in Headers */, + 21414E7B236B325B00F60AE3 /* ff_ffplay_debug.h in Headers */, 21C8496223619A810028AC95 /* ijksdl.h in Headers */, 21C849DC23619BF30028AC95 /* IJKSDLHudViewCell.h in Headers */, 21C8499423619B200028AC95 /* ijksdl_inc_ffmpeg.h in Headers */, + 21414EBF236B327C00F60AE3 /* ijkthreadpool.h in Headers */, 21C8497823619A820028AC95 /* ijksdl_video.h in Headers */, 21C849E223619BF30028AC95 /* ijksdl_thread_ios.h in Headers */, 21C8496723619A810028AC95 /* ijksdl_stdinc.h in Headers */, 21C849E323619BF30028AC95 /* ijksdl_aout_ios_audiounit.h in Headers */, + 21414E77236B325B00F60AE3 /* config.h in Headers */, 21C8498B23619B010028AC95 /* ijksdl_vout_dummy.h in Headers */, 21C8497523619A810028AC95 /* ijksdl_class.h in Headers */, + 21414ECB236B327C00F60AE3 /* ijkstl.h in Headers */, 21C8496323619A810028AC95 /* ijksdl_inc_internal.h in Headers */, + 21414EA4236B327200F60AE3 /* ijkiourl.h in Headers */, 21287EE322E8A971008BF595 /* NSString+IJKMedia.h in Headers */, + 21414EEC236B32E400F60AE3 /* IJKVideoToolBoxSync.h in Headers */, 21287F0922E8A989008BF595 /* IJKAudioKit.h in Headers */, + 21414E7D236B325B00F60AE3 /* ff_ffinc.h in Headers */, 21C8497723619A810028AC95 /* ijksdl_container.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -564,38 +891,73 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 21414EA3236B327200F60AE3 /* allformats.c in Sources */, + 21414ED7236B32C200F60AE3 /* ijkplayer_ios.m in Sources */, + 21414EC7236B327C00F60AE3 /* ijkthreadpool.c in Sources */, + 21414EA5236B327200F60AE3 /* ijkiourlhook.c in Sources */, + 21414E78236B325B00F60AE3 /* ff_ffpipeline.c in Sources */, + 21414EA9236B327200F60AE3 /* ijkioapplication.c in Sources */, + 21414ECA236B327C00F60AE3 /* ijkstl.cpp in Sources */, + 21414ED2236B328600F60AE3 /* ffpipenode_ffplay_vdec.c in Sources */, 21C849DA23619BF30028AC95 /* ijksdl_thread_ios.m in Sources */, + 21414EA8236B327200F60AE3 /* ijkasync.c in Sources */, 21287EDA22E8A971008BF595 /* IJKMediaPlayback.m in Sources */, 21C849E823619BF30028AC95 /* ijksdl_vout_ios_gles2.m in Sources */, 21C8498A23619B010028AC95 /* ijksdl_vout_dummy.c in Sources */, 21C849D723619BF30028AC95 /* IJKSDLAudioKit.m in Sources */, + 21414EB1236B327200F60AE3 /* ijkiomanager.c in Sources */, + 21414E71236B325B00F60AE3 /* ff_ffpipenode.c in Sources */, 21C849E423619BF30028AC95 /* ijksdl_vout_overlay_videotoolbox.m in Sources */, + 21414EEF236B32E400F60AE3 /* IJKVideoToolBoxAsync.m in Sources */, 21287EE222E8A971008BF595 /* IJKMediaModule.m in Sources */, + 21414EAC236B327200F60AE3 /* ijksegment.c in Sources */, 21C8497E23619A820028AC95 /* ijksdl_error.c in Sources */, 21C8499C23619B580028AC95 /* image_convert.c in Sources */, 21C8496A23619A810028AC95 /* ijksdl_vout.c in Sources */, + 21414E84236B326600F60AE3 /* ijkplayer.c in Sources */, + 21414E86236B326600F60AE3 /* ijkmeta.c in Sources */, + 21414EE7236B32E400F60AE3 /* ffpipenode_ios_videotoolbox_vdec.m in Sources */, + 21414E73236B325B00F60AE3 /* ff_ffplay.c in Sources */, 21287F0522E8A989008BF595 /* IJKKVOController.m in Sources */, + 21414EB0236B327200F60AE3 /* ijkmediadatasource.c in Sources */, + 21414EC6236B327C00F60AE3 /* ijktree.c in Sources */, 21C8499623619B200028AC95 /* ijksdl_vout_overlay_ffmpeg.c in Sources */, + 21414F59236B3CCF00F60AE3 /* IJKFFMediaPlayer.m in Sources */, 21287EDD22E8A971008BF595 /* IJKMediaUtils.m in Sources */, 21C849D923619BF30028AC95 /* ijksdl_aout_ios_audiounit.m in Sources */, + 21414EE8236B32E400F60AE3 /* IJKVideoToolBoxSync.m in Sources */, 21C849E723619BF30028AC95 /* IJKSDLAudioUnitController.m in Sources */, 21C8496D23619A810028AC95 /* ijksdl_egl.c in Sources */, 21C8497623619A810028AC95 /* ijksdl_timer.c in Sources */, + 21414E9F236B327200F60AE3 /* ijkioprotocol.c in Sources */, + 21414EA1236B327200F60AE3 /* ijkiocache.c in Sources */, + 21414ED0236B328600F60AE3 /* ffpipeline_ffplay.c in Sources */, 21C849DF23619BF30028AC95 /* IJKSDLHudViewCell.m in Sources */, 21287EE122E8A971008BF595 /* IJKNotificationManager.m in Sources */, 21287EDE22E8A971008BF595 /* NSString+IJKMedia.m in Sources */, 21C8497B23619A820028AC95 /* ijksdl_audio.c in Sources */, 21C849DE23619BF30028AC95 /* IJKSDLAudioQueueController.m in Sources */, + 21414EAF236B327200F60AE3 /* ijkioffio.c in Sources */, + 21414EC8236B327C00F60AE3 /* ijkfifo.c in Sources */, 21C849DD23619BF30028AC95 /* IJKSDLHudViewController.m in Sources */, + 21414E7A236B325B00F60AE3 /* ff_cmdutils.c in Sources */, + 21414EE5236B32E400F60AE3 /* ffpipeline_ios.c in Sources */, + 21414EA6236B327200F60AE3 /* ijklongurl.c in Sources */, + 21414EAB236B327200F60AE3 /* ijklivehook.c in Sources */, + 21414EAD236B327200F60AE3 /* ijkurlhook.c in Sources */, 21C8496423619A810028AC95 /* ijksdl_stdinc.c in Sources */, 21287EFC22E8A989008BF595 /* IJKFFMoviePlayerDef.m in Sources */, + 21414EF3236B331A00F60AE3 /* IJKSDLGLView.m in Sources */, 21C8496923619A810028AC95 /* ijksdl_mutex.c in Sources */, 21287EFF22E8A989008BF595 /* IJKFFMonitor.m in Sources */, 21287EFB22E8A989008BF595 /* IJKFFOptions.m in Sources */, 21287F0222E8A989008BF595 /* IJKDeviceModel.m in Sources */, - 21C849DB23619BF30028AC95 /* IJKSDLGLView.m in Sources */, + 21414EAE236B327200F60AE3 /* ijkio.c in Sources */, + 21414EC5236B327C00F60AE3 /* ijkdict.c in Sources */, 21287F0022E8A989008BF595 /* IJKAudioKit.m in Sources */, + 21414EEE236B32E400F60AE3 /* IJKVideoToolBox.m in Sources */, 21C8497323619A810028AC95 /* ijksdl_thread.c in Sources */, + 21414EC3236B327C00F60AE3 /* ijkutils.c in Sources */, 21C8496023619A810028AC95 /* ijksdl_aout.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -765,7 +1127,14 @@ "@executable_path/../Frameworks", "@loader_path/Frameworks", ); + LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/build/ffmpeg-x86_64/output/lib"; MACH_O_TYPE = mh_dylib; + OTHER_LDFLAGS = ( + "-L/usr/local/opt/openssl/lib", + "-lssl", + "-lcrypto", + "-lz", + ); PRODUCT_BUNDLE_IDENTIFIER = com.befovy.www.IJKMediaPlayer; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; @@ -798,7 +1167,14 @@ "@executable_path/../Frameworks", "@loader_path/Frameworks", ); + LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/build/ffmpeg-x86_64/output/lib"; MACH_O_TYPE = mh_dylib; + OTHER_LDFLAGS = ( + "-L/usr/local/opt/openssl/lib", + "-lssl", + "-lcrypto", + "-lz", + ); PRODUCT_BUNDLE_IDENTIFIER = com.befovy.www.IJKMediaPlayer; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h index 64a19ab025..53164b4f5e 100644 --- a/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h +++ b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h @@ -17,3 +17,7 @@ FOUNDATION_EXPORT const unsigned char IJKMediaPlayerVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import +#include +//#include +#include +#include diff --git a/osx/Podfile b/osx/Podfile deleted file mode 100644 index 500fe12137..0000000000 --- a/osx/Podfile +++ /dev/null @@ -1,19 +0,0 @@ -# Uncomment the next line to define a global platform for your project -platform :osx, '10.10' - -workspace 'Runner' - -project 'IJKMediaPlayer/IJKMediaPlayer.xcodeproj' - -target 'IJKMediaPlayer' do - # Comment the next line if you don't want to use dynamic frameworks - use_frameworks! - - # Pods for IJKMediaPlayer - - target 'IJKMediaPlayerTests' do - inherit! :search_paths - # Pods for testing - end - -end From cef0b897827fdb81e3cd40e3d14d74e0e47ee5e1 Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 3 Nov 2019 21:32:30 +0800 Subject: [PATCH 060/163] feat: C style API for Mac OS --- .gitignore | 2 +- .../IJKMediaPlayer/IJKSDLGLViewProtocol.h | 4 + .../IJKMediaPlayer.xcodeproj/project.pbxproj | 8 + .../IJKMediaPlayer/IJKFFCMediaPlayer.h | 72 ++++ .../IJKMediaPlayer/IJKFFCMediaPlayer.m | 382 ++++++++++++++++++ .../IJKMediaPlayer/IJKMediaPlayer.h | 2 +- 6 files changed, 468 insertions(+), 2 deletions(-) create mode 100644 osx/IJKMediaPlayer/IJKMediaPlayer/IJKFFCMediaPlayer.h create mode 100644 osx/IJKMediaPlayer/IJKMediaPlayer/IJKFFCMediaPlayer.m diff --git a/.gitignore b/.gitignore index 3e95540d46..f0cf85f9c8 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,4 @@ xcshareddata # osx -osx/ +# osx/ diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h index bd753e0262..fa26854378 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKSDLGLViewProtocol.h @@ -46,14 +46,18 @@ struct IJKOverlay { @protocol IJKSDLGLViewProtocol #if IJK_OSX +@optional - (NSImage*) snapshot; #else +@optional - (UIImage*) snapshot; #endif @property(nonatomic, readonly) CGFloat fps; @property(nonatomic) CGFloat scaleFactor; @property(nonatomic) BOOL isThirdGLView; + +@required - (void) display_pixels: (IJKOverlay *) overlay; @end diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index f367343e0b..76ffa0c933 100644 --- a/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/osx/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -117,6 +117,8 @@ 21414F02236B35BA00F60AE3 /* libswscale.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 21414EFC236B35BA00F60AE3 /* libswscale.a */; }; 21414F58236B3CCF00F60AE3 /* IJKFFMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414F56236B3CCF00F60AE3 /* IJKFFMediaPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21414F59236B3CCF00F60AE3 /* IJKFFMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 21414F57236B3CCF00F60AE3 /* IJKFFMediaPlayer.m */; }; + 21414F60236BE0C400F60AE3 /* IJKFFCMediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 21414F5E236BE0C400F60AE3 /* IJKFFCMediaPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21414F61236BE0C400F60AE3 /* IJKFFCMediaPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 21414F5F236BE0C400F60AE3 /* IJKFFCMediaPlayer.m */; }; 21C8495F23619A810028AC95 /* ijksdl_mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8493F23619A800028AC95 /* ijksdl_mutex.h */; }; 21C8496023619A810028AC95 /* ijksdl_aout.c in Sources */ = {isa = PBXBuildFile; fileRef = 21C8494023619A800028AC95 /* ijksdl_aout.c */; }; 21C8496123619A810028AC95 /* ijksdl_log.h in Headers */ = {isa = PBXBuildFile; fileRef = 21C8494123619A800028AC95 /* ijksdl_log.h */; }; @@ -299,6 +301,8 @@ 21414EFC236B35BA00F60AE3 /* libswscale.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libswscale.a; path = "../contrib/build/ffmpeg-x86_64/output/lib/libswscale.a"; sourceTree = ""; }; 21414F56236B3CCF00F60AE3 /* IJKFFMediaPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IJKFFMediaPlayer.h; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h; sourceTree = ""; }; 21414F57236B3CCF00F60AE3 /* IJKFFMediaPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = IJKFFMediaPlayer.m; path = ../../../ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.m; sourceTree = ""; }; + 21414F5E236BE0C400F60AE3 /* IJKFFCMediaPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IJKFFCMediaPlayer.h; sourceTree = ""; }; + 21414F5F236BE0C400F60AE3 /* IJKFFCMediaPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IJKFFCMediaPlayer.m; sourceTree = ""; }; 21C8493F23619A800028AC95 /* ijksdl_mutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_mutex.h; path = ../../ijkmedia/ijksdl/ijksdl_mutex.h; sourceTree = ""; }; 21C8494023619A800028AC95 /* ijksdl_aout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ijksdl_aout.c; path = ../../ijkmedia/ijksdl/ijksdl_aout.c; sourceTree = ""; }; 21C8494123619A800028AC95 /* ijksdl_log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ijksdl_log.h; path = ../../ijkmedia/ijksdl/ijksdl_log.h; sourceTree = ""; }; @@ -411,6 +415,8 @@ 21287EEE22E8A989008BF595 /* IJKDeviceModel.m */, 21287EF422E8A989008BF595 /* IJKFFMonitor.h */, 21287EEB22E8A988008BF595 /* IJKFFMonitor.m */, + 21414F5E236BE0C400F60AE3 /* IJKFFCMediaPlayer.h */, + 21414F5F236BE0C400F60AE3 /* IJKFFCMediaPlayer.m */, 21414F56236B3CCF00F60AE3 /* IJKFFMediaPlayer.h */, 21414F57236B3CCF00F60AE3 /* IJKFFMediaPlayer.m */, 21287EF222E8A989008BF595 /* IJKFFMoviePlayerController.h */, @@ -708,6 +714,7 @@ 21287F0622E8A989008BF595 /* IJKFFMoviePlayerController.h in Headers */, 21287F0822E8A989008BF595 /* IJKFFMonitor.h in Headers */, 21287F0322E8A989008BF595 /* IJKFFOptions.h in Headers */, + 21414F60236BE0C400F60AE3 /* IJKFFCMediaPlayer.h in Headers */, 21287EE622E8A971008BF595 /* IJKMediaPlayback.h in Headers */, 21414E9E236B327200F60AE3 /* ijkiomanager.h in Headers */, 21414E88236B326600F60AE3 /* ijkplayer_internal.h in Headers */, @@ -951,6 +958,7 @@ 21C8496923619A810028AC95 /* ijksdl_mutex.c in Sources */, 21287EFF22E8A989008BF595 /* IJKFFMonitor.m in Sources */, 21287EFB22E8A989008BF595 /* IJKFFOptions.m in Sources */, + 21414F61236BE0C400F60AE3 /* IJKFFCMediaPlayer.m in Sources */, 21287F0222E8A989008BF595 /* IJKDeviceModel.m in Sources */, 21414EAE236B327200F60AE3 /* ijkio.c in Sources */, 21414EC5236B327C00F60AE3 /* ijkdict.c in Sources */, diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer/IJKFFCMediaPlayer.h b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKFFCMediaPlayer.h new file mode 100644 index 0000000000..36016d28b8 --- /dev/null +++ b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKFFCMediaPlayer.h @@ -0,0 +1,72 @@ +// +// IJKFFCMediaPlayer.h +// IJKPlayer +// +// Created by befovy on 2019/11/1. +// Copyright © 2019 befovy. All rights reserved. +// + +#ifndef IJKFF_MEDIA_PLAYER_C_API_H +#define IJKFF_MEDIA_PLAYER_C_API_H + +#include +#include +#include + +typedef struct IJKFFOverlay { + int w; + int h; + uint32_t format; + int planes; + uint16_t *pitches; + uint8_t **pixels; + int sar_num; + int sar_dem; +} IJKFFOverlay; + +typedef void (*IJKFFOverlayCb) (void *userdata, IJKFFOverlay* overlay); + +typedef struct IJKFFCMediaPlayer IJKFFCMediaPlayer; + +IJKFFCMediaPlayer *ijkcmp_create(void); + +int ijkcmp_set_data_source(IJKFFCMediaPlayer *mp, const char * url); +int ijkcmp_prepareAsync(IJKFFCMediaPlayer *mp); +int ijkcmp_start(IJKFFCMediaPlayer *mp); +int ijkcmp_stop(IJKFFCMediaPlayer *mp); +int ijkcmp_pause(IJKFFCMediaPlayer *mp); +int ijkcmp_reset(IJKFFCMediaPlayer *mp); +bool ijkcmp_is_playing(IJKFFCMediaPlayer *mp); +void ijkcmp_shutdown(IJKFFCMediaPlayer *mp); + + +int64_t ijkcmp_get_current_position(IJKFFCMediaPlayer *mp); +int64_t ijkcmp_get_duration(IJKFFCMediaPlayer *mp); +int ijkcmp_seek_to(IJKFFCMediaPlayer *mp, int64_t msec); + +void ijkcmp_set_loop(IJKFFCMediaPlayer *mp, int loop); +int ijkcmp_get_loop(IJKFFCMediaPlayer *mp); + +void ijkcmp_set_speed(IJKFFCMediaPlayer *mp, float speed); + +void ijkcmp_set_playback_volume(IJKFFCMediaPlayer *mp, float volume); +float ijkcmp_get_playback_volume(IJKFFCMediaPlayer *mp); + +void ijkcmp_set_stream_selected(IJKFFCMediaPlayer *mp, int strean, bool selected); + +float ijkcmp_get_float_property(IJKFFCMediaPlayer *mp, int property, float dfault); +int64_t ijkcmp_get_long_property(IJKFFCMediaPlayer *mp, int property, int64_t dfault); + + +void ijkcmp_set_option(IJKFFCMediaPlayer *mp, const char *value, const char *key, int category); +void ijkcmp_set_int_option(IJKFFCMediaPlayer *mp, int64_t value, const char *key, int category); + + +typedef void (*IJKFFEventCb) (void *userdata, int what, int arg1, int arg2, void *extra); + +void ijkcmp_add_event_listener(IJKFFCMediaPlayer *mp, void *userdata, IJKFFEventCb cb); +void ijkcmp_remove_event_listener(IJKFFCMediaPlayer *mp, void *userdata, IJKFFEventCb cb); + +void ijkcmp_set_overlay_cb(IJKFFCMediaPlayer *mp, void *userdata, IJKFFOverlayCb cb); + +#endif //IJKFF_MEDIA_PLAYER_C_API_H diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer/IJKFFCMediaPlayer.m b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKFFCMediaPlayer.m new file mode 100644 index 0000000000..288519492d --- /dev/null +++ b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKFFCMediaPlayer.m @@ -0,0 +1,382 @@ +// +// IJKFFCMediaPlayer.m +// IJKPlayer +// +// Created by befovy on 2019/11/1. +// Copyright © 2019 befovy. All rights reserved. +// + +#include "IJKFFCMediaPlayer.h" +#import "IJKFFMoviePlayerDef.h" +#import "IJKAudioKit.h" +#import "ijkplayer/ijkplayer.h" + +struct IJKFFCMediaPlayer { + IjkMediaPlayer* nativeMediaPlayer; + + void *msgPool; + void *glView; + void *eventCbs; + void *userData; + IJKFFOverlayCb overlayCb; + +}; + + +@interface IJKFFEventCbWrapper : NSObject +@property IJKFFEventCb cb; +@property void * userdata; +@end + +@implementation IJKFFEventCbWrapper + +- (IJKFFEventCbWrapper *) initWithCb: (IJKFFEventCb) cb andUserData:(void *)userdata +{ + self = [super init]; + if (self) { + _cb = cb; + _userdata = userdata; + } + return self; +} + +@end + +@interface IJKFFCMPGlView : NSObject +@end + +@implementation IJKFFCMPGlView { + IJKFFCMediaPlayer *_player; + IJKFFOverlay *_overlay; +} + +@synthesize fps = _fps; +@synthesize scaleFactor = _scaleFactor; +@synthesize isThirdGLView = _isThirdGLView; + + +- (IJKFFCMPGlView *) initWithPlayer:(IJKFFCMediaPlayer *)player +{ + self = [super init]; + if (self) { + _isThirdGLView = true; + _fps = 0; + _scaleFactor = 1.0; + _player = player; + + _overlay = mallocz(sizeof(IJKFFOverlay)); + } + return self; +} + +- (void)dealloc +{ + if (_overlay) { + free(_overlay); + _overlay = nil; + } + _player = nil; +} + +- (void)display_pixels:(IJKOverlay *)overlay { + if (_player->overlayCb) { + _overlay->w = overlay->w; + _overlay->h = overlay->h; + _overlay->format = overlay->format; + _overlay->planes = overlay->planes; + + _overlay->pitches = overlay->pitches; + _overlay->pixels = overlay->pixels; + _overlay->sar_num = overlay->sar_num; + _overlay->sar_dem = overlay->sar_den; + + if (overlay->pixel_buffer) { + _overlay->pixels = CVPixelBufferGetBaseAddress(overlay->pixel_buffer); + _overlay->planes = (int)CVPixelBufferGetPlaneCount(overlay->pixel_buffer); + for (int idx = 0; idx < _overlay->planes; idx ++) { + _overlay->pitches[idx] = CVPixelBufferGetWidthOfPlane(overlay->pixel_buffer, idx); + } + } + + _player->overlayCb(_player->userData, _overlay); + } +} + +- (NSImage *)snapshot { + return nil; +} + +@end + +int ffc_media_player_msg_loop(void* arg) +{ + @autoreleasepool { + IjkMediaPlayer *mp = (IjkMediaPlayer*)arg; + IJKFFCMediaPlayer *ffPlayer = ijkmp_set_weak_thiz(mp, NULL); + while (ffPlayer) { + @autoreleasepool { + IJKFFMoviePlayerMessagePool *pool = (__bridge IJKFFMoviePlayerMessagePool*)(ffPlayer->msgPool); + IJKFFMoviePlayerMessage *msg = [pool obtain]; + if (!msg) + break; + + int retval = ijkmp_get_msg(mp, &msg->_msg, 1); + if (retval < 0) + break; + + // block-get should never return 0 + assert(retval > 0); + // todo + //[ffPlayer performSelectorOnMainThread:@selector(postEvent:) withObject:msg waitUntilDone:NO]; + + NSMutableOrderedSet *eventCbs = (__bridge NSMutableOrderedSet *) ffPlayer->eventCbs; + struct AVMessage *avmsg = &(msg->_msg); + for (IJKFFEventCbWrapper *cbw in eventCbs) { + cbw.cb(cbw.userdata, avmsg->what, avmsg->arg1, avmsg->arg2, avmsg->obj); + } + printf("msg pool: %d %d %d\n", msg->_msg.what, msg->_msg.arg1, msg->_msg.arg2); + } + } + + // retained in prepare_async, before SDL_CreateThreadEx + ijkmp_dec_ref_p(&mp); + return 0; + } +} + +IJKFFCMediaPlayer *ijkcmp_create(void) +{ + IJKFFCMediaPlayer *player = malloc(sizeof(IJKFFCMediaPlayer)); + + ijkmp_global_init(); + IJKFFMoviePlayerMessagePool *pool = [[IJKFFMoviePlayerMessagePool alloc] init]; + + player->msgPool = (__bridge_retained void*) pool; + // player->eventHandlers = [[NSMutableSet alloc] init]; + + IjkMediaPlayer *nativeMediaPlayer = ijkmp_ios_create(ffc_media_player_msg_loop); + player->nativeMediaPlayer = nativeMediaPlayer; + ijkmp_set_option(nativeMediaPlayer, IJKMP_OPT_CATEGORY_PLAYER, "overlay-format", "fcc-_es2"); + + NSMutableOrderedSet *eventCbs = [[NSMutableOrderedSet alloc] init]; + player->eventCbs = (__bridge_retained void*) eventCbs; + + ijkmp_set_weak_thiz(nativeMediaPlayer, player); + ijkmp_set_inject_opaque(nativeMediaPlayer, player); + ijkmp_set_ijkio_inject_opaque(nativeMediaPlayer, player); + [[IJKAudioKit sharedInstance] setupAudioSession]; + + printf("ijkcmp_create\n"); + + return player; +} + +int ijkcmp_set_data_source(IJKFFCMediaPlayer *mp, const char * url) +{ + if (mp) + return ijkmp_set_data_source(mp->nativeMediaPlayer, url); + else + return -1; +} + +int ijkcmp_prepareAsync(IJKFFCMediaPlayer *mp) +{ + if (mp) + return ijkmp_prepare_async(mp->nativeMediaPlayer); + else + return -1; +} + +int ijkcmp_start(IJKFFCMediaPlayer *mp) +{ + if (mp) + return ijkmp_start(mp->nativeMediaPlayer); + else + return -1; +} + +int ijkcmp_stop(IJKFFCMediaPlayer *mp) +{ + if (mp) + return ijkmp_stop(mp->nativeMediaPlayer); + else + return -1; +} + +int ijkcmp_pause(IJKFFCMediaPlayer *mp) +{ + if (mp) + return ijkmp_pause(mp->nativeMediaPlayer); + else + return -1; +} + +int ijkcmp_reset(IJKFFCMediaPlayer *mp) +{ + if (mp) { + ijkmp_stop(mp->nativeMediaPlayer); + ijkmp_reset(mp->nativeMediaPlayer); + return 0; + } else + return -1; +} + +bool ijkcmp_is_playing(IJKFFCMediaPlayer *mp) +{ + if (mp) + return ijkmp_is_playing(mp->nativeMediaPlayer); + else + return false; +} + + +void ijkcmp_shutdown(IJKFFCMediaPlayer *mp) +{ + if (mp) { + ijkmp_shutdown(mp->nativeMediaPlayer); + + ijkmp_set_inject_opaque(mp->nativeMediaPlayer, NULL); + ijkmp_set_ijkio_inject_opaque(mp->nativeMediaPlayer, NULL); + + __unused IJKFFMoviePlayerMessagePool *pool = (__bridge_transfer IJKFFMoviePlayerMessagePool *) mp->msgPool; + NSMutableOrderedSet *eventCbs = (__bridge_transfer NSMutableOrderedSet *) mp->eventCbs; + [eventCbs removeAllObjects]; + //[mp->eventHandlers removeAllObjects]; + ijkmp_dec_ref_p(&mp->nativeMediaPlayer); + } +} + +int64_t ijkcmp_get_current_position(IJKFFCMediaPlayer *mp) +{ + if (mp) + return ijkmp_get_current_position(mp->nativeMediaPlayer); + else + return 0; +} + + +int64_t ijkcmp_get_duration(IJKFFCMediaPlayer *mp) +{ + if (mp) + return ijkmp_get_duration(mp->nativeMediaPlayer); + else + return 0; +} + +int ijkcmp_seek_to(IJKFFCMediaPlayer *mp, int64_t msec) +{ + if (mp) + return ijkmp_seek_to(mp->nativeMediaPlayer, msec); + else + return -1; +} + +void ijkcmp_set_loop(IJKFFCMediaPlayer *mp, int loop) +{ + if (mp) + ijkmp_set_loop(mp->nativeMediaPlayer, loop); +} + +int ijkcmp_get_loop(IJKFFCMediaPlayer *mp) +{ + if (mp) + return ijkmp_get_loop(mp->nativeMediaPlayer); + else + return -1; +} + +void ijkcmp_set_speed(IJKFFCMediaPlayer *mp, float speed) +{ + if (mp) + ijkmp_set_playback_rate(mp->nativeMediaPlayer, speed); +} + +void ijkcmp_set_playback_volume(IJKFFCMediaPlayer *mp, float volume) +{ + if (mp) + ijkmp_set_playback_volume(mp->nativeMediaPlayer, volume); +} + +float ijkcmp_get_playback_volume(IJKFFCMediaPlayer *mp) +{ + if (mp) + return ijkmp_get_property_float(mp->nativeMediaPlayer, FFP_PROP_FLOAT_PLAYBACK_VOLUME, 1.0f); + else + return 0.0f; +} + +void ijkcmp_set_stream_selected(IJKFFCMediaPlayer *mp, int strean, bool selected) +{ + if (mp) + ijkmp_set_stream_selected(mp->nativeMediaPlayer, strean, selected); + +} + +float ijkcmp_get_float_property(IJKFFCMediaPlayer *mp, int property, float dfault) +{ + if (mp) + return ijkmp_get_property_float(mp->nativeMediaPlayer, property, dfault); + else + return -1.0; +} + + +int64_t ijkcmp_get_long_property(IJKFFCMediaPlayer *mp, int property, int64_t dfault) +{ + if (mp) + return ijkmp_get_property_int64(mp->nativeMediaPlayer, property, dfault); + else + return -1; +} + + +void ijkcmp_set_option(IJKFFCMediaPlayer *mp, const char *value, const char *key, int category) +{ + if (mp) + ijkmp_set_option(mp->nativeMediaPlayer, category, key, value); +} + +void ijkcmp_set_int_option(IJKFFCMediaPlayer *mp, int64_t value, const char *key, int category) +{ + if (mp) + ijkmp_set_option_int(mp->nativeMediaPlayer, category, key, value); +} + +void ijkcmp_set_overlay_cb(IJKFFCMediaPlayer *mp, void *userdata, IJKFFOverlayCb cb) +{ + if (mp) { + if (mp->glView == nil) { + IJKFFCMPGlView *glview = [[IJKFFCMPGlView alloc] initWithPlayer:mp]; + mp->glView = (__bridge void*) glview; + ijkmp_ios_set_glview(mp->nativeMediaPlayer, glview); + } + mp->overlayCb = cb; + mp->userData = userdata; + } +} + +void ijkcmp_add_event_listener(IJKFFCMediaPlayer *mp, void *userdata, IJKFFEventCb cb) +{ + if (mp) { + NSMutableOrderedSet *eventCbs = (__bridge NSMutableOrderedSet *) mp->eventCbs; + IJKFFEventCbWrapper *wrapper = [[IJKFFEventCbWrapper alloc] initWithCb:cb andUserData:userdata]; + [eventCbs addObject:wrapper]; + } +} + +void ijkcmp_remove_event_listener(IJKFFCMediaPlayer *mp, void *userdata, IJKFFEventCb cb) +{ + if (mp) { + NSMutableOrderedSet *eventCbs = (__bridge NSMutableOrderedSet *) mp->eventCbs; + IJKFFEventCbWrapper *tobeRemoved = nil; + for (IJKFFEventCbWrapper *wrapper in eventCbs) { + if (wrapper.cb == cb && wrapper.userdata == userdata) { + tobeRemoved = wrapper; + break; + } + } + if (tobeRemoved != nil) { + [eventCbs removeObject:tobeRemoved]; + } + } +} diff --git a/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h index 53164b4f5e..6641295bb8 100644 --- a/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h +++ b/osx/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h @@ -2,7 +2,7 @@ // IJKMediaPlayer.h // IJKMediaPlayer // -// Created by Bai Shuai on 2019/7/24. +// Created by befovy on 2019/7/24. // Copyright © 2019 befovy. All rights reserved. // From 180c85198c015e81dcdb46e381d53f673543a939 Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 5 Nov 2019 00:18:57 +0800 Subject: [PATCH 061/163] feat: add rgba overlay pixel format --- ijkmedia/ijkplayer/ff_ffplay_options.h | 1 + ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c | 9 +++++++++ ijkmedia/ijksdl/ijksdl_fourcc.h | 1 + .../ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m | 4 ++++ .../ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m | 4 ++++ 5 files changed, 19 insertions(+) diff --git a/ijkmedia/ijkplayer/ff_ffplay_options.h b/ijkmedia/ijkplayer/ff_ffplay_options.h index 3f9305cd3b..900743dad9 100644 --- a/ijkmedia/ijkplayer/ff_ffplay_options.h +++ b/ijkmedia/ijkplayer/ff_ffplay_options.h @@ -113,6 +113,7 @@ static const AVOption ffp_context_options[] = { { "fcc-rv24", "", 0, OPTION_CONST(SDL_FCC_RV24), .unit = "overlay-format" }, { "fcc-rv32", "", 0, OPTION_CONST(SDL_FCC_RV32), .unit = "overlay-format" }, { "fcc-bgra", "", 0, OPTION_CONST(SDL_FCC_BGRA), .unit = "overlay-format" }, + { "fcc-rgba", "", 0, OPTION_CONST(SDL_FCC_RGBA), .unit = "overlay-format" }, { "start-on-prepared", "automatically start playing on prepared", OPTION_OFFSET(start_on_prepared), OPTION_INT(1, 0, 1) }, diff --git a/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c b/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c index c87360f9d3..c22f8633aa 100644 --- a/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c +++ b/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c @@ -204,6 +204,9 @@ static int func_fill_frame(SDL_VoutOverlay *overlay, const AVFrame *frame) case SDL_FCC_BGRA: dst_format = AV_PIX_FMT_BGRA; break; + case SDL_FCC_RGBA: + dst_format = AV_PIX_FMT_RGBA; + break; default: ALOGE("SDL_VoutFFmpeg_ConvertPicture: unexpected overlay format %s(%d)", (char*)&overlay->format, overlay->format); @@ -401,6 +404,12 @@ SDL_VoutOverlay *SDL_VoutFFmpeg_CreateOverlay(int width, int height, int frame_f opaque->planes = 1; break; } + case SDL_FCC_RGBA: { + ff_format = AV_PIX_FMT_RGBA; + buf_width = IJKALIGN(width, 4); // 4 bytes per pixel + opaque->planes = 1; + break; + } default: ALOGE("SDL_VoutFFmpeg_CreateOverlay(...): unknown format %.4s(0x%x)\n", (char*)&overlay_format, overlay_format); goto fail; diff --git a/ijkmedia/ijksdl/ijksdl_fourcc.h b/ijkmedia/ijksdl/ijksdl_fourcc.h index 35d772fdc9..a0ecee3d3a 100644 --- a/ijkmedia/ijksdl/ijksdl_fourcc.h +++ b/ijkmedia/ijksdl/ijksdl_fourcc.h @@ -64,6 +64,7 @@ #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 */ +#define SDL_FCC_RGBA SDL_FOURCC('R', 'G', 'B', 'A') /**> bpp=32, RGBA8888 */ // opaque formats #define SDL_FCC__AMC SDL_FOURCC('_', 'A', 'M', 'C') /**< Android MediaCodec */ diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m index 67d7fdb4c0..1a87d65e05 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxAsync.m @@ -560,6 +560,10 @@ static VTDecompressionSessionRef vtbsession_create(Ijk_VideoToolBox_Opaque* cont CFDictionarySetSInt32(destinationPixelBufferAttributes, kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_32BGRA); context->required_format_type = kCVPixelFormatType_32BGRA; + } else if (ffp->overlay_format == SDL_FCC_RGBA) { + CFDictionarySetSInt32(destinationPixelBufferAttributes, + kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_32RGBA); + context->required_format_type = kCVPixelFormatType_32RGBA; } else { CFDictionarySetSInt32(destinationPixelBufferAttributes, kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m index 29e7cc3bc0..b444e604c1 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBoxSync.m @@ -440,6 +440,10 @@ static VTDecompressionSessionRef vtbsession_create(Ijk_VideoToolBox_Opaque* cont CFDictionarySetSInt32(destinationPixelBufferAttributes, kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_32BGRA); context->required_format_type = kCVPixelFormatType_32BGRA; + } else if (ffp->overlay_format == SDL_FCC_RGBA) { + CFDictionarySetSInt32(destinationPixelBufferAttributes, + kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_32RGBA); + context->required_format_type = kCVPixelFormatType_32RGBA; } else { CFDictionarySetSInt32(destinationPixelBufferAttributes, kCVPixelBufferPixelFormatTypeKey, kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange); From b2c895513efa4c3544434dbbc9dadc103f1db1c5 Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 5 Nov 2019 00:19:49 +0800 Subject: [PATCH 062/163] fix: iOS / Max OS video callback IJKOverlay memset 0 --- .../IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m index ea65aab63c..3899eaad86 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_vout_ios_gles2.m @@ -109,7 +109,7 @@ static int vout_display_overlay_l(SDL_Vout *vout, SDL_VoutOverlay *overlay) if (opaque->third_part) { IJKOverlay ijk_overlay; - + memset(&ijk_overlay, 0, sizeof(IJKOverlay)); ijk_overlay.w = overlay->w; ijk_overlay.h = overlay->h; ijk_overlay.format = overlay->format; From ed4ec2ba03b3d2a498243bce3960712631775b76 Mon Sep 17 00:00:00 2001 From: befovy Date: Wed, 6 Nov 2019 22:29:16 +0800 Subject: [PATCH 063/163] refactor: IJkAudioKit setActive return value and catch exception --- .../IJKMediaPlayer/IJKAudioKit.m | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.m index 42c5145de2..cd45996a8a 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKAudioKit.m @@ -57,31 +57,30 @@ - (void)setupAudioSession return; } - error = nil; - if (NO == [[AVAudioSession sharedInstance] setActive:YES error:&error]) { - NSLog(@"IJKAudioKit: AVAudioSession.setActive(YES) failed: %@\n", error ? [error localizedDescription] : @"nil"); - return; - } - - return ; + [self setActive:YES]; + return; #endif } - (BOOL)setActive:(BOOL)active { #if IJK_IOS - if (active != NO) { - [[AVAudioSession sharedInstance] setActive:YES error:nil]; - } else { - @try { - [[AVAudioSession sharedInstance] setActive:NO error:nil]; - } @catch (NSException *exception) { - NSLog(@"failed to inactive AVAudioSession\n"); - } + NSError *error = nil; + BOOL succeed = NO; + @try { + succeed = [[AVAudioSession sharedInstance] setActive:active error:&error]; + } @catch (NSException *exception) { + NSLog(@"failed to inactive/active AVAudioSession\n"); + succeed = NO; } - return YES; + if (succeed == NO) { + NSLog(@"IJKAudioKit: AVAudioSession.setActive(%@) failed: %@\n", + active ? @"YES" : @"NO", + error ? [error localizedDescription] : @"nil"); + } + return succeed; #endif - return NO; + return YES; } - (void)handleInterruption:(NSNotification *)notification From 0a51f24753759e1ff393957b376ff060357ccc6f Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 8 Nov 2019 00:00:54 +0800 Subject: [PATCH 064/163] feat: CMake for desktop, WIP --- .../fijkplayer-full/src/main/CMakeLists.txt | 20 ++-- ijkmedia/CMakeLists.txt | 4 + ijkmedia/ijkplayer/CMakeLists.txt | 25 +++-- ijkmedia/ijkplayer/ff_ffplay.c | 37 +++++--- ijkmedia/ijkplayer/ijkavformat/ijkiocache.c | 2 + ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c | 2 + ijkmedia/ijkplayer/ijkavutil/ijkthreadpool.c | 3 +- ijkmedia/ijksdl/CMakeLists.txt | 11 ++- ijkmedia/ijksdl/ijksdl_mutex.c | 5 + ijkmedia/ijksdl/ijksdl_thread.c | 2 + ijkmedia/ijksdl/ijksdl_timer.c | 6 +- ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.c | 0 ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.h | 0 ijkmedia/ijksdl/mwl/ijksdl_mwl.h | 0 ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.c | 0 ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.h | 0 mawili/CMakeLists.txt | 92 +++++++++++++++++++ 17 files changed, 176 insertions(+), 33 deletions(-) create mode 100644 ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.c create mode 100644 ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.h create mode 100644 ijkmedia/ijksdl/mwl/ijksdl_mwl.h create mode 100644 ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.c create mode 100644 ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.h create mode 100644 mawili/CMakeLists.txt diff --git a/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt b/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt index 11b3277afe..6dd9352c89 100644 --- a/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt +++ b/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt @@ -54,33 +54,33 @@ set(ANDROID_CONTRIB_PATH ${FIJKROOT_PATH}/android/contrib/build) message(STATUS "ANDROID_CONTRIB_PATH:${ANDROID_CONTRIB_PATH}") if (${ANDROID_ABI} STREQUAL "arm64-v8a") - set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-arm64/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-arm64/output) elseif (${ANDROID_ABI} STREQUAL "armeabi-v7a") - set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-armv7a/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-armv7a/output) elseif (${ANDROID_ABI} STREQUAL "armeabi") - set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-armv5/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-armv5/output) elseif (${ANDROID_ABI} STREQUAL "x86") - set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-x86/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-x86/output) elseif (${ANDROID_ABI} STREQUAL "x86_64") - set(FFMPAG_SHARED_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-x86_64/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-x86_64/output) endif () -if (NOT DEFINED FFMPAG_SHARED_DIR) - message(FATAL_ERROR "Can not find ffmpeg build output: ${FFMPAG_SHARED_DIR}") +if (NOT DEFINED IJK_FFMPAG_BUILD_DIR) + message(FATAL_ERROR "Can not find ffmpeg build output: ${IJK_FFMPAG_BUILD_DIR}") else () - message(STATUS "FFMPAG_SHARED_DIR:${FFMPAG_SHARED_DIR}") + message(STATUS "IJK_FFMPAG_BUILD_DIR:${IJK_FFMPAG_BUILD_DIR}") endif () add_library(ijkffmpeg SHARED IMPORTED) set_target_properties( # Specifies the target library. ijkffmpeg PROPERTIES - IMPORTED_LOCATION ${FFMPAG_SHARED_DIR}/libijkffmpeg.so + IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/libijkffmpeg.so ) add_custom_target(cpffmpeg COMMAND mkdir -p ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - COMMAND cp ${FFMPAG_SHARED_DIR}/libijkffmpeg.so ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} + COMMAND cp ${IJK_FFMPAG_BUILD_DIR}/libijkffmpeg.so ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ) add_dependencies(ijkffmpeg cpffmpeg) diff --git a/ijkmedia/CMakeLists.txt b/ijkmedia/CMakeLists.txt index 0b3a764916..e3cdb6e22a 100644 --- a/ijkmedia/CMakeLists.txt +++ b/ijkmedia/CMakeLists.txt @@ -24,6 +24,10 @@ if (NOT DEFINED FIJKROOT_PATH) set(FIJKROOT_PATH ${CMAKE_CURRENT_LIST_DIR}/../) endif () +if(IJK_DESKTOP_MWL) + add_subdirectory(portaudio) +endif() + add_subdirectory(ijksdl) add_subdirectory(ijkplayer) diff --git a/ijkmedia/ijkplayer/CMakeLists.txt b/ijkmedia/ijkplayer/CMakeLists.txt index 338a57051d..8ed47efb85 100644 --- a/ijkmedia/ijkplayer/CMakeLists.txt +++ b/ijkmedia/ijkplayer/CMakeLists.txt @@ -97,17 +97,25 @@ if (ANDROID) endif () -add_library(ijkplayer SHARED ${BUILD_SOURCES}) - +if (IJK_DESKTOP_MWL) + add_library(ijkplayer STATIC ${BUILD_SOURCES}) +else () + add_library(ijkplayer SHARED ${BUILD_SOURCES}) +endif () target_include_directories(ijkplayer PRIVATE ${CMAKE_CURRENT_LIST_DIR}) target_include_directories(ijkplayer PRIVATE ${CMAKE_CURRENT_LIST_DIR}/..) -target_include_directories(ijkplayer PRIVATE ${FFMPAG_SHARED_DIR}/include) +target_include_directories(ijkplayer PRIVATE ${IJK_FFMPAG_BUILD_DIR}/include) + target_include_directories(ijkplayer PRIVATE ijkavformat) target_include_directories(ijkplayer PRIVATE ijkavutil) target_include_directories(ijkplayer PRIVATE pipeline) target_include_directories(ijkplayer PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkj4a) +if (WIN32) + target_include_directories(ijkplayer PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/../../include") +endif() + target_link_libraries(ijkplayer ijksdl) if (ANDROID) @@ -118,8 +126,9 @@ if (ANDROID) target_link_libraries(ijkplayer android) endif () - -add_custom_command(TARGET ijkplayer - PRE_BUILD - COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/version.sh ${CMAKE_CURRENT_LIST_DIR} ijkversion.h -) +if (NOT WIN32) + add_custom_command(TARGET ijkplayer + PRE_BUILD + COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/version.sh ${CMAKE_CURRENT_LIST_DIR} ijkversion.h + ) +endif() diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index fc9f47238b..ab5c0d39de 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -35,7 +35,10 @@ #include #include #include + +#ifndef WIN32 #include +#endif #include "libavutil/avstring.h" #include "libavutil/eval.h" @@ -47,6 +50,7 @@ #include "libavutil/samplefmt.h" #include "libavutil/avassert.h" #include "libavutil/time.h" +#include "libavutil/attributes.h" #include "libavformat/avformat.h" #if CONFIG_AVDEVICE #include "libavdevice/avdevice.h" @@ -73,7 +77,10 @@ #include "ijkmeta.h" #include "ijkversion.h" #include "ijkplayer.h" + +#ifndef WIN32 #include +#endif #if defined(__ANDROID__) #include "ijksoundtouch/ijksoundtouch_wrap.h" #endif @@ -916,7 +923,11 @@ static void video_image_display2(FFPlayer *ffp) } if (is->latest_video_seek_load_serial == vp->serial) { +#ifdef WIN32 + int latest_video_seek_load_serial = InterlockedExchangeAcquire(&(is->latest_video_seek_load_serial), -1); +#else int latest_video_seek_load_serial = __atomic_exchange_n(&(is->latest_video_seek_load_serial), -1, memory_order_seq_cst); +#endif if (latest_video_seek_load_serial == vp->serial) { ffp->stat.latest_seek_load_duration = (av_gettime() - is->latest_seek_load_start_at) / 1000; if (ffp->av_sync_type == AV_SYNC_VIDEO_MASTER) { @@ -1273,8 +1284,8 @@ static double compute_target_delay(FFPlayer *ffp, double delay, VideoState *is) } if (ffp) { - ffp->stat.avdelay = delay; - ffp->stat.avdiff = diff; + ffp->stat.avdelay = (float)delay; + ffp->stat.avdiff = (float)diff; } #ifdef FFP_SHOW_AUDIO_DELAY av_log(NULL, AV_LOG_TRACE, "video: delay=%0.3f A-V=%f\n", @@ -1419,7 +1430,7 @@ static void video_refresh(FFPlayer *opaque, double *remaining_time) if (ffp->show_status) { static int64_t last_time; int64_t cur_time; - int aqsize, vqsize, sqsize __unused; + int aqsize, vqsize, sqsize av_unused; double av_diff; cur_time = av_gettime_relative(); @@ -2703,7 +2714,11 @@ static void sdl_audio_callback(void *opaque, Uint8 *stream, int len) } if (is->latest_audio_seek_load_serial == is->audio_clock_serial) { +#ifdef WIN32 + int latest_audio_seek_load_serial = InterlockedExchangeAcquire(&(is->latest_audio_seek_load_serial), -1); +#else int latest_audio_seek_load_serial = __atomic_exchange_n(&(is->latest_audio_seek_load_serial), -1, memory_order_seq_cst); +#endif if (latest_audio_seek_load_serial == is->audio_clock_serial) { if (ffp->av_sync_type == AV_SYNC_AUDIO_MASTER) { ffp_notify_msg2(ffp, FFP_MSG_AUDIO_SEEK_RENDERING_START, 1); @@ -3063,7 +3078,7 @@ static int read_thread(void *arg) FFPlayer *ffp = arg; VideoState *is = ffp->is; AVFormatContext *ic = NULL; - int err, i, ret __unused; + int err, i, ret av_unused; int st_index[AVMEDIA_TYPE_NB]; AVPacket pkt1, *pkt = &pkt1; int64_t stream_start_time; @@ -3846,7 +3861,7 @@ static void ffp_log_callback_brief(void *ptr, int level, const char *fmt, va_lis if (level > av_log_get_level()) return; - int ffplv __unused = log_level_av_to_ijk(level); + int ffplv av_unused = log_level_av_to_ijk(level); VLOG(ffplv, IJK_LOG_TAG, fmt, vl); } @@ -3855,7 +3870,7 @@ static void ffp_log_callback_report(void *ptr, int level, const char *fmt, va_li if (level > av_log_get_level()) return; - int ffplv __unused = log_level_av_to_ijk(level); + int ffplv av_unused = log_level_av_to_ijk(level); va_list vl2; char line[1024]; @@ -4537,22 +4552,22 @@ int ffp_packet_queue_init(PacketQueue *q) void ffp_packet_queue_destroy(PacketQueue *q) { - return packet_queue_destroy(q); + packet_queue_destroy(q); } void ffp_packet_queue_abort(PacketQueue *q) { - return packet_queue_abort(q); + packet_queue_abort(q); } void ffp_packet_queue_start(PacketQueue *q) { - return packet_queue_start(q); + packet_queue_start(q); } void ffp_packet_queue_flush(PacketQueue *q) { - return packet_queue_flush(q); + packet_queue_flush(q); } int ffp_packet_queue_get(PacketQueue *q, AVPacket *pkt, int block, int *serial) @@ -4585,7 +4600,7 @@ Frame *ffp_frame_queue_peek_writable(FrameQueue *f) void ffp_frame_queue_push(FrameQueue *f) { - return frame_queue_push(f); + frame_queue_push(f); } int ffp_queue_picture(FFPlayer *ffp, AVFrame *src_frame, double pts, double duration, int64_t pos, int serial) diff --git a/ijkmedia/ijkplayer/ijkavformat/ijkiocache.c b/ijkmedia/ijkplayer/ijkavformat/ijkiocache.c index b4dc2cf2c3..86a7f382b9 100644 --- a/ijkmedia/ijkplayer/ijkavformat/ijkiocache.c +++ b/ijkmedia/ijkplayer/ijkavformat/ijkiocache.c @@ -34,7 +34,9 @@ #include #include #include +#ifndef WIN32 #include +#endif #include #define DEFAULT_CACHE_MAX_CAPACITY (512 * 1024 * 1024) diff --git a/ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c b/ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c index eb5a473d80..3cea1ee69c 100644 --- a/ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c +++ b/ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c @@ -29,7 +29,9 @@ #include #include #include +#ifndef WIN32 #include +#endif #define CONFIG_MAX_LINE 1024 diff --git a/ijkmedia/ijkplayer/ijkavutil/ijkthreadpool.c b/ijkmedia/ijkplayer/ijkavutil/ijkthreadpool.c index 00cb67ac21..79fa1c50c3 100644 --- a/ijkmedia/ijkplayer/ijkavutil/ijkthreadpool.c +++ b/ijkmedia/ijkplayer/ijkavutil/ijkthreadpool.c @@ -23,8 +23,9 @@ #include "libavutil/log.h" #include +#ifndef WIN32 #include - +#endif /** * @function void *threadpool_thread(void *threadpool) * @brief the worker thread diff --git a/ijkmedia/ijksdl/CMakeLists.txt b/ijkmedia/ijksdl/CMakeLists.txt index ba3b0a5daf..b701048375 100644 --- a/ijkmedia/ijksdl/CMakeLists.txt +++ b/ijkmedia/ijksdl/CMakeLists.txt @@ -101,14 +101,21 @@ if (ANDROID) set(IJK_SDL_SOURCES ${IJK_SDL_SOURCES} ${SDL_ANDROID_EXTRA_SOURCES} ${GLES2_SOURCES}) endif () -add_library(ijksdl SHARED ${IJK_SDL_SOURCES}) +if (IJK_DESKTOP_MWL) + add_library(ijksdl STATIC ${IJK_SDL_SOURCES}) +else () + add_library(ijksdl SHARED ${IJK_SDL_SOURCES}) +endif () target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}) target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}/..) +if (WIN32) + target_include_directories(ijksdl PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/../../include") +endif() #include ffmpeg header files -target_include_directories(ijksdl PRIVATE ${FFMPAG_SHARED_DIR}/include) +target_include_directories(ijksdl PRIVATE ${IJK_FFMPAG_BUILD_DIR}/include) if (ANDROID) # build cpufeatures as a static lib diff --git a/ijkmedia/ijksdl/ijksdl_mutex.c b/ijkmedia/ijksdl/ijksdl_mutex.c index 5249b32880..4d3ee07cf9 100644 --- a/ijkmedia/ijksdl/ijksdl_mutex.c +++ b/ijkmedia/ijksdl/ijksdl_mutex.c @@ -25,7 +25,12 @@ #include "ijksdl_mutex.h" #include #include +#ifndef WIN32 #include +#else +#include +#endif // !WIN32 + #include "ijksdl_inc_internal.h" SDL_mutex *SDL_CreateMutex(void) diff --git a/ijkmedia/ijksdl/ijksdl_thread.c b/ijkmedia/ijksdl/ijksdl_thread.c index 24fa122eb2..bf58eb8bd2 100644 --- a/ijkmedia/ijksdl/ijksdl_thread.c +++ b/ijkmedia/ijksdl/ijksdl_thread.c @@ -24,7 +24,9 @@ #include #include +#ifndef WIN32 #include +#endif #include "ijksdl_inc_internal.h" #include "ijksdl_thread.h" #ifdef __ANDROID__ diff --git a/ijkmedia/ijksdl/ijksdl_timer.c b/ijkmedia/ijksdl/ijksdl_timer.c index fe09570b05..a3b23d9894 100644 --- a/ijkmedia/ijksdl/ijksdl_timer.c +++ b/ijkmedia/ijksdl/ijksdl_timer.c @@ -23,11 +23,15 @@ */ #include "ijksdl_timer.h" -#include #include #include #include +#ifndef WIN32 +#include #include +#endif // !WIN32 + + #if defined(__APPLE__) #include diff --git a/ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.c b/ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.h b/ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ijkmedia/ijksdl/mwl/ijksdl_mwl.h b/ijkmedia/ijksdl/mwl/ijksdl_mwl.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.c b/ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.h b/ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/mawili/CMakeLists.txt b/mawili/CMakeLists.txt new file mode 100644 index 0000000000..9927b13aa3 --- /dev/null +++ b/mawili/CMakeLists.txt @@ -0,0 +1,92 @@ + +# +# Copyright (c) 2019 befovy +# +# 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 +# + +cmake_minimum_required(VERSION 3.6) + +project("IjkPlayer") + +set(CMAKE_C_STANDARD 11) +set(CMAKE_CXX_STANDARD 11) + +message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") +message(STATUS "PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR}") + +set(IJKROOT_PATH "${PROJECT_SOURCE_DIR}/..") +get_filename_component(IJKROOT_PATH ${IJKROOT_PATH} ABSOLUTE) +message(STATUS "IJKROOT_PATH ${IJKROOT_PATH}") + + +if (${CMAKE_BUILD_TYPE} STREQUAL "Release") + add_definitions(-DNDEBUG) +elseif (${CMAKE_BUILD_TYPE} STREQUAL "Debug") + add_definitions(-DDEBUG) +endif () + + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # 64 bits + message(STATUS "CMAKE SIZEOF POIONT 8") + set(IJK_X64 on) + set(IJK_X86 off) +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + # 32 bits + message(STATUS "cmake sizeof point 4") + set(IJK_X64 off) + set(IJK_X86 on) +endif() + + + +set(IJK_DESKTOP_CONTRIB_PATH ${IJKROOT_PATH}/mawili/contrib) + +if(IJK_X64) + set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x86) +elseif(IJK_X86) + set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x64) +endif() + +if (WIN32) + if(IJK_X64) + set(IJK_DESKTOP_PTHREAD_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/pthreads-w32-2-9-1-release/Pre-built.2/lib/x64) + elseif(IJK_X86) + set(IJK_DESKTOP_PTHREAD_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/pthreads-w32-2-9-1-release/Pre-built.2/lib/x86) + endif() + + add_definitions(-DHAVE_STRUCT_TIMESPEC) +endif() + +if (NOT DEFINED IJK_FFMPAG_BUILD_DIR) + message(FATAL_ERROR "Can not find ffmpeg build output: ${IJK_FFMPAG_BUILD_DIR}") +else () + message(STATUS "IJK_FFMPAG_BUILD_DIR:${IJK_FFMPAG_BUILD_DIR}") +endif () + +# find prebuild static ffmepg library +# add ffmpeg include path +# add ffmpeg link path +# link ffmpeg libs to target + +add_definitions(-DIJK_DESKTOP_MWL) +set(IJK_DESKTOP_MWL ON) +# add_library(ijkplayerall SHARED ) + +add_subdirectory(../ijkmedia ijkmedia) + From f87552cb2e97fa4ce35b393874b36a0a5d5cdd96 Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 10 Nov 2019 17:13:30 +0800 Subject: [PATCH 065/163] feat: ijkplayer desktop works on Windows --- .gitignore | 4 +- desktop/.gitignore | 3 + {mawili => desktop}/CMakeLists.txt | 75 +++++- desktop/CMakeSettings.json | 17 ++ desktop/sources/ijkplayer_demo.c | 61 +++++ desktop/sources/ijkplayer_desktop.c | 249 ++++++++++++++++++ desktop/sources/ijkplayer_desktop.h | 104 ++++++++ ijkmedia/CMakeLists.txt | 2 +- ijkmedia/ijkplayer/CMakeLists.txt | 59 +++-- .../ijkplayer/desktop/ijkplayer_underdesk.c | 57 ++++ .../ijkplayer/desktop/ijkplayer_underdesk.h | 38 +++ .../ijkplayer/desktop/pipeline_underdesk.c | 43 +++ .../ijkplayer/desktop/pipeline_underdesk.h | 31 +++ ijkmedia/ijkplayer/ff_cmdutils.c | 3 +- ijkmedia/ijkplayer/ff_ffplay.c | 5 +- ijkmedia/ijkplayer/ff_ffplay_def.h | 2 +- ijkmedia/ijkplayer/ijkavformat/ijkiocache.c | 2 + ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c | 2 + ijkmedia/ijkplayer/ijkavformat/ijklivehook.c | 2 +- ijkmedia/ijkplayer/ijkavformat/ijksegment.c | 2 +- ijkmedia/ijkplayer/ijkavutil/ijkdict.c | 6 +- ijkmedia/ijkplayer/ijkmeta.c | 4 +- ijkmedia/ijkplayer/ijkplayer.c | 12 + ijkmedia/ijkplayer/ijkplayer_internal.h | 4 + .../ijkplayer/pipeline/ffpipeline_ffplay.h | 2 +- ijkmedia/ijksdl/CMakeLists.txt | 40 ++- .../ijksdl/desktop/ijksdl_aout_port_audio.c | 167 ++++++++++++ .../ijksdl/desktop/ijksdl_aout_port_audio.h | 31 +++ ijkmedia/ijksdl/desktop/ijksdl_desktop.h | 32 +++ .../ijksdl/desktop/ijksdl_vout_uni_callback.c | 98 +++++++ .../ijksdl/desktop/ijksdl_vout_uni_callback.h | 34 +++ ijkmedia/ijksdl/ijksdl_aout.c | 2 +- ijkmedia/ijksdl/ijksdl_mutex.c | 12 +- ijkmedia/ijksdl/ijksdl_thread.c | 10 +- ijkmedia/ijksdl/ijksdl_timer.c | 9 + ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.c | 0 ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.h | 0 ijkmedia/ijksdl/mwl/ijksdl_mwl.h | 0 ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.c | 0 ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.h | 0 40 files changed, 1161 insertions(+), 63 deletions(-) create mode 100644 desktop/.gitignore rename {mawili => desktop}/CMakeLists.txt (52%) create mode 100644 desktop/CMakeSettings.json create mode 100644 desktop/sources/ijkplayer_demo.c create mode 100644 desktop/sources/ijkplayer_desktop.c create mode 100644 desktop/sources/ijkplayer_desktop.h create mode 100644 ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c create mode 100644 ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h create mode 100644 ijkmedia/ijkplayer/desktop/pipeline_underdesk.c create mode 100644 ijkmedia/ijkplayer/desktop/pipeline_underdesk.h create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.h create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_desktop.h create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_vout_uni_callback.c create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_vout_uni_callback.h delete mode 100644 ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.c delete mode 100644 ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.h delete mode 100644 ijkmedia/ijksdl/mwl/ijksdl_mwl.h delete mode 100644 ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.c delete mode 100644 ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.h diff --git a/.gitignore b/.gitignore index f0cf85f9c8..3984f12e48 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,11 @@ ios/openssl-* extra .DS_Store ijkmedia/ijkyuv/ -ijkmedia/ijksoundtouch +ijkmedia/ijksoundtouch/ +ijkmedia/portaudio/ ijkprof/android-ndk-profiler/ + # built application files *.apk *.ap_ diff --git a/desktop/.gitignore b/desktop/.gitignore new file mode 100644 index 0000000000..d04b7579dd --- /dev/null +++ b/desktop/.gitignore @@ -0,0 +1,3 @@ +contrib/ffmpeg +contrib/ +.vs/ \ No newline at end of file diff --git a/mawili/CMakeLists.txt b/desktop/CMakeLists.txt similarity index 52% rename from mawili/CMakeLists.txt rename to desktop/CMakeLists.txt index 9927b13aa3..5014f37f0f 100644 --- a/mawili/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -1,4 +1,3 @@ - # # Copyright (c) 2019 befovy # @@ -40,7 +39,6 @@ elseif (${CMAKE_BUILD_TYPE} STREQUAL "Debug") add_definitions(-DDEBUG) endif () - if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64 bits message(STATUS "CMAKE SIZEOF POIONT 8") @@ -53,14 +51,13 @@ elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) set(IJK_X86 on) endif() - -set(IJK_DESKTOP_CONTRIB_PATH ${IJKROOT_PATH}/mawili/contrib) +set(IJK_DESKTOP_CONTRIB_PATH ${IJKROOT_PATH}/desktop/contrib) if(IJK_X64) - set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x86) -elseif(IJK_X86) set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x64) +elseif(IJK_X86) + set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x86) endif() if (WIN32) @@ -79,14 +76,66 @@ else () message(STATUS "IJK_FFMPAG_BUILD_DIR:${IJK_FFMPAG_BUILD_DIR}") endif () -# find prebuild static ffmepg library -# add ffmpeg include path -# add ffmpeg link path -# link ffmpeg libs to target -add_definitions(-DIJK_DESKTOP_MWL) -set(IJK_DESKTOP_MWL ON) -# add_library(ijkplayerall SHARED ) +add_definitions(-DIJK_DESKTOP_UNI) +set(IJK_DESKTOP_UNI ON) + +set(FIJKPLAYER_SOURCE + ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.h + ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.c +) + +add_library(IjkPlayer SHARED ${FIJKPLAYER_SOURCE}) add_subdirectory(../ijkmedia ijkmedia) +target_include_directories(IjkPlayer PRIVATE ${IJKROOT_PATH}/ijkmedia) +target_include_directories(IjkPlayer PRIVATE ${IJK_FFMPAG_BUILD_DIR}/include) +target_include_directories(IjkPlayer PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/../../include") + +target_link_libraries(IjkPlayer ijksdl_static ijkplayer_static) + + +target_compile_options(ijksdl_static PRIVATE /W3 /we4013) +target_compile_options(ijkplayer_static PRIVATE /W3 /we4013) +target_compile_options(IjkPlayer PRIVATE /W3 /we4013) + + +add_library(avcodec STATIC IMPORTED) +set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libavcodec.a) + +add_library(avformat STATIC IMPORTED) +set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libavformat.a) + +add_library(avutil STATIC IMPORTED) +set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libavutil.a) + +add_library(swresample STATIC IMPORTED) +set_target_properties(swresample PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libswresample.a) + +add_library(swscale STATIC IMPORTED) +set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libswscale.a) + +if (WIN32) + add_library(pthread STATIC IMPORTED) + set_target_properties(pthread PROPERTIES + IMPORTED_LOCATION ${IJK_DESKTOP_PTHREAD_BUILD_DIR}/pthreadVC2.lib + ) + target_link_libraries(IjkPlayer pthread) +endif() + + +target_link_libraries(IjkPlayer avcodec avformat avutil swresample swscale) +target_link_libraries(IjkPlayer portaudio_static) +target_compile_definitions(IjkPlayer PRIVATE -DBUILDING_IJK=1) + +if(WIN32) + target_link_libraries(IjkPlayer ws2_32 secur32 avrt shlwapi advapi32 shell32 kernel32 user32) +endif() + +add_executable(IjkDemo + ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c +) + +target_link_libraries(IjkDemo IjkPlayer user32) + diff --git a/desktop/CMakeSettings.json b/desktop/CMakeSettings.json new file mode 100644 index 0000000000..9d0eaab8c0 --- /dev/null +++ b/desktop/CMakeSettings.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "name": "x86-Debug", + "generator": "Ninja", + "configurationType": "Debug", + "inheritEnvironments": [ + "msvc_x86" + ], + "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}", + "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "-v", + "ctestCommandArgs": "" + } + ] +} \ No newline at end of file diff --git a/desktop/sources/ijkplayer_demo.c b/desktop/sources/ijkplayer_demo.c new file mode 100644 index 0000000000..0571ec2bf6 --- /dev/null +++ b/desktop/sources/ijkplayer_demo.c @@ -0,0 +1,61 @@ +/***************************************************************************** +* ijkplayer_demo.c +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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 "ijkplayer_desktop.h" + +#include +#include +#include + +void demo_event_cb (void *userdata, int what, int arg1, int arg2, void *extra) +{ + printf("demo event cb what %5d:(%5d %5d)\n", what, arg1, arg2); +} + +void demo_overlay_cb (void *userdata, IjkFFOverlay* overlay) +{ + printf("demo overlay cb what %p:(%5d %5d)\n", overlay, overlay->h, overlay->w); +} + + +int main(int argc, char *argv[]) +{ + IjkFFMediaPlayer *fp = ijkff_create(); + ijkff_set_data_source(fp, "D:\\demo.MKV"); + ijkff_prepare_async(fp); + ijkff_start(fp); + + ijkff_set_event_cb(fp, NULL, demo_event_cb); + ijkff_set_overlay_cb(fp, NULL, demo_overlay_cb); + + int x = 0; + while(x < 10) { + x ++; + Sleep(1000); + } + ijkff_stop(fp); + ijkff_shutdown(fp); + system("pause"); + return 0; +} \ No newline at end of file diff --git a/desktop/sources/ijkplayer_desktop.c b/desktop/sources/ijkplayer_desktop.c new file mode 100644 index 0000000000..ae6971bb5e --- /dev/null +++ b/desktop/sources/ijkplayer_desktop.c @@ -0,0 +1,249 @@ +/***************************************************************************** +* ijkplayer_desktop.c +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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 + +#include "ijkplayer_desktop.h" +#include "ijkplayer/desktop/ijkplayer_underdesk.h" +#include "ijkplayer/ff_ffmsg_queue.h" + + +struct IjkFFMediaPlayer +{ + IjkMediaPlayer *mp; + void *event_cb_data; + ijkff_event_cb event_cb; + + IjkFFOverlay overlay; + void *overlay_cb_data; + ijkff_overlay_cb overlay_cb; +}; + +static int ijkff_msg_loop(void *arg) +{ + IjkMediaPlayer *mp = arg; + IjkFFMediaPlayer *fp = ijkmp_set_weak_thiz(mp, NULL); + + while (true) { + AVMessage msg; + + int retval = ijkmp_get_msg(mp, &msg, 1); + if (retval < 0) + break; + + if (fp->event_cb) { + fp->event_cb(fp->event_cb_data, msg.what, msg.arg1, msg.arg2, msg.obj); + } + } + + ijkmp_dec_ref_p(&mp); + return 0; +} + +IjkFFMediaPlayer *ijkff_create() +{ + ijkmp_global_init(); + IjkFFMediaPlayer *fp = mallocz(sizeof(IjkFFMediaPlayer)); + fp->mp = ijkmp_desktop_create(ijkff_msg_loop); + + ijkmp_set_weak_thiz(fp->mp, fp); + ijkmp_set_inject_opaque(fp->mp, fp); + return fp; +} + + +int ijkff_set_data_source(IjkFFMediaPlayer *fp, const char * url) +{ + assert(fp); + return ijkmp_set_data_source(fp->mp, url); +} + +int ijkff_prepare_async(IjkFFMediaPlayer *fp) +{ + assert(fp); + return ijkmp_prepare_async(fp->mp); +} + +int ijkff_start(IjkFFMediaPlayer *fp) +{ + assert(fp); + return ijkmp_start(fp->mp); +} + +int ijkff_stop(IjkFFMediaPlayer *fp) +{ + assert(fp); + return ijkmp_stop(fp->mp); +} + +int ijkff_pause(IjkFFMediaPlayer *fp) +{ + assert(fp); + return ijkmp_pause(fp->mp); +} + +int ijkff_reset(IjkFFMediaPlayer *fp) +{ + assert(fp); + return ijkmp_reset(fp->mp); +} + +bool ijkff_is_playing(IjkFFMediaPlayer *fp) +{ + assert(fp); + return ijkmp_is_playing(fp->mp); +} + +void ijkff_shutdown(IjkFFMediaPlayer *fp) +{ + assert(fp); + if (fp->mp) { + ijkmp_shutdown(fp->mp); + ijkmp_set_inject_opaque(fp->mp, NULL); + ijkmp_set_ijkio_inject_opaque(fp->mp, NULL); + ijkmp_dec_ref(fp->mp); + fp->mp = NULL; + fp->event_cb = NULL; + fp->event_cb_data = NULL; + } +} + +int64_t ijkff_get_current_position(IjkFFMediaPlayer *fp) +{ + assert(fp); + return ijkmp_get_current_position(fp->mp); +} + +int64_t ijkff_get_duration(IjkFFMediaPlayer *fp) +{ + assert(fp); + return ijkmp_get_duration(fp->mp); +} + +int ijkff_seek_to(IjkFFMediaPlayer *fp, int64_t msec) +{ + assert(fp); + return ijkmp_seek_to(fp->mp, msec); +} + +void ijkff_set_loop(IjkFFMediaPlayer *fp, int loop) +{ + assert(fp); + ijkmp_set_loop(fp->mp, loop); +} + +int ijkff_get_loop(IjkFFMediaPlayer *fp) +{ + assert(fp); + ijkmp_get_loop(fp->mp); +} + + +void ijkff_set_speed(IjkFFMediaPlayer *fp, float speed)\ +{ + assert(fp); + ijkmp_set_playback_rate(fp->mp, speed); +} + +void ijkff_set_playback_volume(IjkFFMediaPlayer *fp, float volume) +{ + assert(fp); + ijkmp_set_playback_volume(fp->mp, volume); +} + +float ijkff_get_playback_volume(IjkFFMediaPlayer *fp) +{ + assert(fp); + return ijkmp_get_property_float(fp->mp, FFP_PROP_FLOAT_PLAYBACK_VOLUME, 1.0f); + +} + +void ijkff_set_stream_selected(IjkFFMediaPlayer *fp, int strean, bool selected) +{ + assert(fp); + ijkmp_set_stream_selected(fp->mp, strean, selected); +} + +float ijkff_get_float_property(IjkFFMediaPlayer *fp, int property, float dfault) +{ + assert(fp); + return ijkmp_get_property_float(fp->mp, property, dfault); +} + +int64_t ijkff_get_long_property(IjkFFMediaPlayer *fp, int property, int64_t dfault) +{ + assert(fp); + return ijkmp_get_property_int64(fp->mp, property, dfault); +} + + +void ijkff_set_option(IjkFFMediaPlayer *fp, const char *value, const char *key, int category) +{ + assert(fp); + ijkmp_set_option(fp->mp, category, key, value); +} + +void ijkff_set_int_option(IjkFFMediaPlayer *fp, int64_t value, const char *key, int category) +{ + assert(fp); + ijkmp_set_option_int(fp->mp, category, key, value); +} + + +void ijkff_set_event_cb(IjkFFMediaPlayer *fp, void *userdata, ijkff_event_cb cb) +{ + assert(fp); + fp->event_cb_data = userdata; + fp->event_cb = cb; +} + +int ijkplayer_overlay_draw(void *userdata, + int w, int h, int sar_num, int sar_den, + int planes, uint16_t *linesize, uint8_t **pixels) +{ + IjkFFMediaPlayer *fp = userdata; + int ret = -1; + if (fp->mp && fp->overlay_cb) { + IjkFFOverlay *overlay = &(fp->overlay); + overlay->w = w; + overlay->h = h; + overlay->sar_num = sar_num; + overlay->sar_den = sar_den; + overlay->planes = planes; + overlay->pitches = linesize; + overlay->pixels = pixels; + fp->overlay_cb(fp->overlay_cb_data, overlay); + ret = 0; + } + return ret; +} + +void ijkff_set_overlay_cb(IjkFFMediaPlayer *fp, void *userdata, ijkff_overlay_cb cb) +{ + assert(fp); + memset(&(fp->overlay), 0, sizeof(IjkFFOverlay)); + fp->overlay_cb = cb; + fp->overlay_cb_data = userdata; + ijkmp_set_video_callback(fp->mp, fp, ijkplayer_overlay_draw); +} \ No newline at end of file diff --git a/desktop/sources/ijkplayer_desktop.h b/desktop/sources/ijkplayer_desktop.h new file mode 100644 index 0000000000..0e54b78912 --- /dev/null +++ b/desktop/sources/ijkplayer_desktop.h @@ -0,0 +1,104 @@ +/***************************************************************************** +* ijkplayer_desktop.h +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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_DESKTOP_IJKPLAYER_DESKTOP_H +#define IJKPLAYER_DESKTOP_IJKPLAYER_DESKTOP_H + +#ifdef WIN32// Visual Studio specific macro +# ifdef BUILDING_IJK +# define IJK_API __declspec(dllexport) +# else +# define IJK_API __declspec(dllimport) +# endif +#else +# define IJK_API __attribute__ ((visibility("default"))) +#endif + + +#ifdef __cplusplus +exter "C" { +#endif + +#include +#include +#include + +typedef struct IjkFFMediaPlayer IjkFFMediaPlayer; + +typedef struct IjkFFOverlay { + int w; + int h; + uint32_t format; + int planes; + uint16_t *pitches; + uint8_t **pixels; + int sar_num; + int sar_den; +} IjkFFOverlay; + +typedef void(*ijkff_overlay_cb) (void *userdata, IjkFFOverlay* overlay); + +typedef void(*ijkff_event_cb) (void *userdata, int what, int arg1, int arg2, void *extra); + +IJK_API IjkFFMediaPlayer *ijkff_create(); + +IJK_API int ijkff_set_data_source(IjkFFMediaPlayer *fp, const char * url); +IJK_API int ijkff_prepare_async(IjkFFMediaPlayer *fp); +IJK_API int ijkff_start(IjkFFMediaPlayer *fp); +IJK_API int ijkff_stop(IjkFFMediaPlayer *fp); +IJK_API int ijkff_pause(IjkFFMediaPlayer *fp); +IJK_API int ijkff_reset(IjkFFMediaPlayer *fp); +IJK_API bool ijkff_is_playing(IjkFFMediaPlayer *fp); +IJK_API void ijkff_shutdown(IjkFFMediaPlayer *fp); + + +IJK_API int64_t ijkff_get_current_position(IjkFFMediaPlayer *fp); +IJK_API int64_t ijkff_get_duration(IjkFFMediaPlayer *fp); +IJK_API int ijkff_seek_to(IjkFFMediaPlayer *fp, int64_t msec); + +IJK_API void ijkff_set_loop(IjkFFMediaPlayer *fp, int loop); +IJK_API int ijkff_get_loop(IjkFFMediaPlayer *fp); + +IJK_API void ijkff_set_speed(IjkFFMediaPlayer *fp, float speed); + +IJK_API void ijkff_set_playback_volume(IjkFFMediaPlayer *fp, float volume); +IJK_API float ijkff_get_playback_volume(IjkFFMediaPlayer *fp); + +IJK_API void ijkff_set_stream_selected(IjkFFMediaPlayer *fp, int strean, bool selected); + +IJK_API float ijkff_get_float_property(IjkFFMediaPlayer *fp, int property, float dfault); +IJK_API int64_t ijkff_get_long_property(IjkFFMediaPlayer *fp, int property, int64_t dfault); + + +IJK_API void ijkff_set_option(IjkFFMediaPlayer *fp, const char *value, const char *key, int category); +IJK_API void ijkff_set_int_option(IjkFFMediaPlayer *fp, int64_t value, const char *key, int category); + + +IJK_API void ijkff_set_event_cb(IjkFFMediaPlayer *fp, void *userdata, ijkff_event_cb cb); +IJK_API void ijkff_set_overlay_cb(IjkFFMediaPlayer *fp, void *userdata, ijkff_overlay_cb cb); + +#ifdef __cplusplus +} +#endif + +#endif // IJKPLAYER_DESKTOP_IJKPLAYER_DESKTOP_H diff --git a/ijkmedia/CMakeLists.txt b/ijkmedia/CMakeLists.txt index e3cdb6e22a..f021e4b0aa 100644 --- a/ijkmedia/CMakeLists.txt +++ b/ijkmedia/CMakeLists.txt @@ -24,7 +24,7 @@ if (NOT DEFINED FIJKROOT_PATH) set(FIJKROOT_PATH ${CMAKE_CURRENT_LIST_DIR}/../) endif () -if(IJK_DESKTOP_MWL) +if(IJK_DESKTOP_UNI) add_subdirectory(portaudio) endif() diff --git a/ijkmedia/ijkplayer/CMakeLists.txt b/ijkmedia/ijkplayer/CMakeLists.txt index 8ed47efb85..49985cd3de 100644 --- a/ijkmedia/ijkplayer/CMakeLists.txt +++ b/ijkmedia/ijkplayer/CMakeLists.txt @@ -24,7 +24,6 @@ if (ANDROID) endif () endif () - set(BUILD_SOURCES ff_fferror.h ff_ffinc.h @@ -65,7 +64,6 @@ set(BUILD_SOURCES ijkavformat/ijkioprotocol.c ijkavformat/ijkioapplication.c ijkavformat/ijkiourlhook.c - ijkavformat/ijkasync.c ijkavformat/ijkurlhook.c ijkavformat/ijklongurl.c @@ -79,55 +77,72 @@ set(BUILD_SOURCES ijkavutil/ijkstl.cpp ) -set(ANDROID_IJKPLAYER_SOURCES +if(WIN32) + #list(REMOVE_ITEM BUILD_SOURCES + # ijkavformat/ijkiomanager.c + #) - ijkavformat/ijkioandroidio.c +endif() +set(ANDROID_IJKPLAYER_SOURCES + ijkavformat/ijkioandroidio.c android/ffmpeg_api_jni.c android/ijkplayer_android.c android/ijkplayer_jni.c - android/pipeline/ffpipeline_android.c android/pipeline/ffpipenode_android_mediacodec_vdec.c ) +set(DESKTOP_UNI_SOURCE + desktop/pipeline_underdesk.h + desktop/pipeline_underdesk.c + desktop/ijkplayer_underdesk.h + desktop/ijkplayer_underdesk.c +) if (ANDROID) set(BUILD_SOURCES ${BUILD_SOURCES} ${ANDROID_IJKPLAYER_SOURCES}) endif () -if (IJK_DESKTOP_MWL) - add_library(ijkplayer STATIC ${BUILD_SOURCES}) +if (IJK_DESKTOP_UNI) + set(BUILD_SOURCES ${BUILD_SOURCES} ${DESKTOP_UNI_SOURCE}) + add_library(ijkplayer_static STATIC ${BUILD_SOURCES}) + set(IJKPLAYER_LIB_NAME ijkplayer_static) else () add_library(ijkplayer SHARED ${BUILD_SOURCES}) + set(IJKPLAYER_LIB_NAME ijkplayer) endif () -target_include_directories(ijkplayer PRIVATE ${CMAKE_CURRENT_LIST_DIR}) -target_include_directories(ijkplayer PRIVATE ${CMAKE_CURRENT_LIST_DIR}/..) -target_include_directories(ijkplayer PRIVATE ${IJK_FFMPAG_BUILD_DIR}/include) +target_include_directories(${IJKPLAYER_LIB_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}) +target_include_directories(${IJKPLAYER_LIB_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/..) +target_include_directories(${IJKPLAYER_LIB_NAME} PRIVATE ${IJK_FFMPAG_BUILD_DIR}/include) -target_include_directories(ijkplayer PRIVATE ijkavformat) -target_include_directories(ijkplayer PRIVATE ijkavutil) -target_include_directories(ijkplayer PRIVATE pipeline) -target_include_directories(ijkplayer PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkj4a) +# message(FATAL_ERROR ${IJK_FFMPAG_BUILD_DIR}) + +target_include_directories(${IJKPLAYER_LIB_NAME} PRIVATE ijkavformat) +target_include_directories(${IJKPLAYER_LIB_NAME} PRIVATE ijkavutil) +target_include_directories(${IJKPLAYER_LIB_NAME} PRIVATE pipeline) +target_include_directories(${IJKPLAYER_LIB_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkj4a) if (WIN32) - target_include_directories(ijkplayer PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/../../include") + target_include_directories(${IJKPLAYER_LIB_NAME} PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/../../include") endif() -target_link_libraries(ijkplayer ijksdl) +if (NOT IJK_DESKTOP_UNI) + target_link_libraries(${IJKPLAYER_LIB_NAME} ijksdl) +endif() if (ANDROID) - target_link_libraries(ijkplayer ijksoundtouch) - target_link_libraries(ijkplayer ijkffmpeg) - target_link_libraries(ijkplayer android-ndk-profiler) - target_link_libraries(ijkplayer log) - target_link_libraries(ijkplayer android) + target_link_libraries(${IJKPLAYER_LIB_NAME} ijksoundtouch) + target_link_libraries(${IJKPLAYER_LIB_NAME} ijkffmpeg) + target_link_libraries(${IJKPLAYER_LIB_NAME} android-ndk-profiler) + target_link_libraries(${IJKPLAYER_LIB_NAME} log) + target_link_libraries(${IJKPLAYER_LIB_NAME} android) endif () if (NOT WIN32) - add_custom_command(TARGET ijkplayer + add_custom_command(TARGET ${IJKPLAYER_LIB_NAME} PRE_BUILD COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/version.sh ${CMAKE_CURRENT_LIST_DIR} ijkversion.h ) diff --git a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c b/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c new file mode 100644 index 0000000000..26fbf4e861 --- /dev/null +++ b/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c @@ -0,0 +1,57 @@ +/***************************************************************************** +* ijkplayer_desktop.c +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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 "ijkplayer_underdesk.h" +#include "pipeline_underdesk.h" +#include "../ijkplayer_internal.h" + +#include "ijksdl/desktop/ijksdl_desktop.h" + +IjkMediaPlayer *ijkmp_desktop_create(int(*msg_loop)(void *)) +{ + IjkMediaPlayer *mp = ijkmp_create(msg_loop); + if (!mp) + goto fail; + + mp->ffplayer->vout = SDL_Vout_Callback_Create(); + if (!mp->ffplayer->vout) + goto fail; + + mp->ffplayer->pipeline = ffpipeline_create_desktop(mp->ffplayer); + + return mp; +fail: + ijkmp_dec_ref_p(&mp); + return NULL; +} + +int ijkmp_set_video_callback(IjkMediaPlayer *mp, void *userdata, ijkmp_video_draw callback) +{ + if (!mp || !mp->ffplayer || !mp->ffplayer->vout) + return -1; + + SDL_Vout *vout = mp->ffplayer->vout; + SDL_Vout_Set_Callback(vout, userdata, callback); + return 0; +} + diff --git a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h b/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h new file mode 100644 index 0000000000..145d3e7c41 --- /dev/null +++ b/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h @@ -0,0 +1,38 @@ +/***************************************************************************** +* ijkplayer_desktop.h +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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_IJKMEDIA_IJKPLAYER_DESKUNDER_PLAYER_H +#define IJKPLAYER_IJKMEDIA_IJKPLAYER_DESKUNDER_PLAYER_H + +#include "../ijkplayer.h" + +IjkMediaPlayer *ijkmp_desktop_create(int(*msg_loop)(void *)); + +typedef int (*ijkmp_video_draw)(void *userdata, + int w, int h, int sar_num, int sar_den, + int planes, uint16_t *linesize, uint8_t **pixels); + +int ijkmp_set_video_callback(IjkMediaPlayer *mp, void *userdata, ijkmp_video_draw callback); + + +#endif //IJKPLAYER_IJKMEDIA_IJKPLAYER_DESKUNDER_PLAYER_H \ No newline at end of file diff --git a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.c b/ijkmedia/ijkplayer/desktop/pipeline_underdesk.c new file mode 100644 index 0000000000..dd138c6234 --- /dev/null +++ b/ijkmedia/ijkplayer/desktop/pipeline_underdesk.c @@ -0,0 +1,43 @@ +/***************************************************************************** +* pipeline_desktop.c +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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 "pipeline_underdesk.h" + +#include "../pipeline/ffpipeline_ffplay.h" +#include "ijksdl/desktop/ijksdl_aout_port_audio.h" + +static SDL_Aout *func_open_audio_output_l(IJKFF_Pipeline *pipeline, FFPlayer *ffp) +{ + SDL_Aout *aout = SDL_Aout_Port_Audio_Create(); + return aout; +} + + +IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp) +{ + IJKFF_Pipeline *pipeline = ffpipeline_create_from_ffplay(ffp); + if (pipeline) { + pipeline->func_open_audio_output = func_open_audio_output_l; + } + return pipeline; +} \ No newline at end of file diff --git a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.h b/ijkmedia/ijkplayer/desktop/pipeline_underdesk.h new file mode 100644 index 0000000000..23c4344a5d --- /dev/null +++ b/ijkmedia/ijkplayer/desktop/pipeline_underdesk.h @@ -0,0 +1,31 @@ +/***************************************************************************** +* pipeline_desktop.h +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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 IJKMEDIA_PLAYER_IJKPLAYER_DESKUNDER_PIPELINE_H +#define IJKMEDIA_PLAYER_IJKPLAYER_DESKUNDER_PIPELINE_H + +#include "../ff_ffpipeline.h" + +IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp); + +#endif // IJKMEDIA_PLAYER_IJKPLAYER_DESKUNDER_PIPELINE_H \ No newline at end of file diff --git a/ijkmedia/ijkplayer/ff_cmdutils.c b/ijkmedia/ijkplayer/ff_cmdutils.c index ea42cd4fda..023c690197 100644 --- a/ijkmedia/ijkplayer/ff_cmdutils.c +++ b/ijkmedia/ijkplayer/ff_cmdutils.c @@ -25,6 +25,7 @@ #include "ff_cmdutils.h" + #include "libavutil/display.h" #include "libavutil/eval.h" @@ -186,7 +187,7 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts) { - int i; + unsigned int i; AVDictionary **opts; if (!s->nb_streams) diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index ab5c0d39de..8b8d1faa2e 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -36,7 +36,10 @@ #include #include -#ifndef WIN32 +#ifdef WIN32 +#include +#include +#else #include #endif diff --git a/ijkmedia/ijkplayer/ff_ffplay_def.h b/ijkmedia/ijkplayer/ff_ffplay_def.h index 00f19f3c4d..178a61ead2 100755 --- a/ijkmedia/ijkplayer/ff_ffplay_def.h +++ b/ijkmedia/ijkplayer/ff_ffplay_def.h @@ -583,7 +583,7 @@ typedef struct FFPlayer { int audio_disable; int video_disable; int subtitle_disable; - const char* wanted_stream_spec[AVMEDIA_TYPE_NB]; + char* wanted_stream_spec[AVMEDIA_TYPE_NB]; int seek_by_bytes; int display_disable; int show_status; diff --git a/ijkmedia/ijkplayer/ijkavformat/ijkiocache.c b/ijkmedia/ijkplayer/ijkavformat/ijkiocache.c index 86a7f382b9..a60f4e8094 100644 --- a/ijkmedia/ijkplayer/ijkavformat/ijkiocache.c +++ b/ijkmedia/ijkplayer/ijkavformat/ijkiocache.c @@ -36,6 +36,8 @@ #include #ifndef WIN32 #include +#else +#include #endif #include diff --git a/ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c b/ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c index 3cea1ee69c..6063b62994 100644 --- a/ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c +++ b/ijkmedia/ijkplayer/ijkavformat/ijkiomanager.c @@ -31,6 +31,8 @@ #include #ifndef WIN32 #include +#else +#include #endif #define CONFIG_MAX_LINE 1024 diff --git a/ijkmedia/ijkplayer/ijkavformat/ijklivehook.c b/ijkmedia/ijkplayer/ijkavformat/ijklivehook.c index 07b03a7aa7..be1dad2a0f 100644 --- a/ijkmedia/ijkplayer/ijkavformat/ijklivehook.c +++ b/ijkmedia/ijkplayer/ijkavformat/ijklivehook.c @@ -195,7 +195,7 @@ static int ijklivehook_read_header(AVFormatContext *avf, AVDictionary **options) av_strstart(avf->filename, "ijklivehook:", &inner_url); c->io_control.size = sizeof(c->io_control); - strlcpy(c->io_control.url, inner_url, sizeof(c->io_control.url)); + av_strlcpy(c->io_control.url, inner_url, sizeof(c->io_control.url)); if (av_stristart(c->io_control.url, "rtmp", NULL) || av_stristart(c->io_control.url, "rtsp", NULL)) { diff --git a/ijkmedia/ijkplayer/ijkavformat/ijksegment.c b/ijkmedia/ijkplayer/ijkavformat/ijksegment.c index 3a1ed48542..69f04c0f50 100644 --- a/ijkmedia/ijkplayer/ijkavformat/ijksegment.c +++ b/ijkmedia/ijkplayer/ijkavformat/ijksegment.c @@ -53,7 +53,7 @@ static int ijksegment_open(URLContext *h, const char *arg, int flags, AVDictiona segment_index = (int)strtol(arg, NULL, 0); io_control.size = sizeof(io_control); io_control.segment_index = segment_index; - strlcpy(io_control.url, arg, sizeof(io_control.url)); + av_strlcpy(io_control.url, arg, sizeof(io_control.url)); if (app_ctx && io_control.segment_index < 0) { ret = AVERROR_EXTERNAL; diff --git a/ijkmedia/ijkplayer/ijkavutil/ijkdict.c b/ijkmedia/ijkplayer/ijkavutil/ijkdict.c index 9423f368ac..04c94208b8 100644 --- a/ijkmedia/ijkplayer/ijkavutil/ijkdict.c +++ b/ijkmedia/ijkplayer/ijkavutil/ijkdict.c @@ -27,6 +27,8 @@ #include #include +#include "libavutil/avstring.h" + struct IjkAVDictionary { int count; IjkAVDictionaryEntry *elems; @@ -117,9 +119,9 @@ int ijk_av_dict_set(IjkAVDictionary **pm, const char *key, const char *value, char *newval = (char *)calloc(1, len); if (!newval) goto err_out; - strlcat(newval, oldval, len); + av_strlcat(newval, oldval, len); ijk_av_freep(&oldval); - strlcat(newval, copy_value, len); + av_strlcat(newval, copy_value, len); m->elems[m->count].value = newval; ijk_av_freep(©_value); } diff --git a/ijkmedia/ijkplayer/ijkmeta.c b/ijkmedia/ijkplayer/ijkmeta.c index 10380b809b..239c651cca 100755 --- a/ijkmedia/ijkplayer/ijkmeta.c +++ b/ijkmedia/ijkplayer/ijkmeta.c @@ -69,7 +69,7 @@ void ijkmeta_destroy(IjkMediaMeta *meta) } if (meta->children) { - for(int i = 0; i < meta->children_count; ++i) { + for(size_t i = 0; i < meta->children_count; ++i) { IjkMediaMeta *child = meta->children[i]; if (child) { ijkmeta_destroy(child); @@ -192,7 +192,7 @@ void ijkmeta_set_avformat_context_l(IjkMediaMeta *meta, AVFormatContext *ic) ijkmeta_set_int64_l(meta, IJKM_KEY_BITRATE, ic->bit_rate); IjkMediaMeta *stream_meta = NULL; - for (int i = 0; i < ic->nb_streams; i++) { + for (unsigned int i = 0; i < ic->nb_streams; i++) { if (!stream_meta) ijkmeta_destroy_p(&stream_meta); diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index e27c7878b3..f6ddbe90a5 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -25,6 +25,10 @@ #include "ijkplayer_internal.h" #include "ijkversion.h" +#ifdef WIN32 +#include +#endif + #define MP_RET_IF_FAILED(ret) \ do { \ int retval = ret; \ @@ -318,7 +322,11 @@ void ijkmp_shutdown(IjkMediaPlayer *mp) void ijkmp_inc_ref(IjkMediaPlayer *mp) { assert(mp); +#ifdef WIN32 + InterlockedIncrement(&mp->ref_count); +#else __sync_fetch_and_add(&mp->ref_count, 1); +#endif } void ijkmp_dec_ref(IjkMediaPlayer *mp) @@ -326,7 +334,11 @@ void ijkmp_dec_ref(IjkMediaPlayer *mp) if (!mp) return; +#ifdef WIN32 + long ref_count = InterlockedDecrement(&mp->ref_count); +#else int ref_count = __sync_sub_and_fetch(&mp->ref_count, 1); +#endif // WIN32 if (ref_count == 0) { MPTRACE("ijkmp_dec_ref(): ref=0\n"); ijkmp_shutdown(mp); diff --git a/ijkmedia/ijkplayer/ijkplayer_internal.h b/ijkmedia/ijkplayer/ijkplayer_internal.h index 5e7935f2f0..eb1fe3c468 100644 --- a/ijkmedia/ijkplayer/ijkplayer_internal.h +++ b/ijkmedia/ijkplayer/ijkplayer_internal.h @@ -31,7 +31,11 @@ #include "ijkplayer.h" struct IjkMediaPlayer { +#ifdef WIN32 + volatile long ref_count; +#else volatile int ref_count; +#endif // WIN32 pthread_mutex_t mutex; FFPlayer *ffplayer; diff --git a/ijkmedia/ijkplayer/pipeline/ffpipeline_ffplay.h b/ijkmedia/ijkplayer/pipeline/ffpipeline_ffplay.h index ba332f2f18..9d5cb2bbaa 100644 --- a/ijkmedia/ijkplayer/pipeline/ffpipeline_ffplay.h +++ b/ijkmedia/ijkplayer/pipeline/ffpipeline_ffplay.h @@ -27,6 +27,6 @@ #include "../ff_ffpipeline.h" // There is no default aout for ffplay. -// IJKFF_Pipeline *ffpipeline_create_from_ffplay(FFPlayer *ffp); +IJKFF_Pipeline *ffpipeline_create_from_ffplay(FFPlayer *ffp); #endif diff --git a/ijkmedia/ijksdl/CMakeLists.txt b/ijkmedia/ijksdl/CMakeLists.txt index b701048375..3bebe63b7d 100644 --- a/ijkmedia/ijksdl/CMakeLists.txt +++ b/ijkmedia/ijksdl/CMakeLists.txt @@ -80,6 +80,14 @@ set(SDL_ANDROID_EXTRA_SOURCES android/ijksdl_vout_overlay_android_mediacodec.c ) +set(SDL_DESKTOP_UNI_SOURCES + desktop/ijksdl_desktop.h + desktop/ijksdl_aout_port_audio.h + desktop/ijksdl_aout_port_audio.c + desktop/ijksdl_vout_uni_callback.c + desktop/ijksdl_vout_uni_callback.h +) + set(GLES2_SOURCES ijksdl_egl.c gles2/color.c @@ -95,27 +103,35 @@ set(GLES2_SOURCES gles2/vsh/mvp.vsh.c ) + set(IJK_SDL_SOURCES ${BASE_SOURCES}) if (ANDROID) set(IJK_SDL_SOURCES ${IJK_SDL_SOURCES} ${SDL_ANDROID_EXTRA_SOURCES} ${GLES2_SOURCES}) endif () -if (IJK_DESKTOP_MWL) - add_library(ijksdl STATIC ${IJK_SDL_SOURCES}) +if (IJK_DESKTOP_UNI) + set(IJK_SDL_SOURCES ${IJK_SDL_SOURCES} ${SDL_DESKTOP_UNI_SOURCES}) + add_library(ijksdl_static STATIC ${IJK_SDL_SOURCES}) + set(IJKSDL_LIB_NAME ijksdl_static) else () add_library(ijksdl SHARED ${IJK_SDL_SOURCES}) + set(IJKSDL_LIB_NAME ijksdl) endif () -target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}) -target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}/..) +target_include_directories(${IJKSDL_LIB_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}) +target_include_directories(${IJKSDL_LIB_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/..) + +if(IJK_DESKTOP_UNI) + target_include_directories(${IJKSDL_LIB_NAME} PRIVATE "${IJKROOT_PATH}/ijkmedia/portaudio/include") +endif() if (WIN32) - target_include_directories(ijksdl PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/../../include") + target_include_directories(${IJKSDL_LIB_NAME} PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/../../include") endif() #include ffmpeg header files -target_include_directories(ijksdl PRIVATE ${IJK_FFMPAG_BUILD_DIR}/include) +target_include_directories(${IJKSDL_LIB_NAME} PRIVATE ${IJK_FFMPAG_BUILD_DIR}/include) if (ANDROID) # build cpufeatures as a static lib @@ -124,15 +140,15 @@ if (ANDROID) # include(AndroidNdkModules) # android_ndk_import_module_cpufeatures() - target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkyuv/include) - target_include_directories(ijksdl PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkj4a) + target_include_directories(${IJKSDL_LIB_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkyuv/include) + target_include_directories(${IJKSDL_LIB_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkj4a) endif () if (ANDROID) - target_link_libraries(ijksdl ijkffmpeg) - target_link_libraries(ijksdl ijkj4a) + target_link_libraries(${IJKSDL_LIB_NAME} ijkffmpeg) + target_link_libraries(${IJKSDL_LIB_NAME} ijkj4a) # target_link_libraries(ijksdl cpufeatures) - target_link_libraries(ijksdl yuv_static) - target_link_libraries(ijksdl log android OpenSLES EGL GLESv2) + target_link_libraries(${IJKSDL_LIB_NAME} yuv_static) + target_link_libraries(${IJKSDL_LIB_NAME} log android OpenSLES EGL GLESv2) endif () diff --git a/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c new file mode 100644 index 0000000000..4869ac7d4d --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c @@ -0,0 +1,167 @@ +/***************************************************************************** +* ijksdl_aout_port_audio.c +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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_aout_port_audio.h" + +#include "../ijksdl_misc.h" +#include "../ijksdl_stdinc.h" +#include "../ijksdl_log.h" +#include "../ijksdl_aout_internal.h" + +#include +#include + +static SDL_Class audio_port_class = { .name = "PortAudio" }; + +typedef struct SDL_Aout_Opaque +{ + PaStreamParameters outputParameters; + PaStream *stream; + int x; + + int channels; + void *userdata; + SDL_AudioCallback callback; +} SDL_Aout_Opaque; + + +int portAudioStreamCallback(const void *input, void *output, unsigned long frameCount, + const PaStreamCallbackTimeInfo* timeInfo, + PaStreamCallbackFlags statusFlags, void *userData) +{ + (void) input; + (void) timeInfo; + (void) statusFlags; + + SDL_Aout_Opaque *opaque = userData; + opaque->callback(opaque->userdata, output, frameCount * 2 * opaque->channels); + + return paContinue; +} +static int aout_open_audio_l(SDL_Aout *aout, const SDL_AudioSpec *desired, SDL_AudioSpec *obtained) +{ + assert(aout); + + SDL_Aout_Opaque *opaque = aout->opaque; + + opaque->outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device */ + if (opaque->outputParameters.device == paNoDevice) { + ALOGE("PortAudio Error: No default output device.\n"); + return -1; + } + + PaError err; + opaque->outputParameters.channelCount = desired->channels; /* stereo output */ + opaque->outputParameters.sampleFormat = paInt16; /* 32 bit floating point output */ + opaque->outputParameters.suggestedLatency = Pa_GetDeviceInfo(opaque->outputParameters.device )->defaultLowOutputLatency; + opaque->outputParameters.hostApiSpecificStreamInfo = NULL; + + + opaque->channels = desired->channels; + opaque->userdata = desired->userdata; + opaque->callback = desired->callback; + + if (obtained) { + memcpy(obtained, desired, sizeof(SDL_AudioSpec)); + obtained->size = 1024; + obtained->freq = desired->freq; + obtained->format = AUDIO_S16SYS; + } + + err = Pa_OpenStream( + &opaque->stream, + NULL, /* no input */ + &opaque->outputParameters, + desired->freq, + 128, + paClipOff, /* we won't output out of range samples so don't bother clipping them */ + portAudioStreamCallback, /* no callback, use blocking API */ + opaque); + + return 0; +} + +static void aout_close_audio_l(SDL_Aout *aout) +{ + SDL_Aout_Opaque *opaque = aout->opaque; + + if (opaque->stream) { + Pa_CloseStream(opaque->stream); + opaque->stream = NULL; + } +} + +static void aout_free_l(SDL_Aout *aout) +{ + if (!aout) + return; + aout_close_audio_l(aout); + SDL_Aout_FreeInternal(aout); + ALOGI("aout_uni, aout_free_l, aout(%p)\n", aout); +} + +static int aout_pause_audio_l(SDL_Aout *aout, int pause_on) +{ + SDL_Aout_Opaque *opaque = aout->opaque; + if (opaque->stream){ + if (pause_on) + Pa_StopStream(opaque->stream); + else + Pa_StartStream(opaque->stream); + } + ALOGI("aout_uni, aout_pause_audio, aout(%p) pause(%d)\n", aout, pause_on); + return 0; +} + +static void aout_flush_audio_l(SDL_Aout *aout) +{ + SDL_Aout_Opaque *opaque = aout->opaque; +} + +static double aout_get_latency_seconds_l(SDL_Aout *aout) +{ + // SDL_Aout_Opaque *opaque = aout->opaque; + return 0.0; +} + + +SDL_Aout *SDL_Aout_Port_Audio_Create() +{ + PaError err = Pa_Initialize(); + if (err != paNoError) + return NULL; + SDL_Aout *aout = SDL_Aout_CreateInternal(sizeof(SDL_Aout_Opaque)); + if (!aout) + return NULL; + + aout->opaque_class = &audio_port_class; + aout->free_l = aout_free_l; + aout->open_audio = aout_open_audio_l; + aout->pause_audio = aout_pause_audio_l; + aout->close_audio = aout_close_audio_l; + + // aout->func_get_latency_seconds = aout_get_latency_seconds_l; + // aout->flush_audio = aout_flush_audio_l; + + return aout; +} diff --git a/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.h b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.h new file mode 100644 index 0000000000..31fd716299 --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.h @@ -0,0 +1,31 @@ +/***************************************************************************** +* ijksdl_aout_port_audio.h +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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_IJKMEDIA_IJKSDL_DESKTOP_AOUT_PORT_AUDIO_H +#define IJKPLAYER_IJKMEDIA_IJKSDL_DESKTOP_AOUT_PORT_AUDIO_H + +#include "../ijksdl_aout.h" + +SDL_Aout *SDL_Aout_Port_Audio_Create(); + +#endif //IJKPLAYER_IJKMEDIA_IJKSDL_DESKTOP_AOUT_PORT_AUDIO_H diff --git a/ijkmedia/ijksdl/desktop/ijksdl_desktop.h b/ijkmedia/ijksdl/desktop/ijksdl_desktop.h new file mode 100644 index 0000000000..6701e72688 --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_desktop.h @@ -0,0 +1,32 @@ +/***************************************************************************** +* ijksdl_desktop.c +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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_IJKMEDIA_IJKSDL_DESKTOP_H +#define IJKPLAYER_IJKMEDIA_IJKSDL_DESKTOP_H + +#include "../ijksdl.h" + +#include "ijksdl_aout_port_audio.h" +#include "ijksdl_vout_uni_callback.h" + +#endif // IJKPLAYER_IJKMEDIA_IJKSDL_DESKTOP_H diff --git a/ijkmedia/ijksdl/desktop/ijksdl_vout_uni_callback.c b/ijkmedia/ijksdl/desktop/ijksdl_vout_uni_callback.c new file mode 100644 index 0000000000..329774e6eb --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_vout_uni_callback.c @@ -0,0 +1,98 @@ +/***************************************************************************** +* ijksdl_vout_callback.c +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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_IJKMEDIA_IJKSDL_DESKTOP_VOUT_CALLBACK_H +#define IJKPLAYER_IJKMEDIA_IJKSDL_DESKTOP_VOUT_CALLBACK_H + +#include "ijksdl_vout_uni_callback.h" +#include "../ijksdl_vout_internal.h" +#include "../ffmpeg/ijksdl_vout_overlay_ffmpeg.h" + +struct SDL_Vout_Opaque { + int frame_format; + ijkmp_vout_callback cb; + void *cb_data; +}; + +static SDL_Class uni_vout_class = { .name = "uni_vout" }; + + +int SDL_Vout_Set_Callback(SDL_Vout *vout, void *userdata, ijkmp_vout_callback callback) +{ + if (vout && vout->opaque_class == &uni_vout_class) { + SDL_LockMutex(vout->mutex); + SDL_Vout_Opaque *opaque = vout->opaque; + opaque->cb_data = userdata; + opaque->cb = callback; + SDL_UnlockMutex(vout->mutex); + } + return 0; +} + +static int func_display_overlay(SDL_Vout *vout, SDL_VoutOverlay *overlay) +{ + SDL_LockMutex(vout->mutex); + + SDL_Vout_Opaque *opaque = vout->opaque; + int ret = -1; + if (opaque->cb) { + ret = opaque->cb(opaque->cb_data, overlay->w, overlay->h, + overlay->sar_num, overlay->sar_den, + overlay->planes, overlay->pitches, overlay->pixels); + } + SDL_UnlockMutex(vout->mutex); + return ret; +} + + +static SDL_VoutOverlay *func_create_overlay(int width, int height, int frame_format, SDL_Vout *vout) +{ + SDL_LockMutex(vout->mutex); + SDL_VoutOverlay *overlay = SDL_VoutFFmpeg_CreateOverlay(width, height, frame_format, vout); + SDL_UnlockMutex(vout->mutex); + return overlay; +} + + +static void func_free_l(SDL_Vout *vout) +{ + if (!vout) + return; + + SDL_Vout_FreeInternal(vout); +} + + + +SDL_Vout *SDL_Vout_Callback_Create() +{ + SDL_Vout *vout = SDL_Vout_CreateInternal(sizeof(SDL_Vout_Opaque)); + vout->opaque_class = &uni_vout_class; + vout->overlay_format = SDL_FCC_RGBA; + vout->create_overlay = func_create_overlay; + vout->display_overlay = func_display_overlay; + vout->free_l = func_free_l; + return vout; +} + +#endif // IJKPLAYER_IJKMEDIA_IJKSDL_DESKTOP_VOUT_CALLBACK_H \ No newline at end of file diff --git a/ijkmedia/ijksdl/desktop/ijksdl_vout_uni_callback.h b/ijkmedia/ijksdl/desktop/ijksdl_vout_uni_callback.h new file mode 100644 index 0000000000..82a70c6f0c --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_vout_uni_callback.h @@ -0,0 +1,34 @@ +/***************************************************************************** +* ijksdl_vout_callback.h +***************************************************************************** +* +* copyright (c) 2019 befovy +* +* 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_vout.h" + +SDL_Vout *SDL_Vout_Callback_Create(); + + +typedef int(*ijkmp_vout_callback)(void *userdata, + int w, int h, int sar_num, int sar_den, + int planes, uint16_t *linesize, uint8_t **pixels); + + +int SDL_Vout_Set_Callback(SDL_Vout *vout, void *userdata, ijkmp_vout_callback callback); \ No newline at end of file diff --git a/ijkmedia/ijksdl/ijksdl_aout.c b/ijkmedia/ijksdl/ijksdl_aout.c index 401fd44807..9779455952 100644 --- a/ijkmedia/ijksdl/ijksdl_aout.c +++ b/ijkmedia/ijksdl/ijksdl_aout.c @@ -55,7 +55,7 @@ void SDL_AoutSetStereoVolume(SDL_Aout *aout, float left_volume, float right_volu void SDL_AoutCloseAudio(SDL_Aout *aout) { if (aout && aout->close_audio) - return aout->close_audio(aout); + aout->close_audio(aout); } void SDL_AoutFree(SDL_Aout *aout) diff --git a/ijkmedia/ijksdl/ijksdl_mutex.c b/ijkmedia/ijksdl/ijksdl_mutex.c index 4d3ee07cf9..615a519b53 100644 --- a/ijkmedia/ijksdl/ijksdl_mutex.c +++ b/ijkmedia/ijksdl/ijksdl_mutex.c @@ -25,12 +25,15 @@ #include "ijksdl_mutex.h" #include #include +#include #ifndef WIN32 #include #else #include #endif // !WIN32 +#include "libavutil/time.h" + #include "ijksdl_inc_internal.h" SDL_mutex *SDL_CreateMutex(void) @@ -135,7 +138,6 @@ int SDL_CondBroadcast(SDL_cond *cond) int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, uint32_t ms) { int retval; - struct timeval delta; struct timespec abstime; assert(cond); @@ -144,10 +146,16 @@ int SDL_CondWaitTimeout(SDL_cond *cond, SDL_mutex *mutex, uint32_t ms) return -1; } +#ifdef WIN32 + int64_t current_us = av_gettime(); + abstime.tv_sec = (current_us / 1000000) + (ms / 1000); + abstime.tv_nsec = (long)(current_us % 1000000 + (ms % 1000) * 1000) * 1000; +#else + struct timeval delta; gettimeofday(&delta, NULL); - abstime.tv_sec = delta.tv_sec + (ms / 1000); abstime.tv_nsec = (delta.tv_usec + (ms % 1000) * 1000) * 1000; +#endif if (abstime.tv_nsec > 1000000000) { abstime.tv_sec += 1; abstime.tv_nsec -= 1000000000; diff --git a/ijkmedia/ijksdl/ijksdl_thread.c b/ijkmedia/ijksdl/ijksdl_thread.c index bf58eb8bd2..765572d90f 100644 --- a/ijkmedia/ijksdl/ijksdl_thread.c +++ b/ijkmedia/ijksdl/ijksdl_thread.c @@ -33,13 +33,17 @@ #include "ijksdl/android/ijksdl_android_jni.h" #endif +#include "libavutil/avstring.h" + #if !defined(__APPLE__) // using ios implement for autorelease static void *SDL_RunThread(void *data) { SDL_Thread *thread = data; +#ifndef WIN32 ALOGI("SDL_RunThread: [%d] %s\n", (int)gettid(), thread->name); pthread_setname_np(pthread_self(), thread->name); +#endif thread->retval = thread->func(thread->data); #ifdef __ANDROID__ SDL_JNI_DetachThreadEnv(); @@ -51,7 +55,7 @@ SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data { thread->func = fn; thread->data = data; - strlcpy(thread->name, name, sizeof(thread->name) - 1); + av_strlcpy(thread->name, name, sizeof(thread->name) - 1); int retval = pthread_create(&thread->id, NULL, SDL_RunThread, thread); if (retval) return NULL; @@ -62,6 +66,7 @@ SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data int SDL_SetThreadPriority(SDL_ThreadPriority priority) { +#ifndef WIN32 struct sched_param sched; int policy; pthread_t thread = pthread_self(); @@ -83,6 +88,7 @@ int SDL_SetThreadPriority(SDL_ThreadPriority priority) ALOGE("pthread_setschedparam() failed"); return -1; } +#endif return 0; } @@ -98,6 +104,7 @@ void SDL_WaitThread(SDL_Thread *thread, int *status) *status = thread->retval; } +#ifndef WIN32 void SDL_DetachThread(SDL_Thread *thread) { assert(thread); @@ -106,3 +113,4 @@ void SDL_DetachThread(SDL_Thread *thread) pthread_detach(thread->id); } +#endif \ No newline at end of file diff --git a/ijkmedia/ijksdl/ijksdl_timer.c b/ijkmedia/ijksdl/ijksdl_timer.c index a3b23d9894..ca53eac2da 100644 --- a/ijkmedia/ijksdl/ijksdl_timer.c +++ b/ijkmedia/ijksdl/ijksdl_timer.c @@ -29,10 +29,13 @@ #ifndef WIN32 #include #include +#else +#include "libavutil/time.h" #endif // !WIN32 + #if defined(__APPLE__) #include @@ -48,6 +51,9 @@ int nanosleep(const struct timespec *, struct timespec *) __DARWIN_ALIAS_C(nanos void SDL_Delay(Uint32 ms) { +#ifdef WIN32 + av_usleep(ms * 1000); +#else // WIN32 int was_error; struct timespec elapsed, tv; @@ -59,6 +65,7 @@ void SDL_Delay(Uint32 ms) tv.tv_nsec = elapsed.tv_nsec; was_error = nanosleep(&tv, &elapsed); } while (was_error); +#endif } Uint64 SDL_GetTickHR(void) @@ -85,6 +92,8 @@ Uint64 SDL_GetTickHR(void) gettimeofday(&now, NULL); clock = now.tv_sec * 1000 + now.tv_usec / 1000; } +#elif defined(WIN32) + clock = av_gettime() / 1000; #endif return (clock); } diff --git a/ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.c b/ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.h b/ijkmedia/ijksdl/mwl/ijksdl_aout_mwl.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ijkmedia/ijksdl/mwl/ijksdl_mwl.h b/ijkmedia/ijksdl/mwl/ijksdl_mwl.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.c b/ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.c deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.h b/ijkmedia/ijksdl/mwl/ijksdl_vout_mwl.h deleted file mode 100644 index e69de29bb2..0000000000 From 8da29bec7b53579ba7cb4d8e8176b1be219227d0 Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 11 Nov 2019 11:04:36 +0800 Subject: [PATCH 066/163] feat: ijkplayer desktop works on Mac OS --- desktop/.gitignore | 4 +- desktop/CMakeLists.txt | 78 ++++++++++++------- desktop/sources/ijkplayer_demo.c | 15 +++- ijkmedia/ijksdl/CMakeLists.txt | 8 ++ .../ijksdl/desktop/ijksdl_aout_port_audio.c | 3 +- 5 files changed, 77 insertions(+), 31 deletions(-) diff --git a/desktop/.gitignore b/desktop/.gitignore index d04b7579dd..2a3f028c36 100644 --- a/desktop/.gitignore +++ b/desktop/.gitignore @@ -1,3 +1,5 @@ contrib/ffmpeg contrib/ -.vs/ \ No newline at end of file +.vs/ +cmake-build-debug/ +cmake-build-release/ \ No newline at end of file diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 5014f37f0f..af36ca0311 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -39,36 +39,36 @@ elseif (${CMAKE_BUILD_TYPE} STREQUAL "Debug") add_definitions(-DDEBUG) endif () -if(CMAKE_SIZEOF_VOID_P EQUAL 8) +if (CMAKE_SIZEOF_VOID_P EQUAL 8) # 64 bits message(STATUS "CMAKE SIZEOF POIONT 8") set(IJK_X64 on) set(IJK_X86 off) -elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) +elseif (CMAKE_SIZEOF_VOID_P EQUAL 4) # 32 bits message(STATUS "cmake sizeof point 4") set(IJK_X64 off) set(IJK_X86 on) -endif() +endif () set(IJK_DESKTOP_CONTRIB_PATH ${IJKROOT_PATH}/desktop/contrib) -if(IJK_X64) +if (IJK_X64) set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x64) -elseif(IJK_X86) +elseif (IJK_X86) set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x86) -endif() +endif () if (WIN32) - if(IJK_X64) + if (IJK_X64) set(IJK_DESKTOP_PTHREAD_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/pthreads-w32-2-9-1-release/Pre-built.2/lib/x64) - elseif(IJK_X86) + elseif (IJK_X86) set(IJK_DESKTOP_PTHREAD_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/pthreads-w32-2-9-1-release/Pre-built.2/lib/x86) - endif() + endif () add_definitions(-DHAVE_STRUCT_TIMESPEC) -endif() +endif () if (NOT DEFINED IJK_FFMPAG_BUILD_DIR) message(FATAL_ERROR "Can not find ffmpeg build output: ${IJK_FFMPAG_BUILD_DIR}") @@ -81,8 +81,8 @@ add_definitions(-DIJK_DESKTOP_UNI) set(IJK_DESKTOP_UNI ON) set(FIJKPLAYER_SOURCE - ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.h - ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.c + ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.h + ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.c ) add_library(IjkPlayer SHARED ${FIJKPLAYER_SOURCE}) @@ -96,10 +96,11 @@ target_include_directories(IjkPlayer PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/. target_link_libraries(IjkPlayer ijksdl_static ijkplayer_static) -target_compile_options(ijksdl_static PRIVATE /W3 /we4013) -target_compile_options(ijkplayer_static PRIVATE /W3 /we4013) -target_compile_options(IjkPlayer PRIVATE /W3 /we4013) - +if (WIN32) + target_compile_options(ijksdl_static PRIVATE /W3 /we4013) + target_compile_options(ijkplayer_static PRIVATE /W3 /we4013) + target_compile_options(IjkPlayer PRIVATE /W3 /we4013) +endif () add_library(avcodec STATIC IMPORTED) set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libavcodec.a) @@ -118,24 +119,49 @@ set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DI if (WIN32) add_library(pthread STATIC IMPORTED) - set_target_properties(pthread PROPERTIES - IMPORTED_LOCATION ${IJK_DESKTOP_PTHREAD_BUILD_DIR}/pthreadVC2.lib - ) + set_target_properties(pthread PROPERTIES IMPORTED_LOCATION ${IJK_DESKTOP_PTHREAD_BUILD_DIR}/pthreadVC2.lib) target_link_libraries(IjkPlayer pthread) -endif() +endif () target_link_libraries(IjkPlayer avcodec avformat avutil swresample swscale) target_link_libraries(IjkPlayer portaudio_static) target_compile_definitions(IjkPlayer PRIVATE -DBUILDING_IJK=1) -if(WIN32) +if (WIN32) target_link_libraries(IjkPlayer ws2_32 secur32 avrt shlwapi advapi32 shell32 kernel32 user32) -endif() +elseif (APPLE) + # brew install openssl + set(OPENSSL_ROOT_DIR /usr/local/opt/openssl) + find_package(OpenSSL REQUIRED) + target_link_libraries(IjkPlayer ${OPENSSL_LIBRARIES}) + target_link_libraries(IjkPlayer z) + + macro(add_framework appname fwname) + find_library(FRAMEWORK_${fwname} + NAMES ${fwname} + PATHS ${CMAKE_OSX_SYSROOT}/System/Library + PATH_SUFFIXES Frameworks NO_DEFAULT_PATH) + + if (${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND) + MESSAGE(ERROR ": Framework ${fwname} not found") + else () + target_link_libraries(${appname} "${FRAMEWORK_${fwname}}") + MESSAGE(STATUS "Framework ${fwname} found") + endif () + endmacro(add_framework) + + add_framework(IjkPlayer CoreVideo) + add_framework(IjkPlayer CoreMedia) + add_framework(IjkPlayer VideoToolbox) + add_framework(IjkPlayer Security) +endif () -add_executable(IjkDemo - ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c -) +add_executable(IjkDemo ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c) -target_link_libraries(IjkDemo IjkPlayer user32) +if (WIN32) + target_link_libraries(IjkDemo IjkPlayer user32) +else () + target_link_libraries(IjkDemo IjkPlayer) +endif () diff --git a/desktop/sources/ijkplayer_demo.c b/desktop/sources/ijkplayer_demo.c index 0571ec2bf6..66524a38ef 100644 --- a/desktop/sources/ijkplayer_demo.c +++ b/desktop/sources/ijkplayer_demo.c @@ -26,7 +26,11 @@ #include #include +#ifdef WIN32 #include +#else +#include +#endif void demo_event_cb (void *userdata, int what, int arg1, int arg2, void *extra) { @@ -42,7 +46,8 @@ void demo_overlay_cb (void *userdata, IjkFFOverlay* overlay) int main(int argc, char *argv[]) { IjkFFMediaPlayer *fp = ijkff_create(); - ijkff_set_data_source(fp, "D:\\demo.MKV"); + // ijkff_set_data_source(fp, "D:\\demo.MKV"); + ijkff_set_data_source(fp, "http://jiasu-33.ivneu.cn/20190702/%E5%88%9D%E6%81%8B%E6%9C%AA%E6%BB%A1/2000kb/hls/index.m3u8"); ijkff_prepare_async(fp); ijkff_start(fp); @@ -52,10 +57,16 @@ int main(int argc, char *argv[]) int x = 0; while(x < 10) { x ++; +#if WIN32 Sleep(1000); +#else + usleep(1000 * 1000); +#endif } ijkff_stop(fp); ijkff_shutdown(fp); - system("pause"); + + printf("press any key to quit\n"); + getchar(); return 0; } \ No newline at end of file diff --git a/ijkmedia/ijksdl/CMakeLists.txt b/ijkmedia/ijksdl/CMakeLists.txt index 3bebe63b7d..8c60483194 100644 --- a/ijkmedia/ijksdl/CMakeLists.txt +++ b/ijkmedia/ijksdl/CMakeLists.txt @@ -88,6 +88,11 @@ set(SDL_DESKTOP_UNI_SOURCES desktop/ijksdl_vout_uni_callback.h ) +set(SDL_MAC_OSX_SOURCES + ${IJKROOT_PATH}/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.h + ${IJKROOT_PATH}/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m +) + set(GLES2_SOURCES ijksdl_egl.c gles2/color.c @@ -112,6 +117,9 @@ endif () if (IJK_DESKTOP_UNI) set(IJK_SDL_SOURCES ${IJK_SDL_SOURCES} ${SDL_DESKTOP_UNI_SOURCES}) + if (APPLE AND IJK_DESKTOP_UNI) + set(IJK_SDL_SOURCES ${IJK_SDL_SOURCES} ${SDL_MAC_OSX_SOURCES}) + endif () add_library(ijksdl_static STATIC ${IJK_SDL_SOURCES}) set(IJKSDL_LIB_NAME ijksdl_static) else () diff --git a/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c index 4869ac7d4d..4920351347 100644 --- a/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c +++ b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c @@ -120,7 +120,7 @@ static void aout_free_l(SDL_Aout *aout) ALOGI("aout_uni, aout_free_l, aout(%p)\n", aout); } -static int aout_pause_audio_l(SDL_Aout *aout, int pause_on) +static void aout_pause_audio_l(SDL_Aout *aout, int pause_on) { SDL_Aout_Opaque *opaque = aout->opaque; if (opaque->stream){ @@ -130,7 +130,6 @@ static int aout_pause_audio_l(SDL_Aout *aout, int pause_on) Pa_StartStream(opaque->stream); } ALOGI("aout_uni, aout_pause_audio, aout(%p) pause(%d)\n", aout, pause_on); - return 0; } static void aout_flush_audio_l(SDL_Aout *aout) From f1b495a488c2a8b585f65dd69857fd625039a755 Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 11 Nov 2019 11:13:34 +0800 Subject: [PATCH 067/163] feat: ijkff_get_loop return value --- desktop/sources/ijkplayer_desktop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/sources/ijkplayer_desktop.c b/desktop/sources/ijkplayer_desktop.c index ae6971bb5e..99853a4c9c 100644 --- a/desktop/sources/ijkplayer_desktop.c +++ b/desktop/sources/ijkplayer_desktop.c @@ -156,7 +156,7 @@ void ijkff_set_loop(IjkFFMediaPlayer *fp, int loop) int ijkff_get_loop(IjkFFMediaPlayer *fp) { assert(fp); - ijkmp_get_loop(fp->mp); + return ijkmp_get_loop(fp->mp); } From f8ad2be2cabaa3efd836980ec9b6ae6e509f0a59 Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 11 Nov 2019 12:38:47 +0800 Subject: [PATCH 068/163] feat: add ijkff_log_level and ijkff_version --- desktop/sources/ijkplayer_demo.c | 2 +- desktop/sources/ijkplayer_desktop.c | 21 ++++++++++---- desktop/sources/ijkplayer_desktop.h | 45 ++++++++++++++++++++++++----- 3 files changed, 53 insertions(+), 15 deletions(-) diff --git a/desktop/sources/ijkplayer_demo.c b/desktop/sources/ijkplayer_demo.c index 66524a38ef..17f1733ebc 100644 --- a/desktop/sources/ijkplayer_demo.c +++ b/desktop/sources/ijkplayer_demo.c @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) { IjkFFMediaPlayer *fp = ijkff_create(); // ijkff_set_data_source(fp, "D:\\demo.MKV"); - ijkff_set_data_source(fp, "http://jiasu-33.ivneu.cn/20190702/%E5%88%9D%E6%81%8B%E6%9C%AA%E6%BB%A1/2000kb/hls/index.m3u8"); + ijkff_set_data_source(fp, "http://sample-videos.com/video123/mp4/480/big_buck_bunny_480p_10mb.mp4"); ijkff_prepare_async(fp); ijkff_start(fp); diff --git a/desktop/sources/ijkplayer_desktop.c b/desktop/sources/ijkplayer_desktop.c index 99853a4c9c..f9686dd02f 100644 --- a/desktop/sources/ijkplayer_desktop.c +++ b/desktop/sources/ijkplayer_desktop.c @@ -29,8 +29,7 @@ #include "ijkplayer/ff_ffmsg_queue.h" -struct IjkFFMediaPlayer -{ +struct IjkFFMediaPlayer { IjkMediaPlayer *mp; void *event_cb_data; ijkff_event_cb event_cb; @@ -73,7 +72,7 @@ IjkFFMediaPlayer *ijkff_create() } -int ijkff_set_data_source(IjkFFMediaPlayer *fp, const char * url) +int ijkff_set_data_source(IjkFFMediaPlayer *fp, const char *url) { assert(fp); return ijkmp_set_data_source(fp->mp, url); @@ -153,14 +152,14 @@ void ijkff_set_loop(IjkFFMediaPlayer *fp, int loop) ijkmp_set_loop(fp->mp, loop); } -int ijkff_get_loop(IjkFFMediaPlayer *fp) +int ijkff_get_loop(IjkFFMediaPlayer *fp) { assert(fp); return ijkmp_get_loop(fp->mp); } -void ijkff_set_speed(IjkFFMediaPlayer *fp, float speed)\ +void ijkff_set_speed(IjkFFMediaPlayer *fp, float speed) { assert(fp); ijkmp_set_playback_rate(fp->mp, speed); @@ -246,4 +245,14 @@ void ijkff_set_overlay_cb(IjkFFMediaPlayer *fp, void *userdata, ijkff_overlay_cb fp->overlay_cb = cb; fp->overlay_cb_data = userdata; ijkmp_set_video_callback(fp->mp, fp, ijkplayer_overlay_draw); -} \ No newline at end of file +} + +void ijkff_log_level(int level) +{ + ijkmp_global_set_log_level(level); +} + +const char *ijkff_version() +{ + return ijkmp_version(); +} diff --git a/desktop/sources/ijkplayer_desktop.h b/desktop/sources/ijkplayer_desktop.h index 0e54b78912..47b0acb0c1 100644 --- a/desktop/sources/ijkplayer_desktop.h +++ b/desktop/sources/ijkplayer_desktop.h @@ -30,14 +30,24 @@ # else # define IJK_API __declspec(dllimport) # endif -#else +#else # define IJK_API __attribute__ ((visibility("default"))) -#endif +#endif +#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 + #ifdef __cplusplus exter "C" { -#endif +#endif #include #include @@ -56,49 +66,68 @@ typedef struct IjkFFOverlay { int sar_den; } IjkFFOverlay; -typedef void(*ijkff_overlay_cb) (void *userdata, IjkFFOverlay* overlay); +typedef void(*ijkff_overlay_cb)(void *userdata, IjkFFOverlay *overlay); -typedef void(*ijkff_event_cb) (void *userdata, int what, int arg1, int arg2, void *extra); +typedef void(*ijkff_event_cb)(void *userdata, int what, int arg1, int arg2, void *extra); IJK_API IjkFFMediaPlayer *ijkff_create(); -IJK_API int ijkff_set_data_source(IjkFFMediaPlayer *fp, const char * url); +IJK_API int ijkff_set_data_source(IjkFFMediaPlayer *fp, const char *url); + IJK_API int ijkff_prepare_async(IjkFFMediaPlayer *fp); + IJK_API int ijkff_start(IjkFFMediaPlayer *fp); + IJK_API int ijkff_stop(IjkFFMediaPlayer *fp); + IJK_API int ijkff_pause(IjkFFMediaPlayer *fp); + IJK_API int ijkff_reset(IjkFFMediaPlayer *fp); + IJK_API bool ijkff_is_playing(IjkFFMediaPlayer *fp); + IJK_API void ijkff_shutdown(IjkFFMediaPlayer *fp); IJK_API int64_t ijkff_get_current_position(IjkFFMediaPlayer *fp); + IJK_API int64_t ijkff_get_duration(IjkFFMediaPlayer *fp); + IJK_API int ijkff_seek_to(IjkFFMediaPlayer *fp, int64_t msec); IJK_API void ijkff_set_loop(IjkFFMediaPlayer *fp, int loop); -IJK_API int ijkff_get_loop(IjkFFMediaPlayer *fp); + +IJK_API int ijkff_get_loop(IjkFFMediaPlayer *fp); IJK_API void ijkff_set_speed(IjkFFMediaPlayer *fp, float speed); IJK_API void ijkff_set_playback_volume(IjkFFMediaPlayer *fp, float volume); + IJK_API float ijkff_get_playback_volume(IjkFFMediaPlayer *fp); IJK_API void ijkff_set_stream_selected(IjkFFMediaPlayer *fp, int strean, bool selected); IJK_API float ijkff_get_float_property(IjkFFMediaPlayer *fp, int property, float dfault); + IJK_API int64_t ijkff_get_long_property(IjkFFMediaPlayer *fp, int property, int64_t dfault); IJK_API void ijkff_set_option(IjkFFMediaPlayer *fp, const char *value, const char *key, int category); + IJK_API void ijkff_set_int_option(IjkFFMediaPlayer *fp, int64_t value, const char *key, int category); IJK_API void ijkff_set_event_cb(IjkFFMediaPlayer *fp, void *userdata, ijkff_event_cb cb); + IJK_API void ijkff_set_overlay_cb(IjkFFMediaPlayer *fp, void *userdata, ijkff_overlay_cb cb); + +IJK_API void ijkff_log_level(int level); + +IJK_API const char *ijkff_version(); + #ifdef __cplusplus } -#endif +#endif #endif // IJKPLAYER_DESKTOP_IJKPLAYER_DESKTOP_H From 6c6c80f5b347a882a8563bdc7b4d5ebdc01dd097 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 15 Nov 2019 21:36:09 +0800 Subject: [PATCH 069/163] chore: add mac ffmpeg module --- config/module-mac.sh | 241 +++++++++++++++++++++++++++++++ desktop/sources/ijkplayer_demo.c | 7 +- osx/tools/do-compile-ffmpeg.sh | 2 +- 3 files changed, 245 insertions(+), 5 deletions(-) create mode 100755 config/module-mac.sh diff --git a/config/module-mac.sh b/config/module-mac.sh new file mode 100755 index 0000000000..1c30d22488 --- /dev/null +++ b/config/module-mac.sh @@ -0,0 +1,241 @@ +#! /usr/bin/env bash + +#-------------------- +# Standard options: +export COMMON_FF_CFG_FLAGS= +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --prefix=PREFIX" + +# Licensing options: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-gpl" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-version3" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-nonfree" + +# Configuration options: +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-static" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-shared" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-small" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-runtime-cpudetect" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-gray" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-swscale-alpha" + +# Program options: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-programs" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffmpeg" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffplay" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffprobe" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffserver" + +# Documentation options: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-doc" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-htmlpages" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-manpages" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-podpages" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-txtpages" + +# Component options: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-avdevice" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-avcodec" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-avformat" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-avutil" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-swresample" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-swscale" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-postproc" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-avfilter" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-avresample" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-pthreads" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-w32threads" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-os2threads" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-network" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-dct" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-dwt" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-lsp" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-lzo" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mdct" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-rdft" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-fft" + +# Hardware accelerators: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-dxva2" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vaapi" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vda" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vdpau" + +# Individual component options: +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-everything" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-encoders" + +# ./configure --list-decoders +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-decoders" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=aac" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=aac_latm" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=flv" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=h263" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=h263i" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=h263p" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=h264" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=mp3*" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=vp6" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=vp6a" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=vp6f" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=hevc" + +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-hwaccels" + +# ./configure --list-muxers +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-muxers" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-muxer=mpegts" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-muxer=mp4" + +# ./configure --list-demuxers +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-demuxers" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=aac" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=concat" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=data" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=flv" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=hls" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=latm" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=live_flv" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=loas" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=m4v" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mov" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mp3" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpegps" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpegts" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=mpegvideo" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-demuxer=hevc" + +# ./configure --list-parsers +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-parsers" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=aac" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=aac_latm" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=ac3" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=h263" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=h264" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-parser=hevc" + +# ./configure --list-bsf +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-bsfs" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mjpeg2jpeg" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mjpeg2jpeg" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mjpega_dump_header" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mov2textsub" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=text2movsub" + +# ./configure --list-protocols +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocols" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=async" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=bluray" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=ffrtmpcrypt" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=ffrtmphttp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=gopher" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=librtmp*" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=libssh" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=mmsh" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=mmst" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=rtmp*" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=rtmp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocol=rtmpt" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=rtp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=sctp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=srtp" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-protocol=unix" + +# +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-devices" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-filters" + +# External library support: +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-iconv" +# ... + +# Advanced options (experts only): +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --cross-prefix=${FF_CROSS_PREFIX}-" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-cross-compile" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --sysroot=PATH" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --sysinclude=PATH" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --target-os=TAGET_OS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --target-exec=CMD" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --target-path=DIR" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --toolchain=NAME" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --nm=NM" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --ar=AR" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --as=AS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --yasmexe=EXE" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --cc=CC" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --cxx=CXX" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --dep-cc=DEPCC" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --ld=LD" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-cc=HOSTCC" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-cflags=HCFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-cppflags=HCPPFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-ld=HOSTLD" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-ldflags=HLDFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-libs=HLIBS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --host-os=OS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-cflags=ECFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-cxxflags=ECFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-ldflags=ELDFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-libs=ELIBS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --extra-version=STRING" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --optflags=OPTFLAGS" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --build-suffix=SUFFIX" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --malloc-prefix=PREFIX" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --progs-suffix=SUFFIX" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --arch=ARCH" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --cpu=CPU" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-pic" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-sram" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-thumb" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-symver" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-hardcoded-tables" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-safe-bitstream-reader" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-memalign-hack" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-lto" + +# Optimization options (experts only): +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-asm" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-altivec" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-amd3dnow" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-amd3dnowext" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mmx" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mmxext" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse2" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse3" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ssse3" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse4" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-sse42" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-avx" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-fma4" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-armv5te" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-armv6" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-armv6t2" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vfp" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-neon" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vis" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-inline-asm" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-yasm" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mips32r2" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mipsdspr1" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mipsdspr2" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-mipsfpu" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-fast-unaligned" + +# Developer options (useful when working on FFmpeg itself): +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-coverage" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-debug" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-debug=LEVEL" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-optimizations" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-extra-warnings" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-stripping" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --assert-level=level" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-memory-poisoning" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --valgrind=VALGRIND" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-ftrapv" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --samples=PATH" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-xmm-clobber-test" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-random" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-random" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-random=LIST" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-random=LIST" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --random-seed=VALUE" diff --git a/desktop/sources/ijkplayer_demo.c b/desktop/sources/ijkplayer_demo.c index 17f1733ebc..c4b331bf9c 100644 --- a/desktop/sources/ijkplayer_demo.c +++ b/desktop/sources/ijkplayer_demo.c @@ -34,19 +34,18 @@ void demo_event_cb (void *userdata, int what, int arg1, int arg2, void *extra) { - printf("demo event cb what %5d:(%5d %5d)\n", what, arg1, arg2); + // printf("demo event cb what %5d:(%5d %5d)\n", what, arg1, arg2); } void demo_overlay_cb (void *userdata, IjkFFOverlay* overlay) { - printf("demo overlay cb what %p:(%5d %5d)\n", overlay, overlay->h, overlay->w); + // printf("demo overlay cb what %p:(%5d %5d)\n", overlay, overlay->h, overlay->w); } int main(int argc, char *argv[]) { IjkFFMediaPlayer *fp = ijkff_create(); - // ijkff_set_data_source(fp, "D:\\demo.MKV"); ijkff_set_data_source(fp, "http://sample-videos.com/video123/mp4/480/big_buck_bunny_480p_10mb.mp4"); ijkff_prepare_async(fp); ijkff_start(fp); @@ -55,7 +54,7 @@ int main(int argc, char *argv[]) ijkff_set_overlay_cb(fp, NULL, demo_overlay_cb); int x = 0; - while(x < 10) { + while(x < 100) { x ++; #if WIN32 Sleep(1000); diff --git a/osx/tools/do-compile-ffmpeg.sh b/osx/tools/do-compile-ffmpeg.sh index 11e4bfe85e..0d77d0bebe 100755 --- a/osx/tools/do-compile-ffmpeg.sh +++ b/osx/tools/do-compile-ffmpeg.sh @@ -51,7 +51,7 @@ FF_TAGET_OS="darwin" # ffmpeg build params export COMMON_FF_CFG_FLAGS= -source $FF_BUILD_ROOT/../../config/module.sh +source $FF_BUILD_ROOT/../../config/module-mac.sh FFMPEG_CFG_FLAGS= FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $COMMON_FF_CFG_FLAGS" From c9f1c718c6946258019a0dddd563ace6e49f8538 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 15 Nov 2019 22:03:46 +0800 Subject: [PATCH 070/163] chore: update news.md --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index 1822c84125..59136513db 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ tag next -------------------------------- +tag f0.4.0 +-------------------------------- +- ijkplayer: add osx desktop support, use portaudio for audio output + tag f0.3.8 -------------------------------- - ijkplayer: ios vout add render to pixelbuffer, off screen buffer From f0404747bedf4b6f99929cc193bf3bbfd6ea511d Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 16 Nov 2019 22:14:00 +0800 Subject: [PATCH 071/163] fix: invalid audio channel number for port audio --- ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c index 4920351347..bd1b80d789 100644 --- a/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c +++ b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c @@ -71,21 +71,24 @@ static int aout_open_audio_l(SDL_Aout *aout, const SDL_AudioSpec *desired, SDL_A } PaError err; - opaque->outputParameters.channelCount = desired->channels; /* stereo output */ opaque->outputParameters.sampleFormat = paInt16; /* 32 bit floating point output */ opaque->outputParameters.suggestedLatency = Pa_GetDeviceInfo(opaque->outputParameters.device )->defaultLowOutputLatency; opaque->outputParameters.hostApiSpecificStreamInfo = NULL; - opaque->channels = desired->channels; opaque->userdata = desired->userdata; opaque->callback = desired->callback; + if (desired->channels > 2) + opaque->channels = 2; + + opaque->outputParameters.channelCount = opaque->channels; if (obtained) { memcpy(obtained, desired, sizeof(SDL_AudioSpec)); obtained->size = 1024; obtained->freq = desired->freq; obtained->format = AUDIO_S16SYS; + obtained->channels = (Uint8)opaque->channels; } err = Pa_OpenStream( @@ -98,7 +101,11 @@ static int aout_open_audio_l(SDL_Aout *aout, const SDL_AudioSpec *desired, SDL_A portAudioStreamCallback, /* no callback, use blocking API */ opaque); - return 0; + if (err != paNoError) { + ALOGE("audio open failed: %s", Pa_GetErrorText(err)); + } + + return err; } static void aout_close_audio_l(SDL_Aout *aout) From 1629f874bee484b2999afdf9976a8cd26eedd0df Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 16 Nov 2019 22:36:11 +0800 Subject: [PATCH 072/163] feat: notify current position option --- ijkmedia/ijkplayer/ff_ffmsg.h | 1 + ijkmedia/ijkplayer/ff_ffplay.c | 20 +++++++++++++++++++- ijkmedia/ijkplayer/ff_ffplay_def.h | 4 ++++ ijkmedia/ijkplayer/ff_ffplay_options.h | 6 +++++- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/ijkmedia/ijkplayer/ff_ffmsg.h b/ijkmedia/ijkplayer/ff_ffmsg.h index c5c4cd89d4..2196cb7b57 100755 --- a/ijkmedia/ijkplayer/ff_ffmsg.h +++ b/ijkmedia/ijkplayer/ff_ffmsg.h @@ -47,6 +47,7 @@ #define FFP_MSG_BUFFERING_UPDATE 502 /* arg1 = buffering head position in time, arg2 = minimum percent in time or bytes */ #define FFP_MSG_BUFFERING_BYTES_UPDATE 503 /* arg1 = cached data in bytes, arg2 = high water mark */ #define FFP_MSG_BUFFERING_TIME_UPDATE 504 /* arg1 = cached duration in milliseconds, arg2 = high water mark */ +#define FFP_MSG_CURRENT_POSITION_UPDATE 510 /* arg1 = current position in milliseconds */ #define FFP_MSG_SEEK_COMPLETE 600 /* arg1 = seek position, arg2 = error */ #define FFP_MSG_PLAYBACK_STATE_CHANGED 700 #define FFP_MSG_TIMED_TEXT 800 diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index 8b8d1faa2e..923dbafc38 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -77,6 +77,7 @@ #include "ff_ffpipeline.h" #include "ff_ffpipenode.h" #include "ff_ffplay_debug.h" +#include "ff_ffplay_options.h" #include "ijkmeta.h" #include "ijkversion.h" #include "ijkplayer.h" @@ -879,6 +880,17 @@ static size_t parse_ass_subtitle(const char *ass, char *output) return 0; } +static void ffp_clock_msg_notify_cycle(FFPlayer *ffp, int64_t time_ms) +{ + if (ffp->enable_position_notify && + (time_ms < 0 || time_ms - ffp->clock_notify_time > NOTIFY_KEY_MSG_PER_MILLISECONDS)) { + ffp->clock_notify_time = time_ms; + int64_t position = ffp_get_current_position_l(ffp); + ffp_notify_msg2(ffp, FFP_MSG_CURRENT_POSITION_UPDATE, (int) position); + } +} + + static void video_image_display2(FFPlayer *ffp) { VideoState *is = ffp->is; @@ -1364,7 +1376,10 @@ static void video_refresh(FFPlayer *opaque, double *remaining_time) last_duration = vp_duration(is, lastvp, vp); delay = compute_target_delay(ffp, last_duration, is); - time= av_gettime_relative()/1000000.0; + int64_t time_us = av_gettime_relative(); + if (!is->audio_st) + ffp_clock_msg_notify_cycle(ffp, time_us / 1000); + time = time_us / 1000000.0; if (isnan(is->frame_timer) || time < is->frame_timer) is->frame_timer = time; if (time < is->frame_timer + delay) { @@ -2653,6 +2668,7 @@ static void sdl_audio_callback(void *opaque, Uint8 *stream, int len) } ffp->audio_callback_time = av_gettime_relative(); + ffp_clock_msg_notify_cycle(ffp, ffp->audio_callback_time / 1000); if (ffp->pf_playback_rate_changed) { ffp->pf_playback_rate_changed = 0; @@ -4803,6 +4819,8 @@ void ffp_check_buffering_l(FFPlayer *ffp) if (is->buffer_indicator_queue && is->buffer_indicator_queue->nb_packets > 0) { if ( (is->audioq.nb_packets >= MIN_MIN_FRAMES || is->audio_stream < 0 || is->audioq.abort_request) && (is->videoq.nb_packets >= MIN_MIN_FRAMES || is->video_stream < 0 || is->videoq.abort_request)) { + if (buf_percent < 100) + ffp_notify_msg3(ffp, FFP_MSG_BUFFERING_UPDATE, (int)buf_time_position, 100); ffp_toggle_buffering(ffp, 0); } } diff --git a/ijkmedia/ijkplayer/ff_ffplay_def.h b/ijkmedia/ijkplayer/ff_ffplay_def.h index 178a61ead2..21c4aedbe0 100755 --- a/ijkmedia/ijkplayer/ff_ffplay_def.h +++ b/ijkmedia/ijkplayer/ff_ffplay_def.h @@ -82,6 +82,8 @@ #define FAST_BUFFERING_CHECK_PER_MILLISECONDS (50) #define MAX_RETRY_CONVERT_IMAGE (3) +#define NOTIFY_KEY_MSG_PER_MILLISECONDS (100) + #define MAX_QUEUE_SIZE (15 * 1024 * 1024) #define MAX_ACCURATE_SEEK_TIMEOUT (5000) #ifdef FFP_MERGE @@ -590,6 +592,8 @@ typedef struct FFPlayer { int av_sync_type; int64_t start_time; int64_t duration; + int64_t clock_notify_time; + int enable_position_notify; int fast; int genpts; int lowres; diff --git a/ijkmedia/ijkplayer/ff_ffplay_options.h b/ijkmedia/ijkplayer/ff_ffplay_options.h index 900743dad9..fc0bef7c26 100644 --- a/ijkmedia/ijkplayer/ff_ffplay_options.h +++ b/ijkmedia/ijkplayer/ff_ffplay_options.h @@ -24,7 +24,9 @@ #ifndef FFPLAY__FF_FFPLAY_OPTIONS_H #define FFPLAY__FF_FFPLAY_OPTIONS_H -#define OPTION_OFFSET(x) offsetof(FFPlayer, x) +#include "ff_ffplay_def.h" + +#define OPTION_OFFSET(x) ((int)offsetof(FFPlayer, x)) #define OPTION_INT(default__, min__, max__) \ .type = AV_OPT_TYPE_INT, \ { .i64 = default__ }, \ @@ -166,6 +168,8 @@ static const AVOption ffp_context_options[] = { OPTION_OFFSET(async_init_decoder), OPTION_INT(0, 0, 1) }, { "video-mime-type", "default video mime type", OPTION_OFFSET(video_mime_type), OPTION_STR(NULL) }, + { "enable-position-notify", "enable adjective current position notify", + OPTION_OFFSET(enable_position_notify), OPTION_INT(0, 0, 1) }, // iOS only options { "videotoolbox", "VideoToolbox: enable", From b59e93eb6fbea04b3379a9cde323ce4a9d56d226 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 16 Nov 2019 22:55:33 +0800 Subject: [PATCH 073/163] chore: release 0.4.1 --- NEWS.md | 5 +++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 2 +- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index 59136513db..b1ace7e580 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,10 @@ tag next -------------------------------- +tag f0.4.1 +-------------------------------- +- desktop: fix invalid audio channel number for portaudio +- ijkplayer: add current position msg option + tag f0.4.0 -------------------------------- - ijkplayer: add osx desktop support, use portaudio for audio output diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 4358a36d80..8cf664e7b6 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.3.8 -VERSION_CODE=000308 +VERSION_NAME=0.4.1 +VERSION_CODE=000401 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index f790287aa7..639adb0884 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.3.8" + spec.version = "0.4.1" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 7b74de863d..6fe96ef67d 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.8 + 0.4.1 CFBundleSignature ???? CFBundleVersion - 000308 + 000401 LSRequiresIPhoneOS UIFileSharingEnabled From 862404743981a740c5e1d0adfb1a34b43b592973 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 16 Nov 2019 23:00:27 +0800 Subject: [PATCH 074/163] chore: update pod spec --- ios/CocoaPodsPub/FIJKPlayer.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 639adb0884..11524704d1 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.3.8/IJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.4.1/IJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files From 38da35876fea1b333fa0088ae3d7fb21eb2ef44c Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 16 Nov 2019 23:25:35 +0800 Subject: [PATCH 075/163] fix: missing import iOS header --- .../IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h index 4fe406430a..aadd46e724 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h @@ -24,8 +24,9 @@ #include "ijkplayer/ijkplayer.h" #import "IJKSDLGLView.h" -// #import "IJKSDLFboGLView.h" - +#if IJK_IOS +#import "IJKSDLFboGLView.h" +#endif // ref_count is 1 after open IjkMediaPlayer *ijkmp_ios_create(int (*msg_loop)(void*)); From aeecbe3d0b940543b442d8a823be104b4efbadd4 Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 18 Nov 2019 17:31:38 +0800 Subject: [PATCH 076/163] fix: missing buffering update and position notify --- .vscode/settings.json | 9 +++++++++ NEWS.md | 3 ++- android/ijkplayer/gradle.properties | 4 ++-- .../ijk/media/example/widget/media/IjkVideoView.java | 1 + .../java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java | 1 + ijkmedia/ijkplayer/android/ijkplayer_jni.c | 1 + ijkmedia/ijkplayer/ff_ffplay.c | 1 + ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 9 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..44d190d122 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "search.exclude": { + "**/ijkplayer-arm64/**": true, + "**/ijkplayer-armv5/**": true, + "**/ijkplayer-armv7a/**": true, + "**/ijkplayer-x86/**": true, + "**/ijkplayer-x86_64/**": true, + } +} diff --git a/NEWS.md b/NEWS.md index b1ace7e580..eacd3e8a21 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,9 +1,10 @@ tag next -------------------------------- -tag f0.4.1 +tag f0.4.2 -------------------------------- - desktop: fix invalid audio channel number for portaudio - ijkplayer: add current position msg option +- ijkplayer: notify buffering update 100 percent tag f0.4.0 -------------------------------- diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 8cf664e7b6..fdd8e60457 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.4.1 -VERSION_CODE=000401 +VERSION_NAME=0.4.2 +VERSION_CODE=000402 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/widget/media/IjkVideoView.java b/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/widget/media/IjkVideoView.java index cc3f002d82..1685c31453 100755 --- a/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/widget/media/IjkVideoView.java +++ b/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/widget/media/IjkVideoView.java @@ -1067,6 +1067,7 @@ public IMediaPlayer createPlayer(int playerType) { } ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "framedrop", 1); ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "start-on-prepared", 0); + // ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "enable-position-notify", 1); ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "http-detect-range-support", 0); diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java index 9554de6cc8..7fd81e23f6 100755 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java @@ -115,6 +115,7 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer { public static final int IJK_MSG_BUFFERING_START = 500; public static final int IJK_MSG_BUFFERING_END = 501; public static final int IJK_MSG_BUFFERING_UPDATE = 502; + public static final int IJK_MSG_CURRENT_POSITION_UPDATE = 510; public static final int IJK_MSG_SEEK_COMPLETE = 600; public static final int IJK_MSG_TIMED_TEXT = 800; public static final int IJK_MSG_ACCURATE_SEEK_COMPLETE = 900; diff --git a/ijkmedia/ijkplayer/android/ijkplayer_jni.c b/ijkmedia/ijkplayer/android/ijkplayer_jni.c index e0bb7ab1a6..6001bf2374 100755 --- a/ijkmedia/ijkplayer/android/ijkplayer_jni.c +++ b/ijkmedia/ijkplayer/android/ijkplayer_jni.c @@ -987,6 +987,7 @@ static void message_loop_n(JNIEnv *env, IjkMediaPlayer *mp) post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); break; case FFP_MSG_BUFFERING_UPDATE: + case FFP_MSG_CURRENT_POSITION_UPDATE: // MPTRACE("FFP_MSG_BUFFERING_UPDATE: %d, %d", msg.arg1, msg.arg2); // post_event(env, weak_thiz, MEDIA_BUFFERING_UPDATE, msg.arg1, msg.arg2); post_event(env, weak_thiz, msg.what, msg.arg1, msg.arg2); diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index 923dbafc38..5e70b6791a 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -3545,6 +3545,7 @@ static int read_thread(void *arg) av_strerror(ffp->error, error_msg, AV_ERROR_MAX_STRING_SIZE); ffp_notify_msg4(ffp, FFP_MSG_ERROR, ffp->error, 0, error_msg, AV_ERROR_MAX_STRING_SIZE); } else { + ffp_clock_msg_notify_cycle(ffp, -1); av_log(ffp, AV_LOG_INFO, "ffp_toggle_buffering: completed: OK\n"); ffp_notify_msg1(ffp, FFP_MSG_COMPLETED); } diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 11524704d1..5b7278b22c 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.4.1" + spec.version = "0.4.2" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.4.1/IJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.4.2/IJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 6fe96ef67d..6cbcba9b97 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.4.1 + 0.4.2 CFBundleSignature ???? CFBundleVersion - 000401 + 000402 LSRequiresIPhoneOS UIFileSharingEnabled From 30b8baa52f5de50cb997189be472ee7fe513c1c1 Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 18 Nov 2019 17:43:56 +0800 Subject: [PATCH 077/163] fix: add missing constant --- NEWS.md | 2 +- android/ijkplayer/gradle.properties | 4 ++-- .../java/tv/danmaku/ijk/media/player/IjkEventListener.java | 1 + ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/NEWS.md b/NEWS.md index eacd3e8a21..a482e748ad 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ tag next -------------------------------- -tag f0.4.2 +tag f0.4.3 -------------------------------- - desktop: fix invalid audio channel number for portaudio - ijkplayer: add current position msg option diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index fdd8e60457..e2af4d1c04 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.4.2 -VERSION_CODE=000402 +VERSION_NAME=0.4.3 +VERSION_CODE=000403 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java index 1274036d65..163a3f8302 100644 --- a/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java +++ b/android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkEventListener.java @@ -24,6 +24,7 @@ public interface IjkEventListener { int BUFFERING_UPDATE = 502; int BUFFERING_BYTES_UPDATE = 503; int BUFFERING_TIME_UPDATE = 504; + int CURRENT_POSITION_UPDATE = 510; int SEEK_COMPLETE = 600; int PLAYBACK_STATE_CHANGED = 700; diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 5b7278b22c..b5e7256405 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.4.2" + spec.version = "0.4.3" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.4.2/IJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.4.3/IJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 6cbcba9b97..9657171a13 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.4.2 + 0.4.3 CFBundleSignature ???? CFBundleVersion - 000402 + 000403 LSRequiresIPhoneOS UIFileSharingEnabled From 35d8cbddb2050fc78c24e6e7523fe80baf502b52 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 22 Nov 2019 15:21:04 +0800 Subject: [PATCH 078/163] fix: call start with start-on-prepared=0 fix https://github.com/befovy/fijkplayer/issues/90 --- ijkmedia/ijkplayer/ff_ffplay.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index 5e70b6791a..5ed8b11453 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -3372,6 +3372,10 @@ static int read_thread(void *arg) SDL_Delay(20); } } + if (is->pause_req && ffp->start_on_prepared) { + ffp->auto_resume = true; + } + if (ffp->auto_resume) { ffp_notify_msg1(ffp, FFP_REQ_START); ffp->auto_resume = 0; From fc7e199585f905fbc5d65190cd933fd2e4e2f32d Mon Sep 17 00:00:00 2001 From: befovy Date: Tue, 26 Nov 2019 16:18:02 +0800 Subject: [PATCH 079/163] feat: add libyuv for desktop to convert images\frames --- desktop/CMakeLists.txt | 2 +- ijkmedia/CMakeLists.txt | 1 + ijkmedia/ijksdl/CMakeLists.txt | 1 + ijkmedia/ijksdl/ffmpeg/abi_all/image_convert.c | 18 ++++++++++++++++-- .../ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c | 4 ++-- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index af36ca0311..326eb1bdd8 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -93,7 +93,7 @@ target_include_directories(IjkPlayer PRIVATE ${IJKROOT_PATH}/ijkmedia) target_include_directories(IjkPlayer PRIVATE ${IJK_FFMPAG_BUILD_DIR}/include) target_include_directories(IjkPlayer PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/../../include") -target_link_libraries(IjkPlayer ijksdl_static ijkplayer_static) +target_link_libraries(IjkPlayer ijksdl_static ijkplayer_static yuv) if (WIN32) diff --git a/ijkmedia/CMakeLists.txt b/ijkmedia/CMakeLists.txt index f021e4b0aa..e788df3132 100644 --- a/ijkmedia/CMakeLists.txt +++ b/ijkmedia/CMakeLists.txt @@ -26,6 +26,7 @@ endif () if(IJK_DESKTOP_UNI) add_subdirectory(portaudio) + add_subdirectory(ijkyuv) endif() add_subdirectory(ijksdl) diff --git a/ijkmedia/ijksdl/CMakeLists.txt b/ijkmedia/ijksdl/CMakeLists.txt index 8c60483194..731e57a13c 100644 --- a/ijkmedia/ijksdl/CMakeLists.txt +++ b/ijkmedia/ijksdl/CMakeLists.txt @@ -132,6 +132,7 @@ target_include_directories(${IJKSDL_LIB_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/ if(IJK_DESKTOP_UNI) target_include_directories(${IJKSDL_LIB_NAME} PRIVATE "${IJKROOT_PATH}/ijkmedia/portaudio/include") + target_include_directories(${IJKSDL_LIB_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/../ijkyuv/include) endif() if (WIN32) diff --git a/ijkmedia/ijksdl/ffmpeg/abi_all/image_convert.c b/ijkmedia/ijksdl/ffmpeg/abi_all/image_convert.c index d48a92761a..1b0aac6da2 100644 --- a/ijkmedia/ijksdl/ffmpeg/abi_all/image_convert.c +++ b/ijkmedia/ijksdl/ffmpeg/abi_all/image_convert.c @@ -22,7 +22,7 @@ *****************************************************************************/ #include "../ijksdl_image_convert.h" -#if defined(__ANDROID__) +#if defined(__ANDROID__) || defined(IJK_DESKTOP_UNI) #include "libyuv.h" #endif @@ -30,7 +30,7 @@ int ijk_image_convert(int width, int height, enum AVPixelFormat dst_format, uint8_t **dst_data, int *dst_linesize, enum AVPixelFormat src_format, const uint8_t **src_data, const int *src_linesize) { -#if defined(__ANDROID__) +#if defined(__ANDROID__) || defined(IJK_DESKTOP_UNI) switch (src_format) { case AV_PIX_FMT_YUV420P: case AV_PIX_FMT_YUVJ420P: // FIXME: 9 not equal to AV_PIX_FMT_YUV420P, but a workaround @@ -49,6 +49,20 @@ int ijk_image_convert(int width, int height, src_data[2], src_linesize[2], dst_data[0], dst_linesize[0], width, height); + case AV_PIX_FMT_BGR32_1: + return I420ToARGB( + src_data[0], src_linesize[0], + src_data[1], src_linesize[1], + src_data[2], src_linesize[2], + dst_data[0], dst_linesize[0], + width, height); + case AV_PIX_FMT_RGB32_1: + return I420ToABGR( + src_data[0], src_linesize[0], + src_data[1], src_linesize[1], + src_data[2], src_linesize[2], + dst_data[0], dst_linesize[0], + width, height); default: break; } diff --git a/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c b/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c index c22f8633aa..56c2588ce6 100644 --- a/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c +++ b/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c @@ -202,10 +202,10 @@ static int func_fill_frame(SDL_VoutOverlay *overlay, const AVFrame *frame) dst_format = AV_PIX_FMT_RGB565; break; case SDL_FCC_BGRA: - dst_format = AV_PIX_FMT_BGRA; + dst_format = AV_PIX_FMT_BGR32_1; break; case SDL_FCC_RGBA: - dst_format = AV_PIX_FMT_RGBA; + dst_format = AV_PIX_FMT_RGB32_1; break; default: ALOGE("SDL_VoutFFmpeg_ConvertPicture: unexpected overlay format %s(%d)", From 3160c766545f0190ada8d61def0baa9591010a7c Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 28 Nov 2019 15:58:18 +0800 Subject: [PATCH 080/163] feat: notify rotate degree for video toolbox --- ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h | 1 + .../ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h index 24503ca004..1bac037b46 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMediaPlayer.h @@ -39,6 +39,7 @@ typedef NS_ENUM(NSInteger, IJKMPEventType) { IJKMPET_BUFFERING_START = 500, IJKMPET_BUFFERING_END = 501, IJKMPET_BUFFERING_UPDATE = 502, + IJKMPET_CURRENT_POSITION_UPDATE = 510, IJKMPET_PLAYBACK_STATE_CHANGED = 700, }; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m index 6c742d05f6..861e06390f 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/ffpipenode_ios_videotoolbox_vdec.m @@ -52,6 +52,8 @@ int videotoolbox_video_thread(void *arg) Decoder *d = &is->viddec; int ret = 0; + ffp_notify_msg2(ffp, FFP_MSG_VIDEO_ROTATION_CHANGED, ffp_get_video_rotate_degrees(ffp)); + for (;;) { if (is->abort_request || d->queue->abort_request) { From 77bd4a4c7774b7497b47452ef2e573d6bf9b274b Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 28 Nov 2019 16:30:06 +0800 Subject: [PATCH 081/163] chore(release): release f0.4.4 --- NEWS.md | 6 ++++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index a482e748ad..091e2043b1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,11 @@ tag next -------------------------------- +tag f0.4.4 +-------------------------------- +- desktop: add libyuv for YUV2RGB +- ijkplayer: iOS videotoolbox notify rotate msg +- fix: call start after preparAsync may cause pause state + tag f0.4.3 -------------------------------- - desktop: fix invalid audio channel number for portaudio diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index e2af4d1c04..8f323baa5c 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.4.3 -VERSION_CODE=000403 +VERSION_NAME=0.4.4 +VERSION_CODE=000404 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index b5e7256405..ef540a0e1e 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.4.3" + spec.version = "0.4.4" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.4.3/IJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.4.4/IJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 9657171a13..188c74cebc 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.4.3 + 0.4.4 CFBundleSignature ???? CFBundleVersion - 000403 + 000404 LSRequiresIPhoneOS UIFileSharingEnabled From 7dc4c97612c74cceb298e9147715ccc3b3b3d11c Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 5 Jan 2020 13:16:04 +0800 Subject: [PATCH 082/163] refactor(desktop): rename desktop source file merge ijkplayer_underdesk to pipeline_desktop --- desktop/CMakeLists.txt | 6 +-- desktop/sources/ijkplayer_desktop.c | 3 +- desktop/sources/ijkplayer_desktop.h | 36 ++++++++++------ ijkmedia/CMakeLists.txt | 3 ++ ijkmedia/ijkplayer/CMakeLists.txt | 6 +-- ...kplayer_underdesk.c => pipeline_desktop.c} | 30 +++++++++++-- ...kplayer_underdesk.h => pipeline_desktop.h} | 14 +++--- .../ijkplayer/desktop/pipeline_underdesk.c | 43 ------------------- .../ijkplayer/desktop/pipeline_underdesk.h | 31 ------------- 9 files changed, 69 insertions(+), 103 deletions(-) rename ijkmedia/ijkplayer/desktop/{ijkplayer_underdesk.c => pipeline_desktop.c} (73%) rename ijkmedia/ijkplayer/desktop/{ijkplayer_underdesk.h => pipeline_desktop.h} (77%) delete mode 100644 ijkmedia/ijkplayer/desktop/pipeline_underdesk.c delete mode 100644 ijkmedia/ijkplayer/desktop/pipeline_underdesk.h diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 326eb1bdd8..2b29b633a7 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -157,11 +157,11 @@ elseif (APPLE) add_framework(IjkPlayer Security) endif () -add_executable(IjkDemo ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c) +add_executable(tuidemo ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c) if (WIN32) - target_link_libraries(IjkDemo IjkPlayer user32) + target_link_libraries(tuidemo IjkPlayer user32) else () - target_link_libraries(IjkDemo IjkPlayer) + target_link_libraries(tuidemo IjkPlayer) endif () diff --git a/desktop/sources/ijkplayer_desktop.c b/desktop/sources/ijkplayer_desktop.c index f9686dd02f..ae083d3043 100644 --- a/desktop/sources/ijkplayer_desktop.c +++ b/desktop/sources/ijkplayer_desktop.c @@ -25,7 +25,7 @@ #include #include "ijkplayer_desktop.h" -#include "ijkplayer/desktop/ijkplayer_underdesk.h" +#include "ijkplayer/desktop/pipeline_desktop.h" #include "ijkplayer/ff_ffmsg_queue.h" @@ -175,7 +175,6 @@ float ijkff_get_playback_volume(IjkFFMediaPlayer *fp) { assert(fp); return ijkmp_get_property_float(fp->mp, FFP_PROP_FLOAT_PLAYBACK_VOLUME, 1.0f); - } void ijkff_set_stream_selected(IjkFFMediaPlayer *fp, int strean, bool selected) diff --git a/desktop/sources/ijkplayer_desktop.h b/desktop/sources/ijkplayer_desktop.h index 47b0acb0c1..0c875bf26b 100644 --- a/desktop/sources/ijkplayer_desktop.h +++ b/desktop/sources/ijkplayer_desktop.h @@ -24,16 +24,32 @@ #ifndef IJKPLAYER_DESKTOP_IJKPLAYER_DESKTOP_H #define IJKPLAYER_DESKTOP_IJKPLAYER_DESKTOP_H -#ifdef WIN32// Visual Studio specific macro -# ifdef BUILDING_IJK -# define IJK_API __declspec(dllexport) -# else -# define IJK_API __declspec(dllimport) -# endif -#else -# define IJK_API __attribute__ ((visibility("default"))) +#ifdef __cplusplus +exter "C" { #endif +#if defined _WIN32 || defined __CYGWIN__ + #ifdef BUILDING_IJK + #ifdef __GNUC__ + #define IJK_API __attribute__ ((dllexport)) + #else + #define IJK_API __declspec(dllexport) // Note: actually gcc seems to also supports this syntax. + #endif + #else + #ifdef __GNUC__ + #define IJK_API __attribute__ ((dllimport)) + #else + #define IJK_API __declspec(dllimport) // Note: actually gcc seems to also supports this syntax. + #endif + #endif + #define DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define IJK_API __attribute__ ((visibility ("default"))) + #else + #define IJK_API + #endif +#endif #define IJK_LOG_UNKNOWN 0 #define IJK_LOG_DEFAULT 1 @@ -45,10 +61,6 @@ #define IJK_LOG_FATAL 7 #define IJK_LOG_SILENT 8 -#ifdef __cplusplus -exter "C" { -#endif - #include #include #include diff --git a/ijkmedia/CMakeLists.txt b/ijkmedia/CMakeLists.txt index e788df3132..b4372036a0 100644 --- a/ijkmedia/CMakeLists.txt +++ b/ijkmedia/CMakeLists.txt @@ -27,6 +27,9 @@ endif () if(IJK_DESKTOP_UNI) add_subdirectory(portaudio) add_subdirectory(ijkyuv) + + target_compile_options(portaudio_static PRIVATE "-Wno-deprecated-declarations") + target_compile_options(portaudio PRIVATE "-Wno-deprecated-declarations") endif() add_subdirectory(ijksdl) diff --git a/ijkmedia/ijkplayer/CMakeLists.txt b/ijkmedia/ijkplayer/CMakeLists.txt index 49985cd3de..9a4de6ba37 100644 --- a/ijkmedia/ijkplayer/CMakeLists.txt +++ b/ijkmedia/ijkplayer/CMakeLists.txt @@ -94,10 +94,8 @@ set(ANDROID_IJKPLAYER_SOURCES ) set(DESKTOP_UNI_SOURCE - desktop/pipeline_underdesk.h - desktop/pipeline_underdesk.c - desktop/ijkplayer_underdesk.h - desktop/ijkplayer_underdesk.c + desktop/pipeline_desktop.h + desktop/pipeline_desktop.c ) if (ANDROID) diff --git a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c b/ijkmedia/ijkplayer/desktop/pipeline_desktop.c similarity index 73% rename from ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c rename to ijkmedia/ijkplayer/desktop/pipeline_desktop.c index 26fbf4e861..0b5707cf09 100644 --- a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c +++ b/ijkmedia/ijkplayer/desktop/pipeline_desktop.c @@ -1,5 +1,5 @@ /***************************************************************************** -* ijkplayer_desktop.c +* pipeline_desktop.c ***************************************************************************** * * copyright (c) 2019 befovy @@ -21,8 +21,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "ijkplayer_underdesk.h" -#include "pipeline_underdesk.h" +#include "pipeline_desktop.h" + +#include "../pipeline/ffpipeline_ffplay.h" +#include "ijksdl/desktop/ijksdl_aout_port_audio.h" + + + +#include "ijkplayer_internal.h" +#include "pipeline_desktop.h" #include "../ijkplayer_internal.h" #include "ijksdl/desktop/ijksdl_desktop.h" @@ -55,3 +62,20 @@ int ijkmp_set_video_callback(IjkMediaPlayer *mp, void *userdata, ijkmp_video_dra return 0; } + + +static SDL_Aout *func_open_audio_output_l(IJKFF_Pipeline *pipeline, FFPlayer *ffp) +{ + SDL_Aout *aout = SDL_Aout_Port_Audio_Create(); + return aout; +} + + +IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp) +{ + IJKFF_Pipeline *pipeline = ffpipeline_create_from_ffplay(ffp); + if (pipeline) { + pipeline->func_open_audio_output = func_open_audio_output_l; + } + return pipeline; +} diff --git a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h b/ijkmedia/ijkplayer/desktop/pipeline_desktop.h similarity index 77% rename from ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h rename to ijkmedia/ijkplayer/desktop/pipeline_desktop.h index 145d3e7c41..bc818c03b0 100644 --- a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h +++ b/ijkmedia/ijkplayer/desktop/pipeline_desktop.h @@ -1,5 +1,5 @@ -/***************************************************************************** -* ijkplayer_desktop.h +/***************************************************************************** +* pipeline_desktop.h ***************************************************************************** * * copyright (c) 2019 befovy @@ -21,10 +21,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef IJKPLAYER_IJKMEDIA_IJKPLAYER_DESKUNDER_PLAYER_H -#define IJKPLAYER_IJKMEDIA_IJKPLAYER_DESKUNDER_PLAYER_H +#ifndef IJKMEDIA_PLAYER_IJKPLAYER_DESKTOP_PIPELINE_H +#define IJKMEDIA_PLAYER_IJKPLAYER_DESKTOP_PIPELINE_H #include "../ijkplayer.h" +#include "../ff_ffpipeline.h" + IjkMediaPlayer *ijkmp_desktop_create(int(*msg_loop)(void *)); @@ -34,5 +36,7 @@ typedef int (*ijkmp_video_draw)(void *userdata, int ijkmp_set_video_callback(IjkMediaPlayer *mp, void *userdata, ijkmp_video_draw callback); +IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp); + -#endif //IJKPLAYER_IJKMEDIA_IJKPLAYER_DESKUNDER_PLAYER_H \ No newline at end of file +#endif // IJKMEDIA_PLAYER_IJKPLAYER_DESKTOP_PIPELINE_H diff --git a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.c b/ijkmedia/ijkplayer/desktop/pipeline_underdesk.c deleted file mode 100644 index dd138c6234..0000000000 --- a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.c +++ /dev/null @@ -1,43 +0,0 @@ -/***************************************************************************** -* pipeline_desktop.c -***************************************************************************** -* -* copyright (c) 2019 befovy -* -* 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 "pipeline_underdesk.h" - -#include "../pipeline/ffpipeline_ffplay.h" -#include "ijksdl/desktop/ijksdl_aout_port_audio.h" - -static SDL_Aout *func_open_audio_output_l(IJKFF_Pipeline *pipeline, FFPlayer *ffp) -{ - SDL_Aout *aout = SDL_Aout_Port_Audio_Create(); - return aout; -} - - -IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp) -{ - IJKFF_Pipeline *pipeline = ffpipeline_create_from_ffplay(ffp); - if (pipeline) { - pipeline->func_open_audio_output = func_open_audio_output_l; - } - return pipeline; -} \ No newline at end of file diff --git a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.h b/ijkmedia/ijkplayer/desktop/pipeline_underdesk.h deleted file mode 100644 index 23c4344a5d..0000000000 --- a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.h +++ /dev/null @@ -1,31 +0,0 @@ -/***************************************************************************** -* pipeline_desktop.h -***************************************************************************** -* -* copyright (c) 2019 befovy -* -* 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 IJKMEDIA_PLAYER_IJKPLAYER_DESKUNDER_PIPELINE_H -#define IJKMEDIA_PLAYER_IJKPLAYER_DESKUNDER_PIPELINE_H - -#include "../ff_ffpipeline.h" - -IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp); - -#endif // IJKMEDIA_PLAYER_IJKPLAYER_DESKUNDER_PIPELINE_H \ No newline at end of file From a8f07a990eb3eab01a80f834f9303640745f89fd Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 5 Jan 2020 14:30:08 +0800 Subject: [PATCH 083/163] refactor(init): move most init scripts into init directory Move init script into init diretory. Add init-portaudio.sh --- desktop/CMakeLists.txt | 7 +++- init-android.sh | 4 +- init-osx.sh | 3 ++ .../init-android-exo.sh | 14 ++++--- .../init-android-j4a.sh | 13 ++++--- .../init-android-libsoxr.sh | 15 +++++--- .../init-android-openssl.sh | 11 ++++-- .../init-android-prof.sh | 9 +++-- .../init-android-soundtouch.sh | 10 +++-- init-android-libyuv.sh => init/init-libyuv.sh | 10 +++-- init/init-portaudio.sh | 37 +++++++++++++++++++ osx/compile-ffmpeg.sh | 3 +- 12 files changed, 100 insertions(+), 36 deletions(-) rename init-android-exo.sh => init/init-android-exo.sh (82%) rename init-android-j4a.sh => init/init-android-j4a.sh (73%) rename init-android-libsoxr.sh => init/init-android-libsoxr.sh (79%) rename init-android-openssl.sh => init/init-android-openssl.sh (80%) rename init-android-prof.sh => init/init-android-prof.sh (79%) rename init-android-soundtouch.sh => init/init-android-soundtouch.sh (77%) rename init-android-libyuv.sh => init/init-libyuv.sh (78%) create mode 100755 init/init-portaudio.sh diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 2b29b633a7..90c1c787fd 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -55,7 +55,11 @@ endif () set(IJK_DESKTOP_CONTRIB_PATH ${IJKROOT_PATH}/desktop/contrib) if (IJK_X64) - set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x64) + if (APPLE) + set(IJK_FFMPAG_BUILD_DIR ${IJKROOT_PATH}/osx/contrib/build/ffmpeg-x86_64/output) + else() + set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x64) + endif() elseif (IJK_X86) set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x86) endif () @@ -136,6 +140,7 @@ elseif (APPLE) find_package(OpenSSL REQUIRED) target_link_libraries(IjkPlayer ${OPENSSL_LIBRARIES}) target_link_libraries(IjkPlayer z) + target_link_libraries(IjkPlayer bz2) macro(add_framework appname fwname) find_library(FRAMEWORK_${fwname} diff --git a/init-android.sh b/init-android.sh index 0de272b58a..f4430e982c 100755 --- a/init-android.sh +++ b/init-android.sh @@ -46,8 +46,8 @@ pull_fork "x86" pull_fork "x86_64" ./init-config.sh -./init-android-libyuv.sh -./init-android-soundtouch.sh +./init/init-libyuv.sh +./init/init-android-soundtouch.sh cp extra/CMakeLists.txt.yuv ijkmedia/ijkyuv/CMakeLists.txt cp extra/CMakeLists.txt.soundtouch ijkmedia/ijksoundtouch/CMakeLists.txt diff --git a/init-osx.sh b/init-osx.sh index 2e2003bb21..ea85d1e757 100755 --- a/init-osx.sh +++ b/init-osx.sh @@ -92,3 +92,6 @@ esac # sync_ff_version +./init-config.sh +./init/init-libyuv.sh +./init/init-portaudio.sh diff --git a/init-android-exo.sh b/init/init-android-exo.sh similarity index 82% rename from init-android-exo.sh rename to init/init-android-exo.sh index ade994f71d..1d3ee5a6b9 100755 --- a/init-android-exo.sh +++ b/init/init-android-exo.sh @@ -16,24 +16,28 @@ # limitations under the License. # + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + IJK_EXO_UPSTREAM=https://github.com/google/ExoPlayer.git IJK_EXO_FORK=https://github.com/google/ExoPlayer.git IJK_EXO_COMMIT=r1.5.11 -IJK_EXO_LOCAL_REPO=extra/ExoPlayer +IJK_EXO_LOCAL_REPO=$BASEDIR/extra/ExoPlayer set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull ExoPlayer base ==" sh $TOOLS/pull-repo-base.sh $IJK_EXO_UPSTREAM $IJK_EXO_LOCAL_REPO echo "== pull ExoPlayer fork ==" -cd extra/ExoPlayer +cd $BASEDIR/extra/ExoPlayer git checkout ${IJK_EXO_COMMIT} -B ijkplayer cd - -SRC_EXO_DIR=extra/ExoPlayer/demo/src/main/java/com/google/android/exoplayer/demo -DST_EXO_DIR=android/ijkplayer/ijkplayer-exo/src/main/java/tv/danmaku/ijk/media/exo/demo +SRC_EXO_DIR=$BASEDIR/extra/ExoPlayer/demo/src/main/java/com/google/android/exoplayer/demo +DST_EXO_DIR=$BASEDIR/android/ijkplayer/ijkplayer-exo/src/main/java/tv/danmaku/ijk/media/exo/demo mkdir -p $DST_EXO_DIR/player diff --git a/init-android-j4a.sh b/init/init-android-j4a.sh similarity index 73% rename from init-android-j4a.sh rename to init/init-android-j4a.sh index 512259e3d1..97c933a8cd 100755 --- a/init-android-j4a.sh +++ b/init/init-android-j4a.sh @@ -16,19 +16,22 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + IJK_J4A_UPSTREAM=https://github.com/Bilibili/jni4android.git IJK_J4A_FORK=https://github.com/Bilibili/jni4android.git IJK_J4A_COMMIT=v0.0.2 -IJK_J4A_LOCAL_REPO=extra/jni4android +IJK_J4A_LOCAL_REPO=$BASEDIR/extra/jni4android set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull j4a base ==" sh $TOOLS/pull-repo-base.sh $IJK_J4A_UPSTREAM $IJK_J4A_LOCAL_REPO echo "== pull j4a fork ==" -sh $TOOLS/pull-repo-ref.sh $IJK_J4A_FORK extra/jni4android-fork ${IJK_J4A_LOCAL_REPO} -cd extra/jni4android-fork -git checkout ${IJK_J4A_COMMIT} +sh $TOOLS/pull-repo-ref.sh $IJK_J4A_FORK $BASEDIR/extra/jni4android-fork ${IJK_J4A_LOCAL_REPO} +cd $BASEDIR/extra/jni4android-fork +git checkout ${IJK_J4A_COMMIT} -B ijkplayer-j4a cd - diff --git a/init-android-libsoxr.sh b/init/init-android-libsoxr.sh similarity index 79% rename from init-android-libsoxr.sh rename to init/init-android-libsoxr.sh index a00195c48c..5eb694e4d0 100755 --- a/init-android-libsoxr.sh +++ b/init/init-android-libsoxr.sh @@ -16,14 +16,17 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + IJK_LIBSOXR_UPSTREAM=http://git.code.sf.net/p/soxr/code IJK_LIBSOXR_FORK=http://git.code.sf.net/p/soxr/code IJK_LIBSOXR_COMMIT=0.1.2 IJK_LIBSOXR_COMMIT_64=master -IJK_LIBSOXR_LOCAL_REPO=extra/soxr +IJK_LIBSOXR_LOCAL_REPO=$BASEDIR/extra/soxr set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull soxr base ==" sh $TOOLS/pull-repo-base.sh $IJK_LIBSOXR_UPSTREAM $IJK_LIBSOXR_LOCAL_REPO @@ -31,9 +34,9 @@ sh $TOOLS/pull-repo-base.sh $IJK_LIBSOXR_UPSTREAM $IJK_LIBSOXR_LOCAL_REPO function pull_fork() { echo "== pull soxr fork $1 ==" - sh $TOOLS/pull-repo-ref.sh $IJK_LIBSOXR_FORK android/contrib/libsoxr-$1 ${IJK_LIBSOXR_LOCAL_REPO} - cp extra/android-cmake/android.toolchain.cmake android/contrib/libsoxr-$1 - cd android/contrib/libsoxr-$1 + sh $TOOLS/pull-repo-ref.sh $IJK_LIBSOXR_FORK $BASEDIR/android/contrib/libsoxr-$1 ${IJK_LIBSOXR_LOCAL_REPO} + cp $BASEDIR/extra/android-cmake/android.toolchain.cmake $BASEDIR/android/contrib/libsoxr-$1 + cd $BASEDIR/android/contrib/libsoxr-$1 case "$1" in arm64|x86_64) git checkout ${IJK_LIBSOXR_COMMIT_64} -B ijkplayer @@ -49,7 +52,7 @@ function pull_android_toolchain_cmake() { ANDROID_TOOLCHAIN_CMAKE_UPSTREAM=https://github.com/taka-no-me/android-cmake.git echo "== pull android toolchain cmake from $ANDROID_TOOLCHAIN_CMAKE_UPSTREAM ==" - sh $TOOLS/pull-repo-base.sh $ANDROID_TOOLCHAIN_CMAKE_UPSTREAM extra/android-cmake + sh $TOOLS/pull-repo-base.sh $ANDROID_TOOLCHAIN_CMAKE_UPSTREAM $BASEDIR/extra/android-cmake } pull_android_toolchain_cmake diff --git a/init-android-openssl.sh b/init/init-android-openssl.sh similarity index 80% rename from init-android-openssl.sh rename to init/init-android-openssl.sh index 43a8df7424..041313c01b 100755 --- a/init-android-openssl.sh +++ b/init/init-android-openssl.sh @@ -16,14 +16,17 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + #IJK_OPENSSL_UPSTREAM=https://github.com/openssl/openssl IJK_OPENSSL_UPSTREAM=https://github.com/Bilibili/openssl.git IJK_OPENSSL_FORK=https://github.com/Bilibili/openssl.git IJK_OPENSSL_COMMIT=b34cf4eb61 #tag: OpenSSL_1_0_2r -IJK_OPENSSL_LOCAL_REPO=extra/openssl +IJK_OPENSSL_LOCAL_REPO=$BASEDIR/extra/openssl set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull openssl base ==" sh $TOOLS/pull-repo-base.sh $IJK_OPENSSL_UPSTREAM $IJK_OPENSSL_LOCAL_REPO @@ -31,8 +34,8 @@ sh $TOOLS/pull-repo-base.sh $IJK_OPENSSL_UPSTREAM $IJK_OPENSSL_LOCAL_REPO function pull_fork() { echo "== pull openssl fork $1 ==" - sh $TOOLS/pull-repo-ref.sh $IJK_OPENSSL_FORK android/contrib/openssl-$1 ${IJK_OPENSSL_LOCAL_REPO} - cd android/contrib/openssl-$1 + sh $TOOLS/pull-repo-ref.sh $IJK_OPENSSL_FORK $BASEDIR/android/contrib/openssl-$1 ${IJK_OPENSSL_LOCAL_REPO} + cd $BASEDIR/android/contrib/openssl-$1 git checkout ${IJK_OPENSSL_COMMIT} -B ijkplayer cd - } diff --git a/init-android-prof.sh b/init/init-android-prof.sh similarity index 79% rename from init-android-prof.sh rename to init/init-android-prof.sh index 7c4a3ded93..441ff02cc1 100755 --- a/init-android-prof.sh +++ b/init/init-android-prof.sh @@ -16,11 +16,14 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + IJK_LIB_NAME=android-ndk-profiler IJK_LIB_UPSTREAM=https://github.com/Bilibili/android-ndk-profiler.git IJK_LIB_FORK=https://github.com/Bilibili/android-ndk-profiler.git IJK_LIB_COMMIT=ijk-r0.3.0-dev -IJK_LIB_LOCAL_REPO=extra/android-ndk-profiler +IJK_LIB_LOCAL_REPO=$BASEDIR/extra/android-ndk-profiler set -e TOOLS=tools @@ -29,7 +32,7 @@ echo "== pull $IJK_LIB_NAME base ==" sh $TOOLS/pull-repo-base.sh $IJK_LIB_UPSTREAM $IJK_LIB_LOCAL_REPO echo "== pull $IJK_LIB_NAME fork ==" -sh $TOOLS/pull-repo-ref.sh $IJK_LIB_FORK ijkprof/$IJK_LIB_NAME ${IJK_LIB_LOCAL_REPO} -cd ijkprof/$IJK_LIB_NAME +sh $TOOLS/pull-repo-ref.sh $IJK_LIB_FORK $BASEDIR/ijkprof/$IJK_LIB_NAME ${IJK_LIB_LOCAL_REPO} +cd $BASEDIR/ijkprof/$IJK_LIB_NAME git checkout ${IJK_LIB_COMMIT} cd - diff --git a/init-android-soundtouch.sh b/init/init-android-soundtouch.sh similarity index 77% rename from init-android-soundtouch.sh rename to init/init-android-soundtouch.sh index c369cb6649..7e6f881ff1 100755 --- a/init-android-soundtouch.sh +++ b/init/init-android-soundtouch.sh @@ -16,20 +16,22 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") IJK_SOUNDTOUCH_UPSTREAM=https://github.com/Bilibili/soundtouch.git IJK_SOUNDTOUCH_FORK=https://github.com/Bilibili/soundtouch.git IJK_SOUNDTOUCH_COMMIT=ijk-r0.1.2-dev -IJK_SOUNDTOUCH_LOCAL_REPO=extra/soundtouch +IJK_SOUNDTOUCH_LOCAL_REPO=$BASEDIR/extra/soundtouch set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull soundtouch base ==" sh $TOOLS/pull-repo-base.sh $IJK_SOUNDTOUCH_UPSTREAM $IJK_SOUNDTOUCH_LOCAL_REPO echo "== pull soundtouch fork ==" -sh $TOOLS/pull-repo-ref.sh $IJK_SOUNDTOUCH_FORK ijkmedia/ijksoundtouch ${IJK_SOUNDTOUCH_LOCAL_REPO} -cd ijkmedia/ijksoundtouch +sh $TOOLS/pull-repo-ref.sh $IJK_SOUNDTOUCH_FORK $BASEDIR/ijkmedia/ijksoundtouch ${IJK_SOUNDTOUCH_LOCAL_REPO} +cd $BASEDIR/ijkmedia/ijksoundtouch git checkout ${IJK_SOUNDTOUCH_COMMIT} cd - diff --git a/init-android-libyuv.sh b/init/init-libyuv.sh similarity index 78% rename from init-android-libyuv.sh rename to init/init-libyuv.sh index d1adf4b549..18b9c5e22e 100755 --- a/init-android-libyuv.sh +++ b/init/init-libyuv.sh @@ -16,20 +16,22 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") IJK_LIBYUV_UPSTREAM=https://github.com/Bilibili/libyuv.git IJK_LIBYUV_FORK=https://github.com/Bilibili/libyuv.git IJK_LIBYUV_COMMIT=ijk-r0.2.1-dev -IJK_LIBYUV_LOCAL_REPO=extra/libyuv +IJK_LIBYUV_LOCAL_REPO=$BASEDIR/extra/libyuv set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull libyuv base ==" sh $TOOLS/pull-repo-base.sh $IJK_LIBYUV_UPSTREAM $IJK_LIBYUV_LOCAL_REPO echo "== pull libyuv fork ==" -sh $TOOLS/pull-repo-ref.sh $IJK_LIBYUV_FORK ijkmedia/ijkyuv ${IJK_LIBYUV_LOCAL_REPO} -cd ijkmedia/ijkyuv +sh $TOOLS/pull-repo-ref.sh $IJK_LIBYUV_FORK $BASEDIR/ijkmedia/ijkyuv ${IJK_LIBYUV_LOCAL_REPO} +cd $BASEDIR/ijkmedia/ijkyuv git checkout ${IJK_LIBYUV_COMMIT} cd - diff --git a/init/init-portaudio.sh b/init/init-portaudio.sh new file mode 100755 index 0000000000..6fce7db7df --- /dev/null +++ b/init/init-portaudio.sh @@ -0,0 +1,37 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2013-2015 Bilibili +# Copyright (C) 2013-2015 Zhang Rui +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + +PORTAUDIO_UPSTREAM=https://git.assembla.com/portaudio.git +PORTAUDIO_FORK=https://git.assembla.com/portaudio.git +PORTAUDIO_COMMIT=396fe4b6699ae929d3a685b3ef8a7e97396139a4 +PORTAUDIO_LOCAL_REPO=$BASEDIR/extra/portaudio + +set -e +TOOLS=$BASEDIR/tools + +echo "== pull portaudio base ==" +sh $TOOLS/pull-repo-base.sh $PORTAUDIO_UPSTREAM $PORTAUDIO_LOCAL_REPO + +echo "== pull portaudio fork ==" +sh $TOOLS/pull-repo-ref.sh $PORTAUDIO_FORK $BASEDIR/ijkmedia/portaudio ${PORTAUDIO_LOCAL_REPO} +cd $BASEDIR/ijkmedia/portaudio +git checkout ${PORTAUDIO_COMMIT} -b ijkplayer +cd - diff --git a/osx/compile-ffmpeg.sh b/osx/compile-ffmpeg.sh index 9cccc574e0..90f7a06717 100755 --- a/osx/compile-ffmpeg.sh +++ b/osx/compile-ffmpeg.sh @@ -38,7 +38,7 @@ echo_archs() { echo "FF_ALL_ARCHS = $FF_ALL_ARCHS" } -FF_LIBS="lcompat ibavcodec libavfilter libavformat libavutil libswscale libswresample" +FF_LIBS="libcompat libavcodec libavfilter libavformat libavutil libswscale libswresample" @@ -46,7 +46,6 @@ FF_LIBS="lcompat ibavcodec libavfilter libavformat libavutil libswscale libswres if [ "$FF_TARGET" = "x86_64" ]; then echo_archs sh tools/do-compile-ffmpeg.sh $FF_TARGET $FF_TARGET_EXTRA - do_lipo_all elif [ "$FF_TARGET" = "all" ]; then echo_archs for ARCH in $FF_ALL_ARCHS From eff508367257800641ecb174bc84b2bf8cf6348a Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 5 Jan 2020 14:33:53 +0800 Subject: [PATCH 084/163] docs: add build step for Mac OS https://github.com/befovy/fijkplayer/issues/138 --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index e319334895..50f3378970 100644 --- a/README.md +++ b/README.md @@ -246,8 +246,30 @@ cd ios # ``` +### Build for Mac OS + +Build ffmpeg for Max OS +``` +./init-osx.sh +cd osx && ./compile-ffmpeg.sh +``` + +Build ijkplayer for Max OS + +``` +cd desktop +mkdir cmake-build-debug && cd cmake-build-debug +cmake .. -DCMAKE_BUILD_TYPE="Debug" +make IjkPlayer +make tuidemo +``` + +tuidemo is a terminal UI demo for ijkplayer in progress, it can't display video yet. + +`libIjkPlayer.dylib` is the output dynamic library. ### Support (支持) ### + - Please do not send e-mail to me. Public technical discussion on github is preferred. - 请尽量在 github 上公开讨论[技术问题](https://github.com/befovy/ijkplayer/issues),不要以邮件方式私下询问,恕不一一回复。 From 6ba9800925e898b29118bb13cd24eaea6d141d05 Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 5 Jan 2020 13:16:04 +0800 Subject: [PATCH 085/163] refactor(desktop): rename desktop source file merge ijkplayer_underdesk to pipeline_desktop --- desktop/CMakeLists.txt | 6 +-- desktop/sources/ijkplayer_desktop.c | 3 +- desktop/sources/ijkplayer_desktop.h | 36 ++++++++++------ ijkmedia/CMakeLists.txt | 3 ++ ijkmedia/ijkplayer/CMakeLists.txt | 6 +-- ...kplayer_underdesk.c => pipeline_desktop.c} | 30 +++++++++++-- ...kplayer_underdesk.h => pipeline_desktop.h} | 14 +++--- .../ijkplayer/desktop/pipeline_underdesk.c | 43 ------------------- .../ijkplayer/desktop/pipeline_underdesk.h | 31 ------------- 9 files changed, 69 insertions(+), 103 deletions(-) rename ijkmedia/ijkplayer/desktop/{ijkplayer_underdesk.c => pipeline_desktop.c} (73%) rename ijkmedia/ijkplayer/desktop/{ijkplayer_underdesk.h => pipeline_desktop.h} (77%) delete mode 100644 ijkmedia/ijkplayer/desktop/pipeline_underdesk.c delete mode 100644 ijkmedia/ijkplayer/desktop/pipeline_underdesk.h diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 326eb1bdd8..2b29b633a7 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -157,11 +157,11 @@ elseif (APPLE) add_framework(IjkPlayer Security) endif () -add_executable(IjkDemo ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c) +add_executable(tuidemo ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c) if (WIN32) - target_link_libraries(IjkDemo IjkPlayer user32) + target_link_libraries(tuidemo IjkPlayer user32) else () - target_link_libraries(IjkDemo IjkPlayer) + target_link_libraries(tuidemo IjkPlayer) endif () diff --git a/desktop/sources/ijkplayer_desktop.c b/desktop/sources/ijkplayer_desktop.c index f9686dd02f..ae083d3043 100644 --- a/desktop/sources/ijkplayer_desktop.c +++ b/desktop/sources/ijkplayer_desktop.c @@ -25,7 +25,7 @@ #include #include "ijkplayer_desktop.h" -#include "ijkplayer/desktop/ijkplayer_underdesk.h" +#include "ijkplayer/desktop/pipeline_desktop.h" #include "ijkplayer/ff_ffmsg_queue.h" @@ -175,7 +175,6 @@ float ijkff_get_playback_volume(IjkFFMediaPlayer *fp) { assert(fp); return ijkmp_get_property_float(fp->mp, FFP_PROP_FLOAT_PLAYBACK_VOLUME, 1.0f); - } void ijkff_set_stream_selected(IjkFFMediaPlayer *fp, int strean, bool selected) diff --git a/desktop/sources/ijkplayer_desktop.h b/desktop/sources/ijkplayer_desktop.h index 47b0acb0c1..0c875bf26b 100644 --- a/desktop/sources/ijkplayer_desktop.h +++ b/desktop/sources/ijkplayer_desktop.h @@ -24,16 +24,32 @@ #ifndef IJKPLAYER_DESKTOP_IJKPLAYER_DESKTOP_H #define IJKPLAYER_DESKTOP_IJKPLAYER_DESKTOP_H -#ifdef WIN32// Visual Studio specific macro -# ifdef BUILDING_IJK -# define IJK_API __declspec(dllexport) -# else -# define IJK_API __declspec(dllimport) -# endif -#else -# define IJK_API __attribute__ ((visibility("default"))) +#ifdef __cplusplus +exter "C" { #endif +#if defined _WIN32 || defined __CYGWIN__ + #ifdef BUILDING_IJK + #ifdef __GNUC__ + #define IJK_API __attribute__ ((dllexport)) + #else + #define IJK_API __declspec(dllexport) // Note: actually gcc seems to also supports this syntax. + #endif + #else + #ifdef __GNUC__ + #define IJK_API __attribute__ ((dllimport)) + #else + #define IJK_API __declspec(dllimport) // Note: actually gcc seems to also supports this syntax. + #endif + #endif + #define DLL_LOCAL +#else + #if __GNUC__ >= 4 + #define IJK_API __attribute__ ((visibility ("default"))) + #else + #define IJK_API + #endif +#endif #define IJK_LOG_UNKNOWN 0 #define IJK_LOG_DEFAULT 1 @@ -45,10 +61,6 @@ #define IJK_LOG_FATAL 7 #define IJK_LOG_SILENT 8 -#ifdef __cplusplus -exter "C" { -#endif - #include #include #include diff --git a/ijkmedia/CMakeLists.txt b/ijkmedia/CMakeLists.txt index e788df3132..b4372036a0 100644 --- a/ijkmedia/CMakeLists.txt +++ b/ijkmedia/CMakeLists.txt @@ -27,6 +27,9 @@ endif () if(IJK_DESKTOP_UNI) add_subdirectory(portaudio) add_subdirectory(ijkyuv) + + target_compile_options(portaudio_static PRIVATE "-Wno-deprecated-declarations") + target_compile_options(portaudio PRIVATE "-Wno-deprecated-declarations") endif() add_subdirectory(ijksdl) diff --git a/ijkmedia/ijkplayer/CMakeLists.txt b/ijkmedia/ijkplayer/CMakeLists.txt index 49985cd3de..9a4de6ba37 100644 --- a/ijkmedia/ijkplayer/CMakeLists.txt +++ b/ijkmedia/ijkplayer/CMakeLists.txt @@ -94,10 +94,8 @@ set(ANDROID_IJKPLAYER_SOURCES ) set(DESKTOP_UNI_SOURCE - desktop/pipeline_underdesk.h - desktop/pipeline_underdesk.c - desktop/ijkplayer_underdesk.h - desktop/ijkplayer_underdesk.c + desktop/pipeline_desktop.h + desktop/pipeline_desktop.c ) if (ANDROID) diff --git a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c b/ijkmedia/ijkplayer/desktop/pipeline_desktop.c similarity index 73% rename from ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c rename to ijkmedia/ijkplayer/desktop/pipeline_desktop.c index 26fbf4e861..0b5707cf09 100644 --- a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.c +++ b/ijkmedia/ijkplayer/desktop/pipeline_desktop.c @@ -1,5 +1,5 @@ /***************************************************************************** -* ijkplayer_desktop.c +* pipeline_desktop.c ***************************************************************************** * * copyright (c) 2019 befovy @@ -21,8 +21,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "ijkplayer_underdesk.h" -#include "pipeline_underdesk.h" +#include "pipeline_desktop.h" + +#include "../pipeline/ffpipeline_ffplay.h" +#include "ijksdl/desktop/ijksdl_aout_port_audio.h" + + + +#include "ijkplayer_internal.h" +#include "pipeline_desktop.h" #include "../ijkplayer_internal.h" #include "ijksdl/desktop/ijksdl_desktop.h" @@ -55,3 +62,20 @@ int ijkmp_set_video_callback(IjkMediaPlayer *mp, void *userdata, ijkmp_video_dra return 0; } + + +static SDL_Aout *func_open_audio_output_l(IJKFF_Pipeline *pipeline, FFPlayer *ffp) +{ + SDL_Aout *aout = SDL_Aout_Port_Audio_Create(); + return aout; +} + + +IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp) +{ + IJKFF_Pipeline *pipeline = ffpipeline_create_from_ffplay(ffp); + if (pipeline) { + pipeline->func_open_audio_output = func_open_audio_output_l; + } + return pipeline; +} diff --git a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h b/ijkmedia/ijkplayer/desktop/pipeline_desktop.h similarity index 77% rename from ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h rename to ijkmedia/ijkplayer/desktop/pipeline_desktop.h index 145d3e7c41..bc818c03b0 100644 --- a/ijkmedia/ijkplayer/desktop/ijkplayer_underdesk.h +++ b/ijkmedia/ijkplayer/desktop/pipeline_desktop.h @@ -1,5 +1,5 @@ -/***************************************************************************** -* ijkplayer_desktop.h +/***************************************************************************** +* pipeline_desktop.h ***************************************************************************** * * copyright (c) 2019 befovy @@ -21,10 +21,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef IJKPLAYER_IJKMEDIA_IJKPLAYER_DESKUNDER_PLAYER_H -#define IJKPLAYER_IJKMEDIA_IJKPLAYER_DESKUNDER_PLAYER_H +#ifndef IJKMEDIA_PLAYER_IJKPLAYER_DESKTOP_PIPELINE_H +#define IJKMEDIA_PLAYER_IJKPLAYER_DESKTOP_PIPELINE_H #include "../ijkplayer.h" +#include "../ff_ffpipeline.h" + IjkMediaPlayer *ijkmp_desktop_create(int(*msg_loop)(void *)); @@ -34,5 +36,7 @@ typedef int (*ijkmp_video_draw)(void *userdata, int ijkmp_set_video_callback(IjkMediaPlayer *mp, void *userdata, ijkmp_video_draw callback); +IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp); + -#endif //IJKPLAYER_IJKMEDIA_IJKPLAYER_DESKUNDER_PLAYER_H \ No newline at end of file +#endif // IJKMEDIA_PLAYER_IJKPLAYER_DESKTOP_PIPELINE_H diff --git a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.c b/ijkmedia/ijkplayer/desktop/pipeline_underdesk.c deleted file mode 100644 index dd138c6234..0000000000 --- a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.c +++ /dev/null @@ -1,43 +0,0 @@ -/***************************************************************************** -* pipeline_desktop.c -***************************************************************************** -* -* copyright (c) 2019 befovy -* -* 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 "pipeline_underdesk.h" - -#include "../pipeline/ffpipeline_ffplay.h" -#include "ijksdl/desktop/ijksdl_aout_port_audio.h" - -static SDL_Aout *func_open_audio_output_l(IJKFF_Pipeline *pipeline, FFPlayer *ffp) -{ - SDL_Aout *aout = SDL_Aout_Port_Audio_Create(); - return aout; -} - - -IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp) -{ - IJKFF_Pipeline *pipeline = ffpipeline_create_from_ffplay(ffp); - if (pipeline) { - pipeline->func_open_audio_output = func_open_audio_output_l; - } - return pipeline; -} \ No newline at end of file diff --git a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.h b/ijkmedia/ijkplayer/desktop/pipeline_underdesk.h deleted file mode 100644 index 23c4344a5d..0000000000 --- a/ijkmedia/ijkplayer/desktop/pipeline_underdesk.h +++ /dev/null @@ -1,31 +0,0 @@ -/***************************************************************************** -* pipeline_desktop.h -***************************************************************************** -* -* copyright (c) 2019 befovy -* -* 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 IJKMEDIA_PLAYER_IJKPLAYER_DESKUNDER_PIPELINE_H -#define IJKMEDIA_PLAYER_IJKPLAYER_DESKUNDER_PIPELINE_H - -#include "../ff_ffpipeline.h" - -IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp); - -#endif // IJKMEDIA_PLAYER_IJKPLAYER_DESKUNDER_PIPELINE_H \ No newline at end of file From ce5066e35860a79f5343c0fc880605bb1c3b956b Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 5 Jan 2020 14:30:08 +0800 Subject: [PATCH 086/163] refactor(init): move most init scripts into init directory Move init script into init diretory. Add init-portaudio.sh --- desktop/CMakeLists.txt | 7 +++- init-android.sh | 4 +- init-osx.sh | 3 ++ .../init-android-exo.sh | 14 ++++--- .../init-android-j4a.sh | 13 ++++--- .../init-android-libsoxr.sh | 15 +++++--- .../init-android-openssl.sh | 11 ++++-- .../init-android-prof.sh | 9 +++-- .../init-android-soundtouch.sh | 10 +++-- init-android-libyuv.sh => init/init-libyuv.sh | 10 +++-- init/init-portaudio.sh | 37 +++++++++++++++++++ osx/compile-ffmpeg.sh | 3 +- 12 files changed, 100 insertions(+), 36 deletions(-) rename init-android-exo.sh => init/init-android-exo.sh (82%) rename init-android-j4a.sh => init/init-android-j4a.sh (73%) rename init-android-libsoxr.sh => init/init-android-libsoxr.sh (79%) rename init-android-openssl.sh => init/init-android-openssl.sh (80%) rename init-android-prof.sh => init/init-android-prof.sh (79%) rename init-android-soundtouch.sh => init/init-android-soundtouch.sh (77%) rename init-android-libyuv.sh => init/init-libyuv.sh (78%) create mode 100755 init/init-portaudio.sh diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 2b29b633a7..90c1c787fd 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -55,7 +55,11 @@ endif () set(IJK_DESKTOP_CONTRIB_PATH ${IJKROOT_PATH}/desktop/contrib) if (IJK_X64) - set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x64) + if (APPLE) + set(IJK_FFMPAG_BUILD_DIR ${IJKROOT_PATH}/osx/contrib/build/ffmpeg-x86_64/output) + else() + set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x64) + endif() elseif (IJK_X86) set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x86) endif () @@ -136,6 +140,7 @@ elseif (APPLE) find_package(OpenSSL REQUIRED) target_link_libraries(IjkPlayer ${OPENSSL_LIBRARIES}) target_link_libraries(IjkPlayer z) + target_link_libraries(IjkPlayer bz2) macro(add_framework appname fwname) find_library(FRAMEWORK_${fwname} diff --git a/init-android.sh b/init-android.sh index 0de272b58a..f4430e982c 100755 --- a/init-android.sh +++ b/init-android.sh @@ -46,8 +46,8 @@ pull_fork "x86" pull_fork "x86_64" ./init-config.sh -./init-android-libyuv.sh -./init-android-soundtouch.sh +./init/init-libyuv.sh +./init/init-android-soundtouch.sh cp extra/CMakeLists.txt.yuv ijkmedia/ijkyuv/CMakeLists.txt cp extra/CMakeLists.txt.soundtouch ijkmedia/ijksoundtouch/CMakeLists.txt diff --git a/init-osx.sh b/init-osx.sh index 2e2003bb21..ea85d1e757 100755 --- a/init-osx.sh +++ b/init-osx.sh @@ -92,3 +92,6 @@ esac # sync_ff_version +./init-config.sh +./init/init-libyuv.sh +./init/init-portaudio.sh diff --git a/init-android-exo.sh b/init/init-android-exo.sh similarity index 82% rename from init-android-exo.sh rename to init/init-android-exo.sh index ade994f71d..1d3ee5a6b9 100755 --- a/init-android-exo.sh +++ b/init/init-android-exo.sh @@ -16,24 +16,28 @@ # limitations under the License. # + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + IJK_EXO_UPSTREAM=https://github.com/google/ExoPlayer.git IJK_EXO_FORK=https://github.com/google/ExoPlayer.git IJK_EXO_COMMIT=r1.5.11 -IJK_EXO_LOCAL_REPO=extra/ExoPlayer +IJK_EXO_LOCAL_REPO=$BASEDIR/extra/ExoPlayer set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull ExoPlayer base ==" sh $TOOLS/pull-repo-base.sh $IJK_EXO_UPSTREAM $IJK_EXO_LOCAL_REPO echo "== pull ExoPlayer fork ==" -cd extra/ExoPlayer +cd $BASEDIR/extra/ExoPlayer git checkout ${IJK_EXO_COMMIT} -B ijkplayer cd - -SRC_EXO_DIR=extra/ExoPlayer/demo/src/main/java/com/google/android/exoplayer/demo -DST_EXO_DIR=android/ijkplayer/ijkplayer-exo/src/main/java/tv/danmaku/ijk/media/exo/demo +SRC_EXO_DIR=$BASEDIR/extra/ExoPlayer/demo/src/main/java/com/google/android/exoplayer/demo +DST_EXO_DIR=$BASEDIR/android/ijkplayer/ijkplayer-exo/src/main/java/tv/danmaku/ijk/media/exo/demo mkdir -p $DST_EXO_DIR/player diff --git a/init-android-j4a.sh b/init/init-android-j4a.sh similarity index 73% rename from init-android-j4a.sh rename to init/init-android-j4a.sh index 512259e3d1..97c933a8cd 100755 --- a/init-android-j4a.sh +++ b/init/init-android-j4a.sh @@ -16,19 +16,22 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + IJK_J4A_UPSTREAM=https://github.com/Bilibili/jni4android.git IJK_J4A_FORK=https://github.com/Bilibili/jni4android.git IJK_J4A_COMMIT=v0.0.2 -IJK_J4A_LOCAL_REPO=extra/jni4android +IJK_J4A_LOCAL_REPO=$BASEDIR/extra/jni4android set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull j4a base ==" sh $TOOLS/pull-repo-base.sh $IJK_J4A_UPSTREAM $IJK_J4A_LOCAL_REPO echo "== pull j4a fork ==" -sh $TOOLS/pull-repo-ref.sh $IJK_J4A_FORK extra/jni4android-fork ${IJK_J4A_LOCAL_REPO} -cd extra/jni4android-fork -git checkout ${IJK_J4A_COMMIT} +sh $TOOLS/pull-repo-ref.sh $IJK_J4A_FORK $BASEDIR/extra/jni4android-fork ${IJK_J4A_LOCAL_REPO} +cd $BASEDIR/extra/jni4android-fork +git checkout ${IJK_J4A_COMMIT} -B ijkplayer-j4a cd - diff --git a/init-android-libsoxr.sh b/init/init-android-libsoxr.sh similarity index 79% rename from init-android-libsoxr.sh rename to init/init-android-libsoxr.sh index a00195c48c..5eb694e4d0 100755 --- a/init-android-libsoxr.sh +++ b/init/init-android-libsoxr.sh @@ -16,14 +16,17 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + IJK_LIBSOXR_UPSTREAM=http://git.code.sf.net/p/soxr/code IJK_LIBSOXR_FORK=http://git.code.sf.net/p/soxr/code IJK_LIBSOXR_COMMIT=0.1.2 IJK_LIBSOXR_COMMIT_64=master -IJK_LIBSOXR_LOCAL_REPO=extra/soxr +IJK_LIBSOXR_LOCAL_REPO=$BASEDIR/extra/soxr set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull soxr base ==" sh $TOOLS/pull-repo-base.sh $IJK_LIBSOXR_UPSTREAM $IJK_LIBSOXR_LOCAL_REPO @@ -31,9 +34,9 @@ sh $TOOLS/pull-repo-base.sh $IJK_LIBSOXR_UPSTREAM $IJK_LIBSOXR_LOCAL_REPO function pull_fork() { echo "== pull soxr fork $1 ==" - sh $TOOLS/pull-repo-ref.sh $IJK_LIBSOXR_FORK android/contrib/libsoxr-$1 ${IJK_LIBSOXR_LOCAL_REPO} - cp extra/android-cmake/android.toolchain.cmake android/contrib/libsoxr-$1 - cd android/contrib/libsoxr-$1 + sh $TOOLS/pull-repo-ref.sh $IJK_LIBSOXR_FORK $BASEDIR/android/contrib/libsoxr-$1 ${IJK_LIBSOXR_LOCAL_REPO} + cp $BASEDIR/extra/android-cmake/android.toolchain.cmake $BASEDIR/android/contrib/libsoxr-$1 + cd $BASEDIR/android/contrib/libsoxr-$1 case "$1" in arm64|x86_64) git checkout ${IJK_LIBSOXR_COMMIT_64} -B ijkplayer @@ -49,7 +52,7 @@ function pull_android_toolchain_cmake() { ANDROID_TOOLCHAIN_CMAKE_UPSTREAM=https://github.com/taka-no-me/android-cmake.git echo "== pull android toolchain cmake from $ANDROID_TOOLCHAIN_CMAKE_UPSTREAM ==" - sh $TOOLS/pull-repo-base.sh $ANDROID_TOOLCHAIN_CMAKE_UPSTREAM extra/android-cmake + sh $TOOLS/pull-repo-base.sh $ANDROID_TOOLCHAIN_CMAKE_UPSTREAM $BASEDIR/extra/android-cmake } pull_android_toolchain_cmake diff --git a/init-android-openssl.sh b/init/init-android-openssl.sh similarity index 80% rename from init-android-openssl.sh rename to init/init-android-openssl.sh index 43a8df7424..041313c01b 100755 --- a/init-android-openssl.sh +++ b/init/init-android-openssl.sh @@ -16,14 +16,17 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + #IJK_OPENSSL_UPSTREAM=https://github.com/openssl/openssl IJK_OPENSSL_UPSTREAM=https://github.com/Bilibili/openssl.git IJK_OPENSSL_FORK=https://github.com/Bilibili/openssl.git IJK_OPENSSL_COMMIT=b34cf4eb61 #tag: OpenSSL_1_0_2r -IJK_OPENSSL_LOCAL_REPO=extra/openssl +IJK_OPENSSL_LOCAL_REPO=$BASEDIR/extra/openssl set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull openssl base ==" sh $TOOLS/pull-repo-base.sh $IJK_OPENSSL_UPSTREAM $IJK_OPENSSL_LOCAL_REPO @@ -31,8 +34,8 @@ sh $TOOLS/pull-repo-base.sh $IJK_OPENSSL_UPSTREAM $IJK_OPENSSL_LOCAL_REPO function pull_fork() { echo "== pull openssl fork $1 ==" - sh $TOOLS/pull-repo-ref.sh $IJK_OPENSSL_FORK android/contrib/openssl-$1 ${IJK_OPENSSL_LOCAL_REPO} - cd android/contrib/openssl-$1 + sh $TOOLS/pull-repo-ref.sh $IJK_OPENSSL_FORK $BASEDIR/android/contrib/openssl-$1 ${IJK_OPENSSL_LOCAL_REPO} + cd $BASEDIR/android/contrib/openssl-$1 git checkout ${IJK_OPENSSL_COMMIT} -B ijkplayer cd - } diff --git a/init-android-prof.sh b/init/init-android-prof.sh similarity index 79% rename from init-android-prof.sh rename to init/init-android-prof.sh index 7c4a3ded93..441ff02cc1 100755 --- a/init-android-prof.sh +++ b/init/init-android-prof.sh @@ -16,11 +16,14 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + IJK_LIB_NAME=android-ndk-profiler IJK_LIB_UPSTREAM=https://github.com/Bilibili/android-ndk-profiler.git IJK_LIB_FORK=https://github.com/Bilibili/android-ndk-profiler.git IJK_LIB_COMMIT=ijk-r0.3.0-dev -IJK_LIB_LOCAL_REPO=extra/android-ndk-profiler +IJK_LIB_LOCAL_REPO=$BASEDIR/extra/android-ndk-profiler set -e TOOLS=tools @@ -29,7 +32,7 @@ echo "== pull $IJK_LIB_NAME base ==" sh $TOOLS/pull-repo-base.sh $IJK_LIB_UPSTREAM $IJK_LIB_LOCAL_REPO echo "== pull $IJK_LIB_NAME fork ==" -sh $TOOLS/pull-repo-ref.sh $IJK_LIB_FORK ijkprof/$IJK_LIB_NAME ${IJK_LIB_LOCAL_REPO} -cd ijkprof/$IJK_LIB_NAME +sh $TOOLS/pull-repo-ref.sh $IJK_LIB_FORK $BASEDIR/ijkprof/$IJK_LIB_NAME ${IJK_LIB_LOCAL_REPO} +cd $BASEDIR/ijkprof/$IJK_LIB_NAME git checkout ${IJK_LIB_COMMIT} cd - diff --git a/init-android-soundtouch.sh b/init/init-android-soundtouch.sh similarity index 77% rename from init-android-soundtouch.sh rename to init/init-android-soundtouch.sh index c369cb6649..7e6f881ff1 100755 --- a/init-android-soundtouch.sh +++ b/init/init-android-soundtouch.sh @@ -16,20 +16,22 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") IJK_SOUNDTOUCH_UPSTREAM=https://github.com/Bilibili/soundtouch.git IJK_SOUNDTOUCH_FORK=https://github.com/Bilibili/soundtouch.git IJK_SOUNDTOUCH_COMMIT=ijk-r0.1.2-dev -IJK_SOUNDTOUCH_LOCAL_REPO=extra/soundtouch +IJK_SOUNDTOUCH_LOCAL_REPO=$BASEDIR/extra/soundtouch set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull soundtouch base ==" sh $TOOLS/pull-repo-base.sh $IJK_SOUNDTOUCH_UPSTREAM $IJK_SOUNDTOUCH_LOCAL_REPO echo "== pull soundtouch fork ==" -sh $TOOLS/pull-repo-ref.sh $IJK_SOUNDTOUCH_FORK ijkmedia/ijksoundtouch ${IJK_SOUNDTOUCH_LOCAL_REPO} -cd ijkmedia/ijksoundtouch +sh $TOOLS/pull-repo-ref.sh $IJK_SOUNDTOUCH_FORK $BASEDIR/ijkmedia/ijksoundtouch ${IJK_SOUNDTOUCH_LOCAL_REPO} +cd $BASEDIR/ijkmedia/ijksoundtouch git checkout ${IJK_SOUNDTOUCH_COMMIT} cd - diff --git a/init-android-libyuv.sh b/init/init-libyuv.sh similarity index 78% rename from init-android-libyuv.sh rename to init/init-libyuv.sh index d1adf4b549..18b9c5e22e 100755 --- a/init-android-libyuv.sh +++ b/init/init-libyuv.sh @@ -16,20 +16,22 @@ # limitations under the License. # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") IJK_LIBYUV_UPSTREAM=https://github.com/Bilibili/libyuv.git IJK_LIBYUV_FORK=https://github.com/Bilibili/libyuv.git IJK_LIBYUV_COMMIT=ijk-r0.2.1-dev -IJK_LIBYUV_LOCAL_REPO=extra/libyuv +IJK_LIBYUV_LOCAL_REPO=$BASEDIR/extra/libyuv set -e -TOOLS=tools +TOOLS=$BASEDIR/tools echo "== pull libyuv base ==" sh $TOOLS/pull-repo-base.sh $IJK_LIBYUV_UPSTREAM $IJK_LIBYUV_LOCAL_REPO echo "== pull libyuv fork ==" -sh $TOOLS/pull-repo-ref.sh $IJK_LIBYUV_FORK ijkmedia/ijkyuv ${IJK_LIBYUV_LOCAL_REPO} -cd ijkmedia/ijkyuv +sh $TOOLS/pull-repo-ref.sh $IJK_LIBYUV_FORK $BASEDIR/ijkmedia/ijkyuv ${IJK_LIBYUV_LOCAL_REPO} +cd $BASEDIR/ijkmedia/ijkyuv git checkout ${IJK_LIBYUV_COMMIT} cd - diff --git a/init/init-portaudio.sh b/init/init-portaudio.sh new file mode 100755 index 0000000000..6fce7db7df --- /dev/null +++ b/init/init-portaudio.sh @@ -0,0 +1,37 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2013-2015 Bilibili +# Copyright (C) 2013-2015 Zhang Rui +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + +PORTAUDIO_UPSTREAM=https://git.assembla.com/portaudio.git +PORTAUDIO_FORK=https://git.assembla.com/portaudio.git +PORTAUDIO_COMMIT=396fe4b6699ae929d3a685b3ef8a7e97396139a4 +PORTAUDIO_LOCAL_REPO=$BASEDIR/extra/portaudio + +set -e +TOOLS=$BASEDIR/tools + +echo "== pull portaudio base ==" +sh $TOOLS/pull-repo-base.sh $PORTAUDIO_UPSTREAM $PORTAUDIO_LOCAL_REPO + +echo "== pull portaudio fork ==" +sh $TOOLS/pull-repo-ref.sh $PORTAUDIO_FORK $BASEDIR/ijkmedia/portaudio ${PORTAUDIO_LOCAL_REPO} +cd $BASEDIR/ijkmedia/portaudio +git checkout ${PORTAUDIO_COMMIT} -b ijkplayer +cd - diff --git a/osx/compile-ffmpeg.sh b/osx/compile-ffmpeg.sh index 9cccc574e0..90f7a06717 100755 --- a/osx/compile-ffmpeg.sh +++ b/osx/compile-ffmpeg.sh @@ -38,7 +38,7 @@ echo_archs() { echo "FF_ALL_ARCHS = $FF_ALL_ARCHS" } -FF_LIBS="lcompat ibavcodec libavfilter libavformat libavutil libswscale libswresample" +FF_LIBS="libcompat libavcodec libavfilter libavformat libavutil libswscale libswresample" @@ -46,7 +46,6 @@ FF_LIBS="lcompat ibavcodec libavfilter libavformat libavutil libswscale libswres if [ "$FF_TARGET" = "x86_64" ]; then echo_archs sh tools/do-compile-ffmpeg.sh $FF_TARGET $FF_TARGET_EXTRA - do_lipo_all elif [ "$FF_TARGET" = "all" ]; then echo_archs for ARCH in $FF_ALL_ARCHS From d2168ab9632b2beb0ce9217d62e18db6802c022e Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 5 Jan 2020 14:33:53 +0800 Subject: [PATCH 087/163] docs: add build step for Mac OS https://github.com/befovy/fijkplayer/issues/138 --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index e319334895..50f3378970 100644 --- a/README.md +++ b/README.md @@ -246,8 +246,30 @@ cd ios # ``` +### Build for Mac OS + +Build ffmpeg for Max OS +``` +./init-osx.sh +cd osx && ./compile-ffmpeg.sh +``` + +Build ijkplayer for Max OS + +``` +cd desktop +mkdir cmake-build-debug && cd cmake-build-debug +cmake .. -DCMAKE_BUILD_TYPE="Debug" +make IjkPlayer +make tuidemo +``` + +tuidemo is a terminal UI demo for ijkplayer in progress, it can't display video yet. + +`libIjkPlayer.dylib` is the output dynamic library. ### Support (支持) ### + - Please do not send e-mail to me. Public technical discussion on github is preferred. - 请尽量在 github 上公开讨论[技术问题](https://github.com/befovy/ijkplayer/issues),不要以邮件方式私下询问,恕不一一回复。 From 9e2ef174096dfe0750a0030f4c2ec6a3f4fe847c Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 5 Jan 2020 23:28:31 +0800 Subject: [PATCH 088/163] feat: add start and pause available during async-preparing --- ijkmedia/ijkplayer/ff_ffplay.c | 37 +++++++++++++++++----------------- ijkmedia/ijkplayer/ijkplayer.c | 31 +++++++++++++--------------- 2 files changed, 33 insertions(+), 35 deletions(-) diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index 5ed8b11453..e6ed1f7451 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -921,11 +921,9 @@ static void video_image_display2(FFPlayer *ffp) } } } - if (ffp->render_wait_start && !ffp->start_on_prepared && is->pause_req) { - if (!ffp->first_video_frame_rendered) { - ffp->first_video_frame_rendered = 1; - ffp_notify_msg1(ffp, FFP_MSG_VIDEO_RENDERING_START); - } + if (!ffp->first_video_frame_rendered && ffp->render_wait_start && + !ffp->start_on_prepared && is->pause_req) { + ALOGI("render_wait_start wait first video render\n"); while (is->pause_req && !is->abort_request) { SDL_Delay(20); } @@ -935,6 +933,7 @@ static void video_image_display2(FFPlayer *ffp) if (!ffp->first_video_frame_rendered) { ffp->first_video_frame_rendered = 1; ffp_notify_msg1(ffp, FFP_MSG_VIDEO_RENDERING_START); + ALOGI("first video frame rendered\n"); } if (is->latest_video_seek_load_serial == vp->serial) { @@ -2727,10 +2726,7 @@ static void sdl_audio_callback(void *opaque, Uint8 *stream, int len) set_clock_at(&is->audclk, is->audio_clock - (double)(is->audio_write_buf_size) / is->audio_tgt.bytes_per_sec - SDL_AoutGetLatencySeconds(ffp->aout), is->audio_clock_serial, ffp->audio_callback_time / 1000000.0); sync_clock_to_slave(&is->extclk, &is->audclk); } - if (!ffp->first_audio_frame_rendered) { - ffp->first_audio_frame_rendered = 1; - ffp_notify_msg1(ffp, FFP_MSG_AUDIO_RENDERING_START); - } + if (is->latest_audio_seek_load_serial == is->audio_clock_serial) { #ifdef WIN32 @@ -2747,11 +2743,19 @@ static void sdl_audio_callback(void *opaque, Uint8 *stream, int len) } } - if (ffp->render_wait_start && !ffp->start_on_prepared && is->pause_req) { + if (!ffp->first_audio_frame_rendered && ffp->render_wait_start && + !ffp->start_on_prepared && is->pause_req) { + ALOGI("render_wait_start wait first audio render\n"); while (is->pause_req && !is->abort_request) { SDL_Delay(20); } } + + if (!ffp->first_audio_frame_rendered) { + ffp->first_audio_frame_rendered = 1; + ffp_notify_msg1(ffp, FFP_MSG_AUDIO_RENDERING_START); + ALOGI("first audio frame rendered\n"); + } } static int audio_open(FFPlayer *opaque, int64_t wanted_channel_layout, int wanted_nb_channels, int wanted_sample_rate, struct AudioParams *audio_hw_params) @@ -2974,7 +2978,8 @@ static int stream_component_open(FFPlayer *ffp, int stream_index) } if ((ret = decoder_start(&is->auddec, audio_thread, ffp, "ff_audio_dec")) < 0) goto out; - SDL_AoutPauseAudio(ffp->aout, 0); + if (!is->paused) + SDL_AoutPauseAudio(ffp->aout, 0); break; case AVMEDIA_TYPE_VIDEO: is->video_stream = stream_index; @@ -3357,7 +3362,7 @@ static int read_thread(void *arg) if (ffp->infinite_buffer < 0 && is->realtime) ffp->infinite_buffer = 1; - if (!ffp->render_wait_start && !ffp->start_on_prepared) + if (is->pause_req && !ffp->render_wait_start) toggle_pause(ffp, 1); if (is->video_st && is->video_st->codecpar) { AVCodecParameters *codecpar = is->video_st->codecpar; @@ -3366,15 +3371,11 @@ static int read_thread(void *arg) } ffp->prepared = true; ffp_notify_msg1(ffp, FFP_MSG_PREPARED); - if (!ffp->render_wait_start && !ffp->start_on_prepared) { - while (is->pause_req && !is->abort_request && - !ffp->render_wait_start && !ffp->start_on_prepared) { + if (!ffp->render_wait_start) { + while (is->pause_req && !is->abort_request) { SDL_Delay(20); } } - if (is->pause_req && ffp->start_on_prepared) { - ffp->auto_resume = true; - } if (ffp->auto_resume) { ffp_notify_msg1(ffp, FFP_REQ_START); diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index f6ddbe90a5..dbd16472f6 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -448,7 +448,7 @@ static int ikjmp_chkst_start_l(int mp_state) { MPST_RET_IF_EQ(mp_state, MP_STATE_IDLE); MPST_RET_IF_EQ(mp_state, MP_STATE_INITIALIZED); - MPST_RET_IF_EQ(mp_state, MP_STATE_ASYNC_PREPARING); + // MPST_RET_IF_EQ(mp_state, MP_STATE_ASYNC_PREPARING); // MPST_RET_IF_EQ(mp_state, MP_STATE_PREPARED); // MPST_RET_IF_EQ(mp_state, MP_STATE_STARTED); // MPST_RET_IF_EQ(mp_state, MP_STATE_PAUSED); @@ -463,19 +463,11 @@ static int ikjmp_chkst_start_l(int mp_state) static int ijkmp_start_l(IjkMediaPlayer *mp) { assert(mp); - int retval = 0; - if (mp->mp_state == MP_STATE_ASYNC_PREPARING) { - mp->ffplayer->start_on_prepared = 1; - retval = 0; - } else { - retval = ikjmp_chkst_start_l(mp->mp_state); - if (retval == 0) { - ffp_remove_msg(mp->ffplayer, FFP_REQ_START); - ffp_remove_msg(mp->ffplayer, FFP_REQ_PAUSE); - ffp_notify_msg1(mp->ffplayer, FFP_REQ_START); - } - } - return retval; + MP_RET_IF_FAILED(ikjmp_chkst_start_l(mp->mp_state)); + ffp_remove_msg(mp->ffplayer, FFP_REQ_START); + ffp_remove_msg(mp->ffplayer, FFP_REQ_PAUSE); + ffp_notify_msg1(mp->ffplayer, FFP_REQ_START); + return 0; } int ijkmp_start(IjkMediaPlayer *mp) @@ -493,7 +485,7 @@ static int ikjmp_chkst_pause_l(int mp_state) { MPST_RET_IF_EQ(mp_state, MP_STATE_IDLE); MPST_RET_IF_EQ(mp_state, MP_STATE_INITIALIZED); - MPST_RET_IF_EQ(mp_state, MP_STATE_ASYNC_PREPARING); + // MPST_RET_IF_EQ(mp_state, MP_STATE_ASYNC_PREPARING); // MPST_RET_IF_EQ(mp_state, MP_STATE_PREPARED); // MPST_RET_IF_EQ(mp_state, MP_STATE_STARTED); // MPST_RET_IF_EQ(mp_state, MP_STATE_PAUSED); @@ -737,7 +729,7 @@ int ijkmp_get_msg(IjkMediaPlayer *mp, AVMessage *msg, int block) // FIXME: 1: onError() ? av_log(mp->ffplayer, AV_LOG_DEBUG, "FFP_MSG_PREPARED: expecting mp_state==MP_STATE_ASYNC_PREPARING\n"); } - if (!mp->ffplayer->start_on_prepared) { + if (mp->ffplayer->is && mp->ffplayer->is->pause_req) { ijkmp_change_state_l(mp, MP_STATE_PAUSED); } else { ijkmp_change_state_l(mp, MP_STATE_STARTED); @@ -784,6 +776,9 @@ int ijkmp_get_msg(IjkMediaPlayer *mp, AVMessage *msg, int block) } mp->restart = 0; mp->restart_from_beginning = 0; + } else if(mp->mp_state == MP_STATE_ASYNC_PREPARING) { + av_log(mp->ffplayer, AV_LOG_DEBUG, "ijkmp_get_msg: FFP_REQ_START: start from async preparing\n"); + ffp_start_l(mp->ffplayer); } else { av_log(mp->ffplayer, AV_LOG_DEBUG, "ijkmp_get_msg: FFP_REQ_START: start on fly\n"); retval = ffp_start_l(mp->ffplayer); @@ -798,7 +793,9 @@ int ijkmp_get_msg(IjkMediaPlayer *mp, AVMessage *msg, int block) MPTRACE("ijkmp_get_msg: FFP_REQ_PAUSE\n"); continue_wait_next_msg = 1; pthread_mutex_lock(&mp->mutex); - if (0 == ikjmp_chkst_pause_l(mp->mp_state)) { + if (mp->mp_state == MP_STATE_ASYNC_PREPARING) { + ffp_pause_l(mp->ffplayer); + } else if (0 == ikjmp_chkst_pause_l(mp->mp_state)) { int pause_ret = ffp_pause_l(mp->ffplayer); if (pause_ret == 0) ijkmp_change_state_l(mp, MP_STATE_PAUSED); From c64d2ab5918468753630cb4e1e5364c0df9aecb2 Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 6 Jan 2020 00:06:03 +0800 Subject: [PATCH 089/163] feat: add option cover_after_prepared, show the first video as cover finish https://github.com/befovy/fijkplayer/issues/118 closes https://github.com/befovy/ijkplayer/issues/12 --- ijkmedia/ijkplayer/ff_ffplay.c | 17 +++++++++++------ ijkmedia/ijkplayer/ff_ffplay_def.h | 1 + ijkmedia/ijkplayer/ff_ffplay_options.h | 3 ++- .../ijkmedia/ijkplayer/ios/ijkplayer_ios.h | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index e6ed1f7451..7e132c0347 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -928,12 +928,14 @@ static void video_image_display2(FFPlayer *ffp) SDL_Delay(20); } } - SDL_VoutDisplayYUVOverlay(ffp->vout, vp->bmp); + int ret = SDL_VoutDisplayYUVOverlay(ffp->vout, vp->bmp); ffp->stat.vfps = SDL_SpeedSamplerAdd(&ffp->vfps_sampler, FFP_SHOW_VFPS_FFPLAY, "vfps[ffplay]"); if (!ffp->first_video_frame_rendered) { ffp->first_video_frame_rendered = 1; ffp_notify_msg1(ffp, FFP_MSG_VIDEO_RENDERING_START); - ALOGI("first video frame rendered\n"); + ALOGI("first video frame rendered, ret %d\n", ret); + if (ffp->cover_after_prepared && is->pause_req) + ffp_pause_l(ffp); } if (is->latest_video_seek_load_serial == vp->serial) { @@ -1368,7 +1370,7 @@ static void video_refresh(FFPlayer *opaque, double *remaining_time) if (lastvp->serial != vp->serial) is->frame_timer = av_gettime_relative() / 1000000.0; - if (is->paused) + if (is->paused && (ffp->first_video_frame_rendered || !ffp->cover_after_prepared)) goto display; /* compute nominal last_duration */ @@ -2978,7 +2980,7 @@ static int stream_component_open(FFPlayer *ffp, int stream_index) } if ((ret = decoder_start(&is->auddec, audio_thread, ffp, "ff_audio_dec")) < 0) goto out; - if (!is->paused) + if (!is->paused && !ffp->cover_after_prepared) SDL_AoutPauseAudio(ffp->aout, 0); break; case AVMEDIA_TYPE_VIDEO: @@ -3362,7 +3364,7 @@ static int read_thread(void *arg) if (ffp->infinite_buffer < 0 && is->realtime) ffp->infinite_buffer = 1; - if (is->pause_req && !ffp->render_wait_start) + if (is->pause_req && !ffp->render_wait_start && !ffp->cover_after_prepared) toggle_pause(ffp, 1); if (is->video_st && is->video_st->codecpar) { AVCodecParameters *codecpar = is->video_st->codecpar; @@ -3371,7 +3373,7 @@ static int read_thread(void *arg) } ffp->prepared = true; ffp_notify_msg1(ffp, FFP_MSG_PREPARED); - if (!ffp->render_wait_start) { + if (!ffp->render_wait_start && !ffp->cover_after_prepared) { while (is->pause_req && !is->abort_request) { SDL_Delay(20); } @@ -3812,6 +3814,9 @@ static int video_refresh_thread(void *arg) if (remaining_time > 0.0) av_usleep((int)(int64_t)(remaining_time * 1000000.0)); remaining_time = REFRESH_RATE; + if (ffp->cover_after_prepared && !ffp->first_video_frame_rendered) { + is->force_refresh = true; + } if (is->show_mode != SHOW_MODE_NONE && (!is->paused || is->force_refresh)) video_refresh(ffp, &remaining_time); } diff --git a/ijkmedia/ijkplayer/ff_ffplay_def.h b/ijkmedia/ijkplayer/ff_ffplay_def.h index 21c4aedbe0..a989565390 100755 --- a/ijkmedia/ijkplayer/ff_ffplay_def.h +++ b/ijkmedia/ijkplayer/ff_ffplay_def.h @@ -724,6 +724,7 @@ typedef struct FFPlayer { char *mediacodec_default_name; int ijkmeta_delay_init; int render_wait_start; + int cover_after_prepared; } FFPlayer; #define fftime_to_milliseconds(ts) (av_rescale(ts, 1000, AV_TIME_BASE)) diff --git a/ijkmedia/ijkplayer/ff_ffplay_options.h b/ijkmedia/ijkplayer/ff_ffplay_options.h index fc0bef7c26..cd58694020 100644 --- a/ijkmedia/ijkplayer/ff_ffplay_options.h +++ b/ijkmedia/ijkplayer/ff_ffplay_options.h @@ -212,7 +212,8 @@ static const AVOption ffp_context_options[] = { OPTION_OFFSET(ijkmeta_delay_init), OPTION_INT(0, 0, 1) }, { "render-wait-start", "render wait start", OPTION_OFFSET(render_wait_start), OPTION_INT(0, 0, 1) }, - + { "cover-after-prepared", "display the first video frame as cover, then toggle pause", + OPTION_OFFSET(cover_after_prepared), OPTION_INT(0, 0, 1) }, { NULL } }; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h index aadd46e724..890a996580 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/ijkplayer_ios.h @@ -21,7 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "ijkplayer/ijkplayer.h" +#include "ijkplayer.h" #import "IJKSDLGLView.h" #if IJK_IOS From fd80887bca0656f7f2ab15eaddc2bb781af54784 Mon Sep 17 00:00:00 2001 From: befovy Date: Mon, 6 Jan 2020 12:50:08 +0800 Subject: [PATCH 090/163] chore: release 0.5.0 --- NEWS.md | 6 ++++++ android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 091e2043b1..37559f2a88 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,11 @@ tag next -------------------------------- + +tag f0.5.0 (2020-01-06) +-------------------------------- +- feat: add option cover_after_prepared, show the first video as cover ([c64d2ab](https://github.com/befovy/ijkplayer/commit/c64d2ab5918468753630cb4e1e5364c0df9aecb2)) +- feat: make start and pause available during async-preparing ([9e2ef17](https://github.com/befovy/ijkplayer/commit/9e2ef174096dfe0750a0030f4c2ec6a3f4fe847c)) + tag f0.4.4 -------------------------------- - desktop: add libyuv for YUV2RGB diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 8f323baa5c..1af622f2c1 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.4.4 -VERSION_CODE=000404 +VERSION_NAME=0.5.0 +VERSION_CODE=000500 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index ef540a0e1e..2b1d5fd9df 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.4.4" + spec.version = "0.5.0" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.4.4/IJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.5.0/IJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index 188c74cebc..a0200ed729 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.4.4 + 0.5.0 CFBundleSignature ???? CFBundleVersion - 000404 + 000500 LSRequiresIPhoneOS UIFileSharingEnabled From f7764b6cd8b4da84910e57b94c0cd5614feb08e7 Mon Sep 17 00:00:00 2001 From: befovy <51129600+befovy@users.noreply.github.com> Date: Sun, 12 Jan 2020 10:19:39 +0800 Subject: [PATCH 091/163] feat: add libsrt compile support for Android and mac (#14) * feat: srt scripts WIP * feat: libsrt available on Mac OS * feat(osx): CMakeLists check if build SRT using pkt-config * feat(android): build ffmpeg with libsrt succeed --- android/contrib/.gitignore | 1 + android/contrib/compile-libsrt.sh | 103 ++++++++ android/contrib/tools/do-compile-ffmpeg.sh | 44 +++- android/contrib/tools/do-compile-libsrt.sh | 238 ++++++++++++++++++ android/contrib/tools/do-compile-openssl.sh | 8 +- android/contrib/tools/do-detect-env.sh | 2 +- .../fijkplayer-full/src/main/CMakeLists.txt | 10 +- config/module-mac.sh | 10 +- config/module.sh | 5 +- desktop/CMakeLists.txt | 42 ++-- init-android.sh | 2 +- init-osx.sh | 2 +- init/init-android-libsrt.sh | 45 ++++ ios/.gitignore | 3 + osx/.gitignore | 1 + osx/compile-libsrt.sh | 93 +++++++ osx/tools/do-compile-ffmpeg.sh | 22 +- osx/tools/do-compile-libsrt.sh | 113 +++++++++ 18 files changed, 698 insertions(+), 46 deletions(-) create mode 100755 android/contrib/compile-libsrt.sh create mode 100644 android/contrib/tools/do-compile-libsrt.sh create mode 100755 init/init-android-libsrt.sh create mode 100755 osx/compile-libsrt.sh create mode 100644 osx/tools/do-compile-libsrt.sh diff --git a/android/contrib/.gitignore b/android/contrib/.gitignore index 7838ae1b98..130589f497 100644 --- a/android/contrib/.gitignore +++ b/android/contrib/.gitignore @@ -2,3 +2,4 @@ build ffmpeg-* libsoxr-* openssl-* +libsrt-* \ No newline at end of file diff --git a/android/contrib/compile-libsrt.sh b/android/contrib/compile-libsrt.sh new file mode 100755 index 0000000000..bedfab84ec --- /dev/null +++ b/android/contrib/compile-libsrt.sh @@ -0,0 +1,103 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2013-2014 Zhang Rui +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#---------- +UNI_BUILD_ROOT=`pwd` +FF_TARGET=$1 +set -e +set +x + +FF_ACT_ARCHS_32="armv5 armv7a x86" +FF_ACT_ARCHS_64="armv5 armv7a arm64 x86 x86_64" +FF_ACT_ARCHS_ALL=$FF_ACT_ARCHS_64 + +echo_archs() { + echo "====================" + echo "[*] check archs" + echo "====================" + echo "FF_ALL_ARCHS = $FF_ACT_ARCHS_ALL" + echo "FF_ACT_ARCHS = $*" + echo "" +} + +echo_usage() { + echo "Usage:" + echo " compile-libsrt.sh armv5|armv7a|arm64|x86|x86_64" + echo " compile-libsrt.sh all|all32" + echo " compile-libsrt.sh all64" + echo " compile-libsrt.sh clean" + echo " compile-libsrt.sh check" + exit 1 +} + +echo_nextstep_help() { + #---------- + echo "" + echo "--------------------" + echo "[*] Finished" + echo "--------------------" + echo "# to continue to build ffmpeg, run script below," + echo "sh compile-ffmpeg.sh " + echo "# to continue to build ijkplayer, run script below," + echo "sh compile-ijk.sh " +} + +#---------- +case "$FF_TARGET" in + "") + echo_archs armv7a + sh tools/do-compile-libsrt.sh armv7a + ;; + armv5|armv7a|arm64|x86|x86_64) + echo_archs $FF_TARGET + sh tools/do-compile-libsrt.sh $FF_TARGET + echo_nextstep_help + ;; + all32) + echo_archs $FF_ACT_ARCHS_32 + for ARCH in $FF_ACT_ARCHS_32 + do + sh tools/do-compile-libsrt.sh $ARCH + done + echo_nextstep_help + ;; + all|all64) + echo_archs $FF_ACT_ARCHS_64 + for ARCH in $FF_ACT_ARCHS_64 + do + sh tools/do-compile-libsrt.sh $ARCH + done + echo_nextstep_help + ;; + clean) + echo_archs FF_ACT_ARCHS_64 + for ARCH in $FF_ACT_ARCHS_ALL + do + if [ -d libsrt-$ARCH ]; then + cd libsrt-$ARCH && git clean -xdf && cd - + fi + done + rm -rf ./build/libsrt-* + ;; + check) + echo_archs FF_ACT_ARCHS_ALL + ;; + *) + echo_usage + exit 1 + ;; +esac diff --git a/android/contrib/tools/do-compile-ffmpeg.sh b/android/contrib/tools/do-compile-ffmpeg.sh index d6b3ba639d..f2d5bd22f5 100755 --- a/android/contrib/tools/do-compile-ffmpeg.sh +++ b/android/contrib/tools/do-compile-ffmpeg.sh @@ -40,7 +40,7 @@ fi FF_BUILD_ROOT=`pwd` -FF_ANDROID_PLATFORM=android-9 +FF_ANDROID_PLATFORM=android-14 FF_BUILD_NAME= @@ -52,6 +52,9 @@ FF_DEP_OPENSSL_LIB= FF_DEP_LIBSOXR_INC= FF_DEP_LIBSOXR_LIB= +FF_DEP_LIBSRT_INC= +FF_DEP_LIBSRT_LIB= + FF_CFG_FLAGS= FF_EXTRA_CFLAGS= @@ -79,6 +82,7 @@ if [ "$FF_ARCH" = "armv7a" ]; then FF_BUILD_NAME=ffmpeg-armv7a FF_BUILD_NAME_OPENSSL=openssl-armv7a FF_BUILD_NAME_LIBSOXR=libsoxr-armv7a + FF_BUILD_NAME_LIBSRT=libsrt-armv7a FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME FF_CROSS_PREFIX=arm-linux-androideabi @@ -97,6 +101,7 @@ elif [ "$FF_ARCH" = "armv5" ]; then FF_BUILD_NAME=ffmpeg-armv5 FF_BUILD_NAME_OPENSSL=openssl-armv5 FF_BUILD_NAME_LIBSOXR=libsoxr-armv5 + FF_BUILD_NAME_LIBSRT=libsrt-armv5 FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME FF_CROSS_PREFIX=arm-linux-androideabi @@ -113,6 +118,7 @@ elif [ "$FF_ARCH" = "x86" ]; then FF_BUILD_NAME=ffmpeg-x86 FF_BUILD_NAME_OPENSSL=openssl-x86 FF_BUILD_NAME_LIBSOXR=libsoxr-x86 + FF_BUILD_NAME_LIBSRT=libsrt-x86 FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME FF_CROSS_PREFIX=i686-linux-android @@ -131,6 +137,7 @@ elif [ "$FF_ARCH" = "x86_64" ]; then FF_BUILD_NAME=ffmpeg-x86_64 FF_BUILD_NAME_OPENSSL=openssl-x86_64 FF_BUILD_NAME_LIBSOXR=libsoxr-x86_64 + FF_BUILD_NAME_LIBSRT=libsrt-x86_64 FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME FF_CROSS_PREFIX=x86_64-linux-android @@ -149,6 +156,7 @@ elif [ "$FF_ARCH" = "arm64" ]; then FF_BUILD_NAME=ffmpeg-arm64 FF_BUILD_NAME_OPENSSL=openssl-arm64 FF_BUILD_NAME_LIBSOXR=libsoxr-arm64 + FF_BUILD_NAME_LIBSRT=libsrt-arm64 FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME FF_CROSS_PREFIX=aarch64-linux-android @@ -158,7 +166,6 @@ elif [ "$FF_ARCH" = "arm64" ]; then FF_EXTRA_CFLAGS="$FF_EXTRA_CFLAGS" FF_EXTRA_LDFLAGS="$FF_EXTRA_LDFLAGS" - FF_ASSEMBLER_SUB_DIRS="aarch64 neon" else @@ -175,15 +182,20 @@ if [ ! -d $FF_SOURCE ]; then exit 1 fi -FF_TOOLCHAIN_PATH=$FF_BUILD_ROOT/build/$FF_BUILD_NAME/toolchain +FF_TOOLCHAIN_PATH=$FF_BUILD_ROOT/build/toolchain-$FF_ARCH FF_MAKE_TOOLCHAIN_FLAGS="$FF_MAKE_TOOLCHAIN_FLAGS --install-dir=$FF_TOOLCHAIN_PATH" FF_SYSROOT=$FF_TOOLCHAIN_PATH/sysroot -FF_PREFIX=$FF_BUILD_ROOT/build/$FF_BUILD_NAME/output -FF_DEP_OPENSSL_INC=$FF_BUILD_ROOT/build/$FF_BUILD_NAME_OPENSSL/output/include -FF_DEP_OPENSSL_LIB=$FF_BUILD_ROOT/build/$FF_BUILD_NAME_OPENSSL/output/lib -FF_DEP_LIBSOXR_INC=$FF_BUILD_ROOT/build/$FF_BUILD_NAME_LIBSOXR/output/include -FF_DEP_LIBSOXR_LIB=$FF_BUILD_ROOT/build/$FF_BUILD_NAME_LIBSOXR/output/lib +FF_PREFIX=$FF_BUILD_ROOT/build/output-$FF_ARCH + +FF_DEP_OPENSSL_INC=$FF_PREFIX/include +FF_DEP_OPENSSL_LIB=$FF_PREFIX/lib + +FF_DEP_LIBSOXR_INC=$FF_PREFIX/include +FF_DEP_LIBSOXR_LIB=$FF_PREFIX/lib + +FF_DEP_LIBSRT_INC=$FF_PREFIX/include +FF_DEP_LIBSRT_LIB=$FF_PREFIX/lib case "$UNAME_S" in CYGWIN_NT-*) @@ -214,7 +226,7 @@ echo "[*] check ffmpeg env" echo "--------------------" export PATH=$FF_TOOLCHAIN_PATH/bin/:$PATH #export CC="ccache ${FF_CROSS_PREFIX}-gcc" -export CC="${FF_CROSS_PREFIX}-gcc" +export CC=${FF_CROSS_PREFIX}-gcc export LD=${FF_CROSS_PREFIX}-ld export AR=${FF_CROSS_PREFIX}-ar export STRIP=${FF_CROSS_PREFIX}-strip @@ -258,6 +270,19 @@ if [ -f "${FF_DEP_LIBSOXR_LIB}/libsoxr.a" ]; then FF_DEP_LIBS="$FF_DEP_LIBS -L${FF_DEP_LIBSOXR_LIB} -lsoxr" fi +if [ -f "${FF_DEP_LIBSRT_LIB}/libsrt.a" ]; then + echo "libsrt detected" + FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-libsrt" + FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-protocol=libsrt" + + FF_CFLAGS="$FF_CFLAGS -I${FF_DEP_LIBSRT_INC}" + FF_DEP_LIBS="$FF_DEP_LIBS -L${FF_DEP_LIBSRT_LIB} -lsrt -lc -lm -ldl -lcrypto -lssl -lstdc++" +fi + +export PKG_CONFIG_PATH="${FF_PREFIX}/lib/pkgconfig" + +FF_CFG_FLAGS="$FF_CFG_FLAGS --pkgconfigdir=${FF_PREFIX}/lib/pkgconfig" + FF_CFG_FLAGS="$FF_CFG_FLAGS $COMMON_FF_CFG_FLAGS" #-------------------- @@ -269,6 +294,7 @@ FF_CFG_FLAGS="$FF_CFG_FLAGS --cross-prefix=${FF_CROSS_PREFIX}-" FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-cross-compile" FF_CFG_FLAGS="$FF_CFG_FLAGS --target-os=linux" FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-pic" +FF_CFG_FLAGS="$FF_CFG_FLAGS --pkg-config=pkg-config" # FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-symver" if [ "$FF_ARCH" = "x86" ]; then diff --git a/android/contrib/tools/do-compile-libsrt.sh b/android/contrib/tools/do-compile-libsrt.sh new file mode 100644 index 0000000000..eb06c21df0 --- /dev/null +++ b/android/contrib/tools/do-compile-libsrt.sh @@ -0,0 +1,238 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2020-present befovy +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#-------------------- +set -e + +if [ -z "$ANDROID_NDK" ]; then + echo "You must define ANDROID_NDK before starting." + echo "They must point to your NDK directories.\n" + exit 1 +fi + +#-------------------- +# common defines +FF_ARCH=$1 +if [ -z "$FF_ARCH" ]; then + echo "You must specific an architecture 'arm, armv7a, x86, ...'.\n" + exit 1 +fi + + +FF_BUILD_ROOT=`pwd` +FF_ANDROID_PLATFORM=android-14 + + +FF_BUILD_NAME= +FF_SOURCE= +FF_CROSS_PREFIX= + +FF_CFG_FLAGS= +FF_PLATFORM_CFG_FLAGS= + +FF_EXTRA_CFLAGS= +FF_EXTRA_LDFLAGS= + + + +#-------------------- +echo "" +echo "--------------------" +echo "[*] make NDK standalone toolchain" +echo "--------------------" +. ./tools/do-detect-env.sh +FF_MAKE_TOOLCHAIN_FLAGS=$IJK_MAKE_TOOLCHAIN_FLAGS +FF_MAKE_FLAGS=$IJK_MAKE_FLAG +FF_GCC_VER=$IJK_GCC_VER +FF_GCC_64_VER=$IJK_GCC_64_VER + +ANDROID_ABI= +CMAKE_ANDROID_ARCH_ABI= + +#----- armv7a begin ----- +if [ "$FF_ARCH" = "armv7a" ]; then + FF_BUILD_NAME=libsrt-armv7a + FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME + + FF_CROSS_PREFIX=arm-linux-androideabi + FF_TOOLCHAIN_NAME=${FF_CROSS_PREFIX}-${FF_GCC_VER} + + FF_PLATFORM_CFG_FLAGS="android-armv7" + + ANDROID_ABI=armeabi-v7a + CMAKE_ANDROID_ARCH_ABI=armeabi-v7a + CMAKE_ANDROID_API=14 + +elif [ "$FF_ARCH" = "armv5" ]; then + FF_BUILD_NAME=libsrt-armv5 + FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME + + FF_CROSS_PREFIX=arm-linux-androideabi + FF_TOOLCHAIN_NAME=${FF_CROSS_PREFIX}-${FF_GCC_VER} + + FF_PLATFORM_CFG_FLAGS="android" + CMAKE_ANDROID_API=14 + ANDROID_ABI=armeabi + CMAKE_ANDROID_ARCH_ABI=armeabi +elif [ "$FF_ARCH" = "x86" ]; then + FF_BUILD_NAME=libsrt-x86 + FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME + + FF_CROSS_PREFIX=i686-linux-android + FF_TOOLCHAIN_NAME=x86-${FF_GCC_VER} + + FF_PLATFORM_CFG_FLAGS="android-x86" + CMAKE_ANDROID_API=14 + ANDROID_ABI=x86 + CMAKE_ANDROID_ARCH_ABI=x86 + # FF_CFG_FLAGS="$FF_CFG_FLAGS no-asm" + +elif [ "$FF_ARCH" = "x86_64" ]; then + FF_ANDROID_PLATFORM=android-21 + CMAKE_ANDROID_API=21 + FF_BUILD_NAME=libsrt-x86_64 + FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME + + FF_CROSS_PREFIX=x86_64-linux-android + FF_TOOLCHAIN_NAME=${FF_CROSS_PREFIX}-${FF_GCC_64_VER} + + FF_PLATFORM_CFG_FLAGS="linux-x86_64" + ANDROID_ABI=x86_64 + CMAKE_ANDROID_ARCH_ABI=x86_64 +elif [ "$FF_ARCH" = "arm64" ]; then + FF_ANDROID_PLATFORM=android-21 + CMAKE_ANDROID_API=21 + FF_BUILD_NAME=libsrt-arm64 + FF_SOURCE=$FF_BUILD_ROOT/$FF_BUILD_NAME + + FF_CROSS_PREFIX=aarch64-linux-android + FF_TOOLCHAIN_NAME=${FF_CROSS_PREFIX}-${FF_GCC_64_VER} + + FF_PLATFORM_CFG_FLAGS="linux-aarch64" + + ANDROID_ABI=arm64-v8a + CMAKE_ANDROID_ARCH_ABI=arm64-v8a +else + echo "unknown architecture $FF_ARCH"; + exit 1 +fi + +FF_TOOLCHAIN_PATH=$FF_BUILD_ROOT/build/toolchain-$FF_ARCH + +FF_SYSROOT=$FF_TOOLCHAIN_PATH/sysroot +FF_PREFIX=$FF_BUILD_ROOT/build/output-$FF_ARCH + +mkdir -p $FF_PREFIX +# mkdir -p $FF_SYSROOT + + +#-------------------- +echo "" +echo "--------------------" +echo "[*] make NDK standalone toolchain" +echo "--------------------" +. ./tools/do-detect-env.sh +FF_MAKE_TOOLCHAIN_FLAGS=$IJK_MAKE_TOOLCHAIN_FLAGS +FF_MAKE_FLAGS=$IJK_MAKE_FLAG + + +FF_MAKE_TOOLCHAIN_FLAGS="$FF_MAKE_TOOLCHAIN_FLAGS --install-dir=$FF_TOOLCHAIN_PATH" +FF_TOOLCHAIN_TOUCH="$FF_TOOLCHAIN_PATH/touch" +if [ ! -f "$FF_TOOLCHAIN_TOUCH" ]; then + $ANDROID_NDK/build/tools/make-standalone-toolchain.sh \ + $FF_MAKE_TOOLCHAIN_FLAGS \ + --platform=$FF_ANDROID_PLATFORM \ + --toolchain=$FF_TOOLCHAIN_NAME + touch $FF_TOOLCHAIN_TOUCH; +fi + + +#-------------------- +echo "" +echo "--------------------" +echo "[*] check libsrt env" +echo "--------------------" +export PATH=$FF_TOOLCHAIN_PATH/bin:$PATH + +export COMMON_FF_CFG_FLAGS= + + +FF_CFG_FLAGS="$FF_CFG_FLAGS $COMMON_FF_CFG_FLAGS" + +#-------------------- +# Standard options: +# FF_CFG_FLAGS="$FF_CFG_FLAGS zlib-dynamic" +# FF_CFG_FLAGS="$FF_CFG_FLAGS no-shared" +# FF_CFG_FLAGS="$FF_CFG_FLAGS --openssldir=$FF_PREFIX" + +export PKG_CONFIG_PATH="${FF_PREFIX}/lib/pkgconfig" + +FF_CFG_FLAGS="$FF_CFG_FLAGS --cmake-system-name=Android" +FF_CFG_FLAGS="$FF_CFG_FLAGS --android-toolchain=gcc" +FF_CFG_FLAGS="$FF_CFG_FLAGS --with-compiler-prefix=${FF_CROSS_PREFIX}-" +FF_CFG_FLAGS="$FF_CFG_FLAGS --with-target-path=$FF_TOOLCHAIN_PATH" + +FF_CFG_FLAGS="$FF_CFG_FLAGS --android-abi=$ANDROID_ABI" +FF_CFG_FLAGS="$FF_CFG_FLAGS --cmake-android-arch-abi=$CMAKE_ANDROID_ARCH_ABI" +FF_CFG_FLAGS="$FF_CFG_FLAGS --android-stl=c++_static" +FF_CFG_FLAGS="$FF_CFG_FLAGS --cmake-android-api=$CMAKE_ANDROID_API" + +# FF_CFG_FLAGS="$FF_CFG_FLAGS --cmake-android-standalone-toolchain=${FF_TOOLCHAIN_PATH}" +FF_CFG_FLAGS="$FF_CFG_FLAGS --cmake-prefix-path=${FF_PREFIX}" +FF_CFG_FLAGS="$FF_CFG_FLAGS --cmake-install-prefix=${FF_PREFIX}" +FF_CFG_FLAGS="$FF_CFG_FLAGS --use-openssl-pc=off" +FF_CFG_FLAGS="$FF_CFG_FLAGS --openssl-include-dir=${FF_PREFIX}/include" +FF_CFG_FLAGS="$FF_CFG_FLAGS --openssl-ssl-library=${FF_PREFIX}/lib/libssl.a" +FF_CFG_FLAGS="$FF_CFG_FLAGS --openssl-crypto-library=${FF_PREFIX}/lib/libcrypto.a" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-shared=off --enable-c++11=off" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-static=on" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-apps=off" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-c++-deps=on" +FF_CFG_FLAGS="$FF_CFG_FLAGS --use-static-libstdc++=on" + + +export CFLAGS="$CFLAGS -fPIE -fPIC" +export LDFLAGS="$LDFLAGS -pie" + +#-------------------- +echo "" +echo "--------------------" +echo "[*] configurate libsrt" +echo "--------------------" +cd $FF_SOURCE + +git clean -fx + +#if [ -f "./Makefile" ]; then +# echo 'reuse configure' +#else + echo "./configure $FF_CFG_FLAGS" + ./configure $FF_CFG_FLAGS +# --extra-cflags="$FF_CFLAGS $FF_EXTRA_CFLAGS" \ +# --extra-ldflags="$FF_EXTRA_LDFLAGS" +#fi + +#-------------------- +echo "" +echo "--------------------" +echo "[*] compile libsrt" +echo "--------------------" +make depend +make $FF_MAKE_FLAGS +make install + +sed -i '' 's|-lsrt |-lsrt -lc -lm -ldl -lcrypto -lssl -lstdc++|g' ${FF_PREFIX}/lib/pkgconfig/srt.pc diff --git a/android/contrib/tools/do-compile-openssl.sh b/android/contrib/tools/do-compile-openssl.sh index 20e8794954..6d9bcf68a6 100644 --- a/android/contrib/tools/do-compile-openssl.sh +++ b/android/contrib/tools/do-compile-openssl.sh @@ -35,7 +35,7 @@ fi FF_BUILD_ROOT=`pwd` -FF_ANDROID_PLATFORM=android-9 +FF_ANDROID_PLATFORM=android-14 FF_BUILD_NAME= @@ -119,10 +119,10 @@ else exit 1 fi -FF_TOOLCHAIN_PATH=$FF_BUILD_ROOT/build/$FF_BUILD_NAME/toolchain +FF_TOOLCHAIN_PATH=$FF_BUILD_ROOT/build/toolchain-$FF_ARCH FF_SYSROOT=$FF_TOOLCHAIN_PATH/sysroot -FF_PREFIX=$FF_BUILD_ROOT/build/$FF_BUILD_NAME/output +FF_PREFIX=$FF_BUILD_ROOT/build/output-$FF_ARCH mkdir -p $FF_PREFIX # mkdir -p $FF_SYSROOT @@ -168,6 +168,8 @@ FF_CFG_FLAGS="$FF_CFG_FLAGS --openssldir=$FF_PREFIX" FF_CFG_FLAGS="$FF_CFG_FLAGS --cross-compile-prefix=${FF_CROSS_PREFIX}-" FF_CFG_FLAGS="$FF_CFG_FLAGS $FF_PLATFORM_CFG_FLAGS" +export LDFLAGS="-pie" + #-------------------- echo "" echo "--------------------" diff --git a/android/contrib/tools/do-detect-env.sh b/android/contrib/tools/do-detect-env.sh index 36d64fdc3e..079156fb59 100644 --- a/android/contrib/tools/do-detect-env.sh +++ b/android/contrib/tools/do-detect-env.sh @@ -68,7 +68,7 @@ case "$IJK_NDK_REL" in IJK_NDK_REL=$(grep -o '^Pkg\.Revision.*=[0-9]*.*' $ANDROID_NDK/source.properties 2>/dev/null | sed 's/[[:space:]]*//g' | cut -d "=" -f 2) echo "IJK_NDK_REL=$IJK_NDK_REL" case "$IJK_NDK_REL" in - 11*|12*|13*|14*) + 11*|12*|13*|14*|15*) if test -d ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.9 then echo "NDKr$IJK_NDK_REL detected" diff --git a/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt b/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt index 6dd9352c89..f8679b54e0 100644 --- a/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt +++ b/android/ijkplayer/fijkplayer-full/src/main/CMakeLists.txt @@ -54,15 +54,15 @@ set(ANDROID_CONTRIB_PATH ${FIJKROOT_PATH}/android/contrib/build) message(STATUS "ANDROID_CONTRIB_PATH:${ANDROID_CONTRIB_PATH}") if (${ANDROID_ABI} STREQUAL "arm64-v8a") - set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-arm64/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/output-arm64) elseif (${ANDROID_ABI} STREQUAL "armeabi-v7a") - set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-armv7a/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/output-armv7a) elseif (${ANDROID_ABI} STREQUAL "armeabi") - set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-armv5/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/output-armv5) elseif (${ANDROID_ABI} STREQUAL "x86") - set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-x86/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/output-x86) elseif (${ANDROID_ABI} STREQUAL "x86_64") - set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/ffmpeg-x86_64/output) + set(IJK_FFMPAG_BUILD_DIR ${ANDROID_CONTRIB_PATH}/output-x86_64) endif () if (NOT DEFINED IJK_FFMPAG_BUILD_DIR) diff --git a/config/module-mac.sh b/config/module-mac.sh index 1c30d22488..51720aac9b 100755 --- a/config/module-mac.sh +++ b/config/module-mac.sh @@ -20,10 +20,10 @@ export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-swscale-alpha" # Program options: export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-programs" -export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffmpeg" -export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffplay" -export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffprobe" -export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffserver" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-ffmpeg" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-ffplay" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-ffprobe" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffserver" # Documentation options: export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-doc" @@ -57,7 +57,7 @@ export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-network" # Hardware accelerators: export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-dxva2" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vaapi" -export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vda" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vda" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vdpau" # Individual component options: diff --git a/config/module.sh b/config/module.sh index 4aec36f1eb..1a341db1f7 100755 --- a/config/module.sh +++ b/config/module.sh @@ -25,7 +25,7 @@ export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-programs" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffmpeg" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffplay" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffprobe" -export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffserver" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-ffserver" # Documentation options: export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-doc" @@ -60,7 +60,7 @@ export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-network" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-d3d11va" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-dxva2" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vaapi" -export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vda" +# export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vda" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-vdpau" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-videotoolbox" @@ -140,6 +140,7 @@ export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mjpeg2jpeg" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mjpega_dump_header" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=mov2textsub" export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=text2movsub" +export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --disable-bsf=eac3_core" # ./configure --list-protocols export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-protocols" diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 90c1c787fd..1a9f960b6a 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -56,7 +56,7 @@ set(IJK_DESKTOP_CONTRIB_PATH ${IJKROOT_PATH}/desktop/contrib) if (IJK_X64) if (APPLE) - set(IJK_FFMPAG_BUILD_DIR ${IJKROOT_PATH}/osx/contrib/build/ffmpeg-x86_64/output) + set(IJK_FFMPAG_BUILD_DIR ${IJKROOT_PATH}/osx/contrib/build/) else() set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x64) endif() @@ -85,8 +85,8 @@ add_definitions(-DIJK_DESKTOP_UNI) set(IJK_DESKTOP_UNI ON) set(FIJKPLAYER_SOURCE - ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.h - ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.c + ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.h + ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.c ) add_library(IjkPlayer SHARED ${FIJKPLAYER_SOURCE}) @@ -106,20 +106,16 @@ if (WIN32) target_compile_options(IjkPlayer PRIVATE /W3 /we4013) endif () -add_library(avcodec STATIC IMPORTED) -set_target_properties(avcodec PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libavcodec.a) +find_package(PkgConfig REQUIRED) -add_library(avformat STATIC IMPORTED) -set_target_properties(avformat PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libavformat.a) - -add_library(avutil STATIC IMPORTED) -set_target_properties(avutil PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libavutil.a) - -add_library(swresample STATIC IMPORTED) -set_target_properties(swresample PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libswresample.a) - -add_library(swscale STATIC IMPORTED) -set_target_properties(swscale PROPERTIES IMPORTED_LOCATION ${IJK_FFMPAG_BUILD_DIR}/lib/libswscale.a) +if (APPLE) + # set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${IJKROOT_PATH}/osx/contrib/build") + # set(ENV{PKG_CONFIG_PATH} "${IJKROOT_PATH}/osx/contrib/build") + set(CMAKE_PREFIX_PATH ${IJKROOT_PATH}/osx/contrib/build) + pkg_check_modules(OPENSSL_STATIC openssl) + pkg_check_modules(SRT_STATIC REQUIRED srt) + pkg_check_modules(FFMPEG_STATIC REQUIRED libavcodec libavformat libavutil libswresample libswscale) +endif () if (WIN32) add_library(pthread STATIC IMPORTED) @@ -127,9 +123,21 @@ if (WIN32) target_link_libraries(IjkPlayer pthread) endif () +message(STATUS "ffmpeg libs:${FFMPEG_STATIC_LIBRARIES}") -target_link_libraries(IjkPlayer avcodec avformat avutil swresample swscale) +target_link_libraries(IjkPlayer ${FFMPEG_STATIC_LIBRARIES}) +target_link_directories(IjkPlayer PUBLIC ${FFMPEG_STATIC_LIBRARY_DIRS}) target_link_libraries(IjkPlayer portaudio_static) +if (SRT_FOUND) + message(STATUS "SRT ${SRT_STATIC_LIBRARIES}") + target_link_libraries(IjkPlayer ${SRT_STATIC_LIBRARIES}) + target_link_directories(IjkPlayer PUBLIC ${SRT_STATIC_LIBRARY_DIRS}) +endif() + +if(APPLE AND SRT_STATIC_FOUND) + set_target_properties(IjkPlayer PROPERTIES LINK_FLAGS "-Wl,-no_compact_unwind") +endif() + target_compile_definitions(IjkPlayer PRIVATE -DBUILDING_IJK=1) if (WIN32) diff --git a/init-android.sh b/init-android.sh index f4430e982c..2bfd313cf3 100755 --- a/init-android.sh +++ b/init-android.sh @@ -19,7 +19,7 @@ # IJK_FFMPEG_UPSTREAM=git://git.videolan.org/ffmpeg.git IJK_FFMPEG_UPSTREAM=https://github.com/Bilibili/FFmpeg.git IJK_FFMPEG_FORK=https://github.com/Bilibili/FFmpeg.git -IJK_FFMPEG_COMMIT=ff3.4--ijk0.8.7--20180103--001 +IJK_FFMPEG_COMMIT=ff4.0--ijk0.8.25--20191031--001 IJK_FFMPEG_LOCAL_REPO=extra/ffmpeg set -e diff --git a/init-osx.sh b/init-osx.sh index ea85d1e757..5f92787a0b 100755 --- a/init-osx.sh +++ b/init-osx.sh @@ -18,7 +18,7 @@ # IJK_FFMPEG_UPSTREAM=git://git.videolan.org/ffmpeg.git IJK_FFMPEG_UPSTREAM=https://github.com/Bilibili/FFmpeg.git IJK_FFMPEG_FORK=https://github.com/Bilibili/FFmpeg.git -IJK_FFMPEG_COMMIT=ff3.4--ijk0.8.7--20180612--001 +IJK_FFMPEG_COMMIT=ff4.0--ijk0.8.25--20191231--001 IJK_FFMPEG_LOCAL_REPO=extra/ffmpeg IJK_GASP_UPSTREAM=https://github.com/Bilibili/gas-preprocessor.git diff --git a/init/init-android-libsrt.sh b/init/init-android-libsrt.sh new file mode 100755 index 0000000000..8ce8f30d7c --- /dev/null +++ b/init/init-android-libsrt.sh @@ -0,0 +1,45 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2020-present befovy +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + +IJK_LIBSRT_UPSTREAM=https://github.com/Haivision/srt.git +IJK_LIBSRT_FORK=https://github.com/Haivision/srt.git +IJK_LIBSRT_COMMIT=3209fe90e15cb699f2ee8672c25a4974b2f4abfb +IJK_LIBSRT_LOCAL_REPO=$BASEDIR/extra/libsrt + +set -e +TOOLS=$BASEDIR/tools + +echo "== pull libsrt base ==" +sh $TOOLS/pull-repo-base.sh $IJK_LIBSRT_UPSTREAM $IJK_LIBSRT_LOCAL_REPO + +function pull_fork() +{ + echo "== pull libsrt fork $1 ==" + sh $TOOLS/pull-repo-ref.sh $IJK_LIBSRT_FORK $BASEDIR/android/contrib/libsrt-$1 ${IJK_LIBSRT_LOCAL_REPO} + cd $BASEDIR/android/contrib/libsrt-$1 + git checkout ${IJK_LIBSRT_COMMIT} -B ijkplayer + cd - +} + +pull_fork "armv5" +pull_fork "armv7a" +pull_fork "arm64" +pull_fork "x86" +pull_fork "x86_64" diff --git a/ios/.gitignore b/ios/.gitignore index bcd2f11b48..8606e59850 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -2,6 +2,9 @@ xcuserdata # xcshareddata *.xccheckout CocoaPodsPub/FIJKPlayer.framework +CocoaPodsPub/IJKPlayer.framework CocoaPodsPub/FIJKPlayer.tar.gz +CocoaPodsPub/IJKPlayer.tar.gz CocoaPodsPub/FIJKPlayer.tar.xz +CocoaPodsPub/IJKPlayer.tar.xz CocoaPodsPub/LICENSE diff --git a/osx/.gitignore b/osx/.gitignore index a9ad8c94f4..b73fc22d94 100644 --- a/osx/.gitignore +++ b/osx/.gitignore @@ -1,3 +1,4 @@ contrib/build/ contrib/ffmpeg-x86_64/ +contrib/libsrt-x86_64 Pods/ diff --git a/osx/compile-libsrt.sh b/osx/compile-libsrt.sh new file mode 100755 index 0000000000..911497596c --- /dev/null +++ b/osx/compile-libsrt.sh @@ -0,0 +1,93 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2013-2014 Zhang Rui +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#---------- +UNI_BUILD_ROOT=`pwd` +FF_TARGET=$1 +set -e +set +x + +FF_ACT_ARCHS_64="x86_64" +FF_ACT_ARCHS_ALL=$FF_ACT_ARCHS_64 + +echo_archs() { + echo "====================" + echo "[*] check archs" + echo "====================" + echo "FF_ALL_ARCHS = $FF_ACT_ARCHS_ALL" + echo "FF_ACT_ARCHS = $*" + echo "" +} + +echo_usage() { + echo "Usage:" + echo " compile-libsrt.sh x86_64" + echo " compile-libsrt.sh all" + echo " compile-libsrt.sh clean" + echo " compile-libsrt.sh check" + exit 1 +} + +echo_nextstep_help() { + #---------- + echo "" + echo "--------------------" + echo "[*] Finished" + echo "--------------------" + echo "# to continue to build ffmpeg, run script below," + echo "sh compile-ffmpeg.sh " + echo "# to continue to build ijkplayer, run script below," + echo "sh compile-ijk.sh " +} + +#---------- +case "$FF_TARGET" in + "") + echo_archs x86_64 + sh tools/do-compile-libsrt.sh x86_64 + ;; + x86_64) + echo_archs $FF_TARGET + sh tools/do-compile-libsrt.sh $FF_TARGET + echo_nextstep_help + ;; + all) + echo_archs $FF_ACT_ARCHS_64 + for ARCH in $FF_ACT_ARCHS_64 + do + sh tools/do-compile-libsrt.sh $ARCH + done + echo_nextstep_help + ;; + clean) + echo_archs FF_ACT_ARCHS_64 + for ARCH in $FF_ACT_ARCHS_ALL + do + if [ -d libsrt-$ARCH ]; then + cd libsrt-$ARCH && git clean -xdf && cd - + fi + done + rm -rf ./build/libsrt-* + ;; + check) + echo_archs FF_ACT_ARCHS_ALL + ;; + *) + echo_usage + exit 1 + ;; +esac diff --git a/osx/tools/do-compile-ffmpeg.sh b/osx/tools/do-compile-ffmpeg.sh index 0d77d0bebe..f3e2229a4a 100755 --- a/osx/tools/do-compile-ffmpeg.sh +++ b/osx/tools/do-compile-ffmpeg.sh @@ -114,7 +114,6 @@ FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-demuxers" FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-encoder=mjpeg" FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-hwaccels" - FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-videotoolbox" echo "build_root: $FF_BUILD_ROOT" @@ -163,7 +162,7 @@ echo "[*] make osx toolchain $FF_BUILD_NAME" echo "====================" FF_BUILD_SOURCE="$FF_BUILD_ROOT/$FF_BUILD_NAME" -FF_BUILD_PREFIX="$FF_BUILD_ROOT/build/$FF_BUILD_NAME/output" +FF_BUILD_PREFIX="$FF_BUILD_ROOT/build/" FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --prefix=$FF_BUILD_PREFIX" @@ -209,11 +208,30 @@ if [ -f "${FFMPEG_DEP_OPENSSL_LIB}/libssl.a" ]; then FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I${FFMPEG_DEP_OPENSSL_INC}" FFMPEG_DEP_LIBS="$FFMPEG_CFLAGS -L${FFMPEG_DEP_OPENSSL_LIB} -lssl -lcrypto" + else echo "openssl not found" exit 1; fi + +FFMPEG_DEP_LIBSRT_INC=${FF_BUILD_ROOT}/build/libsrt-x86_64/output/include +FFMPEG_DEP_LIBSRT_LIB=${FF_BUILD_ROOT}/build/libsrt-x86_64/output/lib + +if [ -f "${FF_BUILD_ROOT}/build/lib/libsrt.a" ]; then + echo "detect libsrt" + + FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-libsrt" + + FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I${FFMPEG_DEP_LIBSRT_INC}" + FFMPEG_DEP_LIBS="$FFMPEG_CFLAGS -L${FFMPEG_DEP_LIBSRT_LIB} -lsrt" + +fi + +export PKG_CONFIG_PATH="${FF_BUILD_ROOT}/build/lib/pkgconfig" +echo "PKG_CONFIG_PATH ${PKG_CONFIG_PATH}" + + #-------------------- echo "\n--------------------" echo "[*] configure" diff --git a/osx/tools/do-compile-libsrt.sh b/osx/tools/do-compile-libsrt.sh new file mode 100644 index 0000000000..47b854654c --- /dev/null +++ b/osx/tools/do-compile-libsrt.sh @@ -0,0 +1,113 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2020-present befovy +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#-------------------- +set -e + +#-------------------- +# common defines +FF_ARCH=$1 +if [ -z "$FF_ARCH" ]; then + echo "You must specific an architecture 'x86-64, ...'.\n" + exit 1 +fi + + +FF_BUILD_ROOT=`pwd` + + +FF_BUILD_NAME= +FF_SOURCE= +FF_CROSS_PREFIX= + +FF_CFG_FLAGS= +FF_PLATFORM_CFG_FLAGS= + +FF_EXTRA_CFLAGS= +FF_EXTRA_LDFLAGS= + + +export PKG_CONFIG_PATH="${FF_BUILD_ROOT}/contrib/build/lib/pkgconfig" +echo "PKG_CONFIG_PATH ${PKG_CONFIG_PATH}" + +if [ "$FF_ARCH" = "x86_64" ]; then + + FF_BUILD_NAME=libsrt-x86_64 + FF_SOURCE=$FF_BUILD_ROOT/contrib/$FF_BUILD_NAME + +else + echo "unknown architecture $FF_ARCH"; + exit 1 +fi + + +FF_PREFIX=$FF_BUILD_ROOT/contrib/build/ + +mkdir -p $FF_PREFIX +# mkdir -p $FF_SYSROOT + + + +#-------------------- +echo "" +echo "--------------------" +echo "[*] check libsrt env" +echo "--------------------" +export PATH=$FF_TOOLCHAIN_PATH/bin:$PATH + +export COMMON_FF_CFG_FLAGS= + + +FF_CFG_FLAGS="$FF_CFG_FLAGS $COMMON_FF_CFG_FLAGS" + + +FF_CFG_FLAGS="$FF_CFG_FLAGS --cmake-prefix-path=${FF_PREFIX}" +FF_CFG_FLAGS="$FF_CFG_FLAGS --cmake-install-prefix=${FF_PREFIX}" +FF_CFG_FLAGS="$FF_CFG_FLAGS --use-openssl-pc=on" + +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-shared=off --enable-c++11=off" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-static=on" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-apps=on" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-c++-deps=on" +FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-cxx11=on" + +#-------------------- +echo "" +echo "--------------------" +echo "[*] configurate libsrt" +echo "--------------------" +cd $FF_SOURCE + +git clean -fx + +#if [ -f "./Makefile" ]; then +# echo 'reuse configure' +#else + echo "./configure $FF_CFG_FLAGS" + ./configure $FF_CFG_FLAGS +# --extra-cflags="$FF_CFLAGS $FF_EXTRA_CFLAGS" \ +# --extra-ldflags="$FF_EXTRA_LDFLAGS" +#fi + +#-------------------- +echo "" +echo "--------------------" +echo "[*] compile libsrt" +echo "--------------------" +make depend +make $FF_MAKE_FLAGS +make install From 9e78bbbe0e5cdab9b012a3d896abe7a1e1e52bcf Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 12 Jan 2020 11:08:10 +0800 Subject: [PATCH 092/163] docs: update repo url in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50f3378970..f177d57505 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ sudo dpkg-reconfigure dash ### Build Android ``` -git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-android +git clone https://github.com/befovy/ijkplayer.git ijkplayer-android cd ijkplayer-android git checkout -B latest k0.8.8 From 146958791c3bacb4f117fe8489e02abebf56be40 Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 12 Jan 2020 11:15:51 +0800 Subject: [PATCH 093/163] docs: update readme, remove checkout 0.8.8 --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index f177d57505..2458649d6b 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,6 @@ sudo dpkg-reconfigure dash ``` git clone https://github.com/befovy/ijkplayer.git ijkplayer-android cd ijkplayer-android -git checkout -B latest k0.8.8 ./init-android.sh From 48859d71f567067218d287ed439d448b2946bbdb Mon Sep 17 00:00:00 2001 From: befovy Date: Thu, 20 Feb 2020 22:41:50 +0800 Subject: [PATCH 094/163] fix: add consumerProguardFiles fix minify crash, add test sign --- android/ijkplayer/fijkplayer-full/build.gradle | 4 ++-- .../ijkplayer/ijkplayer-example/build.gradle | 16 ++++++++++++++-- android/ijkplayer/ijkplayer-example/test.key | Bin 0 -> 2061 bytes 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 android/ijkplayer/ijkplayer-example/test.key diff --git a/android/ijkplayer/fijkplayer-full/build.gradle b/android/ijkplayer/fijkplayer-full/build.gradle index fcbf88fcd5..fd88ed9d4a 100644 --- a/android/ijkplayer/fijkplayer-full/build.gradle +++ b/android/ijkplayer/fijkplayer-full/build.gradle @@ -27,7 +27,7 @@ android { targets "ijkplayer" } } - + consumerProguardFiles 'proguard-rules.pro' ndk { // Specifies the ABI configurations of your native // libraries Gradle should build and package with your APK. @@ -39,7 +39,7 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } diff --git a/android/ijkplayer/ijkplayer-example/build.gradle b/android/ijkplayer/ijkplayer-example/build.gradle index db3c246566..5af078255d 100644 --- a/android/ijkplayer/ijkplayer-example/build.gradle +++ b/android/ijkplayer/ijkplayer-example/build.gradle @@ -20,14 +20,26 @@ android { ndk { // Specifies the ABI configurations of your native // libraries Gradle should build and package with your APK. - abiFilters 'armeabi-v7a'//, 'arm64-v8a', 'armeabi', 'x86', 'x86_64' + abiFilters 'armeabi-v7a', 'arm64-v8a', 'armeabi', 'x86', 'x86_64' } } + + signingConfigs { + release { + keyAlias 'key0' + keyPassword 'befovy' + storeFile file('./test.key') + storePassword 'helloworld' + } + } + buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + signingConfig signingConfigs.release } + } flavorDimensions "ndkabi" diff --git a/android/ijkplayer/ijkplayer-example/test.key b/android/ijkplayer/ijkplayer-example/test.key new file mode 100644 index 0000000000000000000000000000000000000000..41a556d0dba8844b4014b7343e443d293fa20c73 GIT binary patch literal 2061 zcmV+o2=e#-?f&fm0006200031000311Z!n^FaQ7naAN;I$^ZZb0Wg9D{V)y&3M&Qy z1OX}n5di@O00e>r=~f*I;zHdlGeYM`fev9r#762ZaQ<}Nu;wnf{zxZjNw3(Wxf_E9?6I>3 zHX6^0{~oa|@@}sIS07}$F#IL0HvVT4?ZJ;Qz(+Rul$|Wslm}@&OFW7e1rKYo*_@i! z2!`;{I#*g|KF&AC*q5dLL0e8_xi~1M1-P%-!`{>2=d@tY%-~$j{4w^R(+`gwpmObv zM5KoCJsPYz3f^8HUszLFd#~|!$Mu?Iw@O?RNn>J0n;|ADyueaZ0HOW`z3rca{&^gx z38zJppi4#kyY^H5gwPj#htCb6)P6clL08NLxn0eiiWwhy;UJH!6tFaDuLUxXS8-C5 zKDC?dfbDo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VSF*GtaG%#8)5-|`k4h92N1P2obLS<=cX>MmQf&n5h4F(A+hDe6@ z4FLfG1potr0S^E$f&mHwf&l>l-l?Hzg=zCD6|}{tp>n}ns$!fWm|4n zrC2X8-uCv(w7-xPBXz`EXA21yT163Uk1QrAoV5Ow143A+j16@eOK{#fn zfL@Z0FbxI?Duzgg_YDC73k3iJf&l>l+$CjB%2*07FYcc2gKxmGC=kfllt~*i2Gh+1 zJZ;bSf&08UNv-2{n+-M?dtBb)(6&bLrw|_3G;U@XSJkjN?yg#XMk{!R>Y$~)&CX!R zC_2PqZJM?*&{UQv%&}2EK|4A}#r!P?R7zI#YMlcEOZB_yt@pg2wZa~{M?=H6KwhWBxbrH#)tWtkfupnEd%_U0it4~Ilk0& rtrgxx@~38Xrxw6ISC$RS!94fP&ac2B+V08L%lh$`)T`XGRNcVS@7Aj) literal 0 HcmV?d00001 From 5c3fef0c2d281cf3c047dd522ef288b25d8a345b Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 21 Feb 2020 10:50:23 +0800 Subject: [PATCH 095/163] fix: ios ffmpeg armv7 build error, update ffmpeg to 4.0 --- init-ios.sh | 2 +- .../IJKMediaDemo.xcodeproj/project.pbxproj | 16 +++++++++++----- .../IJKMediaPlayer/IJKFFMoviePlayerController.m | 2 +- ios/tools/do-compile-ffmpeg.sh | 2 ++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/init-ios.sh b/init-ios.sh index 41a25dc1a5..a6606ee6fd 100755 --- a/init-ios.sh +++ b/init-ios.sh @@ -19,7 +19,7 @@ # IJK_FFMPEG_UPSTREAM=git://git.videolan.org/ffmpeg.git IJK_FFMPEG_UPSTREAM=https://github.com/Bilibili/FFmpeg.git IJK_FFMPEG_FORK=https://github.com/Bilibili/FFmpeg.git -IJK_FFMPEG_COMMIT=ff3.4--ijk0.8.7--20180103--001 +IJK_FFMPEG_COMMIT=ff4.0--ijk0.8.25--20191031--001 IJK_FFMPEG_LOCAL_REPO=extra/ffmpeg IJK_GASP_UPSTREAM=https://github.com/Bilibili/gas-preprocessor.git diff --git a/ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj b/ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj index 08c24eb8a0..9073ab1139 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj +++ b/ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj @@ -314,7 +314,7 @@ E654EAD71B6B28B100B0F2D0 /* IJKMediaFramework.framework */, 21B5D5B022D8A5E500A1D26D /* IJKMediaFrameworkWithSSL.framework */, E654EAD91B6B28B100B0F2D0 /* IJKMediaFrameworkTests.xctest */, - 21B5D5B222D8A5E500A1D26D /* FIJKPlayer.framework */, + 21B5D5B222D8A5E500A1D26D /* IJKPlayer.framework */, ); name = Products; sourceTree = ""; @@ -389,10 +389,10 @@ remoteRef = 21B5D5AF22D8A5E500A1D26D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 21B5D5B222D8A5E500A1D26D /* FIJKPlayer.framework */ = { + 21B5D5B222D8A5E500A1D26D /* IJKPlayer.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = FIJKPlayer.framework; + path = IJKPlayer.framework; remoteRef = 21B5D5B122D8A5E500A1D26D /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -551,11 +551,16 @@ DEVELOPMENT_TEAM = 7SUQ9UM9P2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "IJKMediaDemo/IJKMediaDemo-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + "IJK_IOS=1", + ); INFOPLIST_FILE = "IJKMediaDemo/IJKMediaDemo-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = tv.danmaku.IJKMediaDemo.demo; + PRODUCT_BUNDLE_IDENTIFIER = tv.danmaku.IJKMediaDemo.befovy; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; TARGETED_DEVICE_FAMILY = 1; @@ -573,11 +578,12 @@ DEVELOPMENT_TEAM = 7SUQ9UM9P2; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "IJKMediaDemo/IJKMediaDemo-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = "IJK_IOS=1"; INFOPLIST_FILE = "IJKMediaDemo/IJKMediaDemo-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = tv.danmaku.IJKMediaDemo.demo; + PRODUCT_BUNDLE_IDENTIFIER = tv.danmaku.IJKMediaDemo.befovy; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; TARGETED_DEVICE_FAMILY = 1; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m index 5003992c88..762e3f73d7 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m @@ -42,7 +42,7 @@ #import "ijkplayer/ijkavformat/ijkioapplication.h" #include "string.h" -static const char *kIJKFFRequiredFFmpegVersion = "ff3.4--ijk0.8.7--20180103--001"; +static const char *kIJKFFRequiredFFmpegVersion = "ff4.0--ijk0.8.25--20191031--001"; // It means you didn't call shutdown if you found this object leaked. @interface IJKWeakHolder : NSObject diff --git a/ios/tools/do-compile-ffmpeg.sh b/ios/tools/do-compile-ffmpeg.sh index 28db9677e2..70165b9549 100755 --- a/ios/tools/do-compile-ffmpeg.sh +++ b/ios/tools/do-compile-ffmpeg.sh @@ -139,6 +139,7 @@ elif [ "$FF_ARCH" = "armv7" ]; then FF_BUILD_NAME_OPENSSL=openssl-armv7 FF_XCRUN_OSVERSION="-miphoneos-version-min=6.0" FF_XCODE_BITCODE="-fembed-bitcode" + FFMPEG_CFG_FLAGS_ARM="$FFMPEG_CFG_FLAGS_ARM --disable-asm" FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_ARM" # FFMPEG_CFG_CPU="--cpu=cortex-a8" elif [ "$FF_ARCH" = "armv7s" ]; then @@ -214,6 +215,7 @@ FFMPEG_DEP_OPENSSL_LIB=$FF_BUILD_ROOT/build/$FF_BUILD_NAME_OPENSSL/output/lib if [ -f "${FFMPEG_DEP_OPENSSL_LIB}/libssl.a" ]; then FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-openssl" + echo "OpenSSL Include" $FFMPEG_DEP_OPENSSL_INC FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I${FFMPEG_DEP_OPENSSL_INC}" FFMPEG_DEP_LIBS="$FFMPEG_CFLAGS -L${FFMPEG_DEP_OPENSSL_LIB} -lssl -lcrypto" fi From 9899c7e7f161c617546090bccd8bc9e7176d2326 Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 21 Feb 2020 12:50:24 +0800 Subject: [PATCH 096/163] chore(release): version 0.5.1 --- NEWS.md => CHANGELOG.md | 12 ++++++++++-- android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/FIJKPlayer.podspec | 4 ++-- .../IJKMediaDemo/IJKMediaDemo-Info.plist | 4 ++-- 4 files changed, 16 insertions(+), 8 deletions(-) rename NEWS.md => CHANGELOG.md (95%) diff --git a/NEWS.md b/CHANGELOG.md similarity index 95% rename from NEWS.md rename to CHANGELOG.md index 37559f2a88..a74fad85c9 100644 --- a/NEWS.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ -tag next --------------------------------- +--- +### 0.5.1 (2020-02-21) + +### Features + +* add libsrt compile support for Android and mac ([#14](https://github.com/befovy/ijkplayer/issues/14)) ([f7764b6](https://github.com/befovy/ijkplayer/commit/f7764b6cd8b4da84910e57b94c0cd5614feb08e7)) +* add consumerProguardFiles fix minify crash, add test sign ([48859d7](https://github.com/befovy/ijkplayer/commit/48859d71f567067218d287ed439d448b2946bbdb)) +* add missing constant ([30b8baa](https://github.com/befovy/ijkplayer/commit/30b8baa52f5de50cb997189be472ee7fe513c1c1)) + +--- tag f0.5.0 (2020-01-06) -------------------------------- diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index 1af622f2c1..d39877f675 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.5.0 -VERSION_CODE=000500 +VERSION_NAME=0.5.1 +VERSION_CODE=000501 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/FIJKPlayer.podspec index 2b1d5fd9df..7311ecd73f 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/FIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "FIJKPlayer" - spec.version = "0.5.0" + spec.version = "0.5.1" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.5.0/IJKPlayer.tar.gz" } + spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.5.1/IJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist index a0200ed729..e51ac99405 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKMediaDemo-Info.plist @@ -21,11 +21,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.5.0 + 0.5.1 CFBundleSignature ???? CFBundleVersion - 000500 + 000501 LSRequiresIPhoneOS UIFileSharingEnabled From bddc8c69511405458f0482946f2f5f9de5f852bf Mon Sep 17 00:00:00 2001 From: befovy Date: Fri, 21 Feb 2020 14:17:40 +0800 Subject: [PATCH 097/163] chore: add xcode shared schemes --- .../IJKMediaPlayer.xcodeproj/project.pbxproj | 6 ++ .../IJKMediaFrameworkWithSSL.xcscheme | 4 - .../xcshareddata/xcschemes/IJKPlayer.xcscheme | 67 +++++++++++++++ .../xcshareddata/xcschemes/Universal.xcscheme | 86 +++++++++++++++++++ 4 files changed, 159 insertions(+), 4 deletions(-) create mode 100644 ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/xcshareddata/xcschemes/IJKPlayer.xcscheme create mode 100644 ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/xcshareddata/xcschemes/Universal.xcscheme diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj index 987a6c4856..de7102518c 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj @@ -1827,6 +1827,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "arm64 x86_64 i386 armv7"; VERSIONING_SYSTEM = "apple-generic"; @@ -1885,6 +1886,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "arm64 x86_64 i386 armv7"; VERSIONING_SYSTEM = "apple-generic"; @@ -1942,6 +1944,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1994,6 +1997,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "tv.danmaku.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -2055,6 +2059,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; VERSIONING_SYSTEM = "apple-generic"; @@ -2111,6 +2116,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386"; VERSIONING_SYSTEM = "apple-generic"; diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/xcshareddata/xcschemes/IJKMediaFrameworkWithSSL.xcscheme b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/xcshareddata/xcschemes/IJKMediaFrameworkWithSSL.xcscheme index 693b354712..de33d6e818 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/xcshareddata/xcschemes/IJKMediaFrameworkWithSSL.xcscheme +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/xcshareddata/xcschemes/IJKMediaFrameworkWithSSL.xcscheme @@ -29,8 +29,6 @@ shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/xcshareddata/xcschemes/Universal.xcscheme b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/xcshareddata/xcschemes/Universal.xcscheme new file mode 100644 index 0000000000..cef9006390 --- /dev/null +++ b/ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/xcshareddata/xcschemes/Universal.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 5e49e7af12240284d11370e0d8478e4dce72f085 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 21 Mar 2020 18:44:22 +0800 Subject: [PATCH 098/163] chore: rename pod library name --- ios/CocoaPodsPub/{FIJKPlayer.podspec => BIJKPlayer.podspec} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ios/CocoaPodsPub/{FIJKPlayer.podspec => BIJKPlayer.podspec} (99%) diff --git a/ios/CocoaPodsPub/FIJKPlayer.podspec b/ios/CocoaPodsPub/BIJKPlayer.podspec similarity index 99% rename from ios/CocoaPodsPub/FIJKPlayer.podspec rename to ios/CocoaPodsPub/BIJKPlayer.podspec index 7311ecd73f..d16993c5b3 100644 --- a/ios/CocoaPodsPub/FIJKPlayer.podspec +++ b/ios/CocoaPodsPub/BIJKPlayer.podspec @@ -15,7 +15,7 @@ Pod::Spec.new do |spec| # summary should be tweet-length, and the description more in depth. # - spec.name = "FIJKPlayer" + spec.name = "BIJKPlayer" spec.version = "0.5.1" spec.summary = "ijkplayer iOS video player SDK" From 9e3da67ef7a1c0f71b93157a82f8bbb41331e5bc Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 29 Mar 2020 12:42:29 +0800 Subject: [PATCH 099/163] feat: add SDL2 audio and video render, add glfw video render. glfw video render is not complete --- .gitignore | 3 +- CMakeLists.txt | 27 +++ desktop/.gitignore | 9 +- desktop/CMakeLists.txt | 58 +++++-- desktop/README.md | 3 + desktop/sources/ijkplayer_demo.c | 105 ++++++++--- desktop/sources/ijkplayer_desktop.c | 5 + desktop/sources/ijkplayer_desktop.h | 9 +- ijkmedia/ijkplayer/desktop/pipeline_desktop.c | 31 ++-- ijkmedia/ijkplayer/desktop/pipeline_desktop.h | 2 + ijkmedia/ijkplayer/ff_ffplay.c | 9 +- ijkmedia/ijkplayer/ff_ffplay_def.h | 5 +- ijkmedia/ijkplayer/ff_ffplay_options.h | 4 + ijkmedia/ijkplayer/ijkplayer.c | 3 +- ijkmedia/ijkplayer/ijkplayer_internal.h | 1 - ijkmedia/ijksdl/CMakeLists.txt | 22 ++- .../ijksdl/desktop/ijksdl_aout_port_audio.c | 13 +- .../ijksdl/desktop/ijksdl_aout_sdl2_audio.c | 95 ++++++++++ .../ijksdl/desktop/ijksdl_aout_sdl2_audio.h | 32 ++++ ijkmedia/ijksdl/desktop/ijksdl_desktop.h | 3 + ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.c | 159 +++++++++++++++++ ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.h | 56 ++++++ .../ijksdl/desktop/ijksdl_desktop_vout_glfw.c | 101 +++++++++++ .../ijksdl/desktop/ijksdl_desktop_vout_glfw.h | 32 ++++ .../ijksdl/desktop/ijksdl_vout_sdl2_video.c | 163 ++++++++++++++++++ .../ijksdl/desktop/ijksdl_vout_sdl2_video.h | 33 ++++ ijkmedia/ijksdl/gles2/renderer.c | 2 +- ijkmedia/ijksdl/ijksdl_aout_internal.h | 1 + ijkmedia/ijksdl/ijksdl_audio.c | 3 + ijkmedia/ijksdl/ijksdl_audio.h | 5 + ijkmedia/ijksdl/ijksdl_container.h | 1 + ijkmedia/ijksdl/ijksdl_egl.h | 3 + ijkmedia/ijksdl/ijksdl_endian.h | 5 + ijkmedia/ijksdl/ijksdl_error.c | 2 + ijkmedia/ijksdl/ijksdl_error.h | 4 +- ijkmedia/ijksdl/ijksdl_fourcc.h | 5 + ijkmedia/ijksdl/ijksdl_gles2.h | 6 + ijkmedia/ijksdl/ijksdl_mutex.c | 37 ++-- ijkmedia/ijksdl/ijksdl_mutex.h | 9 +- ijkmedia/ijksdl/ijksdl_stdinc.c | 2 + ijkmedia/ijksdl/ijksdl_stdinc.h | 6 +- ijkmedia/ijksdl/ijksdl_thread.c | 5 +- ijkmedia/ijksdl/ijksdl_thread.h | 11 +- ijkmedia/ijksdl/ijksdl_timer.c | 2 + ijkmedia/ijksdl/ijksdl_timer.h | 5 +- ijkmedia/ijksdl/ijksdl_vout.c | 7 + ijkmedia/ijksdl/ijksdl_vout.h | 3 + .../ijkmedia/ijksdl/ios/ijksdl_thread_ios.m | 2 + 48 files changed, 1014 insertions(+), 95 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 desktop/README.md create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_aout_sdl2_audio.c create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_aout_sdl2_audio.h create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.c create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.h create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_desktop_vout_glfw.c create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_desktop_vout_glfw.h create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_vout_sdl2_video.c create mode 100644 ijkmedia/ijksdl/desktop/ijksdl_vout_sdl2_video.h diff --git a/.gitignore b/.gitignore index 3984f12e48..409e46bd27 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ local.properties # Android Studio .idea .gradle -build/ # Xcode xcuserdata @@ -46,3 +45,5 @@ xcshareddata # osx # osx/ +cmake-build-debug/ +cmake-build-release/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..a2b515b670 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,27 @@ +# +# Copyright (c) 2019-2020 befovy +# +# 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 +# + +cmake_minimum_required(VERSION 3.6) + +project("IjkPlayer") + +set(CMAKE_C_STANDARD 11) +set(CMAKE_CXX_STANDARD 11) +add_subdirectory(desktop) \ No newline at end of file diff --git a/desktop/.gitignore b/desktop/.gitignore index 2a3f028c36..37e27e37d0 100644 --- a/desktop/.gitignore +++ b/desktop/.gitignore @@ -1,5 +1,8 @@ -contrib/ffmpeg -contrib/ .vs/ +contrib/ +contrib/ffmpeg/ cmake-build-debug/ -cmake-build-release/ \ No newline at end of file +cmake-build-release/ +glad/ +spdlog/ +glfw/ \ No newline at end of file diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 1a9f960b6a..26c9b6cf02 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -34,9 +34,9 @@ message(STATUS "IJKROOT_PATH ${IJKROOT_PATH}") if (${CMAKE_BUILD_TYPE} STREQUAL "Release") - add_definitions(-DNDEBUG) + add_definitions(-DNDEBUG=1) elseif (${CMAKE_BUILD_TYPE} STREQUAL "Debug") - add_definitions(-DDEBUG) + add_definitions(-DDEBUG=1) endif () if (CMAKE_SIZEOF_VOID_P EQUAL 8) @@ -64,6 +64,9 @@ elseif (IJK_X86) set(IJK_FFMPAG_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/ffmpeg/x86) endif () +include(CMakePrintHelpers) +cmake_print_variables(IJK_FFMPAG_BUILD_DIR) + if (WIN32) if (IJK_X64) set(IJK_DESKTOP_PTHREAD_BUILD_DIR ${IJK_DESKTOP_CONTRIB_PATH}/pthreads-w32-2-9-1-release/Pre-built.2/lib/x64) @@ -81,12 +84,19 @@ else () endif () -add_definitions(-DIJK_DESKTOP_UNI) +find_package(SDL2 REQUIRED) + +add_definitions(-DUSE_SDL2=1) +include_directories(${SDL2_INCLUDE_DIRS}) + +add_definitions(-DIJK_DESKTOP_UNI=1) set(IJK_DESKTOP_UNI ON) set(FIJKPLAYER_SOURCE ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.h ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_desktop.c + #${CMAKE_CURRENT_LIST_DIR}/glad/include/glad/glad.h + ${CMAKE_CURRENT_LIST_DIR}/glfw/deps/glad_gl.c ) add_library(IjkPlayer SHARED ${FIJKPLAYER_SOURCE}) @@ -96,6 +106,8 @@ add_subdirectory(../ijkmedia ijkmedia) target_include_directories(IjkPlayer PRIVATE ${IJKROOT_PATH}/ijkmedia) target_include_directories(IjkPlayer PRIVATE ${IJK_FFMPAG_BUILD_DIR}/include) target_include_directories(IjkPlayer PRIVATE "${IJK_DESKTOP_PTHREAD_BUILD_DIR}/../../include") +#target_include_directories(IjkPlayer PRIVATE glad/include) +target_include_directories(IjkPlayer PRIVATE glfw/deps) target_link_libraries(IjkPlayer ijksdl_static ijkplayer_static yuv) @@ -106,15 +118,17 @@ if (WIN32) target_compile_options(IjkPlayer PRIVATE /W3 /we4013) endif () -find_package(PkgConfig REQUIRED) - if (APPLE) - # set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${IJKROOT_PATH}/osx/contrib/build") - # set(ENV{PKG_CONFIG_PATH} "${IJKROOT_PATH}/osx/contrib/build") - set(CMAKE_PREFIX_PATH ${IJKROOT_PATH}/osx/contrib/build) - pkg_check_modules(OPENSSL_STATIC openssl) - pkg_check_modules(SRT_STATIC REQUIRED srt) + find_package(PkgConfig REQUIRED QUIET) + set(ENV{PKG_CONFIG_PATH} "${IJKROOT_PATH}/osx/contrib/build/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}") pkg_check_modules(FFMPEG_STATIC REQUIRED libavcodec libavformat libavutil libswresample libswscale) + + cmake_print_variables(FFMPEG_STATIC_INCLUDE_DIRS) + cmake_print_variables(FFMPEG_STATIC_LIBRARIES) + + + target_link_libraries(IjkPlayer ${SDL2_LIBRARIES}) + endif () if (WIN32) @@ -125,9 +139,11 @@ endif () message(STATUS "ffmpeg libs:${FFMPEG_STATIC_LIBRARIES}") +cmake_print_variables(FFMPEG_STATIC_LIBRARIES) + target_link_libraries(IjkPlayer ${FFMPEG_STATIC_LIBRARIES}) target_link_directories(IjkPlayer PUBLIC ${FFMPEG_STATIC_LIBRARY_DIRS}) -target_link_libraries(IjkPlayer portaudio_static) +target_link_libraries(IjkPlayer portaudio_static ) if (SRT_FOUND) message(STATUS "SRT ${SRT_STATIC_LIBRARIES}") target_link_libraries(IjkPlayer ${SRT_STATIC_LIBRARIES}) @@ -170,7 +186,27 @@ elseif (APPLE) add_framework(IjkPlayer Security) endif () +set(GLFW_BUILD_EXAMPLES OFF) +set(GLFW_BUILD_TESTS OFF) +set(GLFW_INSTALL OFF) +set(GLFW_BUILD_DOCS OFF) +add_subdirectory(glfw) + +#target_link_libraries(IjkPlayer glfw) + add_executable(tuidemo ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c) +# target_include_directories(tuidemo PRIVATE glad/include) +target_include_directories(tuidemo PRIVATE glfw/include) +target_include_directories(tuidemo PRIVATE glfw/deps) + +#target_include_directories(tuidemo PRIVATE spdlog/include) +#target_link_libraries(tuidemo glfw) + +if (APPLE) + # set_target_properties(tuidemo PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "tuidemo") + add_compile_definitions(APPLE=1) +endif() + if (WIN32) target_link_libraries(tuidemo IjkPlayer user32) diff --git a/desktop/README.md b/desktop/README.md new file mode 100644 index 0000000000..3bf4a3a7f8 --- /dev/null +++ b/desktop/README.md @@ -0,0 +1,3 @@ +glfw https://github.com/glfw/glfw.git ecda86fa +spdlog https://github.com/gabime/spdlog.git 23f0cdf9 +glad https://github.com/Dav1dde/glad 5bf3eda \ No newline at end of file diff --git a/desktop/sources/ijkplayer_demo.c b/desktop/sources/ijkplayer_demo.c index c4b331bf9c..ef22ddfbd1 100644 --- a/desktop/sources/ijkplayer_demo.c +++ b/desktop/sources/ijkplayer_demo.c @@ -25,47 +25,112 @@ #include "ijkplayer_desktop.h" #include +#include #include + #ifdef WIN32 #include #else #include #endif -void demo_event_cb (void *userdata, int what, int arg1, int arg2, void *extra) -{ - // printf("demo event cb what %5d:(%5d %5d)\n", what, arg1, arg2); +#include +#define GLFW_INCLUDE_NONE +#include +#include + +#define SCR_WIDTH 800 +#define SCR_HEIGHT 600 + +void demo_event_cb(void *userdata, int what, int arg1, int arg2, void *extra) { + printf("demo event cb what %5d:(%5d %5d)\n", what, arg1, arg2); } -void demo_overlay_cb (void *userdata, IjkFFOverlay* overlay) -{ - // printf("demo overlay cb what %p:(%5d %5d)\n", overlay, overlay->h, overlay->w); +static void error_callback(int error, const char *description) { + fprintf(stderr, "Error: %s\n", description); } -int main(int argc, char *argv[]) -{ +//void processInput(GLFWwindow *window) { +// if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) +// glfwSetWindowShouldClose(window, true); +//} + +//static void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods) { +// if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) +// glfwSetWindowShouldClose(window, GLFW_TRUE); +//} + +int main(int argc, char *argv[]) { +#if GLFW + glfwSetErrorCallback(error_callback); + + if (!glfwInit()) { + exit(EXIT_FAILURE); + } + //glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); + //glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); + //glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); +#if APPLE +// glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); +#endif + + glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE); + + GLFWwindow *window = glfwCreateWindow(SCR_WIDTH, SCR_HEIGHT, "OpenGL", NULL, NULL); + if (window == NULL) { + //cout << "Failed to create window" << endl; + glfwTerminate(); + exit(EXIT_FAILURE); + } + glfwSetKeyCallback(window, key_callback); + glfwSetWindowPos(window, 200, 200); + glfwShowWindow(window); + + glfwMakeContextCurrent(window); + gladLoadGL(glfwGetProcAddress); + // gladLoadGLLoader((GLADloadproc) glfwGetProcAddress); + glfwMakeContextCurrent(NULL); +#endif + IjkFFMediaPlayer *fp = ijkff_create(); - ijkff_set_data_source(fp, "http://sample-videos.com/video123/mp4/480/big_buck_bunny_480p_10mb.mp4"); + ijkff_set_option(fp, "fcc-i420", "overlay-format", IJK_OPT_CATEGORY_PLAYER); + ijkff_set_data_source(fp, "http://player.alicdn.com/video/aliyunmedia.mp4"); + // ijkff_set_data_source(fp, "/Users/bytedance/Downloads/aliyunmedia.mp4"); + + SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS | SDL_INIT_AUDIO); + + SDL_Window *window = SDL_CreateWindow("Video", + SDL_WINDOWPOS_CENTERED, + SDL_WINDOWPOS_CENTERED, + 640, 480, + SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL); + ijkff_set_window(fp, window); ijkff_prepare_async(fp); ijkff_start(fp); ijkff_set_event_cb(fp, NULL, demo_event_cb); - ijkff_set_overlay_cb(fp, NULL, demo_overlay_cb); - int x = 0; - while(x < 100) { - x ++; -#if WIN32 - Sleep(1000); -#else - usleep(1000 * 1000); +#if GLFW + while (!glfwWindowShouldClose(window)) { + processInput(window); + glfwPollEvents(); + } #endif + + SDL_Event event; + while (1) { + SDL_WaitEvent(&event); + + if (event.type == SDL_QUIT) + break; } + SDL_Quit(); + + ijkff_stop(fp); ijkff_shutdown(fp); - printf("press any key to quit\n"); - getchar(); +// glfwTerminate(); return 0; -} \ No newline at end of file +} diff --git a/desktop/sources/ijkplayer_desktop.c b/desktop/sources/ijkplayer_desktop.c index ae083d3043..12fc9b6fde 100644 --- a/desktop/sources/ijkplayer_desktop.c +++ b/desktop/sources/ijkplayer_desktop.c @@ -208,6 +208,11 @@ void ijkff_set_int_option(IjkFFMediaPlayer *fp, int64_t value, const char *key, ijkmp_set_option_int(fp->mp, category, key, value); } +void ijkff_set_window(IjkFFMediaPlayer *fp, void *window) +{ + assert(fp); + ijkmp_set_window(fp->mp, window); +} void ijkff_set_event_cb(IjkFFMediaPlayer *fp, void *userdata, ijkff_event_cb cb) { diff --git a/desktop/sources/ijkplayer_desktop.h b/desktop/sources/ijkplayer_desktop.h index 0c875bf26b..a352df915f 100644 --- a/desktop/sources/ijkplayer_desktop.h +++ b/desktop/sources/ijkplayer_desktop.h @@ -25,7 +25,7 @@ #define IJKPLAYER_DESKTOP_IJKPLAYER_DESKTOP_H #ifdef __cplusplus -exter "C" { +extern "C" { #endif #if defined _WIN32 || defined __CYGWIN__ @@ -61,6 +61,12 @@ exter "C" { #define IJK_LOG_FATAL 7 #define IJK_LOG_SILENT 8 +#define IJK_OPT_CATEGORY_FORMAT 1 +#define IJK_OPT_CATEGORY_CODEC 2 +#define IJK_OPT_CATEGORY_SWS 3 +#define IJK_OPT_CATEGORY_PLAYER 4 +#define IJK_OPT_CATEGORY_SWR 5 + #include #include #include @@ -128,6 +134,7 @@ IJK_API void ijkff_set_option(IjkFFMediaPlayer *fp, const char *value, const cha IJK_API void ijkff_set_int_option(IjkFFMediaPlayer *fp, int64_t value, const char *key, int category); +IJK_API void ijkff_set_window(IjkFFMediaPlayer *fp, void *window); IJK_API void ijkff_set_event_cb(IjkFFMediaPlayer *fp, void *userdata, ijkff_event_cb cb); diff --git a/ijkmedia/ijkplayer/desktop/pipeline_desktop.c b/ijkmedia/ijkplayer/desktop/pipeline_desktop.c index 0b5707cf09..2e198d968f 100644 --- a/ijkmedia/ijkplayer/desktop/pipeline_desktop.c +++ b/ijkmedia/ijkplayer/desktop/pipeline_desktop.c @@ -24,15 +24,9 @@ #include "pipeline_desktop.h" #include "../pipeline/ffpipeline_ffplay.h" -#include "ijksdl/desktop/ijksdl_aout_port_audio.h" - - - -#include "ijkplayer_internal.h" -#include "pipeline_desktop.h" -#include "../ijkplayer_internal.h" - #include "ijksdl/desktop/ijksdl_desktop.h" +#include "ijksdl/dummy/ijksdl_dummy.h" +#include "../ijkplayer_internal.h" IjkMediaPlayer *ijkmp_desktop_create(int(*msg_loop)(void *)) { @@ -40,14 +34,17 @@ IjkMediaPlayer *ijkmp_desktop_create(int(*msg_loop)(void *)) if (!mp) goto fail; - mp->ffplayer->vout = SDL_Vout_Callback_Create(); + // mp->ffplayer->vout = SDL_VoutDummy_Create(); + // mp->ffplayer->vout = SDL_Vout_Callback_Create(); + // mp->ffplayer->vout = SDL_Vout_glfw_Create(); + mp->ffplayer->vout = SDL_Vout_sdl2_Create(); if (!mp->ffplayer->vout) goto fail; mp->ffplayer->pipeline = ffpipeline_create_desktop(mp->ffplayer); return mp; -fail: + fail: ijkmp_dec_ref_p(&mp); return NULL; } @@ -62,11 +59,23 @@ int ijkmp_set_video_callback(IjkMediaPlayer *mp, void *userdata, ijkmp_video_dra return 0; } +int ijkmp_set_window(IjkMediaPlayer *mp, void *window) +{ + if (!mp || !mp->ffplayer || !mp->ffplayer->vout) + return -1; + SDL_Vout *vout = mp->ffplayer->vout; + SDL_VoutSetWindow(vout, window); + return 0; +} static SDL_Aout *func_open_audio_output_l(IJKFF_Pipeline *pipeline, FFPlayer *ffp) { - SDL_Aout *aout = SDL_Aout_Port_Audio_Create(); + SDL_Aout *aout = NULL; + if (ffp->aout_type == 0) + aout = SDL_Aout_SDL2_Audio_Create(); + else if (ffp->aout_type == 1) + aout = SDL_Aout_Port_Audio_Create(); return aout; } diff --git a/ijkmedia/ijkplayer/desktop/pipeline_desktop.h b/ijkmedia/ijkplayer/desktop/pipeline_desktop.h index bc818c03b0..76035dbd8c 100644 --- a/ijkmedia/ijkplayer/desktop/pipeline_desktop.h +++ b/ijkmedia/ijkplayer/desktop/pipeline_desktop.h @@ -39,4 +39,6 @@ int ijkmp_set_video_callback(IjkMediaPlayer *mp, void *userdata, ijkmp_video_dra IJKFF_Pipeline *ffpipeline_create_desktop(FFPlayer *ffp); +int ijkmp_set_window(IjkMediaPlayer *mp, void* window); + #endif // IJKMEDIA_PLAYER_IJKPLAYER_DESKTOP_PIPELINE_H diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index 7e132c0347..8df2a91625 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -2194,7 +2194,8 @@ static int audio_thread(void *arg) static int decoder_start(Decoder *d, int (*fn)(void *), void *arg, const char *name) { packet_queue_start(d->queue); - d->decoder_tid = SDL_CreateThreadEx(&d->_decoder_tid, fn, arg, name); + // d->decoder_tid = SDL_CreateThreadEx(&d->_decoder_tid, fn, arg, name); + d->decoder_tid = SDL_CreateThread(fn, name, arg); if (!d->decoder_tid) { av_log(NULL, AV_LOG_ERROR, "SDL_CreateThread(): %s\n", SDL_GetError()); return AVERROR(ENOMEM); @@ -3753,14 +3754,16 @@ static VideoState *stream_open(FFPlayer *ffp, const char *filename, AVInputForma ffp->is = is; is->pause_req = !ffp->start_on_prepared; - is->video_refresh_tid = SDL_CreateThreadEx(&is->_video_refresh_tid, video_refresh_thread, ffp, "ff_vout"); + // is->video_refresh_tid = SDL_CreateThreadEx(&is->_video_refresh_tid, video_refresh_thread, ffp, "ff_vout"); + is->video_refresh_tid = SDL_CreateThread(video_refresh_thread, "ff_vout", ffp); if (!is->video_refresh_tid) { av_freep(&ffp->is); return NULL; } is->initialized_decoder = 0; - is->read_tid = SDL_CreateThreadEx(&is->_read_tid, read_thread, ffp, "ff_read"); + // is->read_tid = SDL_CreateThreadEx(&is->_read_tid, read_thread, ffp, "ff_read"); + is->read_tid = SDL_CreateThread(read_thread, "ff_read", ffp); if (!is->read_tid) { av_log(NULL, AV_LOG_FATAL, "SDL_CreateThread(): %s\n", SDL_GetError()); goto fail; diff --git a/ijkmedia/ijkplayer/ff_ffplay_def.h b/ijkmedia/ijkplayer/ff_ffplay_def.h index a989565390..a23ac3da08 100755 --- a/ijkmedia/ijkplayer/ff_ffplay_def.h +++ b/ijkmedia/ijkplayer/ff_ffplay_def.h @@ -267,7 +267,6 @@ typedef struct Decoder { int64_t next_pts; AVRational next_pts_tb; SDL_Thread *decoder_tid; - SDL_Thread _decoder_tid; SDL_Profiler decode_profiler; Uint64 first_frame_decoded_time; @@ -276,7 +275,6 @@ typedef struct Decoder { typedef struct VideoState { SDL_Thread *read_tid; - SDL_Thread _read_tid; AVInputFormat *iformat; int abort_request; int force_refresh; @@ -393,7 +391,6 @@ typedef struct VideoState { /* extra fields */ SDL_mutex *play_mutex; // only guard state, do not block any long operation SDL_Thread *video_refresh_tid; - SDL_Thread _video_refresh_tid; int buffering_on; int pause_req; @@ -725,6 +722,8 @@ typedef struct FFPlayer { int ijkmeta_delay_init; int render_wait_start; int cover_after_prepared; + int vout_type; + int aout_type; } FFPlayer; #define fftime_to_milliseconds(ts) (av_rescale(ts, 1000, AV_TIME_BASE)) diff --git a/ijkmedia/ijkplayer/ff_ffplay_options.h b/ijkmedia/ijkplayer/ff_ffplay_options.h index cd58694020..a1a2916a14 100644 --- a/ijkmedia/ijkplayer/ff_ffplay_options.h +++ b/ijkmedia/ijkplayer/ff_ffplay_options.h @@ -214,6 +214,10 @@ static const AVOption ffp_context_options[] = { OPTION_OFFSET(render_wait_start), OPTION_INT(0, 0, 1) }, { "cover-after-prepared", "display the first video frame as cover, then toggle pause", OPTION_OFFSET(cover_after_prepared), OPTION_INT(0, 0, 1) }, + { "vout-type", "video out type, SDL2(0) and glfw(1)", + OPTION_OFFSET(vout_type), OPTION_INT(0, 0, 0)}, + { "aout-type", "audio out type, SDL2(0) and port audio(1)", + OPTION_OFFSET(aout_type), OPTION_INT(0, 0, 0)} , { NULL } }; diff --git a/ijkmedia/ijkplayer/ijkplayer.c b/ijkmedia/ijkplayer/ijkplayer.c index dbd16472f6..942ca818f4 100755 --- a/ijkmedia/ijkplayer/ijkplayer.c +++ b/ijkmedia/ijkplayer/ijkplayer.c @@ -420,7 +420,8 @@ static int ijkmp_prepare_async_l(IjkMediaPlayer *mp) // released in msg_loop ijkmp_inc_ref(mp); - mp->msg_thread = SDL_CreateThreadEx(&mp->_msg_thread, ijkmp_msg_loop, mp, "ff_msg_loop"); + // mp->msg_thread = SDL_CreateThreadEx(&mp->_msg_thread, ijkmp_msg_loop, mp, "ff_msg_loop"); + mp->msg_thread = SDL_CreateThread(ijkmp_msg_loop, "ff_msg_loop", mp); // msg_thread is detached inside msg_loop // TODO: 9 release weak_thiz if pthread_create() failed; diff --git a/ijkmedia/ijkplayer/ijkplayer_internal.h b/ijkmedia/ijkplayer/ijkplayer_internal.h index eb1fe3c468..057c54337e 100644 --- a/ijkmedia/ijkplayer/ijkplayer_internal.h +++ b/ijkmedia/ijkplayer/ijkplayer_internal.h @@ -41,7 +41,6 @@ struct IjkMediaPlayer { int (*msg_loop)(void*); SDL_Thread *msg_thread; - SDL_Thread _msg_thread; int mp_state; char *data_source; diff --git a/ijkmedia/ijksdl/CMakeLists.txt b/ijkmedia/ijksdl/CMakeLists.txt index 731e57a13c..dfef645e83 100644 --- a/ijkmedia/ijksdl/CMakeLists.txt +++ b/ijkmedia/ijksdl/CMakeLists.txt @@ -84,8 +84,16 @@ set(SDL_DESKTOP_UNI_SOURCES desktop/ijksdl_desktop.h desktop/ijksdl_aout_port_audio.h desktop/ijksdl_aout_port_audio.c + desktop/ijksdl_aout_sdl2_audio.c + desktop/ijksdl_aout_sdl2_audio.h desktop/ijksdl_vout_uni_callback.c desktop/ijksdl_vout_uni_callback.h + desktop/ijksdl_desktop_vout_glfw.c + desktop/ijksdl_desktop_vout_glfw.h + desktop/ijksdl_desktop_gl.c + desktop/ijksdl_desktop_gl.h + desktop/ijksdl_vout_sdl2_video.c + desktop/ijksdl_vout_sdl2_video.h ) set(SDL_MAC_OSX_SOURCES @@ -116,12 +124,24 @@ if (ANDROID) endif () if (IJK_DESKTOP_UNI) - set(IJK_SDL_SOURCES ${IJK_SDL_SOURCES} ${SDL_DESKTOP_UNI_SOURCES}) + find_package(SDL2 REQUIRED) + + set(IJK_SDL_SOURCES ${IJK_SDL_SOURCES} ${SDL_DESKTOP_UNI_SOURCES} ${GLES2_SOURCES}) if (APPLE AND IJK_DESKTOP_UNI) set(IJK_SDL_SOURCES ${IJK_SDL_SOURCES} ${SDL_MAC_OSX_SOURCES}) + # list(APPEND IJK_SDL_SOURCES gles2/renderer_yuv420sp.c) + # list(APPEND IJK_SDL_SOURCES gles2/fsh/yuv420sp.fsh.c) + endif () add_library(ijksdl_static STATIC ${IJK_SDL_SOURCES}) set(IJKSDL_LIB_NAME ijksdl_static) + + target_include_directories(ijksdl_static PRIVATE ${SDL2_INCLUDE_DIRS}) + cmake_print_variables(SDL2_INCLUDE_DIRS) + + target_include_directories(ijksdl_static PRIVATE ${IJKROOT_PATH}/desktop/glfw/include) + # target_include_directories(ijksdl_static PRIVATE ${IJKROOT_PATH}/desktop/glad/include) + target_include_directories(ijksdl_static PRIVATE ${IJKROOT_PATH}/desktop/glfw/deps) else () add_library(ijksdl SHARED ${IJK_SDL_SOURCES}) set(IJKSDL_LIB_NAME ijksdl) diff --git a/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c index bd1b80d789..9e0bf93ffa 100644 --- a/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c +++ b/ijkmedia/ijksdl/desktop/ijksdl_aout_port_audio.c @@ -58,6 +58,7 @@ int portAudioStreamCallback(const void *input, void *output, unsigned long frame return paContinue; } + static int aout_open_audio_l(SDL_Aout *aout, const SDL_AudioSpec *desired, SDL_AudioSpec *obtained) { assert(aout); @@ -139,18 +140,6 @@ static void aout_pause_audio_l(SDL_Aout *aout, int pause_on) ALOGI("aout_uni, aout_pause_audio, aout(%p) pause(%d)\n", aout, pause_on); } -static void aout_flush_audio_l(SDL_Aout *aout) -{ - SDL_Aout_Opaque *opaque = aout->opaque; -} - -static double aout_get_latency_seconds_l(SDL_Aout *aout) -{ - // SDL_Aout_Opaque *opaque = aout->opaque; - return 0.0; -} - - SDL_Aout *SDL_Aout_Port_Audio_Create() { PaError err = Pa_Initialize(); diff --git a/ijkmedia/ijksdl/desktop/ijksdl_aout_sdl2_audio.c b/ijkmedia/ijksdl/desktop/ijksdl_aout_sdl2_audio.c new file mode 100644 index 0000000000..b9ceb55df3 --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_aout_sdl2_audio.c @@ -0,0 +1,95 @@ +/***************************************************************************** +* ijksdl_vout_callback.c +***************************************************************************** +* +* copyright (c) 2020 befovy +* +* 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_aout_sdl2_audio.h" +#include "../ijksdl_aout_internal.h" +#include "../ijksdl_stdinc.h" +#include "../ijksdl_log.h" +#include +#include +#include + + +static SDL_Class audio_sdl2_class = {.name = "SDL2Audio"}; + +typedef struct SDL_Aout_Opaque { + SDL_AudioDeviceID devid; +} SDL_Aout_Opaque; + +static int aout_open_audio_l(SDL_Aout *aout, const SDL_AudioSpec *desired, SDL_AudioSpec *obtained) +{ + assert(aout); + + SDL_Aout_Opaque *opaque = aout->opaque; + opaque->devid = SDL_OpenAudioDevice(NULL, 0, desired, obtained, 0); + if (opaque->devid == 0) { + ALOGE("Failed to open audio: %s", SDL_GetError()); + return -1; + } else { + if (desired->format != obtained->format) { + ALOGW("We didn't get Float32 audio format."); + } + return 0; + } +} +static void aout_close_audio_l(SDL_Aout *aout) +{ + if (!aout || !aout->opaque) + return; + SDL_Aout_Opaque *opaque = aout->opaque; + if (opaque->devid > 0) + SDL_CloseAudioDevice(opaque->devid); + opaque->devid = 0; +} + +static void aout_pause_audio_l(SDL_Aout *aout, int pause_on) +{ + if (!aout || !aout->opaque) + return; + SDL_Aout_Opaque *opaque = aout->opaque; + if (opaque->devid > 0) + SDL_PauseAudioDevice(opaque->devid, pause_on); + ALOGI("aout_uni, aout_pause_audio, aout(%p) pause(%d)\n", aout, pause_on); +} + +static void aout_free_l(SDL_Aout *aout) { + if (!aout) + return; + aout_close_audio_l(aout); + SDL_Aout_FreeInternal(aout); + ALOGI("aout_uni, aout_free_l, aout(%p)\n", aout); +} + +SDL_Aout *SDL_Aout_SDL2_Audio_Create() { + + SDL_Aout *aout = SDL_Aout_CreateInternal(sizeof(SDL_Aout_Opaque)); + if (!aout) + return NULL; + + aout->opaque_class = &audio_sdl2_class; + aout->free_l = aout_free_l; + aout->open_audio = aout_open_audio_l; + aout->pause_audio = aout_pause_audio_l; + aout->close_audio = aout_close_audio_l; + + return aout; +} \ No newline at end of file diff --git a/ijkmedia/ijksdl/desktop/ijksdl_aout_sdl2_audio.h b/ijkmedia/ijksdl/desktop/ijksdl_aout_sdl2_audio.h new file mode 100644 index 0000000000..a6fd396029 --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_aout_sdl2_audio.h @@ -0,0 +1,32 @@ +/***************************************************************************** +* ijksdl_vout_callback.c +***************************************************************************** +* +* copyright (c) 2020 befovy +* +* 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_AOUT_SDL2_AUDIO_H +#define IJKPLAYER_IJKSDL_AOUT_SDL2_AUDIO_H + + +#include "../ijksdl_aout.h" + +SDL_Aout *SDL_Aout_SDL2_Audio_Create(); + +#endif //IJKPLAYER_IJKSDL_AOUT_SDL2_AUDIO_H diff --git a/ijkmedia/ijksdl/desktop/ijksdl_desktop.h b/ijkmedia/ijksdl/desktop/ijksdl_desktop.h index 6701e72688..cea017ee18 100644 --- a/ijkmedia/ijksdl/desktop/ijksdl_desktop.h +++ b/ijkmedia/ijksdl/desktop/ijksdl_desktop.h @@ -27,6 +27,9 @@ #include "../ijksdl.h" #include "ijksdl_aout_port_audio.h" +#include "ijksdl_aout_sdl2_audio.h" #include "ijksdl_vout_uni_callback.h" +#include "ijksdl_desktop_vout_glfw.h" +#include "ijksdl_vout_sdl2_video.h" #endif // IJKPLAYER_IJKMEDIA_IJKSDL_DESKTOP_H diff --git a/ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.c b/ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.c new file mode 100644 index 0000000000..606d359d3d --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.c @@ -0,0 +1,159 @@ +/***************************************************************************** +* ijksdl_vout_callback.c +***************************************************************************** +* +* copyright (c) 2020 befovy +* +* 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_desktop_gl.h" +#include "ijksdl/ijksdl_log.h" +#include "ijksdl/ijksdl_vout.h" +#include "ijksdl/gles2/internal.h" + +typedef struct IJK_GL_Opaque { + IJK_GLES2_Renderer *renderer; +} IJK_GL_Opaque; + +static GLboolean IJK_GL_isValid(IJK_GL *gl) { + if (gl && gl->window && gl->attached) { + return GL_TRUE; + } + return GL_FALSE; +} + +static void IJK_GL_getSize(IJK_GL *gl) { + GLint width = 0; + GLint height = 0; + glfwGetFramebufferSize(gl->window, &width, &height); + gl->width = width; + gl->height = height; +} + +static GLboolean IJK_EGL_makeCurrent(IJK_GL *gl, GLFWwindow *window) { + if (window && window == gl->window && gl->attached) { + if (glfwGetCurrentContext() == gl->window) + return GL_TRUE; + return GL_FALSE; + } + + gl->window = window; + if (!window) + return GL_FALSE; + glfwMakeContextCurrent(window); + IJK_GLES2_Renderer_setupGLES(); + return GL_TRUE; +} + +static GLboolean IJK_GL_prepareRenderer(IJK_GL *gl, SDL_VoutOverlay *overlay) { + assert(gl); + assert(gl->opaque); + + IJK_GL_Opaque *opaque = gl->opaque; + + if (!IJK_GLES2_Renderer_isValid(opaque->renderer) || + !IJK_GLES2_Renderer_isFormat(opaque->renderer, overlay->format)) { + IJK_GLES2_Renderer_reset(opaque->renderer); + IJK_GLES2_Renderer_freeP(&opaque->renderer); + + opaque->renderer = IJK_GLES2_Renderer_create(overlay); + if (!opaque->renderer) { + ALOGE("[EGL] Could not create render."); + return GL_FALSE; + } + + if (!IJK_GLES2_Renderer_use(opaque->renderer)) { + ALOGE("[EGL] Could not use render."); + IJK_GLES2_Renderer_freeP(&opaque->renderer); + return GL_FALSE; + } + } + IJK_GL_getSize(gl); + + glViewport(0, 0, gl->width, gl->height); + IJK_GLES2_checkError_TRACE("glViewport"); + return GL_TRUE; +} + +GLboolean IJK_GL_display(IJK_GL *gl, GLFWwindow *window, SDL_VoutOverlay *overlay) { + + if (!gl || !gl->opaque) + return GL_FALSE; + if (!IJK_EGL_makeCurrent(gl, window)) + return GL_FALSE; + if (!IJK_GL_prepareRenderer(gl, overlay)) { + ALOGE("[EGL] IJK_EGL_prepareRenderer failed\n"); + return GL_FALSE; + } + IJK_GL_Opaque *opaque = gl->opaque; + + if (!IJK_GLES2_Renderer_renderOverlay(opaque->renderer, overlay)) { + ALOGE("[EGL] IJK_GLES2_render failed\n"); + return GL_FALSE; + } + glfwSwapBuffers(window); + glfwMakeContextCurrent(NULL); + + return GL_TRUE; +} + + +void IJK_GL_terminate(IJK_GL *gl) { + if (!IJK_GL_isValid(gl)) + return; + if (gl->opaque) + IJK_GLES2_Renderer_free(gl->opaque->renderer); + + glfwMakeContextCurrent(NULL); + gl->attached = GL_FALSE; +} + +void IJK_GL_free(IJK_GL *gl) { + if (!gl) + return; + + IJK_GL_terminate(gl); + memset(gl, 0, sizeof(IJK_GL)); + free(gl); +} + +void IJK_GL_freep(IJK_GL **gl) { + if (!gl || !*gl) + return; + + IJK_GL_free(*gl); + *gl = NULL; +} + +static SDL_Class gl_class = { + .name = "GLFW_GL", +}; + +IJK_GL *IJK_GL_create() { + IJK_GL *gl = (IJK_GL *) mallocz(sizeof(IJK_GL)); + if (!gl) + return NULL; + + gl->opaque_class = &gl_class; + gl->opaque = mallocz(sizeof(IJK_GL_Opaque)); + if (!gl->opaque) { + free(gl); + return NULL; + } + return gl; +} \ No newline at end of file diff --git a/ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.h b/ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.h new file mode 100644 index 0000000000..291aa2dba7 --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_desktop_gl.h @@ -0,0 +1,56 @@ +/***************************************************************************** +* ijksdl_vout_callback.c +***************************************************************************** +* +* copyright (c) 2020 befovy +* +* 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_DESKTOP_GL_H +#define IJKPLAYER_IJKSDL_DESKTOP_GL_H + +#include "ijksdl_class.h" +#include "../ijksdl_gles2.h" + +typedef struct SDL_VoutOverlay SDL_VoutOverlay; +typedef struct IJK_GL_Opaque IJK_GL_Opaque; + +typedef struct IJK_GL +{ + SDL_Class *opaque_class; + IJK_GL_Opaque *opaque; + + GLFWwindow *window; + GLboolean attached; + + GLint width; + GLint height; + +} IJK_GL; + + +IJK_GL *IJK_GL_create(); +void IJK_GL_free(IJK_GL *gl); +void IJK_GL_freep(IJK_GL **gl); + + +GLboolean IJK_GL_display(IJK_GL* egl, GLFWwindow *window, SDL_VoutOverlay *overlay); +void IJK_GL_terminate(IJK_GL* egl); + +#endif //IJKPLAYER_IJKSDL_DESKTOP_GL_H diff --git a/ijkmedia/ijksdl/desktop/ijksdl_desktop_vout_glfw.c b/ijkmedia/ijksdl/desktop/ijksdl_desktop_vout_glfw.c new file mode 100644 index 0000000000..039aca42af --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_desktop_vout_glfw.c @@ -0,0 +1,101 @@ +/***************************************************************************** +* ijksdl_vout_callback.c +***************************************************************************** +* +* copyright (c) 2020 befovy +* +* 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_desktop_vout_glfw.h" +#include "../ijksdl_vout_internal.h" +#include "../ffmpeg/ijksdl_vout_overlay_ffmpeg.h" + +#include "ijksdl/gles2/internal.h" +#include "ijksdl_desktop_gl.h" + +struct SDL_Vout_Opaque { + IJK_GL *gl; + GLFWwindow *window; +}; + +static SDL_Class glfw_vout_class = {.name = "glfw_vout"}; + +static SDL_VoutOverlay *func_create_overlay(int width, int height, int frame_format, SDL_Vout *vout) { + SDL_LockMutex(vout->mutex); + SDL_VoutOverlay *overlay = SDL_VoutFFmpeg_CreateOverlay(width, height, frame_format, vout); + SDL_UnlockMutex(vout->mutex); + return overlay; +} + + +static int func_display_overlay(SDL_Vout *vout, SDL_VoutOverlay *overlay) { + SDL_LockMutex(vout->mutex); + + SDL_Vout_Opaque *opaque = vout->opaque; + if (!opaque || !opaque->window) { + return -1; + } + IJK_GL_display(opaque->gl, opaque->window, overlay); + SDL_UnlockMutex(vout->mutex); + return 0; +} + +static void func_free_l(SDL_Vout *vout) { + if (!vout) + return; + SDL_Vout_Opaque *opaque = vout->opaque; + if (opaque) { + if (opaque->gl) { + IJK_GL_free(opaque->gl); + opaque->gl = NULL; + } + } + SDL_Vout_FreeInternal(vout); +} + + +static int set_window(SDL_Vout *vout, void *window) { + SDL_LockMutex(vout->mutex); + SDL_Vout_Opaque *opaque = vout->opaque; + //IJK_GL_terminate(opaque->gl); + opaque->window = window; + SDL_UnlockMutex(vout->mutex); + return 0; +} + +SDL_Vout *SDL_Vout_glfw_Create() { + SDL_Vout *vout = SDL_Vout_CreateInternal(sizeof(SDL_Vout_Opaque)); + if (!vout) + return NULL; + + SDL_Vout_Opaque *opaque = vout->opaque; + opaque->gl = IJK_GL_create(); + if (!opaque->gl) { + func_free_l(vout); + return NULL; + } + vout->opaque_class = &glfw_vout_class; + vout->overlay_format = SDL_FCC_I420; + vout->create_overlay = func_create_overlay; + vout->display_overlay = func_display_overlay; + vout->set_window = set_window; + vout->free_l = func_free_l; + return vout; +} \ No newline at end of file diff --git a/ijkmedia/ijksdl/desktop/ijksdl_desktop_vout_glfw.h b/ijkmedia/ijksdl/desktop/ijksdl_desktop_vout_glfw.h new file mode 100644 index 0000000000..9a553d9345 --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_desktop_vout_glfw.h @@ -0,0 +1,32 @@ +/***************************************************************************** +* ijksdl_vout_callback.c +***************************************************************************** +* +* copyright (c) 2020 befovy +* +* 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_DESKTOP_VOUT_GLFW_H +#define IJKPLAYER_IJKSDL_DESKTOP_VOUT_GLFW_H + +#include "../ijksdl_vout.h" + +SDL_Vout *SDL_Vout_glfw_Create(); + +#endif //IJKPLAYER_IJKSDL_DESKTOP_VOUT_GLFW_H diff --git a/ijkmedia/ijksdl/desktop/ijksdl_vout_sdl2_video.c b/ijkmedia/ijksdl/desktop/ijksdl_vout_sdl2_video.c new file mode 100644 index 0000000000..b72eb618ae --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_vout_sdl2_video.c @@ -0,0 +1,163 @@ +/***************************************************************************** +* ijksdl_vout_callback.c +***************************************************************************** +* +* copyright (c) 2020 befovy +* +* 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_vout_sdl2_video.h" +#include "../ijksdl_vout_internal.h" +#include "../ffmpeg/ijksdl_vout_overlay_ffmpeg.h" + +#include +#include +#include +#include + + +struct SDL_Vout_Opaque { + SDL_Window *window; + SDL_Renderer *renderer; + SDL_Texture *texture; + Uint32 format; + int width; + int height; +}; + +static SDL_Class sdl2_vout_class = {.name = "sdl2_vout_class"}; + +static SDL_VoutOverlay *func_create_overlay(int width, int height, int frame_format, SDL_Vout *vout) { + SDL_LockMutex(vout->mutex); + SDL_VoutOverlay *overlay = SDL_VoutFFmpeg_CreateOverlay(width, height, frame_format, vout); + SDL_UnlockMutex(vout->mutex); + return overlay; +} + + +static int sdl2_display(SDL_Vout_Opaque *opaque, SDL_VoutOverlay *overlay) { + if (opaque->renderer == NULL) { + SDL_Window *window = opaque->window; + SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); + if (!renderer) { + renderer = SDL_CreateRenderer(window, -1, 0); + } + if (renderer == NULL) { + ALOGE("SDL2 2 Error : %s", SDL_GetError()); + } + opaque->renderer = renderer; + } + + SDL_Renderer *renderer = opaque->renderer; + + assert(overlay->format == SDL_FCC_I420); + + Uint32 format = 0; + int access = 0, w = 0, h = 0, ret = 0; + if (opaque->texture != NULL) + ret = SDL_QueryTexture(opaque->texture, &format, &access, &w, &h); + if (ret < 0 || format != opaque->format || w != overlay->w || h != overlay->h) { + if (opaque->texture) + SDL_DestroyTexture(opaque->texture); + opaque->texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_IYUV, SDL_TEXTUREACCESS_STREAMING, overlay->w, + overlay->h); + opaque->format = SDL_PIXELFORMAT_IYUV; + } + if (opaque->texture == NULL) { + return -1; + } + SDL_Texture *texture = opaque->texture; + SDL_UpdateYUVTexture(texture, NULL, + overlay->pixels[0], overlay->pitches[0], + overlay->pixels[1], overlay->pitches[1], + overlay->pixels[2], overlay->pitches[2]); + SDL_RenderCopy(renderer, texture, NULL, NULL); + SDL_RenderPresent(renderer); + return 0; +} + +static int func_display_overlay(SDL_Vout *vout, SDL_VoutOverlay *overlay) { + SDL_LockMutex(vout->mutex); + + SDL_Vout_Opaque *opaque = vout->opaque; + if (!opaque || !opaque->window) { + return -1; + } + sdl2_display(opaque, overlay); + SDL_UnlockMutex(vout->mutex); + return 0; +} + +static void func_free_l(SDL_Vout *vout) { + if (!vout) + return; + SDL_Vout_Opaque *opaque = vout->opaque; + if (opaque) { + if (opaque->texture) { + SDL_DestroyTexture(opaque->texture); + opaque->texture = NULL; + } + if (opaque->renderer) { + SDL_DestroyRenderer(opaque->renderer); + opaque->renderer = NULL; + } + } + SDL_Vout_FreeInternal(vout); +} + +// https://github.com/vheuken/SDL-Render-Thread-Example/blob/master/main.cpp +static int set_window(SDL_Vout *vout, void *window) { + if (!vout || !vout->opaque) + return -1; + SDL_LockMutex(vout->mutex); + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); + + vout->opaque->window = window; + //vout->opaque->context = SDL_GL_GetCurrentContext(); + //SDL_GL_MakeCurrent(window, NULL); + SDL_Vout_Opaque *opaque = vout->opaque; + if (opaque->renderer != NULL) { + SDL_DestroyRenderer(opaque->renderer); + opaque->renderer = NULL; + } + if (opaque->renderer == NULL && window != NULL) { + SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); + if (!renderer) { + renderer = SDL_CreateRenderer(window, -1, 0); + } + if (renderer == NULL) { + ALOGE("SDL2 create renderer failed: %s", SDL_GetError()); + } + opaque->renderer = renderer; + } + SDL_UnlockMutex(vout->mutex); + return 0; +} + +SDL_Vout *SDL_Vout_sdl2_Create() { + SDL_Vout *vout = SDL_Vout_CreateInternal(sizeof(SDL_Vout_Opaque)); + if (!vout) + return NULL; + vout->opaque_class = &sdl2_vout_class; + vout->overlay_format = SDL_FCC_I420; + vout->create_overlay = func_create_overlay; + vout->display_overlay = func_display_overlay; + vout->set_window = set_window; + vout->free_l = func_free_l; + return vout; +} diff --git a/ijkmedia/ijksdl/desktop/ijksdl_vout_sdl2_video.h b/ijkmedia/ijksdl/desktop/ijksdl_vout_sdl2_video.h new file mode 100644 index 0000000000..2ca755ca13 --- /dev/null +++ b/ijkmedia/ijksdl/desktop/ijksdl_vout_sdl2_video.h @@ -0,0 +1,33 @@ +/***************************************************************************** +* ijksdl_vout_callback.c +***************************************************************************** +* +* copyright (c) 2020 befovy +* +* 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_VOUT_SDL2_VIDEO_H +#define IJKPLAYER_IJKSDL_VOUT_SDL2_VIDEO_H + +#include "../ijksdl_vout.h" + +SDL_Vout *SDL_Vout_sdl2_Create(); + +int SDL_Vout_SDL2_Set_Window(SDL_Vout *vout, void *window); + +#endif //IJKPLAYER_IJKSDL_VOUT_SDL2_VIDEO_H diff --git a/ijkmedia/ijksdl/gles2/renderer.c b/ijkmedia/ijksdl/gles2/renderer.c index 76c61273a2..3ec72fb5de 100644 --- a/ijkmedia/ijksdl/gles2/renderer.c +++ b/ijkmedia/ijksdl/gles2/renderer.c @@ -167,7 +167,7 @@ IJK_GLES2_Renderer *IJK_GLES2_Renderer_create(SDL_VoutOverlay *overlay) case SDL_FCC_RV16: renderer = IJK_GLES2_Renderer_create_rgb565(); break; case SDL_FCC_RV24: renderer = IJK_GLES2_Renderer_create_rgb888(); break; case SDL_FCC_RV32: renderer = IJK_GLES2_Renderer_create_rgbx8888(); break; -#ifdef __APPLE__ +#if defined(__APPLE__) && !IJK_DESKTOP_UNI case SDL_FCC_NV12: renderer = IJK_GLES2_Renderer_create_yuv420sp(); break; case SDL_FCC__VTB: renderer = IJK_GLES2_Renderer_create_yuv420sp_vtb(overlay); break; #endif diff --git a/ijkmedia/ijksdl/ijksdl_aout_internal.h b/ijkmedia/ijksdl/ijksdl_aout_internal.h index f726e6c3fb..e15e309089 100644 --- a/ijkmedia/ijksdl/ijksdl_aout_internal.h +++ b/ijkmedia/ijksdl/ijksdl_aout_internal.h @@ -27,6 +27,7 @@ #include "ijksdl_mutex.h" #include "ijksdl_aout.h" +#include "ijksdl_misc.h" inline static SDL_Aout *SDL_Aout_CreateInternal(size_t opaque_size) { diff --git a/ijkmedia/ijksdl/ijksdl_audio.c b/ijkmedia/ijksdl/ijksdl_audio.c index 15b1b5bdd4..fb6eb6a760 100644 --- a/ijkmedia/ijksdl/ijksdl_audio.c +++ b/ijkmedia/ijksdl/ijksdl_audio.c @@ -24,6 +24,7 @@ #include "ijksdl_audio.h" +#if !USE_SDL2 void SDL_CalculateAudioSpec(SDL_AudioSpec * spec) { switch (spec->format) { @@ -46,3 +47,5 @@ void SDL_MixAudio(Uint8* dst, { // do nothing; } + +#endif diff --git a/ijkmedia/ijksdl/ijksdl_audio.h b/ijkmedia/ijksdl/ijksdl_audio.h index 4cbe071ae1..26219cd887 100644 --- a/ijkmedia/ijksdl/ijksdl_audio.h +++ b/ijkmedia/ijksdl/ijksdl_audio.h @@ -28,6 +28,9 @@ #include "ijksdl_stdinc.h" #include "ijksdl_endian.h" +#if USE_SDL2 +#include +#else typedef uint16_t SDL_AudioFormat; #define SDL_AUDIO_MASK_BITSIZE (0xFF) @@ -97,4 +100,6 @@ void SDL_MixAudio(Uint8* dst, Uint32 len, int volume); +#endif //USE_SDL2 + #endif diff --git a/ijkmedia/ijksdl/ijksdl_container.h b/ijkmedia/ijksdl/ijksdl_container.h index 48dc473279..393460e21d 100644 --- a/ijkmedia/ijksdl/ijksdl_container.h +++ b/ijkmedia/ijksdl/ijksdl_container.h @@ -22,6 +22,7 @@ #ifndef IJKSDL__IJKSDL_CONTAINER_H #define IJKSDL__IJKSDL_CONTAINER_H +#include #include typedef int isdl_error; diff --git a/ijkmedia/ijksdl/ijksdl_egl.h b/ijkmedia/ijksdl/ijksdl_egl.h index 4fb1af32a4..2f060244c3 100644 --- a/ijkmedia/ijksdl/ijksdl_egl.h +++ b/ijkmedia/ijksdl/ijksdl_egl.h @@ -22,6 +22,7 @@ #ifndef IJKSDL__IJKSDL_EGL_H #define IJKSDL__IJKSDL_EGL_H +#if !IJK_DESKTOP_UNI #ifdef __APPLE__ #include "ijksdl/ios/EGL/egl.h" #include "ijksdl/ios/EGL/eglplatform.h" @@ -68,4 +69,6 @@ void IJK_EGL_freep(IJK_EGL **egl); EGLBoolean IJK_EGL_display(IJK_EGL* egl, EGLNativeWindowType window, SDL_VoutOverlay *overlay); void IJK_EGL_terminate(IJK_EGL* egl); +#endif //IJK_DESKTOP_UNI + #endif diff --git a/ijkmedia/ijksdl/ijksdl_endian.h b/ijkmedia/ijksdl/ijksdl_endian.h index 5b385b967e..e59facfb8a 100644 --- a/ijkmedia/ijksdl/ijksdl_endian.h +++ b/ijkmedia/ijksdl/ijksdl_endian.h @@ -25,6 +25,9 @@ #ifndef IJKSDL__IJKSDL_ENDIAN_H #define IJKSDL__IJKSDL_ENDIAN_H +#if USE_SDL2 +#include +#else #define SDL_LIL_ENDIAN 1234 #define SDL_BIG_ENDIAN 4321 @@ -45,4 +48,6 @@ #endif /* __linux __ */ #endif /* !SDL_BYTEORDER */ +#endif // USE_SDL2 + #endif diff --git a/ijkmedia/ijksdl/ijksdl_error.c b/ijkmedia/ijksdl/ijksdl_error.c index b54cb60283..496f849252 100644 --- a/ijkmedia/ijksdl/ijksdl_error.c +++ b/ijkmedia/ijksdl/ijksdl_error.c @@ -25,7 +25,9 @@ #include "ijksdl_error.h" #include "ijksdl_stdinc.h" +#if !USE_SDL2 const char *SDL_GetError(void) { return NULL; } +#endif diff --git a/ijkmedia/ijksdl/ijksdl_error.h b/ijkmedia/ijksdl/ijksdl_error.h index aafe49e537..0815759be2 100644 --- a/ijkmedia/ijksdl/ijksdl_error.h +++ b/ijkmedia/ijksdl/ijksdl_error.h @@ -24,7 +24,7 @@ #ifndef IJKSDL__IJKSDL_ERROR_H #define IJKSDL__IJKSDL_ERROR_H - +#if !USE_SDL2 const char *SDL_GetError(void); - +#endif #endif diff --git a/ijkmedia/ijksdl/ijksdl_fourcc.h b/ijkmedia/ijksdl/ijksdl_fourcc.h index a0ecee3d3a..fb08cd145f 100644 --- a/ijkmedia/ijksdl/ijksdl_fourcc.h +++ b/ijkmedia/ijksdl/ijksdl_fourcc.h @@ -28,6 +28,9 @@ #include "ijksdl_stdinc.h" #include "ijksdl_endian.h" +#if USE_SDL2 +#include +#else #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)) @@ -40,6 +43,8 @@ ((uint16_t)(b) | ((uint16_t)(a) << 8)) #endif +#endif // USE_SDL2 + /*- * http://www.webartz.com/fourcc/indexyuv.htm * http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html diff --git a/ijkmedia/ijksdl/ijksdl_gles2.h b/ijkmedia/ijksdl/ijksdl_gles2.h index 7c1fdd51c9..e4b5b8b7e4 100644 --- a/ijkmedia/ijksdl/ijksdl_gles2.h +++ b/ijkmedia/ijksdl/ijksdl_gles2.h @@ -22,6 +22,11 @@ #ifndef IJKSDL__IJKSDL_GLES2_H #define IJKSDL__IJKSDL_GLES2_H +#if IJK_DESKTOP_UNI +#include +#define GLFW_INCLUDE_NONE +#include +#else #ifdef __APPLE__ #include #include @@ -30,6 +35,7 @@ #include #include #endif +#endif typedef struct SDL_VoutOverlay SDL_VoutOverlay; diff --git a/ijkmedia/ijksdl/ijksdl_mutex.c b/ijkmedia/ijksdl/ijksdl_mutex.c index 615a519b53..6fe6b9af09 100644 --- a/ijkmedia/ijksdl/ijksdl_mutex.c +++ b/ijkmedia/ijksdl/ijksdl_mutex.c @@ -36,6 +36,7 @@ #include "ijksdl_inc_internal.h" +#if !USE_SDL2 SDL_mutex *SDL_CreateMutex(void) { SDL_mutex *mutex; @@ -59,14 +60,6 @@ void SDL_DestroyMutex(SDL_mutex *mutex) } } -void SDL_DestroyMutexP(SDL_mutex **mutex) -{ - if (mutex) { - SDL_DestroyMutex(*mutex); - *mutex = NULL; - } -} - int SDL_LockMutex(SDL_mutex *mutex) { assert(mutex); @@ -108,15 +101,6 @@ void SDL_DestroyCond(SDL_cond *cond) } } -void SDL_DestroyCondP(SDL_cond **cond) -{ - - if (cond) { - SDL_DestroyCond(*cond); - *cond = NULL; - } -} - int SDL_CondSignal(SDL_cond *cond) { assert(cond); @@ -185,3 +169,22 @@ int SDL_CondWait(SDL_cond *cond, SDL_mutex *mutex) return pthread_cond_wait(&cond->id, &mutex->id); } +#endif // USE_SDL2 + + +void SDL_DestroyMutexP(SDL_mutex **mutex) +{ + if (mutex) { + SDL_DestroyMutex(*mutex); + *mutex = NULL; + } +} + +void SDL_DestroyCondP(SDL_cond **cond) +{ + + if (cond) { + SDL_DestroyCond(*cond); + *cond = NULL; + } +} diff --git a/ijkmedia/ijksdl/ijksdl_mutex.h b/ijkmedia/ijksdl/ijksdl_mutex.h index 9a9a291315..18c72ca5f1 100644 --- a/ijkmedia/ijksdl/ijksdl_mutex.h +++ b/ijkmedia/ijksdl/ijksdl_mutex.h @@ -28,6 +28,9 @@ #include #include +#if USE_SDL2 +#include +#else #define SDL_MUTEX_TIMEDOUT 1 #define SDL_MUTEX_MAXWAIT (~(uint32_t)0) @@ -37,7 +40,6 @@ typedef struct 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); @@ -47,11 +49,14 @@ typedef struct 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 // USE_SDL2 + +void SDL_DestroyMutexP(SDL_mutex **mutex); +void SDL_DestroyCondP(SDL_cond **mutex); #endif diff --git a/ijkmedia/ijksdl/ijksdl_stdinc.c b/ijkmedia/ijksdl/ijksdl_stdinc.c index 3a1d3a1f00..813884b961 100644 --- a/ijkmedia/ijksdl/ijksdl_stdinc.c +++ b/ijkmedia/ijksdl/ijksdl_stdinc.c @@ -24,8 +24,10 @@ #include "ijksdl_stdinc.h" +#if !USE_SDL2 char *SDL_getenv(const char *name) { return NULL; } +#endif diff --git a/ijkmedia/ijksdl/ijksdl_stdinc.h b/ijkmedia/ijksdl/ijksdl_stdinc.h index afaeebd425..be19aec80c 100644 --- a/ijkmedia/ijksdl/ijksdl_stdinc.h +++ b/ijkmedia/ijksdl/ijksdl_stdinc.h @@ -29,6 +29,10 @@ #include #include +#if USE_SDL2 + +#include +#else typedef int8_t Sint8; typedef uint8_t Uint8; typedef int16_t Sint16; @@ -39,5 +43,5 @@ typedef int64_t Sint64; typedef uint64_t Uint64; char *SDL_getenv(const char *name); - +#endif // USE_SDL2 #endif diff --git a/ijkmedia/ijksdl/ijksdl_thread.c b/ijkmedia/ijksdl/ijksdl_thread.c index 765572d90f..ec8f73cb7b 100644 --- a/ijkmedia/ijksdl/ijksdl_thread.c +++ b/ijkmedia/ijksdl/ijksdl_thread.c @@ -64,6 +64,7 @@ SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data } #endif +#if !USE_SDL2 int SDL_SetThreadPriority(SDL_ThreadPriority priority) { #ifndef WIN32 @@ -113,4 +114,6 @@ void SDL_DetachThread(SDL_Thread *thread) pthread_detach(thread->id); } -#endif \ No newline at end of file +#endif + +#endif // USE_SDL2 diff --git a/ijkmedia/ijksdl/ijksdl_thread.h b/ijkmedia/ijksdl/ijksdl_thread.h index 26de3166da..fc2fe5e0f3 100644 --- a/ijkmedia/ijksdl/ijksdl_thread.h +++ b/ijkmedia/ijksdl/ijksdl_thread.h @@ -25,6 +25,10 @@ #ifndef IJKSDL__IJKSDL_THREAD_H #define IJKSDL__IJKSDL_THREAD_H +#if USE_SDL2 +#include +#else + #include #include @@ -43,9 +47,12 @@ typedef struct SDL_Thread 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); +int SDL_SetThreadPriority(SDL_ThreadPriority priority); void SDL_DetachThread(SDL_Thread *thread); +SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data, const char *name); + +#endif // USE_SDL2 + #endif diff --git a/ijkmedia/ijksdl/ijksdl_timer.c b/ijkmedia/ijksdl/ijksdl_timer.c index ca53eac2da..7673af55cb 100644 --- a/ijkmedia/ijksdl/ijksdl_timer.c +++ b/ijkmedia/ijksdl/ijksdl_timer.c @@ -49,6 +49,7 @@ int nanosleep(const struct timespec *, struct timespec *) __DARWIN_ALIAS_C(nanos #include "ijksdl_log.h" +#if !USE_SDL2 void SDL_Delay(Uint32 ms) { #ifdef WIN32 @@ -67,6 +68,7 @@ void SDL_Delay(Uint32 ms) } while (was_error); #endif } +#endif Uint64 SDL_GetTickHR(void) { diff --git a/ijkmedia/ijksdl/ijksdl_timer.h b/ijkmedia/ijksdl/ijksdl_timer.h index ec371d4b4e..9dece09f80 100644 --- a/ijkmedia/ijksdl/ijksdl_timer.h +++ b/ijkmedia/ijksdl/ijksdl_timer.h @@ -27,8 +27,11 @@ #include "ijksdl_stdinc.h" +#if USE_SDL2 +#include +#else void SDL_Delay(Uint32 ms); - +#endif Uint64 SDL_GetTickHR(void); diff --git a/ijkmedia/ijksdl/ijksdl_vout.c b/ijkmedia/ijksdl/ijksdl_vout.c index fb2c6623b3..5be3842009 100644 --- a/ijkmedia/ijksdl/ijksdl_vout.c +++ b/ijkmedia/ijksdl/ijksdl_vout.c @@ -68,6 +68,13 @@ int SDL_VoutSetOverlayFormat(SDL_Vout *vout, Uint32 overlay_format) return 0; } +int SDL_VoutSetWindow(SDL_Vout *vout, void *window) +{ + if(vout && vout->set_window) + return vout->set_window(vout, window); + return -1; +} + SDL_VoutOverlay *SDL_Vout_CreateOverlay(int width, int height, int frame_format, SDL_Vout *vout) { if (vout && vout->create_overlay) diff --git a/ijkmedia/ijksdl/ijksdl_vout.h b/ijkmedia/ijksdl/ijksdl_vout.h index 8f0f63b67b..6ffd75fd2f 100644 --- a/ijkmedia/ijksdl/ijksdl_vout.h +++ b/ijkmedia/ijksdl/ijksdl_vout.h @@ -68,6 +68,7 @@ struct SDL_Vout { void (*free_l)(SDL_Vout *vout); int (*display_overlay)(SDL_Vout *vout, SDL_VoutOverlay *overlay); + int (*set_window)(SDL_Vout *vout, void *window); Uint32 overlay_format; }; @@ -76,6 +77,8 @@ void SDL_VoutFreeP(SDL_Vout **pvout); int SDL_VoutDisplayYUVOverlay(SDL_Vout *vout, SDL_VoutOverlay *overlay); int SDL_VoutSetOverlayFormat(SDL_Vout *vout, Uint32 overlay_format); +int SDL_VoutSetWindow(SDL_Vout *vout, void *window); + 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); diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m index e6562e2986..78b3ba9611 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m @@ -24,6 +24,7 @@ #import "ijksdl_thread_ios.h" #include "ijksdl/ijksdl_thread.h" +#if !USE_SDL2 static void *SDL_RunThread(void *data) { @autoreleasepool { @@ -45,3 +46,4 @@ return thread; } +#endif \ No newline at end of file From 9c8bb614c1f9c07598017920ac86dd25c98346fa Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 29 Mar 2020 13:01:21 +0800 Subject: [PATCH 100/163] fix: fix android error after add SDL2 in desktop --- android/ijkplayer/build.gradle | 2 +- android/ijkplayer/fijkplayer-full/.gitignore | 3 ++- .../ijkplayer/gradle/wrapper/gradle-wrapper.properties | 4 ++-- .../media/example/fragments/SampleMediaListFragment.java | 1 + .../pipeline/ffpipenode_android_mediacodec_vdec.c | 5 +++-- ijkmedia/ijksdl/android/ijksdl_aout_android_audiotrack.c | 5 +++-- ijkmedia/ijksdl/android/ijksdl_aout_android_opensles.c | 5 +++-- ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c | 2 +- ijkmedia/ijksdl/ijksdl_thread.c | 9 ++++++--- ijkmedia/ijksdl/ijksdl_thread.h | 2 +- 10 files changed, 23 insertions(+), 15 deletions(-) diff --git a/android/ijkplayer/build.gradle b/android/ijkplayer/build.gradle index aacb2f94c4..93024d17ba 100644 --- a/android/ijkplayer/build.gradle +++ b/android/ijkplayer/build.gradle @@ -17,7 +17,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.4.2' + classpath 'com.android.tools.build:gradle:3.6.1' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7' diff --git a/android/ijkplayer/fijkplayer-full/.gitignore b/android/ijkplayer/fijkplayer-full/.gitignore index 796b96d1c4..2c2b962dab 100644 --- a/android/ijkplayer/fijkplayer-full/.gitignore +++ b/android/ijkplayer/fijkplayer-full/.gitignore @@ -1 +1,2 @@ -/build +build/ +.cxx/ diff --git a/android/ijkplayer/gradle/wrapper/gradle-wrapper.properties b/android/ijkplayer/gradle/wrapper/gradle-wrapper.properties index 1f59e782c4..79edf63a2b 100644 --- a/android/ijkplayer/gradle/wrapper/gradle-wrapper.properties +++ b/android/ijkplayer/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Aug 17 18:46:08 CST 2019 +#Sun Mar 29 12:46:48 CST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip diff --git a/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/fragments/SampleMediaListFragment.java b/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/fragments/SampleMediaListFragment.java index 3361d5012f..6dcab9b5ad 100644 --- a/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/fragments/SampleMediaListFragment.java +++ b/android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/fragments/SampleMediaListFragment.java @@ -68,6 +68,7 @@ public void onItemClick(AdapterView parent, View view, final int position, fi } }); + mAdapter.addItem("http://player.alicdn.com/video/aliyunmedia.mp4", "AliyunPlayer"); mAdapter.addItem("http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8", "bipbop basic master playlist"); mAdapter.addItem("http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear1/prog_index.m3u8", "bipbop basic 400x300 @ 232 kbps"); mAdapter.addItem("http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/gear2/prog_index.m3u8", "bipbop basic 640x480 @ 650 kbps"); diff --git a/ijkmedia/ijkplayer/android/pipeline/ffpipenode_android_mediacodec_vdec.c b/ijkmedia/ijkplayer/android/pipeline/ffpipenode_android_mediacodec_vdec.c index 4c6a53510b..4a35e7acc1 100755 --- a/ijkmedia/ijkplayer/android/pipeline/ffpipenode_android_mediacodec_vdec.c +++ b/ijkmedia/ijkplayer/android/pipeline/ffpipenode_android_mediacodec_vdec.c @@ -88,7 +88,7 @@ typedef struct IJKFF_Pipenode_Opaque { size_t nal_size; #endif - SDL_Thread _enqueue_thread; + // SDL_Thread _enqueue_thread; SDL_Thread *enqueue_thread; SDL_mutex *acodec_mutex; @@ -1589,7 +1589,8 @@ static int func_run_sync(IJKFF_Pipenode *node) if (!frame) goto fail; - opaque->enqueue_thread = SDL_CreateThreadEx(&opaque->_enqueue_thread, enqueue_thread_func, node, "amediacodec_input_thread"); + // opaque->enqueue_thread = SDL_CreateThreadEx(&opaque->_enqueue_thread, enqueue_thread_func, node, "amediacodec_input_thread"); + opaque->enqueue_thread = SDL_CreateThread(enqueue_thread_func, "amediacodec_input_thread", node); if (!opaque->enqueue_thread) { ALOGE("%s: SDL_CreateThreadEx failed\n", __func__); ret = -1; diff --git a/ijkmedia/ijksdl/android/ijksdl_aout_android_audiotrack.c b/ijkmedia/ijksdl/android/ijksdl_aout_android_audiotrack.c index a25e78a155..a901fc7c56 100644 --- a/ijkmedia/ijksdl/android/ijksdl_aout_android_audiotrack.c +++ b/ijkmedia/ijksdl/android/ijksdl_aout_android_audiotrack.c @@ -61,7 +61,7 @@ typedef struct SDL_Aout_Opaque { volatile float right_volume; SDL_Thread *audio_tid; - SDL_Thread _audio_tid; + // SDL_Thread _audio_tid; int audio_session_id; @@ -190,7 +190,8 @@ static int aout_open_audio_n(JNIEnv *env, SDL_Aout *aout, const SDL_AudioSpec *d opaque->pause_on = 1; opaque->abort_request = 0; - opaque->audio_tid = SDL_CreateThreadEx(&opaque->_audio_tid, aout_thread, aout, "ff_aout_android"); + // opaque->audio_tid = SDL_CreateThreadEx(&opaque->_audio_tid, aout_thread, aout, "ff_aout_android"); + opaque->audio_tid = SDL_CreateThread(aout_thread, "ff_aout_android", aout); if (!opaque->audio_tid) { ALOGE("aout_open_audio_n: failed to create audio thread"); SDL_Android_AudioTrack_free(env, opaque->atrack); diff --git a/ijkmedia/ijksdl/android/ijksdl_aout_android_opensles.c b/ijkmedia/ijksdl/android/ijksdl_aout_android_opensles.c index fbdbb90e6e..164f4753ac 100644 --- a/ijkmedia/ijksdl/android/ijksdl_aout_android_opensles.c +++ b/ijkmedia/ijksdl/android/ijksdl_aout_android_opensles.c @@ -53,7 +53,7 @@ typedef struct SDL_Aout_Opaque { SDL_mutex *wakeup_mutex; SDL_Thread *audio_tid; - SDL_Thread _audio_tid; + // SDL_Thread _audio_tid; SDL_AudioSpec spec; SLDataFormat_PCM format_pcm; @@ -419,7 +419,8 @@ static int aout_open_audio(SDL_Aout *aout, const SDL_AudioSpec *desired, SDL_Aud opaque->pause_on = 1; opaque->abort_request = 0; - opaque->audio_tid = SDL_CreateThreadEx(&opaque->_audio_tid, aout_thread, aout, "ff_aout_opensles"); + // opaque->audio_tid = SDL_CreateThreadEx(&opaque->_audio_tid, aout_thread, aout, "ff_aout_opensles"); + opaque->audio_tid = SDL_CreateThread(aout_thread, "ff_aout_opensles", aout); CHECK_COND_ERROR(opaque->audio_tid, "%s: failed to SDL_CreateThreadEx", __func__); if (obtained) { diff --git a/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c b/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c index 56c2588ce6..af41e4232a 100644 --- a/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c +++ b/ijkmedia/ijksdl/ffmpeg/ijksdl_vout_overlay_ffmpeg.c @@ -108,7 +108,7 @@ static AVFrame *opaque_obtain_managed_frame_buffer(SDL_VoutOverlay_Opaque* opaqu static void func_free_l(SDL_VoutOverlay *overlay) { - ALOGE("SDL_Overlay(ffmpeg): overlay_free_l(%p)\n", overlay); + ALOGI("SDL_Overlay(ffmpeg): overlay_free_l(%p)\n", overlay); if (!overlay) return; diff --git a/ijkmedia/ijksdl/ijksdl_thread.c b/ijkmedia/ijksdl/ijksdl_thread.c index ec8f73cb7b..41670d0f16 100644 --- a/ijkmedia/ijksdl/ijksdl_thread.c +++ b/ijkmedia/ijksdl/ijksdl_thread.c @@ -51,17 +51,18 @@ static void *SDL_RunThread(void *data) return NULL; } -SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data, const char *name) +SDL_Thread *SDL_CreateThread(int (*fn)(void *), const char *name, void *data) { + SDL_Thread *thread = mallocz(sizeof(SDL_Thread)); thread->func = fn; thread->data = data; - av_strlcpy(thread->name, name, sizeof(thread->name) - 1); + av_strlcpy(thread->name, name, sizeof(thread->name)-1); int retval = pthread_create(&thread->id, NULL, SDL_RunThread, thread); if (retval) return NULL; - return thread; } + #endif #if !USE_SDL2 @@ -103,6 +104,8 @@ void SDL_WaitThread(SDL_Thread *thread, int *status) if (status) *status = thread->retval; + + free(thread); } #ifndef WIN32 diff --git a/ijkmedia/ijksdl/ijksdl_thread.h b/ijkmedia/ijksdl/ijksdl_thread.h index fc2fe5e0f3..1f97d90ba5 100644 --- a/ijkmedia/ijksdl/ijksdl_thread.h +++ b/ijkmedia/ijksdl/ijksdl_thread.h @@ -51,7 +51,7 @@ void SDL_WaitThread(SDL_Thread *thread, int *status); int SDL_SetThreadPriority(SDL_ThreadPriority priority); void SDL_DetachThread(SDL_Thread *thread); -SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data, const char *name); +SDL_Thread *SDL_CreateThread(int (*fn)(void *), const char *name, void *data); #endif // USE_SDL2 From 780ab4294a76883d412c85b18a11207d8e3c72d3 Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 29 Mar 2020 13:07:01 +0800 Subject: [PATCH 101/163] fix: fix ios error after SDL2 desktop --- ios/IJKMediaDemo/IJKMediaDemo/IJKDemoSampleViewController.m | 2 ++ .../IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ios/IJKMediaDemo/IJKMediaDemo/IJKDemoSampleViewController.m b/ios/IJKMediaDemo/IJKMediaDemo/IJKDemoSampleViewController.m index 3eb53a0222..248906b250 100644 --- a/ios/IJKMediaDemo/IJKMediaDemo/IJKDemoSampleViewController.m +++ b/ios/IJKMediaDemo/IJKMediaDemo/IJKDemoSampleViewController.m @@ -36,6 +36,8 @@ - (void)viewDidLoad { NSMutableArray *sampleList = [[NSMutableArray alloc] init]; + [sampleList addObject:@[@"aliyunplayer", + @"http://player.alicdn.com/video/aliyunmedia.mp4"]]; [sampleList addObject:@[@"bipbop basic master playlist", @"http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8"]]; [sampleList addObject:@[@"bipbop basic 400x300 @ 232 kbps", diff --git a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m index 78b3ba9611..3f32fe9204 100644 --- a/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m +++ b/ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/ijksdl_thread_ios.m @@ -35,8 +35,10 @@ } } -SDL_Thread *SDL_CreateThreadEx(SDL_Thread *thread, int (*fn)(void *), void *data, const char *name) +SDL_Thread *SDL_CreateThread(int (*fn)(void *), const char *name, void *data) { + SDL_Thread *thread = malloc(sizeof(SDL_Thread)); + memset(thread, 0, sizeof(SDL_Thread)); thread->func = fn; thread->data = data; strlcpy(thread->name, name, sizeof(thread->name) - 1); @@ -46,4 +48,4 @@ return thread; } -#endif \ No newline at end of file +#endif From 5fd4cac92380c6bf960e630c1047d993b7319d95 Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 29 Mar 2020 13:07:24 +0800 Subject: [PATCH 102/163] chore: delete unused android directory link --- android/ijkplayer/ijkplayer-arm64/src/main/jni/ffmpeg | 1 - android/ijkplayer/ijkplayer-arm64/src/main/jni/ijkmedia | 1 - android/ijkplayer/ijkplayer-armv5/src/main/jni/ffmpeg | 1 - android/ijkplayer/ijkplayer-armv5/src/main/jni/ijkmedia | 1 - android/ijkplayer/ijkplayer-armv7a/src/main/jni/ijkmedia | 1 - android/ijkplayer/ijkplayer-x86/src/main/jni/ijkmedia | 1 - android/ijkplayer/ijkplayer-x86_64/src/main/jni/ijkmedia | 1 - 7 files changed, 7 deletions(-) delete mode 120000 android/ijkplayer/ijkplayer-arm64/src/main/jni/ffmpeg delete mode 120000 android/ijkplayer/ijkplayer-arm64/src/main/jni/ijkmedia delete mode 120000 android/ijkplayer/ijkplayer-armv5/src/main/jni/ffmpeg delete mode 120000 android/ijkplayer/ijkplayer-armv5/src/main/jni/ijkmedia delete mode 120000 android/ijkplayer/ijkplayer-armv7a/src/main/jni/ijkmedia delete mode 120000 android/ijkplayer/ijkplayer-x86/src/main/jni/ijkmedia delete mode 120000 android/ijkplayer/ijkplayer-x86_64/src/main/jni/ijkmedia diff --git a/android/ijkplayer/ijkplayer-arm64/src/main/jni/ffmpeg b/android/ijkplayer/ijkplayer-arm64/src/main/jni/ffmpeg deleted file mode 120000 index 56a0dd3e01..0000000000 --- a/android/ijkplayer/ijkplayer-arm64/src/main/jni/ffmpeg +++ /dev/null @@ -1 +0,0 @@ -../../../../ijkplayer-armv7a/src/main/jni/ffmpeg \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-arm64/src/main/jni/ijkmedia b/android/ijkplayer/ijkplayer-arm64/src/main/jni/ijkmedia deleted file mode 120000 index f61992095f..0000000000 --- a/android/ijkplayer/ijkplayer-arm64/src/main/jni/ijkmedia +++ /dev/null @@ -1 +0,0 @@ -../../../../../../ijkmedia \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-armv5/src/main/jni/ffmpeg b/android/ijkplayer/ijkplayer-armv5/src/main/jni/ffmpeg deleted file mode 120000 index 56a0dd3e01..0000000000 --- a/android/ijkplayer/ijkplayer-armv5/src/main/jni/ffmpeg +++ /dev/null @@ -1 +0,0 @@ -../../../../ijkplayer-armv7a/src/main/jni/ffmpeg \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-armv5/src/main/jni/ijkmedia b/android/ijkplayer/ijkplayer-armv5/src/main/jni/ijkmedia deleted file mode 120000 index f61992095f..0000000000 --- a/android/ijkplayer/ijkplayer-armv5/src/main/jni/ijkmedia +++ /dev/null @@ -1 +0,0 @@ -../../../../../../ijkmedia \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-armv7a/src/main/jni/ijkmedia b/android/ijkplayer/ijkplayer-armv7a/src/main/jni/ijkmedia deleted file mode 120000 index f61992095f..0000000000 --- a/android/ijkplayer/ijkplayer-armv7a/src/main/jni/ijkmedia +++ /dev/null @@ -1 +0,0 @@ -../../../../../../ijkmedia \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-x86/src/main/jni/ijkmedia b/android/ijkplayer/ijkplayer-x86/src/main/jni/ijkmedia deleted file mode 120000 index f61992095f..0000000000 --- a/android/ijkplayer/ijkplayer-x86/src/main/jni/ijkmedia +++ /dev/null @@ -1 +0,0 @@ -../../../../../../ijkmedia \ No newline at end of file diff --git a/android/ijkplayer/ijkplayer-x86_64/src/main/jni/ijkmedia b/android/ijkplayer/ijkplayer-x86_64/src/main/jni/ijkmedia deleted file mode 120000 index f61992095f..0000000000 --- a/android/ijkplayer/ijkplayer-x86_64/src/main/jni/ijkmedia +++ /dev/null @@ -1 +0,0 @@ -../../../../../../ijkmedia \ No newline at end of file From 228813c245f49b33c2ca5b94bc1a57f28ec2a09e Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 29 Mar 2020 13:46:37 +0800 Subject: [PATCH 103/163] chore: update shell for osx ijkplayer. add new ffmpeg tag --- desktop/CMakeLists.txt | 8 +++++--- init-osx.sh | 7 ++++--- init/init-glfw.sh | 37 ++++++++++++++++++++++++++++++++++ osx/tools/do-compile-ffmpeg.sh | 13 ++++++------ 4 files changed, 52 insertions(+), 13 deletions(-) create mode 100755 init/init-glfw.sh diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 26c9b6cf02..c7dd12a3f1 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -32,7 +32,9 @@ set(IJKROOT_PATH "${PROJECT_SOURCE_DIR}/..") get_filename_component(IJKROOT_PATH ${IJKROOT_PATH} ABSOLUTE) message(STATUS "IJKROOT_PATH ${IJKROOT_PATH}") - +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Debug") +endif() if (${CMAKE_BUILD_TYPE} STREQUAL "Release") add_definitions(-DNDEBUG=1) elseif (${CMAKE_BUILD_TYPE} STREQUAL "Debug") @@ -194,7 +196,7 @@ add_subdirectory(glfw) #target_link_libraries(IjkPlayer glfw) -add_executable(tuidemo ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c) +add_executable(tuidemo WIN32 MACOSX_BUNDLE ${CMAKE_CURRENT_LIST_DIR}/sources/ijkplayer_demo.c) # target_include_directories(tuidemo PRIVATE glad/include) target_include_directories(tuidemo PRIVATE glfw/include) target_include_directories(tuidemo PRIVATE glfw/deps) @@ -203,7 +205,7 @@ target_include_directories(tuidemo PRIVATE glfw/deps) #target_link_libraries(tuidemo glfw) if (APPLE) - # set_target_properties(tuidemo PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "tuidemo") + set_target_properties(tuidemo PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "tuidemo") add_compile_definitions(APPLE=1) endif() diff --git a/init-osx.sh b/init-osx.sh index 5f92787a0b..617086376d 100755 --- a/init-osx.sh +++ b/init-osx.sh @@ -16,9 +16,9 @@ # # IJK_FFMPEG_UPSTREAM=git://git.videolan.org/ffmpeg.git -IJK_FFMPEG_UPSTREAM=https://github.com/Bilibili/FFmpeg.git -IJK_FFMPEG_FORK=https://github.com/Bilibili/FFmpeg.git -IJK_FFMPEG_COMMIT=ff4.0--ijk0.8.25--20191231--001 +IJK_FFMPEG_UPSTREAM=https://github.com/befovy/FFmpeg.git +IJK_FFMPEG_FORK=https://github.com/befovy/FFmpeg.git +IJK_FFMPEG_COMMIT=ff4.0--ijk0.8.25--20200329--001 IJK_FFMPEG_LOCAL_REPO=extra/ffmpeg IJK_GASP_UPSTREAM=https://github.com/Bilibili/gas-preprocessor.git @@ -95,3 +95,4 @@ esac ./init-config.sh ./init/init-libyuv.sh ./init/init-portaudio.sh +./init/init-glfw.sh diff --git a/init/init-glfw.sh b/init/init-glfw.sh new file mode 100755 index 0000000000..8f8bd7cec1 --- /dev/null +++ b/init/init-glfw.sh @@ -0,0 +1,37 @@ +#! /usr/bin/env bash +# +# Copyright (C) 2013-2015 Bilibili +# Copyright (C) 2013-2015 Zhang Rui +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BASEDIR=$(dirname "$DIR") + +GLFW_UPSTREAM=https://github.com/glfw/glfw.git +GLFW_FORK=https://github.com/glfw/glfw.git +GLFW_COMMIT=ecda86fa +GLFW_LOCAL_REPO=$BASEDIR/extra/glfw + +set -e +TOOLS=$BASEDIR/tools + +echo "== pull GLFW base ==" +sh $TOOLS/pull-repo-base.sh $GLFW_UPSTREAM $GLFW_LOCAL_REPO + +echo "== pull GLFW fork ==" +sh $TOOLS/pull-repo-ref.sh $GLFW_FORK $BASEDIR/desktop/glfw ${GLFW_LOCAL_REPO} +cd $BASEDIR/desktop/glfw +git checkout ${GLFW_COMMIT} -b ijkplayer +cd - diff --git a/osx/tools/do-compile-ffmpeg.sh b/osx/tools/do-compile-ffmpeg.sh index f3e2229a4a..0035749ab3 100755 --- a/osx/tools/do-compile-ffmpeg.sh +++ b/osx/tools/do-compile-ffmpeg.sh @@ -195,23 +195,22 @@ FFMPEG_CFLAGS="$FFMPEG_CFLAGS $FF_XCODE_BITCODE" FFMPEG_LDFLAGS="$FFMPEG_CFLAGS" -#-------------------- -echo "\n--------------------" +# -------------------- +echo "----------------------" echo "[*] check OpenSSL" echo "----------------------" FFMPEG_DEP_OPENSSL_INC=/usr/local/opt/openssl/include FFMPEG_DEP_OPENSSL_LIB=/usr/local/opt/openssl/lib #-------------------- # with openssl -if [ -f "${FFMPEG_DEP_OPENSSL_LIB}/libssl.a" ]; then - FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-openssl" +# brew install openssl +if [ -f "${FFMPEG_DEP_OPENSSL_LIB}/libssl.dylib" ]; then + FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS --enable-openssl" FFMPEG_CFLAGS="$FFMPEG_CFLAGS -I${FFMPEG_DEP_OPENSSL_INC}" FFMPEG_DEP_LIBS="$FFMPEG_CFLAGS -L${FFMPEG_DEP_OPENSSL_LIB} -lssl -lcrypto" - else - echo "openssl not found" - exit 1; + echo "openssl not found" fi From ae56dee3961fe5e7ddefbd4c211720f92003b99b Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 29 Mar 2020 13:48:42 +0800 Subject: [PATCH 104/163] docs: add osx build guide --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2458649d6b..d969607145 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,8 @@ make IjkPlayer make tuidemo ``` +**Or you call open ijkplayer as a CMakeLists.txt project using Clion.** + tuidemo is a terminal UI demo for ijkplayer in progress, it can't display video yet. `libIjkPlayer.dylib` is the output dynamic library. From e479d4e75fd05ed3f5e0e64a6722d8a900bd9774 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 11 Apr 2020 15:59:51 +0800 Subject: [PATCH 105/163] feat: add input process for tui demo --- desktop/CMakeLists.txt | 5 +- desktop/sources/ijkplayer_demo.c | 102 +++++++++++++++++++++++++--- desktop/sources/ijkplayer_desktop.h | 42 ++++++++++++ 3 files changed, 139 insertions(+), 10 deletions(-) diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index c7dd12a3f1..510ace7e96 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -128,9 +128,7 @@ if (APPLE) cmake_print_variables(FFMPEG_STATIC_INCLUDE_DIRS) cmake_print_variables(FFMPEG_STATIC_LIBRARIES) - target_link_libraries(IjkPlayer ${SDL2_LIBRARIES}) - endif () if (WIN32) @@ -141,6 +139,9 @@ endif () message(STATUS "ffmpeg libs:${FFMPEG_STATIC_LIBRARIES}") +list(REMOVE_ITEM FFMPEG_STATIC_LIBRARIES "ssl") +list(REMOVE_ITEM FFMPEG_STATIC_LIBRARIES "crypto") + cmake_print_variables(FFMPEG_STATIC_LIBRARIES) target_link_libraries(IjkPlayer ${FFMPEG_STATIC_LIBRARIES}) diff --git a/desktop/sources/ijkplayer_demo.c b/desktop/sources/ijkplayer_demo.c index ef22ddfbd1..24b9473049 100644 --- a/desktop/sources/ijkplayer_demo.c +++ b/desktop/sources/ijkplayer_demo.c @@ -31,19 +31,51 @@ #ifdef WIN32 #include #else + #include + #endif #include + #define GLFW_INCLUDE_NONE + #include #include #define SCR_WIDTH 800 #define SCR_HEIGHT 600 + +typedef struct IjkDemoInfo { + IjkFFMediaPlayer *fp; + int state; + int w, h; + int isSeeking; + int64_t duration; +} IjkDemoInfo; + void demo_event_cb(void *userdata, int what, int arg1, int arg2, void *extra) { - printf("demo event cb what %5d:(%5d %5d)\n", what, arg1, arg2); + printf("demo event cb what %5d:(%5d %5d)\n", what, arg1, arg2); + + IjkDemoInfo *info = userdata; + switch (what) { + case IJK_MSG_PLAYBACK_STATE_CHANGED: + info->state = arg1; + break; + case IJK_MSG_PREPARED: + info->duration = ijkff_get_duration(info->fp); + break; + case IJK_MSG_VIDEO_SIZE_CHANGED: + info->w = arg1; + info->h = arg2; + break; + case IJK_MSG_SEEK_COMPLETE: + info->isSeeking = 0; + break; + default: + break; + } } static void error_callback(int error, const char *description) { @@ -61,6 +93,58 @@ static void error_callback(int error, const char *description) { // glfwSetWindowShouldClose(window, GLFW_TRUE); //} +int processEvent(IjkFFMediaPlayer *fp, IjkDemoInfo *info, const SDL_Event *event) { + if (!fp || !event) + return SDL_QUIT; + + int ret = 0; + switch (event->type) { + case SDL_QUIT: + ret = SDL_QUIT; + break; + case SDL_KEYDOWN: { + switch (event->key.keysym.sym) { + case SDLK_SPACE: { + if (info->state == IJK_STATE_STARTED) + ijkff_pause(fp); + else if (info->state == IJK_STATE_PAUSED) + ijkff_start(fp); + break; + } + case SDLK_UP: + case SDLK_DOWN: { + float volume = ijkff_get_playback_volume(fp); + volume += event->key.keysym.sym == SDLK_DOWN ? -0.1f : 0.1f; + if (volume < 0.0f) volume = 0.0f; + if (volume > 1.0f) volume = 1.0f; + ijkff_set_playback_volume(fp, volume); + break; + } + case SDLK_LEFT: + case SDLK_RIGHT: { + if (ijkff_is_playing(fp)) { + int64_t position = ijkff_get_current_position(fp); + int64_t delta = info->duration / 40; + int64_t target = position + (event->key.keysym.sym == SDLK_LEFT ? -delta : delta); + if (target < 0) target = 0; + if (target > info->duration) target = info->duration; + ijkff_seek_to(fp, target); + } + break; + } + case SDLK_ESCAPE: + ret = SDL_QUIT; + break; + default: + break; + } + default: + break; + } + } + return ret; +} + int main(int argc, char *argv[]) { #if GLFW glfwSetErrorCallback(error_callback); @@ -94,12 +178,18 @@ int main(int argc, char *argv[]) { #endif IjkFFMediaPlayer *fp = ijkff_create(); + + IjkDemoInfo info; + memset(&info, 0, sizeof(info)); + info.fp = fp; + ijkff_set_event_cb(fp, &info, demo_event_cb); + ijkff_set_option(fp, "fcc-i420", "overlay-format", IJK_OPT_CATEGORY_PLAYER); - ijkff_set_data_source(fp, "http://player.alicdn.com/video/aliyunmedia.mp4"); - // ijkff_set_data_source(fp, "/Users/bytedance/Downloads/aliyunmedia.mp4"); + ijkff_set_data_source(fp, "https://player.alicdn.com/video/aliyunmedia.mp4"); SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS | SDL_INIT_AUDIO); + SDL_Window *window = SDL_CreateWindow("Video", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, @@ -109,7 +199,6 @@ int main(int argc, char *argv[]) { ijkff_prepare_async(fp); ijkff_start(fp); - ijkff_set_event_cb(fp, NULL, demo_event_cb); #if GLFW while (!glfwWindowShouldClose(window)) { @@ -121,16 +210,13 @@ int main(int argc, char *argv[]) { SDL_Event event; while (1) { SDL_WaitEvent(&event); - - if (event.type == SDL_QUIT) + if (processEvent(fp, &info, &event) == SDL_QUIT) break; } SDL_Quit(); - ijkff_stop(fp); ijkff_shutdown(fp); -// glfwTerminate(); return 0; } diff --git a/desktop/sources/ijkplayer_desktop.h b/desktop/sources/ijkplayer_desktop.h index a352df915f..16e8c3b323 100644 --- a/desktop/sources/ijkplayer_desktop.h +++ b/desktop/sources/ijkplayer_desktop.h @@ -67,6 +67,48 @@ extern "C" { #define IJK_OPT_CATEGORY_PLAYER 4 #define IJK_OPT_CATEGORY_SWR 5 +#define IJK_STATE_IDLE 0 +#define IJK_STATE_INITIALIZED 1 +#define IJK_STATE_ASYNC_PREPARING 2 +#define IJK_STATE_PREPARED 3 +#define IJK_STATE_STARTED 4 +#define IJK_STATE_PAUSED 5 +#define IJK_STATE_COMPLETED 6 +#define IJK_STATE_STOPPED 7 +#define IJK_STATE_ERROR 8 +#define IJK_STATE_END 9 + + +#define IJK_MSG_FLUSH 0 +#define IJK_MSG_ERROR 100 /* arg1 = error */ +#define IJK_MSG_PREPARED 200 +#define IJK_MSG_COMPLETED 300 +#define IJK_MSG_VIDEO_SIZE_CHANGED 400 /* arg1 = width, arg2 = height */ +#define IJK_MSG_SAR_CHANGED 401 /* arg1 = sar.num, arg2 = sar.den */ +#define IJK_MSG_VIDEO_RENDERING_START 402 +#define IJK_MSG_AUDIO_RENDERING_START 403 +#define IJK_MSG_VIDEO_ROTATION_CHANGED 404 /* arg1 = degree */ +#define IJK_MSG_AUDIO_DECODED_START 405 +#define IJK_MSG_VIDEO_DECODED_START 406 +#define IJK_MSG_OPEN_INPUT 407 +#define IJK_MSG_FIND_STREAM_INFO 408 +#define IJK_MSG_COMPONENT_OPEN 409 +#define IJK_MSG_VIDEO_SEEK_RENDERING_START 410 +#define IJK_MSG_AUDIO_SEEK_RENDERING_START 411 + +#define IJK_MSG_BUFFERING_START 500 +#define IJK_MSG_BUFFERING_END 501 +#define IJK_MSG_BUFFERING_UPDATE 502 /* arg1 = buffering head position in time, arg2 = minimum percent in time or bytes */ +#define IJK_MSG_BUFFERING_BYTES_UPDATE 503 /* arg1 = cached data in bytes, arg2 = high water mark */ +#define IJK_MSG_BUFFERING_TIME_UPDATE 504 /* arg1 = cached duration in milliseconds, arg2 = high water mark */ +#define IJK_MSG_CURRENT_POSITION_UPDATE 510 /* arg1 = current position in milliseconds */ +#define IJK_MSG_SEEK_COMPLETE 600 /* arg1 = seek position, arg2 = error */ +#define IJK_MSG_PLAYBACK_STATE_CHANGED 700 +#define IJK_MSG_TIMED_TEXT 800 +#define IJK_MSG_ACCURATE_SEEK_COMPLETE 900 /* arg1 = current position*/ +#define IJK_MSG_GET_IMG_STATE 1000 /* arg1 = timestamp, arg2 = result code, obj = file name*/ + + #include #include #include From a9266ee63132ea2c4cd1585a2f67b64a149ecb6c Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 11 Apr 2020 16:04:24 +0800 Subject: [PATCH 106/163] docs: fix spell typo --- CMakeLists.txt | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2b515b670..244111bac5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,4 +24,4 @@ project("IjkPlayer") set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 11) -add_subdirectory(desktop) \ No newline at end of file +add_subdirectory(desktop) diff --git a/README.md b/README.md index d969607145..385862b507 100644 --- a/README.md +++ b/README.md @@ -263,7 +263,7 @@ make IjkPlayer make tuidemo ``` -**Or you call open ijkplayer as a CMakeLists.txt project using Clion.** +**Or you can open ijkplayer as a CMakeLists.txt project using Clion.** tuidemo is a terminal UI demo for ijkplayer in progress, it can't display video yet. From 1ab8a601b239f45c01760db86e89f244c10956f3 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 11 Apr 2020 16:29:06 +0800 Subject: [PATCH 107/163] fix: build warning printf lld and isnan --- ijkmedia/ijkplayer/ff_ffplay.c | 19 ++++++++++++------- ijkmedia/ijksdl/ijksdl_egl.c | 4 ++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ijkmedia/ijkplayer/ff_ffplay.c b/ijkmedia/ijkplayer/ff_ffplay.c index 8df2a91625..05a974a52b 100755 --- a/ijkmedia/ijkplayer/ff_ffplay.c +++ b/ijkmedia/ijkplayer/ff_ffplay.c @@ -103,9 +103,14 @@ #ifdef isnan #undef isnan #endif -#define isnan(x) (isnan((double)(x)) || isnanf((float)(x))) +//#define isnan(x) (isnan((double)(x)) || isnanf((float)(x))) + +//http://faywong.github.io/2016/07/18/isnanf%E5%BC%95%E5%8F%91%E7%9A%84%E8%A1%80%E6%A1%88/ +#include +#define isnan(x) __builtin_isnan(x) #endif + #if defined(__ANDROID__) #define printf(...) ALOGD(__VA_ARGS__) #endif @@ -539,7 +544,7 @@ static int convert_image(FFPlayer *ffp, AVFrame *src_frame, int64_t src_frame_pt if (ret >= 0 && got_packet > 0) { strcpy(file_path, img_info->img_path); strcat(file_path, "/"); - sprintf(file_name, "%lld", src_frame_pts); + sprintf(file_name, "%" PRId64 "", src_frame_pts); strcat(file_name, ".png"); strcat(file_path, file_name); @@ -1564,7 +1569,7 @@ static int queue_picture(FFPlayer *ffp, AVFrame *src_frame, double pts, double d is->accurate_seek_start_time = now; } SDL_UnlockMutex(is->accurate_seek_mutex); - av_log(NULL, AV_LOG_INFO, "video accurate_seek start, is->seek_pos=%lld, pts=%lf, is->accurate_seek_time = %lld\n", is->seek_pos, pts, is->accurate_seek_start_time); + av_log(NULL, AV_LOG_INFO, "video accurate_seek start, is->seek_pos=%" PRId64 ", pts=%lf, is->accurate_seek_time = %" PRId64 "\n", is->seek_pos, pts, is->accurate_seek_start_time); } is->drop_vframe_count++; @@ -1587,11 +1592,11 @@ static int queue_picture(FFPlayer *ffp, AVFrame *src_frame, double pts, double d if ((now - is->accurate_seek_start_time) <= ffp->accurate_seek_timeout) { return 1; // drop some old frame when do accurate seek } else { - av_log(NULL, AV_LOG_WARNING, "video accurate_seek is error, is->drop_vframe_count=%d, now = %lld, pts = %lf\n", is->drop_vframe_count, now, pts); + av_log(NULL, AV_LOG_WARNING, "video accurate_seek is error, is->drop_vframe_count=%d, now = %" PRId64 ", pts = %lf\n", is->drop_vframe_count, now, pts); video_accurate_seek_fail = 1; // if KEY_FRAME interval too big, disable accurate seek } } else { - av_log(NULL, AV_LOG_INFO, "video accurate_seek is ok, is->drop_vframe_count =%d, is->seek_pos=%lld, pts=%lf\n", is->drop_vframe_count, is->seek_pos, pts); + av_log(NULL, AV_LOG_INFO, "video accurate_seek is ok, is->drop_vframe_count =%d, is->seek_pos=%" PRId64 ", pts=%lf\n", is->drop_vframe_count, is->seek_pos, pts); if (video_seek_pos == is->seek_pos) { is->drop_vframe_count = 0; SDL_LockMutex(is->accurate_seek_mutex); @@ -2049,7 +2054,7 @@ static int audio_thread(void *arg) is->accurate_seek_start_time = now; } SDL_UnlockMutex(is->accurate_seek_mutex); - av_log(NULL, AV_LOG_INFO, "audio accurate_seek start, is->seek_pos=%lld, audio_clock=%lf, is->accurate_seek_start_time = %lld\n", is->seek_pos, audio_clock, is->accurate_seek_start_time); + av_log(NULL, AV_LOG_INFO, "audio accurate_seek start, is->seek_pos=%" PRId64 ", audio_clock=%lf, is->accurate_seek_start_time = %" PRId64 "\n", is->seek_pos, audio_clock, is->accurate_seek_start_time); } is->drop_aframe_count++; while (is->video_accurate_seek_req && !is->abort_request) { @@ -2106,7 +2111,7 @@ static int audio_thread(void *arg) audio_accurate_seek_fail = 1; } if (audio_accurate_seek_fail) { - av_log(NULL, AV_LOG_INFO, "audio accurate_seek is error, is->drop_aframe_count=%d, now = %lld, audio_clock = %lf\n", is->drop_aframe_count, now, audio_clock); + av_log(NULL, AV_LOG_INFO, "audio accurate_seek is error, is->drop_aframe_count=%d, now = %" PRId64 ", audio_clock = %lf\n", is->drop_aframe_count, now, audio_clock); is->drop_aframe_count = 0; SDL_LockMutex(is->accurate_seek_mutex); is->audio_accurate_seek_req = 0; diff --git a/ijkmedia/ijksdl/ijksdl_egl.c b/ijkmedia/ijksdl/ijksdl_egl.c index f2c995ab1a..59026e8292 100644 --- a/ijkmedia/ijksdl/ijksdl_egl.c +++ b/ijkmedia/ijksdl/ijksdl_egl.c @@ -30,6 +30,10 @@ #include "ijksdl/ijksdl_vout.h" #include "ijksdl/gles2/internal.h" +#if ANDROID +#include +#endif + #define IJK_EGL_RENDER_BUFFER 0 typedef struct IJK_EGL_Opaque { From 95c3d938e76ba892df47431a596e9cf0113b1909 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 11 Apr 2020 16:38:41 +0800 Subject: [PATCH 108/163] chore: release 0.6.0 --- CHANGELOG.md | 14 +++++++++++++- android/ijkplayer/gradle.properties | 4 ++-- ios/CocoaPodsPub/BIJKPlayer.podspec | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a74fad85c9..25c278c7dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ + +--- +## 0.6.0 (2020-04-11) + +* add input process for tui demo ([e479d4e](https://github.com/befovy/ijkplayer/commit/e479d4e75fd05ed3f5e0e64a6722d8a900bd9774)) +* add SDL2 audio and video render, add glfw video render. ([9e3da67](https://github.com/befovy/ijkplayer/commit/9e3da67ef7a1c0f71b93157a82f8bbb41331e5bc)) +* C style API for Mac OS ([cef0b89](https://github.com/befovy/ijkplayer/commit/cef0b897827fdb81e3cd40e3d14d74e0e47ee5e1)) +* ijkplayer desktop works on Mac OS ([8da29be](https://github.com/befovy/ijkplayer/commit/8da29bec7b53579ba7cb4d8e8176b1be219227d0)) +* notify current position option ([1629f87](https://github.com/befovy/ijkplayer/commit/1629f874bee484b2999afdf9976a8cd26eedd0df)) + + --- -### 0.5.1 (2020-02-21) + +## 0.5.1 (2020-02-21) ### Features diff --git a/android/ijkplayer/gradle.properties b/android/ijkplayer/gradle.properties index d39877f675..2605f461f1 100644 --- a/android/ijkplayer/gradle.properties +++ b/android/ijkplayer/gradle.properties @@ -17,8 +17,8 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -VERSION_NAME=0.5.1 -VERSION_CODE=000501 +VERSION_NAME=0.6.0 +VERSION_CODE=000600 GROUP=com.befovy.fijkplayer # http://central.sonatype.org/pages/requirements.html diff --git a/ios/CocoaPodsPub/BIJKPlayer.podspec b/ios/CocoaPodsPub/BIJKPlayer.podspec index d16993c5b3..7dde167a52 100644 --- a/ios/CocoaPodsPub/BIJKPlayer.podspec +++ b/ios/CocoaPodsPub/BIJKPlayer.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |spec| # spec.name = "BIJKPlayer" - spec.version = "0.5.1" + spec.version = "0.6.0" spec.summary = "ijkplayer iOS video player SDK" spec.author = { "befovy" => "befovy@gmail.com" } From 704b9c03e7d2815f86911dad3cf6efc632bbd4e7 Mon Sep 17 00:00:00 2001 From: befovy Date: Sat, 11 Apr 2020 17:03:32 +0800 Subject: [PATCH 109/163] chore: update podspec url --- ios/CocoaPodsPub/BIJKPlayer.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/CocoaPodsPub/BIJKPlayer.podspec b/ios/CocoaPodsPub/BIJKPlayer.podspec index 7dde167a52..5288f0a39a 100644 --- a/ios/CocoaPodsPub/BIJKPlayer.podspec +++ b/ios/CocoaPodsPub/BIJKPlayer.podspec @@ -75,7 +75,7 @@ Pod::Spec.new do |spec| # Supports git, hg, bzr, svn and HTTP. # - spec.source = { :http => "https://github.com/befovy/ijkplayer/releases/download/f0.5.1/IJKPlayer.tar.gz" } + spec.source = { :http => "https://dl.bintray.com/befovytray/bijkplayer/f0.6.0/IJKPlayer.tar.gz" } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # # CocoaPods is smart about how it includes source code. For source files From b1f924fd0aa4310e9383f6cafbd21375e0c9f37c Mon Sep 17 00:00:00 2001 From: befovy Date: Sun, 19 Apr 2020 22:15:42 +0800 Subject: [PATCH 110/163] feat: add gles ose render for android mediacodec buffers When using gles render for mediacodec, we can take snapshot using glReadPixels. So both ffmpeg decoder and mediacodec decoder can take snapshot. !! Warning there still has issue which is **Can't setSurface more than once.** when using gles render for mediacodec. --- .../ijkplayer/ijkplayer-example/build.gradle | 2 + .../src/main/AndroidManifest.xml | 1 + .../example/activities/VideoActivity.java | 27 ++ .../ijk/media/example/application/IjkApp.java | 39 +++ .../media/example/application/Settings.java | 5 + .../example/widget/media/IjkVideoView.java | 39 ++- .../src/main/res/layout/activity_player.xml | 16 +- .../src/main/res/values/strings.xml | 1 + .../src/main/res/values/strings_pref.xml | 24 +- .../src/main/res/xml/settings.xml | 6 + .../ijk/media/exo/IjkExoMediaPlayer.java | 5 + .../ijk/media/player/AbstractMediaPlayer.java | 23 ++ .../ijk/media/player/AndroidMediaPlayer.java | 5 + .../ijk/media/player/IMediaPlayer.java | 24 +- .../ijk/media/player/IjkMediaPlayer.java | 58 ++++- .../ijk/media/player/MediaPlayerProxy.java | 21 ++ .../media/player/misc/MediaCodecSurface.java | 86 +++++++ ijkmedia/ijkj4a/CMakeLists.txt | 1 + ijkmedia/ijkj4a/Makefile | 1 + .../ijk/media/player/misc/MediaCodecSurface.c | 212 ++++++++++++++++ .../ijk/media/player/misc/MediaCodecSurface.h | 61 +++++ .../player/misc/MediaCodecSurface.include.j4a | 1 + .../player/misc/MediaCodecSurface.loader.j4a | 1 + ijkmedia/ijkj4a/j4a/j4a_allclasses.include.h | 1 + ijkmedia/ijkj4a/j4a/j4a_allclasses.loader.h | 1 + .../media/player/misc/MediaCodecSurface.java | 20 ++ .../ijkplayer/android/ijkplayer_android.c | 32 ++- .../ijkplayer/android/ijkplayer_android.h | 1 + ijkmedia/ijkplayer/android/ijkplayer_jni.c | 59 ++++- .../android/pipeline/ffpipeline_android.c | 1 + ijkmedia/ijkplayer/ff_ffmsg.h | 2 + ijkmedia/ijkplayer/ff_ffmsg_queue.h | 19 +- ijkmedia/ijkplayer/ff_ffplay.c | 37 ++- ijkmedia/ijkplayer/ff_ffplay.h | 2 + ijkmedia/ijkplayer/ff_ffplay_def.h | 5 + ijkmedia/ijkplayer/ff_ffplay_options.h | 2 +- ijkmedia/ijkplayer/ijkplayer.c | 9 + ijkmedia/ijkplayer/ijkplayer.h | 2 + ijkmedia/ijksdl/CMakeLists.txt | 3 + .../ijksdl_vout_android_nativewindow.c | 87 +++++-- .../ijksdl_vout_android_nativewindow.h | 4 +- .../android/ijksdl_vout_android_surface.c | 3 +- .../android/ijksdl_vout_android_surface.h | 1 - ijkmedia/ijksdl/gles2/color.c | 12 +- ijkmedia/ijksdl/gles2/fsh/amc.fsh.c | 38 +++ ijkmedia/ijksdl/gles2/internal.h | 34 ++- ijkmedia/ijksdl/gles2/renderer.c | 123 ++++++++- ijkmedia/ijksdl/gles2/renderer_amc.c | 233 ++++++++++++++++++ ijkmedia/ijksdl/gles2/vsh/amc.vsh.c | 41 +++ ijkmedia/ijksdl/ijksdl_egl.c | 22 ++ ijkmedia/ijksdl/ijksdl_egl.h | 7 + ijkmedia/ijksdl/ijksdl_gles2.h | 5 + ijkmedia/ijksdl/ijksdl_vout.c | 17 +- ijkmedia/ijksdl/ijksdl_vout.h | 11 +- 54 files changed, 1408 insertions(+), 85 deletions(-) create mode 100644 android/ijkplayer/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/application/IjkApp.java create mode 100644 android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/MediaCodecSurface.java create mode 100644 ijkmedia/ijkj4a/j4a/class/tv/danmaku/ijk/media/player/misc/MediaCodecSurface.c create mode 100644 ijkmedia/ijkj4a/j4a/class/tv/danmaku/ijk/media/player/misc/MediaCodecSurface.h create mode 100644 ijkmedia/ijkj4a/j4a/class/tv/danmaku/ijk/media/player/misc/MediaCodecSurface.include.j4a create mode 100644 ijkmedia/ijkj4a/j4a/class/tv/danmaku/ijk/media/player/misc/MediaCodecSurface.loader.j4a create mode 100644 ijkmedia/ijkj4a/java/tv/danmaku/ijk/media/player/misc/MediaCodecSurface.java create mode 100644 ijkmedia/ijksdl/gles2/fsh/amc.fsh.c create mode 100644 ijkmedia/ijksdl/gles2/renderer_amc.c create mode 100644 ijkmedia/ijksdl/gles2/vsh/amc.vsh.c diff --git a/android/ijkplayer/ijkplayer-example/build.gradle b/android/ijkplayer/ijkplayer-example/build.gradle index 5af078255d..c1516583c5 100644 --- a/android/ijkplayer/ijkplayer-example/build.gradle +++ b/android/ijkplayer/ijkplayer-example/build.gradle @@ -68,6 +68,8 @@ dependencies { implementation 'com.android.support:support-annotations:28.0.0' implementation 'com.squareup:otto:1.3.8' + implementation 'com.github.anrwatchdog:anrwatchdog:1.4.0' + implementation project(':fijkplayer-full') implementation project(':ijkplayer-exo') diff --git a/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml b/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml index 921c8095da..28afafc0e2 100644 --- a/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml +++ b/android/ijkplayer/ijkplayer-example/src/main/AndroidManifest.xml @@ -15,6 +15,7 @@ android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" + android:name=".application.IjkApp" android:theme="@style/AppTheme"> + android:layout_gravity="center"/> + +