提交 b7c2dcc4 编写于 作者: Z zhenghanchao 提交者: Xinzheng Zhang

ff_ffplay: report codec profile id

Signed-off-by: NXinzheng Zhang <zhangxzheng@gmail.com>
上级 296b4d4b
......@@ -210,6 +210,7 @@ void ijkmeta_set_avformat_context_l(IjkMediaMeta *meta, AVFormatContext *ic)
if (codecpar->profile != FF_PROFILE_UNKNOWN) {
const AVCodec *codec = avcodec_find_decoder(codecpar->codec_id);
if (codec) {
ijkmeta_set_int64_l(stream_meta, IJKM_KEY_CODEC_PROFILE_ID, codecpar->profile);
const char *profile = av_get_profile_name(codec, codecpar->profile);
if (profile)
ijkmeta_set_string_l(stream_meta, IJKM_KEY_CODEC_PROFILE, profile);
......
......@@ -46,6 +46,7 @@
#define IJKM_KEY_CODEC_LEVEL "codec_level"
#define IJKM_KEY_CODEC_LONG_NAME "codec_long_name"
#define IJKM_KEY_CODEC_PIXEL_FORMAT "codec_pixel_format"
#define IJKM_KEY_CODEC_PROFILE_ID "codec_profile_id"
// stream: video
#define IJKM_KEY_WIDTH "width"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册