[vlc-commits] codec: hxxx_helper: add h264_helper_get_current_profile_level
Thomas Guillem
git at videolan.org
Thu Sep 28 11:10:27 CEST 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Sep 28 09:37:57 2017 +0200| [d1f5f4a0a480357f41ad0ba37509cbb62f308834] | committer: Thomas Guillem
codec: hxxx_helper: add h264_helper_get_current_profile_level
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d1f5f4a0a480357f41ad0ba37509cbb62f308834
---
modules/codec/hxxx_helper.c | 12 ++++++++++++
modules/codec/hxxx_helper.h | 3 +++
2 files changed, 15 insertions(+)
diff --git a/modules/codec/hxxx_helper.c b/modules/codec/hxxx_helper.c
index 76cfded6eb..137bf174cd 100644
--- a/modules/codec/hxxx_helper.c
+++ b/modules/codec/hxxx_helper.c
@@ -601,6 +601,18 @@ h264_helper_get_current_dpb_values(const struct hxxx_helper *hh,
}
int
+h264_helper_get_current_profile_level(const struct hxxx_helper *hh,
+ uint8_t *p_profile, uint8_t *p_level)
+{
+ const struct hxxx_helper_nal *hsps = h264_helper_get_current_sps(hh);
+ if (hsps == NULL)
+ return VLC_EGENERIC;
+ *p_profile = hsps->h264_sps->i_profile;
+ *p_level = hsps->h264_sps->i_level;
+ return VLC_SUCCESS;
+}
+
+int
hxxx_helper_get_colorimetry(const struct hxxx_helper *hh,
video_color_primaries_t *p_primaries,
video_transfer_func_t *p_transfer,
diff --git a/modules/codec/hxxx_helper.h b/modules/codec/hxxx_helper.h
index e9551642dd..58306fe6ad 100644
--- a/modules/codec/hxxx_helper.h
+++ b/modules/codec/hxxx_helper.h
@@ -87,6 +87,9 @@ int h264_helper_get_current_sar(const struct hxxx_helper *hh, int *p_num, int *p
int h264_helper_get_current_dpb_values(const struct hxxx_helper *hh,
uint8_t *p_depth, unsigned *pi_delay);
+int h264_helper_get_current_profile_level(const struct hxxx_helper *hh,
+ uint8_t *p_profile, uint8_t *p_level);
+
int hxxx_helper_get_colorimetry(const struct hxxx_helper *hh,
video_color_primaries_t *p_primaries,
video_transfer_func_t *p_transfer,
More information about the vlc-commits
mailing list