Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

Fixed building issue to with gst-plugins-bad >= 1.18 #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmake/FindBaseDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ endfunction(FindGlib)

function(FindGstreamer libs)
pkg_check_modules (GSTREAMER REQUIRED gstreamer-1.0>=1.6)
pkg_search_module (GST_PLUGINS_BAD gstreamer-plugins-bad-1.0)
pkg_check_modules (GSTREAMER_VIDEO REQUIRED gstreamer-video-1.0>=1.6)
pkg_check_modules (GSTREAMER_ALLOCATORS REQUIRED gstreamer-allocators-1.0>=1.6)
pkg_check_modules (GSTREAMER_GL gstreamer-gl-1.0)
Expand All @@ -47,6 +48,11 @@ function(FindGstreamer libs)
include_directories (${GSTREAMER_GL_INCLUDE_DIRS})
add_definitions(-DHAVE_GST_GL_LIBS)
endif()

if (${GST_PLUGINS_BAD_VERSION} VERSION_GREATER_EQUAL "1.18")
add_compile_options(-DUSE_GST_PLUGINS_BAD_1_18)
endif()

set(${libs} ${GST_LIBS} PARENT_SCOPE)
endfunction(FindGstreamer)

Expand Down
4 changes: 4 additions & 0 deletions gst-libs/mfx/gstmfxdecoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,11 @@ gst_mfx_decoder_handle_avc_codec_data (GstMfxDecoder * decoder,
nalu.data = decoder->codec_data->data;
nalu.size = decoder->codec_data->len;

#ifdef USE_GST_PLUGINS_BAD_1_18
if (GST_H264_PARSER_OK == gst_h264_parse_sps(&nalu, &sps) &&
#else
if (GST_H264_PARSER_OK == gst_h264_parse_sps(&nalu, &sps, TRUE) &&
#endif
sps.vui_parameters_present_flag &&
sps.vui_parameters.max_dec_frame_buffering == 16)
decoder->sync_out_surf = TRUE;
Expand Down
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ endif
mfx_decoder = get_option('MFX_DECODER')
if mfx_decoder
mfx_c_args += ['-DMFX_DECODER']

if dependency('gst-plugins-bad', version: '>1.18').found()
mfx_c_args += ['-DUSE_GST_PLUGINS_BAD_1_18']
endif
endif

mfx_sink = get_option('MFX_SINK')
Expand Down