Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
ijkplayer
提交
b79e0017
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,发现更多精彩内容 >>
提交
b79e0017
编写于
6月 20, 2013
作者:
Z
Zhang Rui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ff_ffplay: remove more ffp fields
上级
d9cde5b1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
22 deletion
+21
-22
ijkmediaplayer/jni/ffplay/ff_ffplay.c
ijkmediaplayer/jni/ffplay/ff_ffplay.c
+17
-16
ijkmediaplayer/jni/ffplay/ff_ffplay_def.h
ijkmediaplayer/jni/ffplay/ff_ffplay_def.h
+4
-6
未找到文件。
ijkmediaplayer/jni/ffplay/ff_ffplay.c
浏览文件 @
b79e0017
...
...
@@ -1386,10 +1386,7 @@ static int stream_component_open(FFPlayer *ffp, int stream_index)
is
->
last_audio_stream
=
stream_index
;
forced_codec_name
=
ffp
->
audio_codec_name
;
break
;
case
AVMEDIA_TYPE_SUBTITLE
:
is
->
last_subtitle_stream
=
stream_index
;
forced_codec_name
=
ffp
->
subtitle_codec_name
;
break
;
// FFP_MERGE: case AVMEDIA_TYPE_SUBTITLE:
case
AVMEDIA_TYPE_VIDEO
:
is
->
last_video_stream
=
stream_index
;
forced_codec_name
=
ffp
->
video_codec_name
;
...
...
@@ -1474,7 +1471,7 @@ static int stream_component_open(FFPlayer *ffp, int stream_index)
packet_queue_start
(
&
is
->
videoq
);
is
->
video_tid
=
SDL_CreateThreadEx
(
&
is
->
_video_tid
,
video_thread
,
ffp
);
break
;
// FFP_MERGE: case AVMEDIA_TYPE_SUBTITLE:
// FFP_MERGE: case AVMEDIA_TYPE_SUBTITLE:
default:
break
;
}
...
...
@@ -1525,7 +1522,7 @@ static void stream_component_close(FFPlayer *ffp, int stream_index)
packet_queue_flush
(
&
is
->
videoq
);
break
;
// FFP_MERGE: case AVMEDIA_TYPE_SUBTITLE:
// FFP_MERGE: case AVMEDIA_TYPE_SUBTITLE:
default:
break
;
}
...
...
@@ -1544,7 +1541,7 @@ static void stream_component_close(FFPlayer *ffp, int stream_index)
is
->
video_st
=
NULL
;
is
->
video_stream
=
-
1
;
break
;
// FFP_MERGE: case AVMEDIA_TYPE_SUBTITLE:
// FFP_MERGE: case AVMEDIA_TYPE_SUBTITLE:
default:
break
;
}
...
...
@@ -1659,21 +1656,23 @@ static int read_thread(void *arg)
if
(
!
ffp
->
video_disable
)
st_index
[
AVMEDIA_TYPE_VIDEO
]
=
av_find_best_stream
(
ic
,
AVMEDIA_TYPE_VIDEO
,
ffp
->
wanted_stream
[
AVMEDIA_TYPE_VIDEO
],
-
1
,
NULL
,
0
);
ffp
->
wanted_stream
[
AVMEDIA_TYPE_VIDEO
],
-
1
,
NULL
,
0
);
if
(
!
ffp
->
audio_disable
)
st_index
[
AVMEDIA_TYPE_AUDIO
]
=
av_find_best_stream
(
ic
,
AVMEDIA_TYPE_AUDIO
,
ffp
->
wanted_stream
[
AVMEDIA_TYPE_AUDIO
],
st_index
[
AVMEDIA_TYPE_VIDEO
],
NULL
,
0
);
ffp
->
wanted_stream
[
AVMEDIA_TYPE_AUDIO
],
st_index
[
AVMEDIA_TYPE_VIDEO
],
NULL
,
0
);
#ifdef FFP_MERGE
if
(
!
ffp
->
video_disable
&&
!
ffp
->
subtitle_disable
)
st_index
[
AVMEDIA_TYPE_SUBTITLE
]
=
av_find_best_stream
(
ic
,
AVMEDIA_TYPE_SUBTITLE
,
ffp
->
wanted_stream
[
AVMEDIA_TYPE_SUBTITLE
],
(
st_index
[
AVMEDIA_TYPE_AUDIO
]
>=
0
?
st_index
[
AVMEDIA_TYPE_AUDIO
]
:
st_index
[
AVMEDIA_TYPE_VIDEO
]),
NULL
,
0
);
ffp
->
wanted_stream
[
AVMEDIA_TYPE_SUBTITLE
],
(
st_index
[
AVMEDIA_TYPE_AUDIO
]
>=
0
?
st_index
[
AVMEDIA_TYPE_AUDIO
]
:
st_index
[
AVMEDIA_TYPE_VIDEO
]),
NULL
,
0
);
#endif
if
(
ffp
->
show_status
)
{
av_dump_format
(
ic
,
0
,
is
->
filename
,
0
);
}
...
...
@@ -1692,9 +1691,11 @@ static int read_thread(void *arg)
if
(
is
->
show_mode
==
SHOW_MODE_NONE
)
is
->
show_mode
=
ret
>=
0
?
SHOW_MODE_VIDEO
:
SHOW_MODE_RDFT
;
#ifdef FFP_MERGE
if
(
st_index
[
AVMEDIA_TYPE_SUBTITLE
]
>=
0
)
{
stream_component_open
(
ffp
,
st_index
[
AVMEDIA_TYPE_SUBTITLE
]);
}
#endif
if
(
is
->
video_stream
<
0
&&
is
->
audio_stream
<
0
)
{
fprintf
(
stderr
,
"%s: could not open codecs
\n
"
,
is
->
filename
);
...
...
ijkmediaplayer/jni/ffplay/ff_ffplay_def.h
浏览文件 @
b79e0017
...
...
@@ -328,16 +328,16 @@ typedef struct FFPlayer {
const
char
*
window_title
;
int
fs_screen_width
;
int
fs_screen_height
;
#endif
int
default_width
;
int
default_height
;
#ifdef FFP_MERGE
int
screen_width
=
0
;
int
screen_height
=
0
;
#endif
int
audio_disable
;
int
video_disable
;
#ifdef FFP_MERGE
int
subtitle_disable
;
#endif
int
wanted_stream
[
AVMEDIA_TYPE_NB
];
int
seek_by_bytes
;
int
display_disable
;
...
...
@@ -365,7 +365,9 @@ typedef struct FFPlayer {
int
infinite_buffer
;
enum
ShowMode
show_mode
;
char
*
audio_codec_name
;
#ifdef FFP_MERGE
char
*
subtitle_codec_name
;
#endif
char
*
video_codec_name
;
double
rdftspeed
;
#ifdef FFP_MERGE
...
...
@@ -414,11 +416,8 @@ inline static void ffp_reset_internal(FFPlayer *ffp)
/* ffplay options specified by the user */
FFP_SAFE_FREE
(
ffp
->
input_filename
);
ffp
->
default_width
=
640
;
ffp
->
default_height
=
480
;
ffp
->
audio_disable
=
0
;
ffp
->
video_disable
=
0
;
ffp
->
subtitle_disable
=
0
;
ffp
->
wanted_stream
[
AVMEDIA_TYPE_AUDIO
]
=
-
1
;
ffp
->
wanted_stream
[
AVMEDIA_TYPE_VIDEO
]
=
-
1
;
ffp
->
wanted_stream
[
AVMEDIA_TYPE_SUBTITLE
]
=
-
1
;
...
...
@@ -444,7 +443,6 @@ inline static void ffp_reset_internal(FFPlayer *ffp)
ffp
->
infinite_buffer
=
-
1
;
ffp
->
show_mode
=
SHOW_MODE_NONE
;
FFP_SAFE_FREE
(
ffp
->
audio_codec_name
);
FFP_SAFE_FREE
(
ffp
->
subtitle_codec_name
);
FFP_SAFE_FREE
(
ffp
->
video_codec_name
);
ffp
->
rdftspeed
=
0
.
02
;
#if CONFIG_AVFILTER
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录