Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_25606643
ijkplayer
提交
ecb21ae7
I
ijkplayer
项目概览
qq_25606643
/
ijkplayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
ecb21ae7
编写于
10月 17, 2013
作者:
B
bbcallen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ios: set skip_loopfilter, skip_frame from objc level
上级
0fe547ba
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
92 addition
and
2 deletion
+92
-2
ijkmedia/ijkplayer/ff_ffplay.c
ijkmedia/ijkplayer/ff_ffplay.c
+3
-0
ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
+8
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.h
...JKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.h
+2
-1
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m
...JKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m
+3
-1
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFOptions.h
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFOptions.h
+33
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFOptions.m
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFOptions.m
+43
-0
未找到文件。
ijkmedia/ijkplayer/ff_ffplay.c
浏览文件 @
ecb21ae7
...
...
@@ -1683,8 +1683,11 @@ static int stream_component_open(FFPlayer *ffp, int stream_index)
return
-
1
;
}
// FIXME: android set these from outside
#ifndef __APPLE__
avctx
->
skip_frame
=
ffp
->
skip_frame
;
avctx
->
skip_loop_filter
=
ffp
->
skip_loop_filter
;
#endif
avctx
->
codec_id
=
codec
->
id
;
avctx
->
workaround_bugs
=
ffp
->
workaround_bugs
;
...
...
ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
浏览文件 @
ecb21ae7
...
...
@@ -7,6 +7,8 @@
objects
=
{
/* Begin PBXBuildFile section */
E62139BE180FA89B00553533
/* IJKFFOptions.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E62139BD180FA89A00553533
/* IJKFFOptions.m */
;
};
E62139BF180FAE5F00553533
/* IJKFFOptions.h in CopyFiles */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E62139BC180FA89A00553533
/* IJKFFOptions.h */
;
};
E63FC26917EFF39E003551EB
/* ijksdl_aout_ios_audiounit.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC26817EFF39E003551EB
/* ijksdl_aout_ios_audiounit.m */
;
settings
=
{
COMPILER_FLAGS
=
"-fno-objc-arc"
;
};
};
E63FC26F17EFF79F003551EB
/* IJKSDLAudioUnitController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC26E17EFF79F003551EB
/* IJKSDLAudioUnitController.m */
;
};
E63FC27117F01143003551EB
/* ijksdl_audio.c in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC27017F01143003551EB
/* ijksdl_audio.c */
;
};
...
...
@@ -55,6 +57,7 @@
dstPath
=
"include/${PRODUCT_NAME}"
;
dstSubfolderSpec
=
16
;
files
=
(
E62139BF180FAE5F00553533
/* IJKFFOptions.h in CopyFiles */
,
E6F727BF17F40C4A0043623F
/* IJKMediaModule.h in CopyFiles */
,
E6F727BE17F40C390043623F
/* IJKFFMoviePlayerController.h in CopyFiles */
,
E6F727BD17F40C360043623F
/* IJKMPMoviePlayerController.h in CopyFiles */
,
...
...
@@ -66,6 +69,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
E62139BC180FA89A00553533
/* IJKFFOptions.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
IJKFFOptions.h
;
sourceTree
=
"<group>"
;
};
E62139BD180FA89A00553533
/* IJKFFOptions.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
IJKFFOptions.m
;
sourceTree
=
"<group>"
;
};
E63FC26717EFF38C003551EB
/* ijksdl_aout_ios_audiounit.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
ijksdl_aout_ios_audiounit.h
;
path
=
ijkmedia/ijksdl/ios/ijksdl_aout_ios_audiounit.h
;
sourceTree
=
"<group>"
;
};
E63FC26817EFF39E003551EB
/* ijksdl_aout_ios_audiounit.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
ijksdl_aout_ios_audiounit.m
;
path
=
ijkmedia/ijksdl/ios/ijksdl_aout_ios_audiounit.m
;
sourceTree
=
"<group>"
;
};
E63FC26D17EFF79F003551EB
/* IJKSDLAudioUnitController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
IJKSDLAudioUnitController.h
;
path
=
ijkmedia/ijksdl/ios/IJKSDLAudioUnitController.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -332,6 +337,8 @@
children
=
(
E6716E4C1807EA4F00B3FBC1
/* IJKFFMrl.h */
,
E6716E4D1807EA5000B3FBC1
/* IJKFFMrl.m */
,
E62139BC180FA89A00553533
/* IJKFFOptions.h */
,
E62139BD180FA89A00553533
/* IJKFFOptions.m */
,
E66F8DE517EFD9C300354D80
/* IJKFFMoviePlayerController.h */
,
E66F8DE617EFD9C300354D80
/* IJKFFMoviePlayerController.m */
,
E6F727B917F2D9D30043623F
/* IJKFFMoviePlayerDef.h */
,
...
...
@@ -687,6 +694,7 @@
E6F727C217F7C9BA0043623F
/* IJKMediaPlayback.m in Sources */
,
E6716E4B1807E5FC00B3FBC1
/* IJKMediaUtils.m in Sources */
,
E6716E4E1807EA5000B3FBC1
/* IJKFFMrl.m in Sources */
,
E62139BE180FA89B00553533
/* IJKFFOptions.m in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.h
浏览文件 @
ecb21ae7
...
...
@@ -21,10 +21,11 @@
*/
#import "IJKMediaPlayback.h"
#import "IJKFFOptions.h"
@interface
IJKFFMoviePlayerController
:
NSObject
<
IJKMediaPlayback
>
-
(
id
)
initWithContentURL
:(
NSURL
*
)
aUrl
;
-
(
id
)
initWithContentURL
:(
NSURL
*
)
aUrl
withOptions
:(
IJKFFOptions
*
)
options
;
-
(
void
)
prepareToPlay
;
-
(
void
)
play
;
...
...
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m
浏览文件 @
ecb21ae7
...
...
@@ -58,7 +58,7 @@
@synthesize
initialPlaybackTime
=
_initialPlaybackTime
;
@synthesize
endPlaybackTime
=
_endPlaybackTime
;
-
(
id
)
initWithContentURL
:(
NSURL
*
)
aUrl
-
(
id
)
initWithContentURL
:(
NSURL
*
)
aUrl
withOptions
:(
IJKFFOptions
*
)
options
{
self
=
[
super
init
];
if
(
self
)
{
...
...
@@ -84,6 +84,8 @@
ijkmp_ios_set_glview
(
_mediaPlayer
,
glView
);
ijkmp_set_overlay_format
(
_mediaPlayer
,
SDL_FCC_I420
);
[
options
applyTo
:
_mediaPlayer
];
}
return
self
;
}
...
...
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFOptions.h
0 → 100644
浏览文件 @
ecb21ae7
//
// IJKFFOptions.h
// IJKMediaPlayer
//
// Created by ZhangRui on 13-10-17.
// Copyright (c) 2013年 bilibili. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef
enum
IJKAVDiscard
{
/* We leave some space between them for extensions (drop some
* keyframes for intra-only or drop just some bidir frames). */
IJK_AVDISCARD_NONE
=-
16
,
///< discard nothing
IJK_AVDISCARD_DEFAULT
=
0
,
///< discard useless packets like 0 size packets in avi
IJK_AVDISCARD_NONREF
=
8
,
///< discard all non reference
IJK_AVDISCARD_BIDIR
=
16
,
///< discard all bidirectional frames
IJK_AVDISCARD_NONKEY
=
32
,
///< discard all frames except keyframes
IJK_AVDISCARD_ALL
=
48
,
///< discard all
}
IJKAVDiscard
;
typedef
struct
IjkMediaPlayer
IjkMediaPlayer
;
@interface
IJKFFOptions
:
NSObject
+
(
IJKFFOptions
*
)
optionsByDefault
;
-
(
void
)
applyTo
:(
IjkMediaPlayer
*
)
mediaPlayer
;
@property
(
nonatomic
)
IJKAVDiscard
skipLoopFilter
;
@property
(
nonatomic
)
IJKAVDiscard
skipFrame
;
@end
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFOptions.m
0 → 100644
浏览文件 @
ecb21ae7
//
// IJKFFOptions.m
// IJKMediaPlayer
//
// Created by ZhangRui on 13-10-17.
// Copyright (c) 2013年 bilibili. All rights reserved.
//
#import "IJKFFOptions.h"
#include "ijkplayer/ios/ijkplayer_ios.h"
@implementation
IJKFFOptions
+
(
IJKFFOptions
*
)
optionsByDefault
{
IJKFFOptions
*
options
=
[[
IJKFFOptions
alloc
]
init
];
options
.
skipLoopFilter
=
IJK_AVDISCARD_ALL
;
options
.
skipFrame
=
IJK_AVDISCARD_NONREF
;
return
options
;
}
-
(
void
)
applyTo
:(
IjkMediaPlayer
*
)
mediaPlayer
{
[
self
setCodecOption
:
@"skip_loop_filter"
withInteger:
self
.
skipLoopFilter
to:
mediaPlayer
];
[
self
setCodecOption
:
@"skip_frame"
withInteger:
self
.
skipFrame
to:
mediaPlayer
];
}
-
(
void
)
setCodecOption
:(
NSString
*
)
optionName
withInteger
:(
NSInteger
)
value
to
:(
IjkMediaPlayer
*
)
mediaPlayer
{
ijkmp_set_codec_option
(
mediaPlayer
,
[
optionName
UTF8String
],
[[
NSString
stringWithFormat
:
@"%d"
,
value
]
UTF8String
]);
}
@end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录