Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_25606643
ijkplayer
提交
099983d6
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,发现更多精彩内容 >>
提交
099983d6
编写于
9月 23, 2013
作者:
Z
Zhang Rui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ijkmedia: inline -> inline static
上级
fdfefd12
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
80 addition
and
21 deletion
+80
-21
ijkmedia/ijkplayer/ff_ffmsg_queue.h
ijkmedia/ijkplayer/ff_ffmsg_queue.h
+1
-1
ijkmedia/ijkutil/ijkutil.h
ijkmedia/ijkutil/ijkutil.h
+2
-2
ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj
ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj
+11
-11
ios/IJKMediaDemo/IJKMediaDemo/IJKVideoViewController.m
ios/IJKMediaDemo/IJKMediaDemo/IJKVideoViewController.m
+2
-1
ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
+12
-0
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFPlayerController.m
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFPlayerController.m
+52
-6
未找到文件。
ijkmedia/ijkplayer/ff_ffmsg_queue.h
浏览文件 @
099983d6
...
...
@@ -197,7 +197,7 @@ inline static int msg_queue_get(MessageQueue *q, AVMessage *msg, int block)
return
ret
;
}
inline
void
msg_queue_remove
(
MessageQueue
*
q
,
int
what
)
inline
static
void
msg_queue_remove
(
MessageQueue
*
q
,
int
what
)
{
AVMessage
**
p_msg
,
*
msg
,
*
last_msg
=
q
->
first_msg
;
SDL_LockMutex
(
q
->
mutex
);
...
...
ijkmedia/ijkutil/ijkutil.h
浏览文件 @
099983d6
...
...
@@ -46,7 +46,7 @@
return (retval__); \
}
inline
void
*
mallocz
(
size_t
size
)
inline
static
void
*
mallocz
(
size_t
size
)
{
void
*
mem
=
malloc
(
size
);
if
(
!
mem
)
...
...
@@ -56,7 +56,7 @@ inline void *mallocz(size_t size)
return
mem
;
}
inline
void
freep
(
void
**
mem
)
inline
static
void
freep
(
void
**
mem
)
{
if
(
mem
&&
*
mem
)
{
free
(
*
mem
);
...
...
ios/IJKMediaDemo/IJKMediaDemo.xcodeproj/project.pbxproj
浏览文件 @
099983d6
...
...
@@ -9,6 +9,8 @@
/* Begin PBXBuildFile section */
E6166C7117EDA43C0006B956
/* libIJKMediaPlayer.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6166C7017EDA43C0006B956
/* libIJKMediaPlayer.a */
;
};
E6166C9C17EDA4A20006B956
/* IJKMediaDemo-Prefix.pch in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6166C9B17EDA4A20006B956
/* IJKMediaDemo-Prefix.pch */
;
};
E63FC28A17F04C48003551EB
/* CoreAudio.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC28917F04C48003551EB
/* CoreAudio.framework */
;
};
E63FC29117F04C83003551EB
/* AudioToolbox.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC28F17F04C83003551EB
/* AudioToolbox.framework */
;
};
E66F8DCB17EEDD8B00354D80
/* IJKMediaControl.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E66F8DCA17EEDD8B00354D80
/* IJKMediaControl.m */
;
};
E66F8DCF17EEDFCB00354D80
/* player_top_control_bg.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E66F8DCD17EEDFCA00354D80
/* player_top_control_bg.png */
;
};
E66F8DD017EEDFCB00354D80
/* player_top_control_bg@2x.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E66F8DCE17EEDFCB00354D80
/* player_top_control_bg@2x.png */
;
};
...
...
@@ -22,7 +24,6 @@
E66F8DE417EEF73600354D80
/* btn_player_play@2x.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E66F8DE017EEF73500354D80
/* btn_player_play@2x.png */
;
};
E6903F0017EAF70200CFD954
/* UIKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903EFF17EAF70200CFD954
/* UIKit.framework */
;
};
E6903F0217EAF70200CFD954
/* Foundation.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903F0117EAF70200CFD954
/* Foundation.framework */
;
};
E6903F0417EAF70200CFD954
/* CoreGraphics.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903F0317EAF70200CFD954
/* CoreGraphics.framework */
;
};
E6903F0A17EAF70200CFD954
/* InfoPlist.strings in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903F0817EAF70200CFD954
/* InfoPlist.strings */
;
};
E6903F0C17EAF70200CFD954
/* main.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903F0B17EAF70200CFD954
/* main.m */
;
};
E6903F1017EAF70200CFD954
/* IJKAppDelegate.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903F0F17EAF70200CFD954
/* IJKAppDelegate.m */
;
};
...
...
@@ -31,13 +32,14 @@
E6903F1617EAF70200CFD954
/* Default-568h@2x.png in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6903F1517EAF70200CFD954
/* Default-568h@2x.png */
;
};
E6A9B56417EDA72C00A1A500
/* IJKVideoViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6A9B56217EDA72C00A1A500
/* IJKVideoViewController.m */
;
};
E6A9B56517EDA72C00A1A500
/* IJKVideoViewController.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6A9B56317EDA72C00A1A500
/* IJKVideoViewController.xib */
;
};
E6A9B56717EDAC0000A1A500
/* MediaPlayer.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E6A9B56617EDAC0000A1A500
/* MediaPlayer.framework */
;
};
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
E6166C7017EDA43C0006B956
/* libIJKMediaPlayer.a */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
archive.ar
;
name
=
libIJKMediaPlayer.a
;
path
=
"../../../../../Library/Developer/Xcode/DerivedData/IJKMedia-earrwrzhlmypuheegnwtfewujljd/Build/Products/Debug-iphoneos/libIJKMediaPlayer.a"
;
sourceTree
=
"<group>"
;
};
E6166C9B17EDA4A20006B956
/* IJKMediaDemo-Prefix.pch */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"IJKMediaDemo-Prefix.pch"
;
sourceTree
=
"<group>"
;
};
E63FC27817F032FD003551EB
/* IJKCommon.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
IJKCommon.h
;
sourceTree
=
"<group>"
;
};
E63FC28917F04C48003551EB
/* CoreAudio.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
CoreAudio.framework
;
path
=
System/Library/Frameworks/CoreAudio.framework
;
sourceTree
=
SDKROOT
;
};
E63FC28F17F04C83003551EB
/* AudioToolbox.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
AudioToolbox.framework
;
path
=
System/Library/Frameworks/AudioToolbox.framework
;
sourceTree
=
SDKROOT
;
};
E66F8DC917EEDD8B00354D80
/* IJKMediaControl.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
IJKMediaControl.h
;
sourceTree
=
"<group>"
;
};
E66F8DCA17EEDD8B00354D80
/* IJKMediaControl.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
IJKMediaControl.m
;
sourceTree
=
"<group>"
;
};
E66F8DCD17EEDFCA00354D80
/* player_top_control_bg.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
name
=
player_top_control_bg.png
;
path
=
resources/player_top_control_bg.png
;
sourceTree
=
"<group>"
;
};
...
...
@@ -53,7 +55,6 @@
E6903EFC17EAF70200CFD954
/* IJKMediaDemo.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
IJKMediaDemo.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
E6903EFF17EAF70200CFD954
/* UIKit.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
UIKit.framework
;
path
=
System/Library/Frameworks/UIKit.framework
;
sourceTree
=
SDKROOT
;
};
E6903F0117EAF70200CFD954
/* Foundation.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
Foundation.framework
;
path
=
System/Library/Frameworks/Foundation.framework
;
sourceTree
=
SDKROOT
;
};
E6903F0317EAF70200CFD954
/* CoreGraphics.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
CoreGraphics.framework
;
path
=
System/Library/Frameworks/CoreGraphics.framework
;
sourceTree
=
SDKROOT
;
};
E6903F0717EAF70200CFD954
/* IJKMediaDemo-Info.plist */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.xml
;
path
=
"IJKMediaDemo-Info.plist"
;
sourceTree
=
"<group>"
;
};
E6903F0917EAF70200CFD954
/* en */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.strings
;
name
=
en
;
path
=
en.lproj/InfoPlist.strings
;
sourceTree
=
"<group>"
;
};
E6903F0B17EAF70200CFD954
/* main.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
main.m
;
sourceTree
=
"<group>"
;
};
...
...
@@ -65,7 +66,6 @@
E6A9B56117EDA72C00A1A500
/* IJKVideoViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
IJKVideoViewController.h
;
sourceTree
=
"<group>"
;
};
E6A9B56217EDA72C00A1A500
/* IJKVideoViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
IJKVideoViewController.m
;
sourceTree
=
"<group>"
;
};
E6A9B56317EDA72C00A1A500
/* IJKVideoViewController.xib */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
file.xib
;
path
=
IJKVideoViewController.xib
;
sourceTree
=
"<group>"
;
};
E6A9B56617EDAC0000A1A500
/* MediaPlayer.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
MediaPlayer.framework
;
path
=
System/Library/Frameworks/MediaPlayer.framework
;
sourceTree
=
SDKROOT
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -73,11 +73,11 @@
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
E6
166C7117EDA43C0006B956
/* libIJKMediaPlayer.a
in Frameworks */
,
E6
A9B56717EDAC0000A1A500
/* MediaPlayer
.framework in Frameworks */
,
E6
3FC29117F04C83003551EB
/* AudioToolbox.framework
in Frameworks */
,
E6
3FC28A17F04C48003551EB
/* CoreAudio
.framework in Frameworks */
,
E6903F0017EAF70200CFD954
/* UIKit.framework in Frameworks */
,
E6903F0217EAF70200CFD954
/* Foundation.framework in Frameworks */
,
E6
903F0417EAF70200CFD954
/* CoreGraphics.framework
in Frameworks */
,
E6
166C7117EDA43C0006B956
/* libIJKMediaPlayer.a
in Frameworks */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -129,11 +129,11 @@
E6903EFE17EAF70200CFD954
/* Frameworks */
=
{
isa
=
PBXGroup
;
children
=
(
E6166C7017EDA43C0006B956
/* libIJKMediaPlayer.a */
,
E6A9B56617EDAC0000A1A500
/* MediaPlayer.framework */
,
E6903EFF17EAF70200CFD954
/* UIKit.framework */
,
E63FC28F17F04C83003551EB
/* AudioToolbox.framework */
,
E63FC28917F04C48003551EB
/* CoreAudio.framework */
,
E6903F0117EAF70200CFD954
/* Foundation.framework */
,
E6903F0317EAF70200CFD954
/* CoreGraphics.framework */
,
E6903EFF17EAF70200CFD954
/* UIKit.framework */
,
E6166C7017EDA43C0006B956
/* libIJKMediaPlayer.a */
,
);
name
=
Frameworks
;
sourceTree
=
"<group>"
;
...
...
ios/IJKMediaDemo/IJKMediaDemo/IJKVideoViewController.m
浏览文件 @
099983d6
...
...
@@ -39,7 +39,8 @@
[[
UIApplication
sharedApplication
]
setStatusBarOrientation
:
UIInterfaceOrientationLandscapeLeft
animated
:
NO
];
NSURL
*
theMovieURL
=
[
NSURL
URLWithString
:
@"http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8"
];
self
.
player
=
[[
IJKMPMoviePlayerController
alloc
]
initWithContentURL
:
theMovieURL
];
// self.player = [[IJKMPMoviePlayerController alloc] initWithContentURL:theMovieURL];
self
.
player
=
[[
IJKFFPlayerController
alloc
]
initWithContentURL
:
theMovieURL
];
[
self
.
player
.
view
setAutoresizingMask
:
UIViewAutoresizingFlexibleWidth
|
UIViewAutoresizingFlexibleHeight
];
[
self
.
view
setAutoresizesSubviews
:
YES
];
...
...
ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj/project.pbxproj
浏览文件 @
099983d6
...
...
@@ -11,6 +11,9 @@
E63FC26F17EFF79F003551EB
/* IJKSDLAudioUnitController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC26E17EFF79F003551EB
/* IJKSDLAudioUnitController.m */
;
};
E63FC27117F01143003551EB
/* ijksdl_audio.c in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC27017F01143003551EB
/* ijksdl_audio.c */
;
};
E63FC27617F013DE003551EB
/* ijksdl_vout_dummy.c in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC27417F013DE003551EB
/* ijksdl_vout_dummy.c */
;
};
E63FC28217F04BB5003551EB
/* MediaPlayer.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC28117F04BB5003551EB
/* MediaPlayer.framework */
;
};
E63FC28817F04C3D003551EB
/* CoreAudio.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC28717F04C3D003551EB
/* CoreAudio.framework */
;
};
E63FC28D17F04C76003551EB
/* AudioToolbox.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E63FC28B17F04C76003551EB
/* AudioToolbox.framework */
;
};
E66F8DC117EEC65200354D80
/* IJKMPMoviePlayerController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E66F8DC017EEC65200354D80
/* IJKMPMoviePlayerController.m */
;
};
E66F8DE717EFD9C300354D80
/* IJKFFPlayerController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E66F8DE617EFD9C300354D80
/* IJKFFPlayerController.m */
;
};
E66F8DF117EFEA9400354D80
/* ijkplayer.c in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
E66F8DEF17EFEA9400354D80
/* ijkplayer.c */
;
};
...
...
@@ -57,6 +60,9 @@
E63FC27317F013DE003551EB
/* ijksdl_dummy.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ijksdl_dummy.h
;
sourceTree
=
"<group>"
;
};
E63FC27417F013DE003551EB
/* ijksdl_vout_dummy.c */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.c
;
path
=
ijksdl_vout_dummy.c
;
sourceTree
=
"<group>"
;
};
E63FC27517F013DE003551EB
/* ijksdl_vout_dummy.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ijksdl_vout_dummy.h
;
sourceTree
=
"<group>"
;
};
E63FC28117F04BB5003551EB
/* MediaPlayer.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
MediaPlayer.framework
;
path
=
System/Library/Frameworks/MediaPlayer.framework
;
sourceTree
=
SDKROOT
;
};
E63FC28717F04C3D003551EB
/* CoreAudio.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
CoreAudio.framework
;
path
=
System/Library/Frameworks/CoreAudio.framework
;
sourceTree
=
SDKROOT
;
};
E63FC28B17F04C76003551EB
/* AudioToolbox.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
AudioToolbox.framework
;
path
=
System/Library/Frameworks/AudioToolbox.framework
;
sourceTree
=
SDKROOT
;
};
E66F8DBF17EEC65200354D80
/* IJKMPMoviePlayerController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
IJKMPMoviePlayerController.h
;
path
=
IJKMediaPlayer/IJKMPMoviePlayerController.h
;
sourceTree
=
"<group>"
;
};
E66F8DC017EEC65200354D80
/* IJKMPMoviePlayerController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
IJKMPMoviePlayerController.m
;
path
=
IJKMediaPlayer/IJKMPMoviePlayerController.m
;
sourceTree
=
"<group>"
;
};
E66F8DC217EECB1E00354D80
/* IJKMediaPlayer.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
IJKMediaPlayer.h
;
path
=
IJKMediaPlayer/IJKMediaPlayer.h
;
sourceTree
=
"<group>"
;
};
...
...
@@ -193,6 +199,9 @@
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
E63FC28D17F04C76003551EB
/* AudioToolbox.framework in Frameworks */
,
E63FC28817F04C3D003551EB
/* CoreAudio.framework in Frameworks */
,
E63FC28217F04BB5003551EB
/* MediaPlayer.framework in Frameworks */
,
E6903EBD17EAF6C500CFD954
/* Foundation.framework in Frameworks */
,
E6903FC717EAFC2C00CFD954
/* libavcodec.a in Frameworks */
,
E6903FC817EAFC2C00CFD954
/* libavformat.a in Frameworks */
,
...
...
@@ -286,6 +295,9 @@
E6903EBB17EAF6C500CFD954
/* Frameworks */
=
{
isa
=
PBXGroup
;
children
=
(
E63FC28B17F04C76003551EB
/* AudioToolbox.framework */
,
E63FC28717F04C3D003551EB
/* CoreAudio.framework */
,
E63FC28117F04BB5003551EB
/* MediaPlayer.framework */
,
E6903EBC17EAF6C500CFD954
/* Foundation.framework */
,
);
name
=
Frameworks
;
...
...
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFPlayerController.m
浏览文件 @
099983d6
...
...
@@ -12,6 +12,8 @@
@implementation
IJKFFPlayerController
{
NSURL
*
_url
;
__weak
IJKFFPlayerController
*
_weakSelf
;
IjkMediaPlayer
*
_mediaPlayer
;
}
...
...
@@ -26,36 +28,77 @@
{
self
=
[
super
init
];
if
(
self
)
{
self
->
_url
=
aUrl
;
self
->
_mediaPlayer
=
ijkmp_ios_create
(
media_player_msg_loop
);
ijkmp_set_weak_thiz
(
self
->
_mediaPlayer
,
(
__bridge_retained
void
*
)
self
);
_url
=
aUrl
;
_mediaPlayer
=
ijkmp_ios_create
(
media_player_msg_loop
);
_weakSelf
=
self
;
ijkmp_set_weak_thiz
(
_mediaPlayer
,
(
__bridge_retained
void
*
)
self
);
}
return
self
;
}
-
(
void
)
prepareToPlay
{
ijkmp_set_data_source
(
_mediaPlayer
,
[[
self
->
_url
absoluteString
]
UTF8String
]);
if
(
!
_mediaPlayer
)
return
;
ijkmp_set_data_source
(
_mediaPlayer
,
[[
_url
absoluteString
]
UTF8String
]);
ijkmp_prepare_async
(
_mediaPlayer
);
}
-
(
void
)
play
{
if
(
!
_mediaPlayer
)
return
;
ijkmp_start
(
_mediaPlayer
);
}
-
(
void
)
pause
{
if
(
!
_mediaPlayer
)
return
;
ijkmp_pause
(
_mediaPlayer
);
}
-
(
void
)
stop
{
if
(
!
_mediaPlayer
)
return
;
ijkmp_stop
(
_mediaPlayer
);
}
-
(
BOOL
)
isPlaying
{
return
NO
;
if
(
!
_mediaPlayer
)
return
NO
;
return
ijkmp_is_playing
(
_mediaPlayer
);
}
-
(
void
)
setCurrentPlaybackTime
:(
NSTimeInterval
)
aCurrentPlaybackTime
{
if
(
!
_mediaPlayer
)
return
;
ijkmp_seek_to
(
_mediaPlayer
,
aCurrentPlaybackTime
);
}
-
(
NSTimeInterval
)
getCurrentPlaybackTime
{
if
(
!
_mediaPlayer
)
return
0
.
0
f
;
return
ijkmp_get_current_position
(
_mediaPlayer
);
}
-
(
NSTimeInterval
)
getDuration
{
if
(
!
_mediaPlayer
)
return
0
.
0
f
;
return
ijkmp_get_duration
(
_mediaPlayer
);
}
-
(
void
)
postEvent
:
(
AVMessage
*
)
msg
...
...
@@ -68,7 +111,10 @@ void *media_player_msg_loop(void* arg)
IjkMediaPlayer
*
mp
=
(
IjkMediaPlayer
*
)
arg
;
IJKFFPlayerController
*
ffpController
=
(
__bridge_transfer
IJKFFPlayerController
*
)
ijkmp_set_weak_thiz
(
mp
,
NULL
);
while
(
true
)
{
__weak
IJKFFPlayerController
*
weakSelf
=
ffpController
->
_weakSelf
;
ffpController
=
nil
;
while
(
weakSelf
&&
true
)
{
AVMessage
msg
;
int
retval
=
ijkmp_get_msg
(
mp
,
&
msg
,
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录