From e847f920df5b15a59d61ef2b5c77d27ca2a7599a Mon Sep 17 00:00:00 2001 From: Devarsh Thakkar Date: Thu, 2 Mar 2017 23:16:42 -0800 Subject: [PATCH 06/24] Link omxh265dec with gst-omx - Add decoder h265 decoder type in array. - Set compression format for HEVC to OMX macro. Signed-off-by: Devarsh Thakkar Upstream status : Pending --- omx/Makefile.am | 5 ++++- omx/gstomx.c | 3 ++- omx/gstomxh265dec.c | 5 ++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/omx/Makefile.am b/omx/Makefile.am index 80e3c92..62f89c8 100644 --- a/omx/Makefile.am +++ b/omx/Makefile.am @@ -12,7 +12,9 @@ endif if USE_OMX_TARGET_ZYNQ_USCALE_PLUS $(H265_C_FILES)=gstomxh265enc.c - $(H265_H_FILES)=gstomxh265enc.h + $(H265_C_FILES)=gstomxh265enc.c + $(H265DEC_H_FILES)=gstomxh265dec.h + $(H265DEC_H_FILES)=gstomxh265dec.h endif libgstomx_la_SOURCES = \ @@ -33,6 +35,7 @@ libgstomx_la_SOURCES = \ $(THEORA_C_FILES) \ gstomxmpeg4videoenc.c \ gstomxh265enc.c \ + gstomxh265dec.c \ gstomxh264enc.c \ gstomxh263enc.c \ gstomxaacdec.c \ diff --git a/omx/gstomx.c b/omx/gstomx.c index 8e2cb61..ccfeec8 100644 --- a/omx/gstomx.c +++ b/omx/gstomx.c @@ -2248,7 +2248,8 @@ static const GGetTypeFunction types[] = { gst_omx_h264_dec_get_type, gst_omx_h263_dec_get_type, gst_omx_wmv_dec_get_type, gst_omx_mpeg4_video_enc_get_type, gst_omx_h264_enc_get_type, gst_omx_h263_enc_get_type, - gst_omx_h265_enc_get_type, gst_omx_aac_enc_get_type, gst_omx_mjpeg_dec_get_type, + gst_omx_h265_enc_get_type, gst_omx_h265_dec_get_type, + gst_omx_aac_enc_get_type, gst_omx_mjpeg_dec_get_type, gst_omx_aac_dec_get_type, gst_omx_mp3_dec_get_type #ifdef HAVE_VP8 , gst_omx_vp8_dec_get_type diff --git a/omx/gstomxh265dec.c b/omx/gstomxh265dec.c index 6eb5259..9638a0e 100644 --- a/omx/gstomxh265dec.c +++ b/omx/gstomxh265dec.c @@ -68,8 +68,7 @@ gst_omx_h265_dec_class_init (GstOMXH265DecClass * klass) gst_element_class_set_static_metadata (element_class, "OpenMAX H.265 Video Decoder", "Codec/Decoder/Video", - "Decode H.265 video streams", - "Sanket Kothari "); + "Decode H.265 video streams", "Sanket Kothari "); gst_omx_set_default_role (&videodec_class->cdata, "video_decoder.hevc"); } @@ -96,7 +95,7 @@ gst_omx_h265_dec_set_format (GstOMXVideoDec * dec, GstOMXPort * port, OMX_PARAM_PORTDEFINITIONTYPE port_def; gst_omx_port_get_port_definition (port, &port_def); - port_def.format.video.eCompressionFormat = NVX_VIDEO_CodingHEVC; + port_def.format.video.eCompressionFormat = OMX_VIDEO_CodingVendorStartUnused; ret = gst_omx_port_update_port_definition (port, &port_def) == OMX_ErrorNone; -- 2.7.4