From 15d4dcf9b4b3c04150e46df48ef03db6f7cf80e7 Mon Sep 17 00:00:00 2001 From: Matt Oliver Date: Thu, 29 Aug 2019 03:29:39 +1000 Subject: [PATCH] Rename Crop to CropPosition. This prevents name collisions with FFFR. --- include/FFMultiCrop.h | 10 +++++----- source/FFMC.cpp | 2 +- test/FFMCTest.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/FFMultiCrop.h b/include/FFMultiCrop.h index c6949d9..baa911d 100644 --- a/include/FFMultiCrop.h +++ b/include/FFMultiCrop.h @@ -29,7 +29,7 @@ using EncoderOptions = Ffr::EncoderOptions; using Resolution = Ffr::Resolution; using Stream = Ffr::Stream; -struct Crop +struct CropPosition { uint32_t m_top; /**< The offset in pixels from top of frame */ uint32_t m_left; /**< The offset in pixels from left of frame */ @@ -55,11 +55,11 @@ class CropOptions * @param frame The frame index of the value to get. * @returns The crop, {UINT32_MAX, UINT32_MAX} if frame is invalid. */ - FFMULTICROP_EXPORT Crop getCrop(uint64_t frame) const noexcept; + FFMULTICROP_EXPORT CropPosition getCrop(uint64_t frame) const noexcept; - std::vector m_cropList; /**< List of crops for each frame in video */ - Resolution m_resolution = {0, 0}; /**< The resolution of the output video (affects crop size) */ - std::string m_fileName; /**< Filename of the output file */ + std::vector m_cropList; /**< List of crops for each frame in video */ + Resolution m_resolution = {0, 0}; /**< The resolution of the output video (affects crop size) */ + std::string m_fileName; /**< Filename of the output file */ std::vector> m_skipRegions; /**< A list of frame ranges to skip during encoding. The list elements takes the form [startFrame, endFrame) */ }; diff --git a/source/FFMC.cpp b/source/FFMC.cpp index 7ae9702..5283042 100644 --- a/source/FFMC.cpp +++ b/source/FFMC.cpp @@ -282,7 +282,7 @@ class MultiCrop } }; -Crop CropOptions::getCrop(const uint64_t frame) const noexcept +CropPosition CropOptions::getCrop(const uint64_t frame) const noexcept { // Check if frame is in skip region bool skip = false; diff --git a/test/FFMCTest.cpp b/test/FFMCTest.cpp index 09fd849..aa6a72c 100644 --- a/test/FFMCTest.cpp +++ b/test/FFMCTest.cpp @@ -67,7 +67,7 @@ class EncodeTest1 : public ::testing::TestWithParam y += yMod * directionY; } j.m_cropList.emplace_back( - Crop({static_cast(std::max(y, 0)), static_cast(std::max(x, 0))})); + CropPosition({static_cast(std::max(y, 0)), static_cast(std::max(x, 0))})); y += yMod * directionY; x += xMod * directionX; }