Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
ijkplayer
提交
e99d640e
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,体验更适合开发者的 AI 搜索 >>
提交
e99d640e
编写于
2月 07, 2021
作者:
Z
zhenghanchao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ijkplayer: convert pointer to string instead of using av_dict_set_int
上级
86e8d338
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
79 addition
and
39 deletion
+79
-39
ijkmedia/ijkplayer/ff_ffplay.c
ijkmedia/ijkplayer/ff_ffplay.c
+11
-2
ijkmedia/ijkplayer/ff_ffplay.h
ijkmedia/ijkplayer/ff_ffplay.h
+1
-0
ijkmedia/ijkplayer/ijkavformat/ijkasync.c
ijkmedia/ijkplayer/ijkavformat/ijkasync.c
+4
-4
ijkmedia/ijkplayer/ijkavformat/ijkio.c
ijkmedia/ijkplayer/ijkavformat/ijkio.c
+14
-13
ijkmedia/ijkplayer/ijkavformat/ijkiourlhook.c
ijkmedia/ijkplayer/ijkavformat/ijkiourlhook.c
+4
-7
ijkmedia/ijkplayer/ijkavformat/ijklivehook.c
ijkmedia/ijkplayer/ijkavformat/ijklivehook.c
+3
-3
ijkmedia/ijkplayer/ijkavformat/ijksegment.c
ijkmedia/ijkplayer/ijkavformat/ijksegment.c
+3
-3
ijkmedia/ijkplayer/ijkavformat/ijkurlhook.c
ijkmedia/ijkplayer/ijkavformat/ijkurlhook.c
+6
-7
ijkmedia/ijkplayer/ijkavutil/ijkdict.c
ijkmedia/ijkplayer/ijkavutil/ijkdict.c
+29
-0
ijkmedia/ijkplayer/ijkavutil/ijkdict.h
ijkmedia/ijkplayer/ijkavutil/ijkdict.h
+4
-0
未找到文件。
ijkmedia/ijkplayer/ff_ffplay.c
浏览文件 @
e99d640e
...
...
@@ -4144,7 +4144,7 @@ void *ffp_set_ijkio_inject_opaque(FFPlayer *ffp, void *opaque)
ijkio_manager_destroyp
(
&
ffp
->
ijkio_manager_ctx
);
ijkio_manager_create
(
&
ffp
->
ijkio_manager_ctx
,
ffp
);
ijkio_manager_set_callback
(
ffp
->
ijkio_manager_ctx
,
ijkio_app_func_event
);
ffp_set_option_int
(
ffp
,
FFP_OPT_CATEGORY_FORMAT
,
"ijkiomanager"
,
(
int64_t
)(
intptr_t
)
ffp
->
ijkio_manager_ctx
);
ffp_set_option_int
ptr
(
ffp
,
FFP_OPT_CATEGORY_FORMAT
,
"ijkiomanager"
,
(
u
intptr_t
)
ffp
->
ijkio_manager_ctx
);
return
prev_weak_thiz
;
}
...
...
@@ -4158,7 +4158,7 @@ void *ffp_set_inject_opaque(FFPlayer *ffp, void *opaque)
av_application_closep
(
&
ffp
->
app_ctx
);
av_application_open
(
&
ffp
->
app_ctx
,
ffp
);
ffp_set_option_int
(
ffp
,
FFP_OPT_CATEGORY_FORMAT
,
"ijkapplication"
,
(
int64_t
)(
intptr_t
)
ffp
->
app_ctx
);
ffp_set_option_int
ptr
(
ffp
,
FFP_OPT_CATEGORY_FORMAT
,
"ijkapplication"
,
(
u
int64_t
)(
intptr_t
)
ffp
->
app_ctx
);
ffp
->
app_ctx
->
func_on_app_event
=
app_func_event
;
return
prev_weak_thiz
;
...
...
@@ -4182,6 +4182,15 @@ void ffp_set_option_int(FFPlayer *ffp, int opt_category, const char *name, int64
av_dict_set_int
(
dict
,
name
,
value
,
0
);
}
void
ffp_set_option_intptr
(
FFPlayer
*
ffp
,
int
opt_category
,
const
char
*
name
,
uintptr_t
value
)
{
if
(
!
ffp
)
return
;
AVDictionary
**
dict
=
ffp_get_opt_dict
(
ffp
,
opt_category
);
av_dict_set_intptr
(
dict
,
name
,
value
,
0
);
}
void
ffp_set_overlay_format
(
FFPlayer
*
ffp
,
int
chroma_fourcc
)
{
switch
(
chroma_fourcc
)
{
...
...
ijkmedia/ijkplayer/ff_ffplay.h
浏览文件 @
e99d640e
...
...
@@ -51,6 +51,7 @@ void *ffp_set_inject_opaque(FFPlayer *ffp, void *opaque);
void
*
ffp_set_ijkio_inject_opaque
(
FFPlayer
*
ffp
,
void
*
opaque
);
void
ffp_set_option
(
FFPlayer
*
ffp
,
int
opt_category
,
const
char
*
name
,
const
char
*
value
);
void
ffp_set_option_int
(
FFPlayer
*
ffp
,
int
opt_category
,
const
char
*
name
,
int64_t
value
);
void
ffp_set_option_intptr
(
FFPlayer
*
ffp
,
int
opt_category
,
const
char
*
name
,
uintptr_t
value
);
int
ffp_get_video_codec_info
(
FFPlayer
*
ffp
,
char
**
codec_info
);
int
ffp_get_audio_codec_info
(
FFPlayer
*
ffp
,
char
**
codec_info
);
...
...
ijkmedia/ijkplayer/ijkavformat/ijkasync.c
浏览文件 @
e99d640e
...
...
@@ -84,7 +84,7 @@ typedef struct Context {
/* options */
int64_t
forwards_capacity
;
int64_t
backwards_capacity
;
int64_t
app_ctx_intptr
;
char
*
app_ctx_intptr
;
AVApplicationContext
*
app_ctx
;
}
Context
;
...
...
@@ -308,8 +308,8 @@ static int async_open(URLContext *h, const char *arg, int flags, AVDictionary **
goto
fifo_fail
;
if
(
c
->
app_ctx_intptr
)
{
c
->
app_ctx
=
(
AVApplicationContext
*
)
(
intptr_t
)
c
->
app_ctx_intptr
;
av_dict_set_int
(
options
,
"ijkapplication"
,
c
->
app_ctx_intptr
,
0
);
c
->
app_ctx
=
(
AVApplicationContext
*
)
av_dict_strtoptr
(
c
->
app_ctx_intptr
)
;
av_dict_set_int
ptr
(
options
,
"ijkapplication"
,
(
uintptr_t
)
c
->
app_ctx
,
0
);
}
/* wrap interrupt callback */
c
->
interrupt_callback
=
h
->
interrupt_callback
;
...
...
@@ -535,7 +535,7 @@ static const AVOption options[] = {
OFFSET
(
forwards_capacity
),
AV_OPT_TYPE_INT64
,
{.
i64
=
128
*
1024
},
128
*
1024
,
128
*
1024
*
1024
,
D
},
{
"async-backwards-capacity"
,
"max bytes that may be seek backward without seeking in inner protocol"
,
OFFSET
(
backwards_capacity
),
AV_OPT_TYPE_INT64
,
{.
i64
=
128
*
1024
},
128
*
1024
,
128
*
1024
*
1024
,
D
},
{
"ijkapplication"
,
"AVApplicationContext"
,
OFFSET
(
app_ctx_intptr
),
AV_OPT_TYPE_
INT64
,
{
.
i64
=
0
},
INT64_MIN
,
INT64_MAX
,
.
flags
=
D
},
{
"ijkapplication"
,
"AVApplicationContext"
,
OFFSET
(
app_ctx_intptr
),
AV_OPT_TYPE_
STRING
,
{
.
str
=
0
},
0
,
0
,
.
flags
=
D
},
{
NULL
},
};
...
...
ijkmedia/ijkplayer/ijkavformat/ijkio.c
浏览文件 @
e99d640e
...
...
@@ -31,7 +31,7 @@
typedef
struct
Context
{
AVClass
*
class
;
int64_t
*
io_manager_ctx
;
char
*
io_manager_ctx_intptr
;
}
Context
;
static
int
ijkio_copy_options
(
IjkAVDictionary
**
dst
,
AVDictionary
*
src
)
{
...
...
@@ -51,10 +51,10 @@ static int ijkio_open(URLContext *h, const char *arg, int flags, AVDictionary **
Context
*
c
=
h
->
priv_data
;
int
ret
=
-
1
;
if
(
!
c
||
!
c
->
io_manager_ctx
)
if
(
!
c
||
!
c
->
io_manager_ctx
_intptr
)
return
-
1
;
IjkIOManagerContext
*
manager_ctx
=
(
IjkIOManagerContext
*
)
(
c
->
io_manager_ctx
);
IjkIOManagerContext
*
manager_ctx
=
(
IjkIOManagerContext
*
)
av_dict_strtoptr
(
c
->
io_manager_ctx_intptr
);
manager_ctx
->
ijkio_interrupt_callback
=
(
IjkAVIOInterruptCB
*
)
&
(
h
->
interrupt_callback
);
av_strstart
(
arg
,
"ijkio:"
,
&
arg
);
...
...
@@ -77,40 +77,41 @@ static int ijkio_read(URLContext *h, unsigned char *buf, int size)
{
Context
*
c
=
h
->
priv_data
;
if
(
!
c
||
!
c
->
io_manager_ctx
)
if
(
!
c
||
!
c
->
io_manager_ctx
_intptr
)
return
-
1
;
((
IjkIOManagerContext
*
)(
c
->
io_manager_ctx
))
->
cur_ffmpeg_ctx
=
c
;
return
ijkio_manager_io_read
((
IjkIOManagerContext
*
)(
c
->
io_manager_ctx
),
buf
,
size
);
((
IjkIOManagerContext
*
)(
av_dict_strtoptr
(
c
->
io_manager_ctx_intptr
)
))
->
cur_ffmpeg_ctx
=
c
;
return
ijkio_manager_io_read
((
IjkIOManagerContext
*
)(
av_dict_strtoptr
(
c
->
io_manager_ctx_intptr
)
),
buf
,
size
);
}
static
int64_t
ijkio_seek
(
URLContext
*
h
,
int64_t
offset
,
int
whence
)
{
Context
*
c
=
h
->
priv_data
;
if
(
!
c
||
!
c
->
io_manager_ctx
)
if
(
!
c
||
!
c
->
io_manager_ctx
_intptr
)
return
-
1
;
((
IjkIOManagerContext
*
)(
c
->
io_manager_ctx
))
->
cur_ffmpeg_ctx
=
c
;
return
ijkio_manager_io_seek
((
IjkIOManagerContext
*
)(
c
->
io_manager_ctx
),
offset
,
whence
);
((
IjkIOManagerContext
*
)(
av_dict_strtoptr
(
c
->
io_manager_ctx_intptr
)
))
->
cur_ffmpeg_ctx
=
c
;
return
ijkio_manager_io_seek
((
IjkIOManagerContext
*
)(
av_dict_strtoptr
(
c
->
io_manager_ctx_intptr
)
),
offset
,
whence
);
}
static
int
ijkio_close
(
URLContext
*
h
)
{
Context
*
c
=
h
->
priv_data
;
if
(
!
c
||
!
c
->
io_manager_ctx
)
if
(
!
c
||
!
c
->
io_manager_ctx
_intptr
)
return
-
1
;
((
IjkIOManagerContext
*
)(
c
->
io_manager_ctx
))
->
cur_ffmpeg_ctx
=
c
;
return
ijkio_manager_io_close
((
IjkIOManagerContext
*
)(
c
->
io_manager_ctx
));
((
IjkIOManagerContext
*
)(
av_dict_strtoptr
(
c
->
io_manager_ctx_intptr
)
))
->
cur_ffmpeg_ctx
=
c
;
return
ijkio_manager_io_close
((
IjkIOManagerContext
*
)(
av_dict_strtoptr
(
c
->
io_manager_ctx_intptr
)
));
}
#define OFFSET(x) offsetof(Context, x)
#define D AV_OPT_FLAG_DECODING_PARAM
static
const
AVOption
options
[]
=
{
{
"ijkiomanager"
,
"IjkIOManagerContext"
,
OFFSET
(
io_manager_ctx
),
AV_OPT_TYPE_INT64
,
{
.
i64
=
0
},
INT64_MIN
,
INT64_MAX
,
.
flags
=
D
},
{
"ijkiomanager"
,
"IjkIOManagerContext"
,
OFFSET
(
io_manager_ctx_intptr
),
AV_OPT_TYPE_STRING
,
{
.
i64
=
0
},
0
,
0
,
.
flags
=
D
},
{
NULL
}
};
#undef D
...
...
ijkmedia/ijkplayer/ijkavformat/ijkiourlhook.c
浏览文件 @
e99d640e
...
...
@@ -45,7 +45,6 @@ typedef struct Context {
int
segment_index
;
int64_t
test_fail_point
;
int64_t
test_fail_point_next
;
int64_t
app_ctx_intptr
;
int
abort_request
;
AVApplicationContext
*
app_ctx
;
IjkIOApplicationContext
*
ijkio_app_ctx
;
...
...
@@ -175,7 +174,7 @@ static int ijkio_urlhook_init(IjkURLContext *h, const char *arg, int flags, IjkA
if
(
options
)
ijk_av_dict_copy
(
&
c
->
inner_options
,
*
options
,
0
);
ijk_av_dict_set_int
(
&
c
->
inner_options
,
"ijkapplication"
,
c
->
app_ctx_intptr
,
0
);
ijk_av_dict_set_int
ptr
(
&
c
->
inner_options
,
"ijkapplication"
,
(
uintptr_t
)
c
->
app_ctx
,
0
);
ijk_av_dict_set_int
(
&
c
->
inner_options
,
"ijkinject-segment-index"
,
c
->
segment_index
,
0
);
c
->
app_io_ctrl
.
size
=
sizeof
(
c
->
app_io_ctrl
);
...
...
@@ -266,11 +265,9 @@ static int ijkio_httphook_open(IjkURLContext *h, const char *arg, int flags, Ijk
c
->
ijkio_app_ctx
=
h
->
ijkio_app_ctx
;
c
->
ijkio_interrupt_callback
=
h
->
ijkio_app_ctx
->
ijkio_interrupt_callback
;
t
=
ijk_av_dict_get
(
*
options
,
"ijkapplication"
,
NULL
,
IJK_AV_DICT_MATCH_CASE
);
if
(
t
)
{
c
->
app_ctx_intptr
=
(
int64_t
)
strtoll
(
t
->
value
,
NULL
,
10
);
c
->
app_ctx
=
(
AVApplicationContext
*
)(
intptr_t
)
c
->
app_ctx_intptr
;
}
else
{
c
->
app_ctx
=
(
AVApplicationContext
*
)
ijk_av_dict_get_intptr
(
*
options
,
"ijkapplication"
);
if
(
!
c
->
app_ctx
)
{
goto
fail
;
}
...
...
ijkmedia/ijkplayer/ijkavformat/ijklivehook.c
浏览文件 @
e99d640e
...
...
@@ -39,7 +39,7 @@ typedef struct {
/* options */
AVDictionary
*
open_opts
;
int64_t
app_ctx_intptr
;
char
*
app_ctx_intptr
;
AVApplicationContext
*
app_ctx
;
}
Context
;
...
...
@@ -191,7 +191,7 @@ static int ijklivehook_read_header(AVFormatContext *avf, AVDictionary **options)
const
char
*
inner_url
=
NULL
;
int
ret
=
-
1
;
c
->
app_ctx
=
(
AVApplicationContext
*
)
(
intptr_t
)
c
->
app_ctx_intptr
;
c
->
app_ctx
=
(
AVApplicationContext
*
)
av_dict_strtoptr
(
c
->
app_ctx_intptr
)
;
av_strstart
(
avf
->
filename
,
"ijklivehook:"
,
&
inner_url
);
c
->
io_control
.
size
=
sizeof
(
c
->
io_control
);
...
...
@@ -292,7 +292,7 @@ fail:
#define D AV_OPT_FLAG_DECODING_PARAM
static
const
AVOption
options
[]
=
{
{
"ijkapplication"
,
"AVApplicationContext"
,
OFFSET
(
app_ctx_intptr
),
AV_OPT_TYPE_
INT64
,
{
.
i64
=
0
},
INT64_MIN
,
INT64_MAX
,
.
flags
=
D
},
{
"ijkapplication"
,
"AVApplicationContext"
,
OFFSET
(
app_ctx_intptr
),
AV_OPT_TYPE_
STRING
,
{
.
str
=
NULL
},
0
,
0
,
.
flags
=
D
},
{
NULL
}
};
...
...
ijkmedia/ijkplayer/ijkavformat/ijksegment.c
浏览文件 @
e99d640e
...
...
@@ -34,14 +34,14 @@ typedef struct Context {
/* options */
char
*
http_hook
;
int64_t
app_ctx_intptr
;
char
*
app_ctx_intptr
;
}
Context
;
static
int
ijksegment_open
(
URLContext
*
h
,
const
char
*
arg
,
int
flags
,
AVDictionary
**
options
)
{
Context
*
c
=
h
->
priv_data
;
AVAppIOControl
io_control
=
{
0
};
AVApplicationContext
*
app_ctx
=
(
AVApplicationContext
*
)
(
intptr_t
)
c
->
app_ctx_intptr
;
AVApplicationContext
*
app_ctx
=
(
AVApplicationContext
*
)
av_dict_strtoptr
(
c
->
app_ctx_intptr
)
;
int
ret
=
-
1
;
int
segment_index
=
-
1
;
...
...
@@ -65,7 +65,7 @@ static int ijksegment_open(URLContext *h, const char *arg, int flags, AVDictiona
goto
fail
;
}
av_dict_set_int
(
options
,
"ijkapplication"
,
c
->
app_ctx_intptr
,
0
);
av_dict_set_int
ptr
(
options
,
"ijkapplication"
,
(
uintptr_t
)
app_ctx
,
0
);
av_dict_set_int
(
options
,
"ijkinject-segment-index"
,
segment_index
,
0
);
ret
=
ffurl_open_whitelist
(
&
c
->
inner
,
...
...
ijkmedia/ijkplayer/ijkavformat/ijkurlhook.c
浏览文件 @
e99d640e
...
...
@@ -46,7 +46,7 @@ typedef struct Context {
int
segment_index
;
int64_t
test_fail_point
;
int64_t
test_fail_point_next
;
int64_t
app_ctx_intptr
;
char
*
app_ctx_intptr
;
AVApplicationContext
*
app_ctx
;
}
Context
;
...
...
@@ -141,7 +141,7 @@ static int ijkurlhook_init(URLContext *h, const char *arg, int flags, AVDictiona
if
(
options
)
av_dict_copy
(
&
c
->
inner_options
,
*
options
,
0
);
av_dict_set_int
(
&
c
->
inner_options
,
"ijkapplication"
,
c
->
app_ctx_intptr
,
0
);
av_dict_set_int
ptr
(
&
c
->
inner_options
,
"ijkapplication"
,
(
uintptr_t
)
c
->
app_ctx
,
0
);
av_dict_set_int
(
&
c
->
inner_options
,
"ijkinject-segment-index"
,
c
->
segment_index
,
0
);
c
->
app_io_ctrl
.
size
=
sizeof
(
c
->
app_io_ctrl
);
...
...
@@ -162,7 +162,7 @@ static int ijktcphook_open(URLContext *h, const char *arg, int flags, AVDictiona
Context
*
c
=
h
->
priv_data
;
int
ret
=
0
;
c
->
app_ctx
=
(
AVApplicationContext
*
)
(
intptr_t
)
c
->
app_ctx_intptr
;
c
->
app_ctx
=
(
AVApplicationContext
*
)
av_dict_strtoptr
(
c
->
app_ctx_intptr
)
;
c
->
scheme
=
"ijktcphook:"
;
c
->
inner_scheme
=
"tcp:"
;
ret
=
ijkurlhook_init
(
h
,
arg
,
flags
,
options
);
...
...
@@ -251,7 +251,7 @@ static int ijkhttphook_open(URLContext *h, const char *arg, int flags, AVDiction
Context
*
c
=
h
->
priv_data
;
int
ret
=
0
;
c
->
app_ctx
=
(
AVApplicationContext
*
)
(
intptr_t
)
c
->
app_ctx_intptr
;
c
->
app_ctx
=
(
AVApplicationContext
*
)
av_dict_strtoptr
(
c
->
app_ctx_intptr
)
;
c
->
scheme
=
"ijkhttphook:"
;
if
(
av_stristart
(
arg
,
"ijkhttphook:https:"
,
NULL
))
c
->
inner_scheme
=
"https:"
;
...
...
@@ -417,7 +417,7 @@ fail:
static
const
AVOption
ijktcphook_options
[]
=
{
{
"ijktcphook-test-fail-point"
,
"test fail point, in bytes"
,
OFFSET
(
test_fail_point
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
D
},
{
"ijkapplication"
,
"AVApplicationContext"
,
OFFSET
(
app_ctx_intptr
),
AV_OPT_TYPE_
INT64
,
{
.
i64
=
0
},
INT64_MIN
,
INT64_MAX
,
.
flags
=
D
},
{
"ijkapplication"
,
"AVApplicationContext"
,
OFFSET
(
app_ctx_intptr
),
AV_OPT_TYPE_
STRING
,
{
.
str
=
NULL
},
0
,
0
,
.
flags
=
D
},
{
NULL
}
};
...
...
@@ -427,8 +427,7 @@ static const AVOption ijkhttphook_options[] = {
OFFSET
(
segment_index
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
D
},
{
"ijkhttphook-test-fail-point"
,
"test fail point, in bytes"
,
OFFSET
(
test_fail_point
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
,
D
},
{
"ijkapplication"
,
"AVApplicationContext"
,
OFFSET
(
app_ctx_intptr
),
AV_OPT_TYPE_INT64
,
{
.
i64
=
0
},
INT64_MIN
,
INT64_MAX
,
.
flags
=
D
},
{
"ijkapplication"
,
"AVApplicationContext"
,
OFFSET
(
app_ctx_intptr
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
0
,
0
,
.
flags
=
D
},
{
NULL
}
};
...
...
ijkmedia/ijkplayer/ijkavutil/ijkdict.c
浏览文件 @
e99d640e
...
...
@@ -153,6 +153,35 @@ int ijk_av_dict_set_int(IjkAVDictionary **pm, const char *key, int64_t value,
return
ijk_av_dict_set
(
pm
,
key
,
valuestr
,
flags
);
}
int
ijk_av_dict_set_intptr
(
IjkAVDictionary
**
pm
,
const
char
*
key
,
uintptr_t
value
,
int
flags
)
{
char
valuestr
[
22
];
snprintf
(
valuestr
,
sizeof
(
valuestr
),
"%p"
,
value
);
flags
&=
~
IJK_AV_DICT_DONT_STRDUP_VAL
;
return
ijk_av_dict_set
(
pm
,
key
,
valuestr
,
flags
);
}
uintptr_t
ijk_av_dict_strtoptr
(
char
*
value
)
{
uintptr_t
ptr
=
NULL
;
char
*
next
=
NULL
;
if
(
value
[
0
]
!=
'0'
||
(
value
[
1
]
|
0x20
)
!=
'x'
)
{
return
NULL
;
}
ptr
=
strtoll
(
value
,
&
next
,
16
);
if
(
next
==
value
)
{
return
NULL
;
}
return
ptr
;
}
uintptr_t
ijk_av_dict_get_intptr
(
const
IjkAVDictionary
*
m
,
const
char
*
key
)
{
uintptr_t
ptr
=
NULL
;
IjkAVDictionaryEntry
*
t
=
NULL
;
if
((
t
=
av_dict_get
(
m
,
key
,
NULL
,
0
)))
{
return
ijk_av_dict_strtoptr
(
t
->
value
);
}
return
NULL
;
}
void
ijk_av_dict_free
(
IjkAVDictionary
**
pm
)
{
IjkAVDictionary
*
m
=
*
pm
;
...
...
ijkmedia/ijkplayer/ijkavutil/ijkdict.h
浏览文件 @
e99d640e
...
...
@@ -103,6 +103,10 @@ int ijk_av_dict_set(IjkAVDictionary **pm, const char *key, const char *value, in
*/
int
ijk_av_dict_set_int
(
IjkAVDictionary
**
pm
,
const
char
*
key
,
int64_t
value
,
int
flags
);
int
ijk_av_dict_set_intptr
(
IjkAVDictionary
**
pm
,
const
char
*
key
,
uintptr_t
value
,
int
flags
);
uintptr_t
ijk_av_dict_get_intptr
(
const
IjkAVDictionary
*
m
,
const
char
*
key
);
/**
* Copy entries from one AVDictionary struct into another.
* @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录