Skip to content

Commit

Permalink
remove pass-through method add_unci_item()
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Oct 14, 2024
1 parent 0d4487b commit 1236f2f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion libheif/api/libheif/heif.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3607,7 +3607,7 @@ struct heif_error heif_context_add_unci_image(struct heif_context* ctx,
{
#if WITH_UNCOMPRESSED_CODEC
Result<std::shared_ptr<ImageItem_uncompressed>> unciImageResult;
unciImageResult = ctx->context->add_unci_item(parameters, encoding_options, prototype->image);
unciImageResult = ImageItem_uncompressed::add_unci_item(ctx->context.get(), parameters, encoding_options, prototype->image);

if (unciImageResult.error != Error::Ok) {
return unciImageResult.error.error_struct(ctx->context.get());
Expand Down
14 changes: 0 additions & 14 deletions libheif/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1384,20 +1384,6 @@ Error HeifContext::add_tiled_image_tile(heif_item_id tild_id, uint32_t tile_x, u
}


Result<std::shared_ptr<ImageItem_uncompressed>> HeifContext::add_unci_item(const heif_unci_image_parameters* parameters,
const struct heif_encoding_options* encoding_options,
const std::shared_ptr<const HeifPixelImage>& prototype)
{
#if WITH_UNCOMPRESSED_CODEC
return ImageItem_uncompressed::add_unci_item(this, parameters, encoding_options, prototype);
#else
return Error{heif_error_Unsupported_feature,
heif_suberror_Unspecified,
"support for uncompressed images has been disabled"};
#endif
}


void HeifContext::set_primary_image(const std::shared_ptr<ImageItem>& image)
{
// update heif context
Expand Down
4 changes: 0 additions & 4 deletions libheif/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ class HeifContext : public ErrorBuffer
const std::shared_ptr<HeifPixelImage>& image,
struct heif_encoder* encoder);

Result<std::shared_ptr<ImageItem_uncompressed>> add_unci_item(const heif_unci_image_parameters* parameters,
const struct heif_encoding_options* encoding_options,
const std::shared_ptr<const HeifPixelImage>& prototype);

void set_primary_image(const std::shared_ptr<ImageItem>& image);

bool is_primary_image_set() const { return m_primary_image != nullptr; }
Expand Down

0 comments on commit 1236f2f

Please sign in to comment.