Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_25606643
ijkplayer
提交
6a5cae30
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,发现更多精彩内容 >>
提交
6a5cae30
编写于
12月 30, 2016
作者:
R
raymondzheng
提交者:
Xinzheng Zhang
2月 04, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ijkplayer-java: add ijkio function
上级
ec442d4e
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
76 addition
and
7 deletion
+76
-7
android/ijkplayer/ijkplayer-arm64/src/main/jni/Application.mk
...oid/ijkplayer/ijkplayer-arm64/src/main/jni/Application.mk
+2
-0
android/ijkplayer/ijkplayer-armv5/src/main/jni/Application.mk
...oid/ijkplayer/ijkplayer-armv5/src/main/jni/Application.mk
+2
-0
android/ijkplayer/ijkplayer-armv7a/src/main/jni/Application.mk
...id/ijkplayer/ijkplayer-armv7a/src/main/jni/Application.mk
+2
-0
android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java
...main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java
+39
-7
android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/IIjkIOHttp.java
...ain/java/tv/danmaku/ijk/media/player/misc/IIjkIOHttp.java
+27
-0
android/ijkplayer/ijkplayer-x86/src/main/jni/Application.mk
android/ijkplayer/ijkplayer-x86/src/main/jni/Application.mk
+2
-0
android/ijkplayer/ijkplayer-x86_64/src/main/jni/Application.mk
...id/ijkplayer/ijkplayer-x86_64/src/main/jni/Application.mk
+2
-0
未找到文件。
android/ijkplayer/ijkplayer-arm64/src/main/jni/Application.mk
浏览文件 @
6a5cae30
...
...
@@ -22,6 +22,8 @@ APP_ABI := arm64-v8a
NDK_TOOLCHAIN_VERSION
=
4.9
APP_PIE
:=
false
APP_STL
:=
stlport_static
APP_CFLAGS
:=
-O3
-Wall
-pipe
\
-ffast-math
\
-fstrict-aliasing
-Werror
=
strict-aliasing
\
...
...
android/ijkplayer/ijkplayer-armv5/src/main/jni/Application.mk
浏览文件 @
6a5cae30
...
...
@@ -22,6 +22,8 @@ APP_ABI := armeabi
NDK_TOOLCHAIN_VERSION
=
4.9
APP_PIE
:=
false
APP_STL
:=
stlport_static
APP_CFLAGS
:=
-O3
-Wall
-pipe
\
-ffast-math
\
-fstrict-aliasing
-Werror
=
strict-aliasing
\
...
...
android/ijkplayer/ijkplayer-armv7a/src/main/jni/Application.mk
浏览文件 @
6a5cae30
...
...
@@ -22,6 +22,8 @@ APP_ABI := armeabi-v7a
NDK_TOOLCHAIN_VERSION
=
4.9
APP_PIE
:=
false
APP_STL
:=
stlport_static
APP_CFLAGS
:=
-O3
-Wall
-pipe
\
-ffast-math
\
-fstrict-aliasing
-Werror
=
strict-aliasing
\
...
...
android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/IjkMediaPlayer.java
浏览文件 @
6a5cae30
...
...
@@ -53,6 +53,7 @@ import java.util.Map;
import
tv.danmaku.ijk.media.player.annotations.AccessedByNative
;
import
tv.danmaku.ijk.media.player.annotations.CalledByNative
;
import
tv.danmaku.ijk.media.player.misc.IIjkIOHttp
;
import
tv.danmaku.ijk.media.player.misc.IMediaDataSource
;
import
tv.danmaku.ijk.media.player.misc.ITrackInfo
;
import
tv.danmaku.ijk.media.player.misc.IjkTrackInfo
;
...
...
@@ -60,7 +61,7 @@ import tv.danmaku.ijk.media.player.pragma.DebugLog;
/**
* @author bbcallen
*
*
* Java wrapper of ffplay.
*/
public
final
class
IjkMediaPlayer
extends
AbstractMediaPlayer
{
...
...
@@ -127,6 +128,10 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
public
static
final
int
FFP_PROP_INT64_ASYNC_STATISTIC_BUF_FORWARDS
=
20202
;
public
static
final
int
FFP_PROP_INT64_ASYNC_STATISTIC_BUF_CAPACITY
=
20203
;
public
static
final
int
FFP_PROP_INT64_TRAFFIC_STATISTIC_BYTE_COUNT
=
20204
;
public
static
final
int
FFP_PROP_INT64_CACHE_STATISTIC_PHYSICAL_POS
=
20205
;
public
static
final
int
FFP_PROP_INT64_CACHE_STATISTIC_BUF_FORWARDS
=
20206
;
public
static
final
int
FFP_PROP_INT64_CACHE_STATISTIC_FILE_POS
=
20207
;
public
static
final
int
FFP_PROP_INT64_CACHE_STATISTIC_COUNT_BYTES
=
20208
;
public
static
final
int
FFP_PROP_INT64_BIT_RATE
=
20100
;
public
static
final
int
FFP_PROP_INT64_TCP_SPEED
=
20200
;
public
static
final
int
FFP_PROP_INT64_LATEST_SEEK_LOAD_DURATION
=
20300
;
...
...
@@ -137,6 +142,9 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
@AccessedByNative
private
long
mNativeMediaDataSource
;
@AccessedByNative
private
long
mNativeIjkIOHttp
;
@AccessedByNative
private
int
mNativeSurfaceTexture
;
...
...
@@ -243,13 +251,13 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
/**
* Sets the {@link SurfaceHolder} to use for displaying the video portion of
* the media.
*
*
* Either a surface holder or surface must be set if a display or video sink
* is needed. Not calling this method or {@link #setSurface(Surface)} when
* playing back a video will result in only the audio track being played. A
* null surface holder or surface will result in only the audio track being
* played.
*
*
* @param sh
* the SurfaceHolder to use for video display
*/
...
...
@@ -272,7 +280,7 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
* does not support {@link #setScreenOnWhilePlaying(boolean)}. Setting a
* Surface will un-set any Surface or SurfaceHolder that was previously set.
* A null surface will result in only the audio track being played.
*
*
* If the Surface sends frames to a {@link SurfaceTexture}, the timestamps
* returned from {@link SurfaceTexture#getTimestamp()} will have an
* unspecified zero point. These timestamps cannot be directly compared
...
...
@@ -280,7 +288,7 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
* source, or multiple runs of the same program. The timestamp is normally
* monotonically increasing and is unaffected by time-of-day adjustments,
* but it is reset when the position is set.
*
*
* @param surface
* The {@link Surface} to be used for the video portion of the
* media.
...
...
@@ -370,13 +378,13 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
/**
* Sets the data source (file-path or http/rtsp URL) to use.
*
*
* @param path
* the path of the file, or the http/rtsp URL of the stream you
* want to play
* @throws IllegalStateException
* if it is called in an invalid state
*
*
* <p>
* When <code>path</code> refers to a local file, the file may
* actually be opened by a process other than the calling
...
...
@@ -472,6 +480,11 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
_setDataSource
(
mediaDataSource
);
}
public
void
setDataSourceIjkIOHttp
(
IIjkIOHttp
ijkIOHttp
)
throws
IllegalArgumentException
,
SecurityException
,
IllegalStateException
{
_setDataSourceIjkIOHttp
(
ijkIOHttp
);
}
private
native
void
_setDataSource
(
String
path
,
String
[]
keys
,
String
[]
values
)
throws
IOException
,
IllegalArgumentException
,
SecurityException
,
IllegalStateException
;
...
...
@@ -481,6 +494,9 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
private
native
void
_setDataSource
(
IMediaDataSource
mediaDataSource
)
throws
IllegalArgumentException
,
SecurityException
,
IllegalStateException
;
private
native
void
_setDataSourceIjkIOHttp
(
IIjkIOHttp
ijkIOHttp
)
throws
IllegalArgumentException
,
SecurityException
,
IllegalStateException
;
@Override
public
String
getDataSource
()
{
return
mDataSource
;
...
...
@@ -782,6 +798,22 @@ public final class IjkMediaPlayer extends AbstractMediaPlayer {
return
_getPropertyLong
(
FFP_PROP_INT64_TRAFFIC_STATISTIC_BYTE_COUNT
,
0
);
}
public
long
getCacheStatisticPhysicalPos
()
{
return
_getPropertyLong
(
FFP_PROP_INT64_CACHE_STATISTIC_PHYSICAL_POS
,
0
);
}
public
long
getCacheStatisticBufForwards
()
{
return
_getPropertyLong
(
FFP_PROP_INT64_CACHE_STATISTIC_BUF_FORWARDS
,
0
);
}
public
long
getCacheStatisticFilePos
()
{
return
_getPropertyLong
(
FFP_PROP_INT64_CACHE_STATISTIC_FILE_POS
,
0
);
}
public
long
getCacheStatisticCountBytes
()
{
return
_getPropertyLong
(
FFP_PROP_INT64_CACHE_STATISTIC_COUNT_BYTES
,
0
);
}
public
long
getBitRate
()
{
return
_getPropertyLong
(
FFP_PROP_INT64_BIT_RATE
,
0
);
}
...
...
android/ijkplayer/ijkplayer-java/src/main/java/tv/danmaku/ijk/media/player/misc/IIjkIOHttp.java
0 → 100644
浏览文件 @
6a5cae30
/*
* Copyright (C) 2016 Raymond Zheng <raymondzheng1412@gmail.com>
*
* 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
;
@SuppressWarnings
(
"RedundantThrows"
)
public
interface
IIjkIOHttp
{
int
open
()
throws
IOException
;
int
read
(
byte
[]
buffer
,
int
size
)
throws
IOException
;
long
seek
(
long
offset
,
int
whence
)
throws
IOException
;
int
close
()
throws
IOException
;
}
android/ijkplayer/ijkplayer-x86/src/main/jni/Application.mk
浏览文件 @
6a5cae30
...
...
@@ -22,6 +22,8 @@ APP_ABI := x86
NDK_TOOLCHAIN_VERSION
=
4.9
APP_PIE
:=
false
APP_STL
:=
stlport_static
APP_CFLAGS
:=
-O3
-Wall
-pipe
\
-ffast-math
\
-fstrict-aliasing
-Werror
=
strict-aliasing
\
...
...
android/ijkplayer/ijkplayer-x86_64/src/main/jni/Application.mk
浏览文件 @
6a5cae30
...
...
@@ -22,6 +22,8 @@ APP_ABI := x86_64
NDK_TOOLCHAIN_VERSION
=
4.9
APP_PIE
:=
false
APP_STL
:=
stlport_static
APP_CFLAGS
:=
-O3
-Wall
-pipe
\
-ffast-math
\
-fstrict-aliasing
-Werror
=
strict-aliasing
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录