Skip to content

Commit

Permalink
modify FFMPEG hevc plugin names to match existing style
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Oct 9, 2023
1 parent 0965184 commit ea06f34
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ plugin_option(OpenJPEG_DECODER OpenJPEG "OpenJPEG_Decoder" "JPEG2000 decoder" OF

# FFMPEG detection works slightly differently. We cannot use plugin_option().

option(WITH_FFMPEG_DECODER "Build FFMPEG HEVC decoder (HW accelerated)" OFF)
option(WITH_FFMPEG_DECODER_PLUGIN "Build FFMPEG HEVC decoder as a plugin" OFF)
if (WITH_FFMPEG_DECODER)
option(WITH_FFMPEG_HEVC_DECODER "Build FFMPEG HEVC decoder (HW accelerated)" OFF)
option(WITH_FFMPEG_HEVC_DECODER_PLUGIN "Build FFMPEG HEVC decoder as a plugin" OFF)
if (WITH_FFMPEG_HEVC_DECODER)
find_package(FFMPEG COMPONENTS avcodec)
endif ()

if (FFMPEG_avcodec_FOUND AND WITH_FFMPEG_DECODER_PLUGIN AND PLUGIN_LOADING_SUPPORTED_AND_ENABLED)
if (FFMPEG_avcodec_FOUND AND WITH_FFMPEG_HEVC_DECODER_PLUGIN AND PLUGIN_LOADING_SUPPORTED_AND_ENABLED)
set(msg "found plugin")
elseif (FFMPEG_avcodec_FOUND)
set(msg " found built-in")
Expand Down
4 changes: 2 additions & 2 deletions libheif/plugin_registry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#include "libheif/plugins/encoder_svt.h"
#endif

#if HAVE_FFMPEG_DECODER
#if HAVE_FFMPEG_HEVC_DECODER
#include "libheif/plugins/heif_decoder_ffmpeg.h"
#endif

Expand Down Expand Up @@ -151,7 +151,7 @@ void register_default_plugins()
register_encoder(get_encoder_plugin_svt());
#endif

#if HAVE_FFMPEG_DECODER
#if HAVE_FFMPEG_HEVC_DECODER
register_decoder(get_decoder_plugin_ffmpeg());
#endif

Expand Down
6 changes: 3 additions & 3 deletions libheif/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ set(KVAZAAR_sources encoder_kvazaar.cc encoder_kvazaar.h)
set(KVAZAAR_extra_plugin_sources)
plugin_compilation(kvazaar KVAZAAR KVAZAAR KVAZAAR)

set(FFMPEG_DECODER_sources heif_decoder_ffmpeg.cc heif_decoder_ffmpeg.h)
set(FFMPEG_DECODER_extra_plugin_sources ../heif_image.cc ../error.cc)
plugin_compilation(ffmpegdec FFMPEG FFMPEG_DECODER FFMPEG_DECODER)
set(FFMPEG_HEVC_DECODER_sources decoder_ffmpeg_hevc.cc decoder_ffmpeg_hevc.h)
set(FFMPEG_HEVC_DECODER_extra_plugin_sources ../error.cc)
plugin_compilation(ffmpeg_hevc_dec FFMPEG FFMPEG_HEVC_DECODER FFMPEG_HEVC_DECODER)

target_sources(heif PRIVATE
encoder_mask.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "libheif/heif.h"
#include "libheif/heif_plugin.h"
#include "heif_decoder_ffmpeg.h"
#include "decoder_ffmpeg_hevc.h"

#if defined(HAVE_CONFIG_H)
#include "config.h"
Expand Down Expand Up @@ -479,15 +479,15 @@ static const struct heif_decoder_plugin decoder_ffmpeg
ffmpeg_v1_push_data,
ffmpeg_v1_decode_image,
ffmpeg_set_strict_decoding,
"ffmpeg"
"ffmpeg-hevc"
};

const struct heif_decoder_plugin* get_decoder_plugin_ffmpeg()
{
return &decoder_ffmpeg;
}

#if PLUGIN_FFMPEG_DECODER
#if PLUGIN_FFMPEG_HEVC_DECODER
heif_plugin_info plugin_info{
1,
heif_plugin_type_decoder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

const struct heif_decoder_plugin* get_decoder_plugin_ffmpeg();

#if PLUGIN_FFMPEG_DECODER
#if PLUGIN_FFMPEG_HEVC_DECODER
extern "C" {
MAYBE_UNUSED LIBHEIF_API extern heif_plugin_info plugin_info;
}
Expand Down

0 comments on commit ea06f34

Please sign in to comment.