Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
ijkplayer
提交
788352d5
I
ijkplayer
项目概览
NotesChapter
/
ijkplayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
ijkplayer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
788352d5
编写于
9月 24, 2014
作者:
Z
Zhang Rui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ios: add IJKAVMoviePlayerController
上级
db0dfef1
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
1153 addition
and
3 deletion
+1153
-3
ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
+22
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVMoviePlayerController.h
...JKMediaPlayer/IJKMediaPlayer/IJKAVMoviePlayerController.h
+76
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVMoviePlayerController.m
...JKMediaPlayer/IJKMediaPlayer/IJKAVMoviePlayerController.m
+794
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVPlayerLayerView.h
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVPlayerLayerView.h
+82
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVPlayerLayerView.m
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVPlayerLayerView.m
+128
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m
...JKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m
+5
-3
ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h
ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h
+2
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaUtils.h
ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaUtils.h
+9
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaUtils.m
ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaUtils.m
+35
-0
未找到文件。
ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
浏览文件 @
788352d5
...
...
@@ -19,6 +19,9 @@
E6716E4E1807EA5000B3FBC1
/* IJKFFMrl.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6716E4D1807EA5000B3FBC1
/* IJKFFMrl.m */
;
};
E672D6F318D3445100C51FF9
/* IJKMediaModule.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E672D6F218D3445100C51FF9
/* IJKMediaModule.m */
;
};
E672D6F418D345C100C51FF9
/* IJKMediaModule.h in CopyFiles */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E672D6F118D3445100C51FF9
/* IJKMediaModule.h */
;
};
E67C4E0519D15B3200415CEE
/* IJKAVPlayerLayerView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E67C4E0419D15B3200415CEE
/* IJKAVPlayerLayerView.m */
;
};
E67C4E0819D15EEA00415CEE
/* IJKAVMoviePlayerController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E67C4E0719D15EEA00415CEE
/* IJKAVMoviePlayerController.m */
;
};
E67C4E0A19D2BFF100415CEE
/* IJKAVMoviePlayerController.h in CopyFiles */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E67C4E0619D15EEA00415CEE
/* IJKAVMoviePlayerController.h */
;
};
E6903EC217EAF6C500CFD954
/* IJKMediaPlayback.h in CopyFiles */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903EC117EAF6C500CFD954
/* IJKMediaPlayback.h */
;
};
E6903FC717EAFC2C00CFD954
/* libavcodec.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903FC217EAFC2C00CFD954
/* libavcodec.a */
;
};
E6903FC817EAFC2C00CFD954
/* libavformat.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903FC317EAFC2C00CFD954
/* libavformat.a */
;
};
...
...
@@ -61,6 +64,7 @@
dstPath
=
"include/${PRODUCT_NAME}"
;
dstSubfolderSpec
=
16
;
files
=
(
E67C4E0A19D2BFF100415CEE
/* IJKAVMoviePlayerController.h in CopyFiles */
,
E672D6F418D345C100C51FF9
/* IJKMediaModule.h in CopyFiles */
,
E62139BF180FAE5F00553533
/* IJKFFOptions.h in CopyFiles */
,
E6F727BE17F40C390043623F
/* IJKFFMoviePlayerController.h in CopyFiles */
,
...
...
@@ -95,6 +99,10 @@
E6716E4D1807EA5000B3FBC1
/* IJKFFMrl.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
IJKFFMrl.m
;
sourceTree
=
"<group>"
;
};
E672D6F118D3445100C51FF9
/* IJKMediaModule.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
IJKMediaModule.h
;
path
=
IJKMediaPlayer/IJKMediaModule.h
;
sourceTree
=
"<group>"
;
};
E672D6F218D3445100C51FF9
/* IJKMediaModule.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
IJKMediaModule.m
;
path
=
IJKMediaPlayer/IJKMediaModule.m
;
sourceTree
=
"<group>"
;
};
E67C4E0319D15B3200415CEE
/* IJKAVPlayerLayerView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
IJKAVPlayerLayerView.h
;
path
=
IJKMediaPlayer/IJKAVPlayerLayerView.h
;
sourceTree
=
"<group>"
;
};
E67C4E0419D15B3200415CEE
/* IJKAVPlayerLayerView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
IJKAVPlayerLayerView.m
;
path
=
IJKMediaPlayer/IJKAVPlayerLayerView.m
;
sourceTree
=
"<group>"
;
};
E67C4E0619D15EEA00415CEE
/* IJKAVMoviePlayerController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
IJKAVMoviePlayerController.h
;
path
=
IJKMediaPlayer/IJKAVMoviePlayerController.h
;
sourceTree
=
"<group>"
;
};
E67C4E0719D15EEA00415CEE
/* IJKAVMoviePlayerController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
IJKAVMoviePlayerController.m
;
path
=
IJKMediaPlayer/IJKAVMoviePlayerController.m
;
sourceTree
=
"<group>"
;
};
E6850E7A195D6ABF00550718
/* ijkavfmsg.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ijkavfmsg.h
;
sourceTree
=
"<group>"
;
};
E6903EB917EAF6C500CFD954
/* libIJKMediaPlayer.a */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
archive.ar
;
includeInIndex
=
0
;
path
=
libIJKMediaPlayer.a
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
E6903EC017EAF6C500CFD954
/* IJKMediaPlayer-Prefix.pch */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"IJKMediaPlayer-Prefix.pch"
;
sourceTree
=
"<group>"
;
};
...
...
@@ -272,6 +280,7 @@
isa
=
PBXGroup
;
children
=
(
E6F727B517F2B1690043623F
/* IJKMediaPlayer */
,
E67C4E0219D15B0600415CEE
/* IJKAVMoviePlayerController */
,
E66F8DBE17EEC5DE00354D80
/* IJKMPMoviePlayerController */
,
E6903EBE17EAF6C500CFD954
/* IJKFFMoviePlayerController */
,
);
...
...
@@ -297,6 +306,17 @@
path
=
../../ios/IJKMediaPlayer/IJKMediaPlayer
;
sourceTree
=
"<group>"
;
};
E67C4E0219D15B0600415CEE
/* IJKAVMoviePlayerController */
=
{
isa
=
PBXGroup
;
children
=
(
E67C4E0319D15B3200415CEE
/* IJKAVPlayerLayerView.h */
,
E67C4E0419D15B3200415CEE
/* IJKAVPlayerLayerView.m */
,
E67C4E0619D15EEA00415CEE
/* IJKAVMoviePlayerController.h */
,
E67C4E0719D15EEA00415CEE
/* IJKAVMoviePlayerController.m */
,
);
name
=
IJKAVMoviePlayerController
;
sourceTree
=
"<group>"
;
};
E6903EB017EAF6C500CFD954
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -704,6 +724,7 @@
E690403417EAFC6100CFD954
/* ijksdl_vout.c in Sources */
,
E6EE92B91878230C009EAB56
/* ijksdl_thread_ios.m in Sources */
,
E66F8DC117EEC65200354D80
/* IJKMPMoviePlayerController.m in Sources */
,
E67C4E0819D15EEA00415CEE
/* IJKAVMoviePlayerController.m in Sources */
,
E6EE92B81878230C009EAB56
/* ijksdl_aout_ios_audiounit.m in Sources */
,
E6EE92C21878236A009EAB56
/* IJKSDLAudioQueueController.m in Sources */
,
E66F8DE717EFD9C300354D80
/* IJKFFMoviePlayerController.m in Sources */
,
...
...
@@ -716,6 +737,7 @@
E6EE92BF1878230C009EAB56
/* IJKSDLGLView.m in Sources */
,
E6F727BB17F2D9D40043623F
/* IJKFFMoviePlayerDef.m in Sources */
,
E6EE92BE1878230C009EAB56
/* IJKSDLGLShader.m in Sources */
,
E67C4E0519D15B3200415CEE
/* IJKAVPlayerLayerView.m in Sources */
,
E6F727C217F7C9BA0043623F
/* IJKMediaPlayback.m in Sources */
,
E6EE92BA1878230C009EAB56
/* ijksdl_vout_ios_gles2.m in Sources */
,
E6716E4B1807E5FC00B3FBC1
/* IJKMediaUtils.m in Sources */
,
...
...
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVMoviePlayerController.h
0 → 100644
浏览文件 @
788352d5
/*
* IJKAVMoviePlayerController.h
*
* Copyright (c) 2014 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
File: AVPlayerDemoPlaybackViewController.h
Abstract: UIViewController managing a playback view, thumbnail view, and associated playback UI.
Version: 1.3
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
this Apple software constitutes acceptance of these terms. If you do
not agree with these terms, please do not use, install, modify or
redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and
subject to these terms, Apple grants you a personal, non-exclusive
license, under Apple's copyrights in this original Apple software (the
"Apple Software"), to use, reproduce, modify and redistribute the Apple
Software, with or without modifications, in source and/or binary forms;
provided that if you redistribute the Apple Software in its entirety and
without modifications, you must retain this notice and the following
text and disclaimers in all such redistributions of the Apple Software.
Neither the name, trademarks, service marks or logos of Apple Inc. may
be used to endorse or promote products derived from the Apple Software
without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or
implied, are granted by Apple herein, including but not limited to any
patent rights that may be infringed by your derivative works or by other
works in which the Apple Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Copyright (C) 2014 Apple Inc. All Rights Reserved.
*/
#import "IJKMediaPlayback.h"
@interface
IJKAVMoviePlayerController
:
NSObject
<
IJKMediaPlayback
>
-
(
id
)
initWithContentURL
:(
NSURL
*
)
aUrl
;
@end
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVMoviePlayerController.m
0 → 100644
浏览文件 @
788352d5
此差异已折叠。
点击以展开。
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVPlayerLayerView.h
0 → 100644
浏览文件 @
788352d5
/*
* IJKAVPlayerLayerView.h
*
* Copyright (c) 2014 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
File: AVPlayerDemoPlaybackView.h
Abstract: UIView subclass to display the content associated with an AVPlayer
Version: 1.3
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
this Apple software constitutes acceptance of these terms. If you do
not agree with these terms, please do not use, install, modify or
redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and
subject to these terms, Apple grants you a personal, non-exclusive
license, under Apple's copyrights in this original Apple software (the
"Apple Software"), to use, reproduce, modify and redistribute the Apple
Software, with or without modifications, in source and/or binary forms;
provided that if you redistribute the Apple Software in its entirety and
without modifications, you must retain this notice and the following
text and disclaimers in all such redistributions of the Apple Software.
Neither the name, trademarks, service marks or logos of Apple Inc. may
be used to endorse or promote products derived from the Apple Software
without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or
implied, are granted by Apple herein, including but not limited to any
patent rights that may be infringed by your derivative works or by other
works in which the Apple Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Copyright (C) 2014 Apple Inc. All Rights Reserved.
*/
#import <UIKit/UIKit.h>
@class
AVPlayer
;
@interface
IJKAVPlayerLayerView
:
UIView
@property
(
nonatomic
,
strong
)
AVPlayer
*
player
;
-
(
void
)
setPlayer
:(
AVPlayer
*
)
player
;
-
(
void
)
setVideoFillMode
:(
NSString
*
)
fillMode
;
@end
ios/IJKMediaPlayer/IJKMediaPlayer/IJKAVPlayerLayerView.m
0 → 100644
浏览文件 @
788352d5
/*
* IJKAVPlayerLayerView.m
*
* Copyright (c) 2014 Zhang Rui <bbcallen@gmail.com>
*
* This file is part of ijkPlayer.
*
* ijkPlayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* ijkPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with ijkPlayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
File: AVPlayerDemoPlaybackView.m
Abstract: UIView subclass to display the content associated with an AVPlayer
Version: 1.3
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
this Apple software constitutes acceptance of these terms. If you do
not agree with these terms, please do not use, install, modify or
redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and
subject to these terms, Apple grants you a personal, non-exclusive
license, under Apple's copyrights in this original Apple software (the
"Apple Software"), to use, reproduce, modify and redistribute the Apple
Software, with or without modifications, in source and/or binary forms;
provided that if you redistribute the Apple Software in its entirety and
without modifications, you must retain this notice and the following
text and disclaimers in all such redistributions of the Apple Software.
Neither the name, trademarks, service marks or logos of Apple Inc. may
be used to endorse or promote products derived from the Apple Software
without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or
implied, are granted by Apple herein, including but not limited to any
patent rights that may be infringed by your derivative works or by other
works in which the Apple Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Copyright (C) 2014 Apple Inc. All Rights Reserved.
*/
#import "IJKAVPlayerLayerView.h"
#import <AVFoundation/AVFoundation.h>
@implementation
IJKAVPlayerLayerView
-
(
id
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
// Initialization code
}
return
self
;
}
+
(
Class
)
layerClass
{
return
[
AVPlayerLayer
class
];
}
-
(
AVPlayer
*
)
player
{
return
[(
AVPlayerLayer
*
)[
self
layer
]
player
];
}
-
(
void
)
setPlayer
:(
AVPlayer
*
)
player
{
[(
AVPlayerLayer
*
)[
self
layer
]
setPlayer
:
player
];
}
/* Specifies how the video is displayed within a player layer’s bounds.
(AVLayerVideoGravityResizeAspect is default) */
-
(
void
)
setVideoFillMode
:(
NSString
*
)
fillMode
{
AVPlayerLayer
*
playerLayer
=
(
AVPlayerLayer
*
)[
self
layer
];
playerLayer
.
videoGravity
=
fillMode
;
}
-
(
void
)
setContentMode
:(
UIViewContentMode
)
contentMode
{
[
super
setContentMode
:
contentMode
];
switch
(
contentMode
)
{
case
UIViewContentModeScaleToFill
:
[
self
setVideoFillMode
:
AVLayerVideoGravityResize
];
break
;
case
UIViewContentModeCenter
:
[
self
setVideoFillMode
:
AVLayerVideoGravityResizeAspect
];
break
;
case
UIViewContentModeScaleAspectFill
:
[
self
setVideoFillMode
:
AVLayerVideoGravityResizeAspectFill
];
break
;
case
UIViewContentModeScaleAspectFit
:
[
self
setVideoFillMode
:
AVLayerVideoGravityResizeAspect
];
default:
break
;
}
}
@end
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m
浏览文件 @
788352d5
...
...
@@ -418,7 +418,8 @@ void IJKFFIOStatCompleteRegister(void (*cb)(const char *url,
[
self
setScreenOn
:
NO
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName:
IJKMoviePlayerPlaybackDidFinishNotification
object
:
self
];
postNotificationName:
IJKMoviePlayerPlaybackStateDidChangeNotification
object:
self
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName:
IJKMoviePlayerPlaybackDidFinishNotification
...
...
@@ -447,12 +448,13 @@ void IJKFFIOStatCompleteRegister(void (*cb)(const char *url,
[
self
setScreenOn
:
NO
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName:
IJKMoviePlayerPlaybackDidFinishNotification
object
:
self
];
postNotificationName:
IJKMoviePlayerPlaybackStateDidChangeNotification
object:
self
];
[[
NSNotificationCenter
defaultCenter
]
postNotificationName:
IJKMoviePlayerPlaybackDidFinishNotification
object:
self
userInfo:
@{
MPMoviePlayerPlaybackDidFinishReasonUserInfoKey
:
@
(
MPMovieFinishReasonPlaybackE
rror
)}];
userInfo:
@{
MPMoviePlayerPlaybackDidFinishReasonUserInfoKey
:
@
(
MPMovieFinishReasonPlaybackE
nded
)}];
break
;
}
case
FFP_MSG_VIDEO_SIZE_CHANGED
:
...
...
ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaPlayer.h
浏览文件 @
788352d5
...
...
@@ -26,4 +26,6 @@
#import "IJKFFOptions.h"
#import "IJKFFMoviePlayerController.h"
#import "IJKAVMoviePlayerController.h"
#import "IJKMediaModule.h"
ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaUtils.h
浏览文件 @
788352d5
...
...
@@ -31,4 +31,13 @@
+
(
NSString
*
)
createTempFileNameInDirectory
:
(
NSString
*
)
aDirectory
withPrefix
:
(
NSString
*
)
aPrefix
;
+
(
NSError
*
)
createErrorWithDomain
:
(
NSString
*
)
domain
code
:
(
NSInteger
)
code
description
:
(
NSString
*
)
description
reason
:
(
NSString
*
)
reason
;
+
(
void
)
kvoQuietlyRemoveObserver
:(
NSObject
*
)
anObserver
forKeyPath
:(
NSString
*
)
keyPath
fromObject
:(
NSObject
*
)
object
;
@end
ios/IJKMediaPlayer/IJKMediaPlayer/IJKMediaUtils.m
浏览文件 @
788352d5
...
...
@@ -50,4 +50,39 @@
return
[
NSString
stringWithCString
:
filename
encoding
:
NSASCIIStringEncoding
];
}
+
(
NSError
*
)
createErrorWithDomain
:
(
NSString
*
)
domain
code
:
(
NSInteger
)
code
description
:
(
NSString
*
)
description
reason
:
(
NSString
*
)
reason
{
/* Generate an error describing the failure. */
if
(
description
==
nil
)
description
=
@""
;
if
(
reason
==
nil
)
reason
=
@""
;
NSString
*
localizedDescription
=
NSLocalizedString
(
description
,
description
);
NSString
*
localizedFailureReason
=
NSLocalizedString
(
reason
,
reason
);
NSDictionary
*
errorDict
=
[
NSDictionary
dictionaryWithObjectsAndKeys
:
localizedDescription
,
NSLocalizedDescriptionKey
,
localizedFailureReason
,
NSLocalizedFailureReasonErrorKey
,
nil
];
NSError
*
error
=
[
NSError
errorWithDomain
:
domain
code:
0
userInfo:
errorDict
];
return
error
;
}
+
(
void
)
kvoQuietlyRemoveObserver
:(
NSObject
*
)
anObserver
forKeyPath
:(
NSString
*
)
keyPath
fromObject
:(
NSObject
*
)
object
{
@try
{
[
object
removeObserver
:
anObserver
forKeyPath
:
@"status"
];
}
@catch
(
NSException
*
exception
)
{
NSLog
(
@"dup remove observer
\n
"
);
}
}
@end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录