-libffmpegthumbnailer_dep = []
-req_version = '>=2.1.0'
-option = get_option('videothumbnailer')
-if not option.disabled()
- libffmpegthumbnailer_dep = dependency('libffmpegthumbnailer',
- version : req_version,
- required : get_option('videothumbnailer'))
-
- if libffmpegthumbnailer_dep.found()
- conf_data.set('HAVE_FFMPEGTHUMBNAILER', 1)
- summary({'videothumbnailer' : ['thumbnails of video files supported:', true]}, section : 'Configuration', bool_yn : true)
-
- result = cc.has_member('struct video_thumbnailer_struct', 'prefer_embedded_metadata', prefix : '#include <libffmpegthumbnailer/videothumbnailerc.h>')
- if result
- conf_data.set('HAVE_FFMPEGTHUMBNAILER_METADATA', 1)
- endif
- summary({'fmpegthumbnailer_metadata' : ['fmpegthumbnailer_metadata found:', result]}, section : 'Thumbnailer', bool_yn : true)
-
- result = cc.has_member('struct image_data_struct', 'image_data_width', prefix : '#include <libffmpegthumbnailer/videothumbnailerc.h>' )
- if result
- conf_data.set('HAVE_FFMPEGTHUMBNAILER_RGB', 1)
- endif
- summary({'fmpegthumbnailer_rgb' : ['fmpegthumbnailer_rgb found:', result]}, section : 'Thumbnailer', bool_yn : true)
-
- result = cc.has_function('video_thumbnailer_set_size', dependencies : libffmpegthumbnailer_dep)
- if result
- conf_data.set('HAVE_FFMPEGTHUMBNAILER_WH', 1)
- endif
- summary({'fmpegthumbnailer_set_size' : ['fmpegthumbnailer_set_size found:', result]}, section : 'Thumbnailer', bool_yn : true)
- else
- summary({'videothumbnailer' : ['libvideothumbnailer ' + req_version + ' not found - thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
- endif
-else
- summary({'videothumbnailer' : ['disabled -thumbnails of video files supported', false]}, section : 'Configuration', bool_yn : true)
-endif
-