From fabe58038364df75a79bd41a58df5370d60b8e7b Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Mon, 7 Dec 2020 13:58:16 -0600 Subject: [PATCH 01/27] Update .gitlab-ci.yml Fixing path for Qt and Python on opencv branch --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ee17e4f..dd7c5d30 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ mac-builder: - unzip artifacts.zip - export LIBOPENSHOT_AUDIO_DIR=$CI_PROJECT_DIR/build/install-x64 - mkdir -p build; cd build; - - cmake -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++" -DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_PREFIX_PATH=/usr/local/qt5.15.X/qt5.15/5.15.0/clang_64/ -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -DPYTHON_MODULE_PATH=python -DPython_FRAMEWORKS=/Library/Frameworks/Python.framework/ -D"CMAKE_BUILD_TYPE:STRING=Release" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../ + - cmake -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++" -DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_PREFIX_PATH=/usr/local/qt5.15.X/qt5.15/5.15.0/clang_64/ -D"CMAKE_BUILD_TYPE:STRING=Release" -D"PYTHON_MODULE_PATH=python" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../ - make - make install - echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "install-x64/share/$CI_PROJECT_NAME" From 29b28f95dccd12118aa39d99e273ef6d937e665c Mon Sep 17 00:00:00 2001 From: Brenno Date: Sat, 12 Dec 2020 20:38:06 -0300 Subject: [PATCH 02/27] Improved protobuf message compiling --- src/CMakeLists.txt | 38 +- src/effects/ObjectDetection.h | 2 +- src/objdetectdata.pb.cc | 1003 ------------------------- src/objdetectdata.pb.h | 1020 -------------------------- src/protobuf_messages/CMakeLists.txt | 38 + src/stabilizedata.pb.cc | 722 ------------------ src/stabilizedata.pb.h | 723 ------------------ src/trackerdata.pb.cc | 961 ------------------------ src/trackerdata.pb.h | 931 ----------------------- 9 files changed, 45 insertions(+), 5393 deletions(-) delete mode 100644 src/objdetectdata.pb.cc delete mode 100644 src/objdetectdata.pb.h create mode 100644 src/protobuf_messages/CMakeLists.txt delete mode 100644 src/stabilizedata.pb.cc delete mode 100644 src/stabilizedata.pb.h delete mode 100644 src/trackerdata.pb.cc delete mode 100644 src/trackerdata.pb.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c1d03f4..55519202 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -112,13 +112,6 @@ set(OPENSHOT_CV_SOURCES ./sort_filter/Hungarian.cpp ./sort_filter/KalmanTracker.cpp) -# Compiled Protobuf messages -set(PROTOBUF_MESSAGES - stabilizedata.pb.cc - trackerdata.pb.cc - objdetectdata.pb.cc - ) - # Video effects set(EFFECTS_SOURCES effects/Bars.cpp @@ -415,37 +408,16 @@ if (OpenCV_FOUND) message(FATAL_ERROR "\nPLEASE INSTALL PROTOBUF. Protobuf is required when compiling with opencv.\n") endif() - # compiling protobuf messages - include_directories(${PROTOBUF_INCLUDE_DIR}) - set(PROTOBUF_MESSAGES_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/protobuf_messages") + add_subdirectory(protobuf_messages) - FILE(GLOB PROTO_MSGS "${PROTOBUF_MESSAGES_FOLDER}/*.proto") - foreach(PROTO_MSG ${PROTO_MSGS}) - execute_process ( - COMMAND bash -c "${PROTOBUF_PROTOC_EXECUTABLE} -I=${PROTOBUF_MESSAGES_FOLDER} --cpp_out=${PROTOBUF_MESSAGES_FOLDER} ${PROTO_MSG}" - ) - endforeach() - - FILE(GLOB PROTO_CCS "${PROTOBUF_MESSAGES_FOLDER}/*.pb.cc") - foreach(PROTO_CC ${PROTO_CCS}) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_CC} ${CMAKE_CURRENT_SOURCE_DIR}) - file(REMOVE ${PROTO_CC}) - endforeach() - - FILE(GLOB PROTO_HS "${PROTOBUF_MESSAGES_FOLDER}/*.pb.h") - foreach(PROTO_H ${PROTO_HS}) - execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${PROTO_H} ${CMAKE_CURRENT_SOURCE_DIR}) - file(REMOVE ${PROTO_H}) - endforeach() + target_include_directories(openshot PUBLIC ${ProtobufMessagePath}) # Add OpenCV target sources target_sources(openshot PRIVATE - ${OPENSHOT_CV_SOURCES} - ${PROTOBUF_MESSAGES}) + ${OPENSHOT_CV_SOURCES}) # Link libopenshot with OpenCV libs - target_link_libraries(openshot PUBLIC ${OpenCV_LIBS} ${PROTOBUF_LIBRARY}) - + target_link_libraries(openshot PUBLIC ProtoMessages ${OpenCV_LIBS} ${PROTOBUF_LIBRARY} ${Protobuf_INCLUDE_DIRS}) endif() ############### LINK LIBRARY ################# @@ -489,3 +461,5 @@ endif() set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Jonathan Thomas") #required include(CPack) + + diff --git a/src/effects/ObjectDetection.h b/src/effects/ObjectDetection.h index ac528ef6..45d30d58 100644 --- a/src/effects/ObjectDetection.h +++ b/src/effects/ObjectDetection.h @@ -40,7 +40,7 @@ #include "../Color.h" #include "../Json.h" #include "../KeyFrame.h" -#include "../objdetectdata.pb.h" +#include "objdetectdata.pb.h" // Struct that stores the detected bounding boxes for all the clip frames struct DetectionData{ diff --git a/src/objdetectdata.pb.cc b/src/objdetectdata.pb.cc deleted file mode 100644 index d4d04ea0..00000000 --- a/src/objdetectdata.pb.cc +++ /dev/null @@ -1,1003 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: objdetectdata.proto - -#include "objdetectdata.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_objdetectdata_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Frame_objdetectdata_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_objdetectdata_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Frame_Box_objdetectdata_2eproto; -namespace libopenshotobjdetect { -class Frame_BoxDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Frame_Box_default_instance_; -class FrameDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Frame_default_instance_; -class ObjDetectDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _ObjDetect_default_instance_; -} // namespace libopenshotobjdetect -static void InitDefaultsscc_info_Frame_objdetectdata_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::libopenshotobjdetect::_Frame_default_instance_; - new (ptr) ::libopenshotobjdetect::Frame(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::libopenshotobjdetect::Frame::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Frame_objdetectdata_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Frame_objdetectdata_2eproto}, { - &scc_info_Frame_Box_objdetectdata_2eproto.base,}}; - -static void InitDefaultsscc_info_Frame_Box_objdetectdata_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::libopenshotobjdetect::_Frame_Box_default_instance_; - new (ptr) ::libopenshotobjdetect::Frame_Box(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::libopenshotobjdetect::Frame_Box::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Frame_Box_objdetectdata_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Frame_Box_objdetectdata_2eproto}, {}}; - -static void InitDefaultsscc_info_ObjDetect_objdetectdata_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::libopenshotobjdetect::_ObjDetect_default_instance_; - new (ptr) ::libopenshotobjdetect::ObjDetect(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::libopenshotobjdetect::ObjDetect::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ObjDetect_objdetectdata_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_ObjDetect_objdetectdata_2eproto}, { - &scc_info_Frame_objdetectdata_2eproto.base, - &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}}; - -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_objdetectdata_2eproto[3]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_objdetectdata_2eproto = nullptr; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_objdetectdata_2eproto = nullptr; - -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_objdetectdata_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, x_), - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, y_), - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, w_), - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, h_), - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, classid_), - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame_Box, confidence_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame, id_), - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::Frame, bounding_box_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::ObjDetect, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::ObjDetect, frame_), - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::ObjDetect, last_updated_), - PROTOBUF_FIELD_OFFSET(::libopenshotobjdetect::ObjDetect, classnames_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::libopenshotobjdetect::Frame_Box)}, - { 11, -1, sizeof(::libopenshotobjdetect::Frame)}, - { 18, -1, sizeof(::libopenshotobjdetect::ObjDetect)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::libopenshotobjdetect::_Frame_Box_default_instance_), - reinterpret_cast(&::libopenshotobjdetect::_Frame_default_instance_), - reinterpret_cast(&::libopenshotobjdetect::_ObjDetect_default_instance_), -}; - -const char descriptor_table_protodef_objdetectdata_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\023objdetectdata.proto\022\024libopenshotobjdet" - "ect\032\037google/protobuf/timestamp.proto\"\242\001\n" - "\005Frame\022\n\n\002id\030\001 \001(\005\0225\n\014bounding_box\030\002 \003(\013" - "2\037.libopenshotobjdetect.Frame.Box\032V\n\003Box" - "\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001w\030\003 \001(\002\022\t\n\001h\030\004" - " \001(\002\022\017\n\007classId\030\005 \001(\005\022\022\n\nconfidence\030\006 \001(" - "\002\"}\n\tObjDetect\022*\n\005frame\030\001 \003(\0132\033.libopens" - "hotobjdetect.Frame\0220\n\014last_updated\030\002 \001(\013" - "2\032.google.protobuf.Timestamp\022\022\n\nclassNam" - "es\030\003 \003(\tb\006proto3" - ; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_objdetectdata_2eproto_deps[1] = { - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_objdetectdata_2eproto_sccs[3] = { - &scc_info_Frame_objdetectdata_2eproto.base, - &scc_info_Frame_Box_objdetectdata_2eproto.base, - &scc_info_ObjDetect_objdetectdata_2eproto.base, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_objdetectdata_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_objdetectdata_2eproto = { - false, false, descriptor_table_protodef_objdetectdata_2eproto, "objdetectdata.proto", 376, - &descriptor_table_objdetectdata_2eproto_once, descriptor_table_objdetectdata_2eproto_sccs, descriptor_table_objdetectdata_2eproto_deps, 3, 1, - schemas, file_default_instances, TableStruct_objdetectdata_2eproto::offsets, - file_level_metadata_objdetectdata_2eproto, 3, file_level_enum_descriptors_objdetectdata_2eproto, file_level_service_descriptors_objdetectdata_2eproto, -}; - -// Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_objdetectdata_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_objdetectdata_2eproto)), true); -namespace libopenshotobjdetect { - -// =================================================================== - -void Frame_Box::InitAsDefaultInstance() { -} -class Frame_Box::_Internal { - public: -}; - -Frame_Box::Frame_Box(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:libopenshotobjdetect.Frame.Box) -} -Frame_Box::Frame_Box(const Frame_Box& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&x_, &from.x_, - static_cast(reinterpret_cast(&confidence_) - - reinterpret_cast(&x_)) + sizeof(confidence_)); - // @@protoc_insertion_point(copy_constructor:libopenshotobjdetect.Frame.Box) -} - -void Frame_Box::SharedCtor() { - ::memset(&x_, 0, static_cast( - reinterpret_cast(&confidence_) - - reinterpret_cast(&x_)) + sizeof(confidence_)); -} - -Frame_Box::~Frame_Box() { - // @@protoc_insertion_point(destructor:libopenshotobjdetect.Frame.Box) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Frame_Box::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void Frame_Box::ArenaDtor(void* object) { - Frame_Box* _this = reinterpret_cast< Frame_Box* >(object); - (void)_this; -} -void Frame_Box::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Frame_Box::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Frame_Box& Frame_Box::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Frame_Box_objdetectdata_2eproto.base); - return *internal_default_instance(); -} - - -void Frame_Box::Clear() { -// @@protoc_insertion_point(message_clear_start:libopenshotobjdetect.Frame.Box) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&x_, 0, static_cast( - reinterpret_cast(&confidence_) - - reinterpret_cast(&x_)) + sizeof(confidence_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Frame_Box::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // float x = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { - x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float y = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float w = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - w_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float h = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) { - h_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // int32 classId = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { - classid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float confidence = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { - confidence_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Frame_Box::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:libopenshotobjdetect.Frame.Box) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x(), target); - } - - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y(), target); - } - - // float w = 3; - if (!(this->w() <= 0 && this->w() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_w(), target); - } - - // float h = 4; - if (!(this->h() <= 0 && this->h() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_h(), target); - } - - // int32 classId = 5; - if (this->classid() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_classid(), target); - } - - // float confidence = 6; - if (!(this->confidence() <= 0 && this->confidence() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_confidence(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:libopenshotobjdetect.Frame.Box) - return target; -} - -size_t Frame_Box::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:libopenshotobjdetect.Frame.Box) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // float x = 1; - if (!(this->x() <= 0 && this->x() >= 0)) { - total_size += 1 + 4; - } - - // float y = 2; - if (!(this->y() <= 0 && this->y() >= 0)) { - total_size += 1 + 4; - } - - // float w = 3; - if (!(this->w() <= 0 && this->w() >= 0)) { - total_size += 1 + 4; - } - - // float h = 4; - if (!(this->h() <= 0 && this->h() >= 0)) { - total_size += 1 + 4; - } - - // int32 classId = 5; - if (this->classid() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_classid()); - } - - // float confidence = 6; - if (!(this->confidence() <= 0 && this->confidence() >= 0)) { - total_size += 1 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Frame_Box::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:libopenshotobjdetect.Frame.Box) - GOOGLE_DCHECK_NE(&from, this); - const Frame_Box* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:libopenshotobjdetect.Frame.Box) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:libopenshotobjdetect.Frame.Box) - MergeFrom(*source); - } -} - -void Frame_Box::MergeFrom(const Frame_Box& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:libopenshotobjdetect.Frame.Box) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (!(from.x() <= 0 && from.x() >= 0)) { - _internal_set_x(from._internal_x()); - } - if (!(from.y() <= 0 && from.y() >= 0)) { - _internal_set_y(from._internal_y()); - } - if (!(from.w() <= 0 && from.w() >= 0)) { - _internal_set_w(from._internal_w()); - } - if (!(from.h() <= 0 && from.h() >= 0)) { - _internal_set_h(from._internal_h()); - } - if (from.classid() != 0) { - _internal_set_classid(from._internal_classid()); - } - if (!(from.confidence() <= 0 && from.confidence() >= 0)) { - _internal_set_confidence(from._internal_confidence()); - } -} - -void Frame_Box::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:libopenshotobjdetect.Frame.Box) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Frame_Box::CopyFrom(const Frame_Box& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:libopenshotobjdetect.Frame.Box) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Frame_Box::IsInitialized() const { - return true; -} - -void Frame_Box::InternalSwap(Frame_Box* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Frame_Box, confidence_) - + sizeof(Frame_Box::confidence_) - - PROTOBUF_FIELD_OFFSET(Frame_Box, x_)>( - reinterpret_cast(&x_), - reinterpret_cast(&other->x_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Frame_Box::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Frame::InitAsDefaultInstance() { -} -class Frame::_Internal { - public: -}; - -Frame::Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - bounding_box_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:libopenshotobjdetect.Frame) -} -Frame::Frame(const Frame& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - bounding_box_(from.bounding_box_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - id_ = from.id_; - // @@protoc_insertion_point(copy_constructor:libopenshotobjdetect.Frame) -} - -void Frame::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Frame_objdetectdata_2eproto.base); - id_ = 0; -} - -Frame::~Frame() { - // @@protoc_insertion_point(destructor:libopenshotobjdetect.Frame) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Frame::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void Frame::ArenaDtor(void* object) { - Frame* _this = reinterpret_cast< Frame* >(object); - (void)_this; -} -void Frame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Frame::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Frame& Frame::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Frame_objdetectdata_2eproto.base); - return *internal_default_instance(); -} - - -void Frame::Clear() { -// @@protoc_insertion_point(message_clear_start:libopenshotobjdetect.Frame) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - bounding_box_.Clear(); - id_ = 0; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Frame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // int32 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated .libopenshotobjdetect.Frame.Box bounding_box = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_bounding_box(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Frame::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:libopenshotobjdetect.Frame) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int32 id = 1; - if (this->id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target); - } - - // repeated .libopenshotobjdetect.Frame.Box bounding_box = 2; - for (unsigned int i = 0, - n = static_cast(this->_internal_bounding_box_size()); i < n; i++) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(2, this->_internal_bounding_box(i), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:libopenshotobjdetect.Frame) - return target; -} - -size_t Frame::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:libopenshotobjdetect.Frame) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .libopenshotobjdetect.Frame.Box bounding_box = 2; - total_size += 1UL * this->_internal_bounding_box_size(); - for (const auto& msg : this->bounding_box_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // int32 id = 1; - if (this->id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_id()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Frame::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:libopenshotobjdetect.Frame) - GOOGLE_DCHECK_NE(&from, this); - const Frame* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:libopenshotobjdetect.Frame) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:libopenshotobjdetect.Frame) - MergeFrom(*source); - } -} - -void Frame::MergeFrom(const Frame& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:libopenshotobjdetect.Frame) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - bounding_box_.MergeFrom(from.bounding_box_); - if (from.id() != 0) { - _internal_set_id(from._internal_id()); - } -} - -void Frame::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:libopenshotobjdetect.Frame) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Frame::CopyFrom(const Frame& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:libopenshotobjdetect.Frame) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Frame::IsInitialized() const { - return true; -} - -void Frame::InternalSwap(Frame* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - bounding_box_.InternalSwap(&other->bounding_box_); - swap(id_, other->id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Frame::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void ObjDetect::InitAsDefaultInstance() { - ::libopenshotobjdetect::_ObjDetect_default_instance_._instance.get_mutable()->last_updated_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>( - PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance()); -} -class ObjDetect::_Internal { - public: - static const PROTOBUF_NAMESPACE_ID::Timestamp& last_updated(const ObjDetect* msg); -}; - -const PROTOBUF_NAMESPACE_ID::Timestamp& -ObjDetect::_Internal::last_updated(const ObjDetect* msg) { - return *msg->last_updated_; -} -void ObjDetect::clear_last_updated() { - if (GetArena() == nullptr && last_updated_ != nullptr) { - delete last_updated_; - } - last_updated_ = nullptr; -} -ObjDetect::ObjDetect(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - frame_(arena), - classnames_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:libopenshotobjdetect.ObjDetect) -} -ObjDetect::ObjDetect(const ObjDetect& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - frame_(from.frame_), - classnames_(from.classnames_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_last_updated()) { - last_updated_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.last_updated_); - } else { - last_updated_ = nullptr; - } - // @@protoc_insertion_point(copy_constructor:libopenshotobjdetect.ObjDetect) -} - -void ObjDetect::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ObjDetect_objdetectdata_2eproto.base); - last_updated_ = nullptr; -} - -ObjDetect::~ObjDetect() { - // @@protoc_insertion_point(destructor:libopenshotobjdetect.ObjDetect) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void ObjDetect::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - if (this != internal_default_instance()) delete last_updated_; -} - -void ObjDetect::ArenaDtor(void* object) { - ObjDetect* _this = reinterpret_cast< ObjDetect* >(object); - (void)_this; -} -void ObjDetect::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void ObjDetect::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const ObjDetect& ObjDetect::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ObjDetect_objdetectdata_2eproto.base); - return *internal_default_instance(); -} - - -void ObjDetect::Clear() { -// @@protoc_insertion_point(message_clear_start:libopenshotobjdetect.ObjDetect) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - frame_.Clear(); - classnames_.Clear(); - if (GetArena() == nullptr && last_updated_ != nullptr) { - delete last_updated_; - } - last_updated_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ObjDetect::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // repeated .libopenshotobjdetect.Frame frame = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_frame(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else goto handle_unusual; - continue; - // .google.protobuf.Timestamp last_updated = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_last_updated(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // repeated string classNames = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - auto str = _internal_add_classnames(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "libopenshotobjdetect.ObjDetect.classNames")); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* ObjDetect::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:libopenshotobjdetect.ObjDetect) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .libopenshotobjdetect.Frame frame = 1; - for (unsigned int i = 0, - n = static_cast(this->_internal_frame_size()); i < n; i++) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, this->_internal_frame(i), target, stream); - } - - // .google.protobuf.Timestamp last_updated = 2; - if (this->has_last_updated()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 2, _Internal::last_updated(this), target, stream); - } - - // repeated string classNames = 3; - for (int i = 0, n = this->_internal_classnames_size(); i < n; i++) { - const auto& s = this->_internal_classnames(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "libopenshotobjdetect.ObjDetect.classNames"); - target = stream->WriteString(3, s, target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:libopenshotobjdetect.ObjDetect) - return target; -} - -size_t ObjDetect::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:libopenshotobjdetect.ObjDetect) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .libopenshotobjdetect.Frame frame = 1; - total_size += 1UL * this->_internal_frame_size(); - for (const auto& msg : this->frame_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // repeated string classNames = 3; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(classnames_.size()); - for (int i = 0, n = classnames_.size(); i < n; i++) { - total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - classnames_.Get(i)); - } - - // .google.protobuf.Timestamp last_updated = 2; - if (this->has_last_updated()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *last_updated_); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void ObjDetect::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:libopenshotobjdetect.ObjDetect) - GOOGLE_DCHECK_NE(&from, this); - const ObjDetect* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:libopenshotobjdetect.ObjDetect) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:libopenshotobjdetect.ObjDetect) - MergeFrom(*source); - } -} - -void ObjDetect::MergeFrom(const ObjDetect& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:libopenshotobjdetect.ObjDetect) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - frame_.MergeFrom(from.frame_); - classnames_.MergeFrom(from.classnames_); - if (from.has_last_updated()) { - _internal_mutable_last_updated()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_last_updated()); - } -} - -void ObjDetect::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:libopenshotobjdetect.ObjDetect) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ObjDetect::CopyFrom(const ObjDetect& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:libopenshotobjdetect.ObjDetect) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ObjDetect::IsInitialized() const { - return true; -} - -void ObjDetect::InternalSwap(ObjDetect* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - frame_.InternalSwap(&other->frame_); - classnames_.InternalSwap(&other->classnames_); - swap(last_updated_, other->last_updated_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ObjDetect::GetMetadata() const { - return GetMetadataStatic(); -} - - -// @@protoc_insertion_point(namespace_scope) -} // namespace libopenshotobjdetect -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::libopenshotobjdetect::Frame_Box* Arena::CreateMaybeMessage< ::libopenshotobjdetect::Frame_Box >(Arena* arena) { - return Arena::CreateMessageInternal< ::libopenshotobjdetect::Frame_Box >(arena); -} -template<> PROTOBUF_NOINLINE ::libopenshotobjdetect::Frame* Arena::CreateMaybeMessage< ::libopenshotobjdetect::Frame >(Arena* arena) { - return Arena::CreateMessageInternal< ::libopenshotobjdetect::Frame >(arena); -} -template<> PROTOBUF_NOINLINE ::libopenshotobjdetect::ObjDetect* Arena::CreateMaybeMessage< ::libopenshotobjdetect::ObjDetect >(Arena* arena) { - return Arena::CreateMessageInternal< ::libopenshotobjdetect::ObjDetect >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/src/objdetectdata.pb.h b/src/objdetectdata.pb.h deleted file mode 100644 index 48630c17..00000000 --- a/src/objdetectdata.pb.h +++ /dev/null @@ -1,1020 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: objdetectdata.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_objdetectdata_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_objdetectdata_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3012000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3012003 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_objdetectdata_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_objdetectdata_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_objdetectdata_2eproto; -namespace libopenshotobjdetect { -class Frame; -class FrameDefaultTypeInternal; -extern FrameDefaultTypeInternal _Frame_default_instance_; -class Frame_Box; -class Frame_BoxDefaultTypeInternal; -extern Frame_BoxDefaultTypeInternal _Frame_Box_default_instance_; -class ObjDetect; -class ObjDetectDefaultTypeInternal; -extern ObjDetectDefaultTypeInternal _ObjDetect_default_instance_; -} // namespace libopenshotobjdetect -PROTOBUF_NAMESPACE_OPEN -template<> ::libopenshotobjdetect::Frame* Arena::CreateMaybeMessage<::libopenshotobjdetect::Frame>(Arena*); -template<> ::libopenshotobjdetect::Frame_Box* Arena::CreateMaybeMessage<::libopenshotobjdetect::Frame_Box>(Arena*); -template<> ::libopenshotobjdetect::ObjDetect* Arena::CreateMaybeMessage<::libopenshotobjdetect::ObjDetect>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace libopenshotobjdetect { - -// =================================================================== - -class Frame_Box PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:libopenshotobjdetect.Frame.Box) */ { - public: - inline Frame_Box() : Frame_Box(nullptr) {}; - virtual ~Frame_Box(); - - Frame_Box(const Frame_Box& from); - Frame_Box(Frame_Box&& from) noexcept - : Frame_Box() { - *this = ::std::move(from); - } - - inline Frame_Box& operator=(const Frame_Box& from) { - CopyFrom(from); - return *this; - } - inline Frame_Box& operator=(Frame_Box&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Frame_Box& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Frame_Box* internal_default_instance() { - return reinterpret_cast( - &_Frame_Box_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(Frame_Box& a, Frame_Box& b) { - a.Swap(&b); - } - inline void Swap(Frame_Box* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Frame_Box* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Frame_Box* New() const final { - return CreateMaybeMessage(nullptr); - } - - Frame_Box* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Frame_Box& from); - void MergeFrom(const Frame_Box& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Frame_Box* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "libopenshotobjdetect.Frame.Box"; - } - protected: - explicit Frame_Box(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_objdetectdata_2eproto); - return ::descriptor_table_objdetectdata_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kXFieldNumber = 1, - kYFieldNumber = 2, - kWFieldNumber = 3, - kHFieldNumber = 4, - kClassIdFieldNumber = 5, - kConfidenceFieldNumber = 6, - }; - // float x = 1; - void clear_x(); - float x() const; - void set_x(float value); - private: - float _internal_x() const; - void _internal_set_x(float value); - public: - - // float y = 2; - void clear_y(); - float y() const; - void set_y(float value); - private: - float _internal_y() const; - void _internal_set_y(float value); - public: - - // float w = 3; - void clear_w(); - float w() const; - void set_w(float value); - private: - float _internal_w() const; - void _internal_set_w(float value); - public: - - // float h = 4; - void clear_h(); - float h() const; - void set_h(float value); - private: - float _internal_h() const; - void _internal_set_h(float value); - public: - - // int32 classId = 5; - void clear_classid(); - ::PROTOBUF_NAMESPACE_ID::int32 classid() const; - void set_classid(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_classid() const; - void _internal_set_classid(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float confidence = 6; - void clear_confidence(); - float confidence() const; - void set_confidence(float value); - private: - float _internal_confidence() const; - void _internal_set_confidence(float value); - public: - - // @@protoc_insertion_point(class_scope:libopenshotobjdetect.Frame.Box) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - float x_; - float y_; - float w_; - float h_; - ::PROTOBUF_NAMESPACE_ID::int32 classid_; - float confidence_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_objdetectdata_2eproto; -}; -// ------------------------------------------------------------------- - -class Frame PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:libopenshotobjdetect.Frame) */ { - public: - inline Frame() : Frame(nullptr) {}; - virtual ~Frame(); - - Frame(const Frame& from); - Frame(Frame&& from) noexcept - : Frame() { - *this = ::std::move(from); - } - - inline Frame& operator=(const Frame& from) { - CopyFrom(from); - return *this; - } - inline Frame& operator=(Frame&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Frame& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Frame* internal_default_instance() { - return reinterpret_cast( - &_Frame_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(Frame& a, Frame& b) { - a.Swap(&b); - } - inline void Swap(Frame* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Frame* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Frame* New() const final { - return CreateMaybeMessage(nullptr); - } - - Frame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Frame& from); - void MergeFrom(const Frame& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Frame* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "libopenshotobjdetect.Frame"; - } - protected: - explicit Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_objdetectdata_2eproto); - return ::descriptor_table_objdetectdata_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - typedef Frame_Box Box; - - // accessors ------------------------------------------------------- - - enum : int { - kBoundingBoxFieldNumber = 2, - kIdFieldNumber = 1, - }; - // repeated .libopenshotobjdetect.Frame.Box bounding_box = 2; - int bounding_box_size() const; - private: - int _internal_bounding_box_size() const; - public: - void clear_bounding_box(); - ::libopenshotobjdetect::Frame_Box* mutable_bounding_box(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame_Box >* - mutable_bounding_box(); - private: - const ::libopenshotobjdetect::Frame_Box& _internal_bounding_box(int index) const; - ::libopenshotobjdetect::Frame_Box* _internal_add_bounding_box(); - public: - const ::libopenshotobjdetect::Frame_Box& bounding_box(int index) const; - ::libopenshotobjdetect::Frame_Box* add_bounding_box(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame_Box >& - bounding_box() const; - - // int32 id = 1; - void clear_id(); - ::PROTOBUF_NAMESPACE_ID::int32 id() const; - void set_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_id() const; - void _internal_set_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // @@protoc_insertion_point(class_scope:libopenshotobjdetect.Frame) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame_Box > bounding_box_; - ::PROTOBUF_NAMESPACE_ID::int32 id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_objdetectdata_2eproto; -}; -// ------------------------------------------------------------------- - -class ObjDetect PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:libopenshotobjdetect.ObjDetect) */ { - public: - inline ObjDetect() : ObjDetect(nullptr) {}; - virtual ~ObjDetect(); - - ObjDetect(const ObjDetect& from); - ObjDetect(ObjDetect&& from) noexcept - : ObjDetect() { - *this = ::std::move(from); - } - - inline ObjDetect& operator=(const ObjDetect& from) { - CopyFrom(from); - return *this; - } - inline ObjDetect& operator=(ObjDetect&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const ObjDetect& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const ObjDetect* internal_default_instance() { - return reinterpret_cast( - &_ObjDetect_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(ObjDetect& a, ObjDetect& b) { - a.Swap(&b); - } - inline void Swap(ObjDetect* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(ObjDetect* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline ObjDetect* New() const final { - return CreateMaybeMessage(nullptr); - } - - ObjDetect* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const ObjDetect& from); - void MergeFrom(const ObjDetect& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(ObjDetect* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "libopenshotobjdetect.ObjDetect"; - } - protected: - explicit ObjDetect(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_objdetectdata_2eproto); - return ::descriptor_table_objdetectdata_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kFrameFieldNumber = 1, - kClassNamesFieldNumber = 3, - kLastUpdatedFieldNumber = 2, - }; - // repeated .libopenshotobjdetect.Frame frame = 1; - int frame_size() const; - private: - int _internal_frame_size() const; - public: - void clear_frame(); - ::libopenshotobjdetect::Frame* mutable_frame(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame >* - mutable_frame(); - private: - const ::libopenshotobjdetect::Frame& _internal_frame(int index) const; - ::libopenshotobjdetect::Frame* _internal_add_frame(); - public: - const ::libopenshotobjdetect::Frame& frame(int index) const; - ::libopenshotobjdetect::Frame* add_frame(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame >& - frame() const; - - // repeated string classNames = 3; - int classnames_size() const; - private: - int _internal_classnames_size() const; - public: - void clear_classnames(); - const std::string& classnames(int index) const; - std::string* mutable_classnames(int index); - void set_classnames(int index, const std::string& value); - void set_classnames(int index, std::string&& value); - void set_classnames(int index, const char* value); - void set_classnames(int index, const char* value, size_t size); - std::string* add_classnames(); - void add_classnames(const std::string& value); - void add_classnames(std::string&& value); - void add_classnames(const char* value); - void add_classnames(const char* value, size_t size); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& classnames() const; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_classnames(); - private: - const std::string& _internal_classnames(int index) const; - std::string* _internal_add_classnames(); - public: - - // .google.protobuf.Timestamp last_updated = 2; - bool has_last_updated() const; - private: - bool _internal_has_last_updated() const; - public: - void clear_last_updated(); - const PROTOBUF_NAMESPACE_ID::Timestamp& last_updated() const; - PROTOBUF_NAMESPACE_ID::Timestamp* release_last_updated(); - PROTOBUF_NAMESPACE_ID::Timestamp* mutable_last_updated(); - void set_allocated_last_updated(PROTOBUF_NAMESPACE_ID::Timestamp* last_updated); - private: - const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_last_updated() const; - PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_last_updated(); - public: - void unsafe_arena_set_allocated_last_updated( - PROTOBUF_NAMESPACE_ID::Timestamp* last_updated); - PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_last_updated(); - - // @@protoc_insertion_point(class_scope:libopenshotobjdetect.ObjDetect) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame > frame_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField classnames_; - PROTOBUF_NAMESPACE_ID::Timestamp* last_updated_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_objdetectdata_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// Frame_Box - -// float x = 1; -inline void Frame_Box::clear_x() { - x_ = 0; -} -inline float Frame_Box::_internal_x() const { - return x_; -} -inline float Frame_Box::x() const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.x) - return _internal_x(); -} -inline void Frame_Box::_internal_set_x(float value) { - - x_ = value; -} -inline void Frame_Box::set_x(float value) { - _internal_set_x(value); - // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.x) -} - -// float y = 2; -inline void Frame_Box::clear_y() { - y_ = 0; -} -inline float Frame_Box::_internal_y() const { - return y_; -} -inline float Frame_Box::y() const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.y) - return _internal_y(); -} -inline void Frame_Box::_internal_set_y(float value) { - - y_ = value; -} -inline void Frame_Box::set_y(float value) { - _internal_set_y(value); - // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.y) -} - -// float w = 3; -inline void Frame_Box::clear_w() { - w_ = 0; -} -inline float Frame_Box::_internal_w() const { - return w_; -} -inline float Frame_Box::w() const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.w) - return _internal_w(); -} -inline void Frame_Box::_internal_set_w(float value) { - - w_ = value; -} -inline void Frame_Box::set_w(float value) { - _internal_set_w(value); - // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.w) -} - -// float h = 4; -inline void Frame_Box::clear_h() { - h_ = 0; -} -inline float Frame_Box::_internal_h() const { - return h_; -} -inline float Frame_Box::h() const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.h) - return _internal_h(); -} -inline void Frame_Box::_internal_set_h(float value) { - - h_ = value; -} -inline void Frame_Box::set_h(float value) { - _internal_set_h(value); - // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.h) -} - -// int32 classId = 5; -inline void Frame_Box::clear_classid() { - classid_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::_internal_classid() const { - return classid_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Frame_Box::classid() const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.classId) - return _internal_classid(); -} -inline void Frame_Box::_internal_set_classid(::PROTOBUF_NAMESPACE_ID::int32 value) { - - classid_ = value; -} -inline void Frame_Box::set_classid(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_classid(value); - // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.classId) -} - -// float confidence = 6; -inline void Frame_Box::clear_confidence() { - confidence_ = 0; -} -inline float Frame_Box::_internal_confidence() const { - return confidence_; -} -inline float Frame_Box::confidence() const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.Box.confidence) - return _internal_confidence(); -} -inline void Frame_Box::_internal_set_confidence(float value) { - - confidence_ = value; -} -inline void Frame_Box::set_confidence(float value) { - _internal_set_confidence(value); - // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.Box.confidence) -} - -// ------------------------------------------------------------------- - -// Frame - -// int32 id = 1; -inline void Frame::clear_id() { - id_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Frame::_internal_id() const { - return id_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Frame::id() const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.id) - return _internal_id(); -} -inline void Frame::_internal_set_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - - id_ = value; -} -inline void Frame::set_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_id(value); - // @@protoc_insertion_point(field_set:libopenshotobjdetect.Frame.id) -} - -// repeated .libopenshotobjdetect.Frame.Box bounding_box = 2; -inline int Frame::_internal_bounding_box_size() const { - return bounding_box_.size(); -} -inline int Frame::bounding_box_size() const { - return _internal_bounding_box_size(); -} -inline void Frame::clear_bounding_box() { - bounding_box_.Clear(); -} -inline ::libopenshotobjdetect::Frame_Box* Frame::mutable_bounding_box(int index) { - // @@protoc_insertion_point(field_mutable:libopenshotobjdetect.Frame.bounding_box) - return bounding_box_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame_Box >* -Frame::mutable_bounding_box() { - // @@protoc_insertion_point(field_mutable_list:libopenshotobjdetect.Frame.bounding_box) - return &bounding_box_; -} -inline const ::libopenshotobjdetect::Frame_Box& Frame::_internal_bounding_box(int index) const { - return bounding_box_.Get(index); -} -inline const ::libopenshotobjdetect::Frame_Box& Frame::bounding_box(int index) const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.Frame.bounding_box) - return _internal_bounding_box(index); -} -inline ::libopenshotobjdetect::Frame_Box* Frame::_internal_add_bounding_box() { - return bounding_box_.Add(); -} -inline ::libopenshotobjdetect::Frame_Box* Frame::add_bounding_box() { - // @@protoc_insertion_point(field_add:libopenshotobjdetect.Frame.bounding_box) - return _internal_add_bounding_box(); -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame_Box >& -Frame::bounding_box() const { - // @@protoc_insertion_point(field_list:libopenshotobjdetect.Frame.bounding_box) - return bounding_box_; -} - -// ------------------------------------------------------------------- - -// ObjDetect - -// repeated .libopenshotobjdetect.Frame frame = 1; -inline int ObjDetect::_internal_frame_size() const { - return frame_.size(); -} -inline int ObjDetect::frame_size() const { - return _internal_frame_size(); -} -inline void ObjDetect::clear_frame() { - frame_.Clear(); -} -inline ::libopenshotobjdetect::Frame* ObjDetect::mutable_frame(int index) { - // @@protoc_insertion_point(field_mutable:libopenshotobjdetect.ObjDetect.frame) - return frame_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame >* -ObjDetect::mutable_frame() { - // @@protoc_insertion_point(field_mutable_list:libopenshotobjdetect.ObjDetect.frame) - return &frame_; -} -inline const ::libopenshotobjdetect::Frame& ObjDetect::_internal_frame(int index) const { - return frame_.Get(index); -} -inline const ::libopenshotobjdetect::Frame& ObjDetect::frame(int index) const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.ObjDetect.frame) - return _internal_frame(index); -} -inline ::libopenshotobjdetect::Frame* ObjDetect::_internal_add_frame() { - return frame_.Add(); -} -inline ::libopenshotobjdetect::Frame* ObjDetect::add_frame() { - // @@protoc_insertion_point(field_add:libopenshotobjdetect.ObjDetect.frame) - return _internal_add_frame(); -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotobjdetect::Frame >& -ObjDetect::frame() const { - // @@protoc_insertion_point(field_list:libopenshotobjdetect.ObjDetect.frame) - return frame_; -} - -// .google.protobuf.Timestamp last_updated = 2; -inline bool ObjDetect::_internal_has_last_updated() const { - return this != internal_default_instance() && last_updated_ != nullptr; -} -inline bool ObjDetect::has_last_updated() const { - return _internal_has_last_updated(); -} -inline const PROTOBUF_NAMESPACE_ID::Timestamp& ObjDetect::_internal_last_updated() const { - const PROTOBUF_NAMESPACE_ID::Timestamp* p = last_updated_; - return p != nullptr ? *p : *reinterpret_cast( - &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const PROTOBUF_NAMESPACE_ID::Timestamp& ObjDetect::last_updated() const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.ObjDetect.last_updated) - return _internal_last_updated(); -} -inline void ObjDetect::unsafe_arena_set_allocated_last_updated( - PROTOBUF_NAMESPACE_ID::Timestamp* last_updated) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(last_updated_); - } - last_updated_ = last_updated; - if (last_updated) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:libopenshotobjdetect.ObjDetect.last_updated) -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* ObjDetect::release_last_updated() { - auto temp = unsafe_arena_release_last_updated(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* ObjDetect::unsafe_arena_release_last_updated() { - // @@protoc_insertion_point(field_release:libopenshotobjdetect.ObjDetect.last_updated) - - PROTOBUF_NAMESPACE_ID::Timestamp* temp = last_updated_; - last_updated_ = nullptr; - return temp; -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* ObjDetect::_internal_mutable_last_updated() { - - if (last_updated_ == nullptr) { - auto* p = CreateMaybeMessage(GetArena()); - last_updated_ = p; - } - return last_updated_; -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* ObjDetect::mutable_last_updated() { - // @@protoc_insertion_point(field_mutable:libopenshotobjdetect.ObjDetect.last_updated) - return _internal_mutable_last_updated(); -} -inline void ObjDetect::set_allocated_last_updated(PROTOBUF_NAMESPACE_ID::Timestamp* last_updated) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(last_updated_); - } - if (last_updated) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(last_updated)->GetArena(); - if (message_arena != submessage_arena) { - last_updated = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, last_updated, submessage_arena); - } - - } else { - - } - last_updated_ = last_updated; - // @@protoc_insertion_point(field_set_allocated:libopenshotobjdetect.ObjDetect.last_updated) -} - -// repeated string classNames = 3; -inline int ObjDetect::_internal_classnames_size() const { - return classnames_.size(); -} -inline int ObjDetect::classnames_size() const { - return _internal_classnames_size(); -} -inline void ObjDetect::clear_classnames() { - classnames_.Clear(); -} -inline std::string* ObjDetect::add_classnames() { - // @@protoc_insertion_point(field_add_mutable:libopenshotobjdetect.ObjDetect.classNames) - return _internal_add_classnames(); -} -inline const std::string& ObjDetect::_internal_classnames(int index) const { - return classnames_.Get(index); -} -inline const std::string& ObjDetect::classnames(int index) const { - // @@protoc_insertion_point(field_get:libopenshotobjdetect.ObjDetect.classNames) - return _internal_classnames(index); -} -inline std::string* ObjDetect::mutable_classnames(int index) { - // @@protoc_insertion_point(field_mutable:libopenshotobjdetect.ObjDetect.classNames) - return classnames_.Mutable(index); -} -inline void ObjDetect::set_classnames(int index, const std::string& value) { - // @@protoc_insertion_point(field_set:libopenshotobjdetect.ObjDetect.classNames) - classnames_.Mutable(index)->assign(value); -} -inline void ObjDetect::set_classnames(int index, std::string&& value) { - // @@protoc_insertion_point(field_set:libopenshotobjdetect.ObjDetect.classNames) - classnames_.Mutable(index)->assign(std::move(value)); -} -inline void ObjDetect::set_classnames(int index, const char* value) { - GOOGLE_DCHECK(value != nullptr); - classnames_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:libopenshotobjdetect.ObjDetect.classNames) -} -inline void ObjDetect::set_classnames(int index, const char* value, size_t size) { - classnames_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:libopenshotobjdetect.ObjDetect.classNames) -} -inline std::string* ObjDetect::_internal_add_classnames() { - return classnames_.Add(); -} -inline void ObjDetect::add_classnames(const std::string& value) { - classnames_.Add()->assign(value); - // @@protoc_insertion_point(field_add:libopenshotobjdetect.ObjDetect.classNames) -} -inline void ObjDetect::add_classnames(std::string&& value) { - classnames_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:libopenshotobjdetect.ObjDetect.classNames) -} -inline void ObjDetect::add_classnames(const char* value) { - GOOGLE_DCHECK(value != nullptr); - classnames_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:libopenshotobjdetect.ObjDetect.classNames) -} -inline void ObjDetect::add_classnames(const char* value, size_t size) { - classnames_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:libopenshotobjdetect.ObjDetect.classNames) -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& -ObjDetect::classnames() const { - // @@protoc_insertion_point(field_list:libopenshotobjdetect.ObjDetect.classNames) - return classnames_; -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* -ObjDetect::mutable_classnames() { - // @@protoc_insertion_point(field_mutable_list:libopenshotobjdetect.ObjDetect.classNames) - return &classnames_; -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace libopenshotobjdetect - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_objdetectdata_2eproto diff --git a/src/protobuf_messages/CMakeLists.txt b/src/protobuf_messages/CMakeLists.txt new file mode 100644 index 00000000..5752a216 --- /dev/null +++ b/src/protobuf_messages/CMakeLists.txt @@ -0,0 +1,38 @@ +####################### CMakeLists.txt (libopenshot) ######################### +# @brief CMake build file for libopenshot (used to generate makefiles) +# @author Jonathan Thomas +# @author FeRD (Frank Dana) +# +# @section LICENSE +# +# Copyright (c) 2008-2020 OpenShot Studios, LLC +# . This file is part of +# OpenShot Library (libopenshot), an open-source project dedicated to +# delivering high quality video editing and animation solutions to the +# world. For more information visit . +# +# OpenShot Library (libopenshot) is free software: you can redistribute it +# and/or modify it under the terms of the GNU Lesser General Public License +# as published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# OpenShot Library (libopenshot) is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with OpenShot Library. If not, see . +################################################################################ + +# Dependencies +find_package(Protobuf 3) + +file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto") +PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles}) +add_library(ProtoMessages SHARED ${ProtoSources} ${ProtoHeaders}) + +set(ProtobufMessagePath ${CMAKE_CURRENT_BINARY_DIR} + CACHE INTERNAL "Path to generated protobuf header files.") + +target_link_libraries(ProtoMessages ${Boost_LIBRARIES} ${PROTOBUF_LIBRARY}) diff --git a/src/stabilizedata.pb.cc b/src/stabilizedata.pb.cc deleted file mode 100644 index 081aca10..00000000 --- a/src/stabilizedata.pb.cc +++ /dev/null @@ -1,722 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: stabilizedata.proto - -#include "stabilizedata.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_stabilizedata_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Frame_stabilizedata_2eproto; -namespace libopenshotstabilize { -class FrameDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Frame_default_instance_; -class StabilizationDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Stabilization_default_instance_; -} // namespace libopenshotstabilize -static void InitDefaultsscc_info_Frame_stabilizedata_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::libopenshotstabilize::_Frame_default_instance_; - new (ptr) ::libopenshotstabilize::Frame(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::libopenshotstabilize::Frame::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Frame_stabilizedata_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Frame_stabilizedata_2eproto}, {}}; - -static void InitDefaultsscc_info_Stabilization_stabilizedata_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::libopenshotstabilize::_Stabilization_default_instance_; - new (ptr) ::libopenshotstabilize::Stabilization(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::libopenshotstabilize::Stabilization::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Stabilization_stabilizedata_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_Stabilization_stabilizedata_2eproto}, { - &scc_info_Frame_stabilizedata_2eproto.base, - &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}}; - -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_stabilizedata_2eproto[2]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_stabilizedata_2eproto = nullptr; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_stabilizedata_2eproto = nullptr; - -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_stabilizedata_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Frame, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Frame, id_), - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Frame, dx_), - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Frame, dy_), - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Frame, da_), - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Frame, x_), - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Frame, y_), - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Frame, a_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Stabilization, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Stabilization, frame_), - PROTOBUF_FIELD_OFFSET(::libopenshotstabilize::Stabilization, last_updated_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::libopenshotstabilize::Frame)}, - { 12, -1, sizeof(::libopenshotstabilize::Stabilization)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::libopenshotstabilize::_Frame_default_instance_), - reinterpret_cast(&::libopenshotstabilize::_Stabilization_default_instance_), -}; - -const char descriptor_table_protodef_stabilizedata_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\023stabilizedata.proto\022\024libopenshotstabil" - "ize\032\037google/protobuf/timestamp.proto\"X\n\005" - "Frame\022\n\n\002id\030\001 \001(\005\022\n\n\002dx\030\002 \001(\002\022\n\n\002dy\030\003 \001(" - "\002\022\n\n\002da\030\004 \001(\002\022\t\n\001x\030\005 \001(\002\022\t\n\001y\030\006 \001(\002\022\t\n\001a" - "\030\007 \001(\002\"m\n\rStabilization\022*\n\005frame\030\001 \003(\0132\033" - ".libopenshotstabilize.Frame\0220\n\014last_upda" - "ted\030\002 \001(\0132\032.google.protobuf.Timestampb\006p" - "roto3" - ; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_stabilizedata_2eproto_deps[1] = { - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_stabilizedata_2eproto_sccs[2] = { - &scc_info_Frame_stabilizedata_2eproto.base, - &scc_info_Stabilization_stabilizedata_2eproto.base, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_stabilizedata_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_stabilizedata_2eproto = { - false, false, descriptor_table_protodef_stabilizedata_2eproto, "stabilizedata.proto", 285, - &descriptor_table_stabilizedata_2eproto_once, descriptor_table_stabilizedata_2eproto_sccs, descriptor_table_stabilizedata_2eproto_deps, 2, 1, - schemas, file_default_instances, TableStruct_stabilizedata_2eproto::offsets, - file_level_metadata_stabilizedata_2eproto, 2, file_level_enum_descriptors_stabilizedata_2eproto, file_level_service_descriptors_stabilizedata_2eproto, -}; - -// Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_stabilizedata_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_stabilizedata_2eproto)), true); -namespace libopenshotstabilize { - -// =================================================================== - -void Frame::InitAsDefaultInstance() { -} -class Frame::_Internal { - public: -}; - -Frame::Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:libopenshotstabilize.Frame) -} -Frame::Frame(const Frame& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&id_, &from.id_, - static_cast(reinterpret_cast(&a_) - - reinterpret_cast(&id_)) + sizeof(a_)); - // @@protoc_insertion_point(copy_constructor:libopenshotstabilize.Frame) -} - -void Frame::SharedCtor() { - ::memset(&id_, 0, static_cast( - reinterpret_cast(&a_) - - reinterpret_cast(&id_)) + sizeof(a_)); -} - -Frame::~Frame() { - // @@protoc_insertion_point(destructor:libopenshotstabilize.Frame) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Frame::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void Frame::ArenaDtor(void* object) { - Frame* _this = reinterpret_cast< Frame* >(object); - (void)_this; -} -void Frame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Frame::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Frame& Frame::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Frame_stabilizedata_2eproto.base); - return *internal_default_instance(); -} - - -void Frame::Clear() { -// @@protoc_insertion_point(message_clear_start:libopenshotstabilize.Frame) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&id_, 0, static_cast( - reinterpret_cast(&a_) - - reinterpret_cast(&id_)) + sizeof(a_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Frame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // int32 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float dx = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - dx_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float dy = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - dy_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float da = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) { - da_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float x = 5; - case 5: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) { - x_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float y = 6; - case 6: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { - y_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float a = 7; - case 7: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 61)) { - a_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Frame::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:libopenshotstabilize.Frame) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int32 id = 1; - if (this->id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target); - } - - // float dx = 2; - if (!(this->dx() <= 0 && this->dx() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_dx(), target); - } - - // float dy = 3; - if (!(this->dy() <= 0 && this->dy() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_dy(), target); - } - - // float da = 4; - if (!(this->da() <= 0 && this->da() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_da(), target); - } - - // float x = 5; - if (!(this->x() <= 0 && this->x() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_x(), target); - } - - // float y = 6; - if (!(this->y() <= 0 && this->y() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_y(), target); - } - - // float a = 7; - if (!(this->a() <= 0 && this->a() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_a(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:libopenshotstabilize.Frame) - return target; -} - -size_t Frame::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:libopenshotstabilize.Frame) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // int32 id = 1; - if (this->id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_id()); - } - - // float dx = 2; - if (!(this->dx() <= 0 && this->dx() >= 0)) { - total_size += 1 + 4; - } - - // float dy = 3; - if (!(this->dy() <= 0 && this->dy() >= 0)) { - total_size += 1 + 4; - } - - // float da = 4; - if (!(this->da() <= 0 && this->da() >= 0)) { - total_size += 1 + 4; - } - - // float x = 5; - if (!(this->x() <= 0 && this->x() >= 0)) { - total_size += 1 + 4; - } - - // float y = 6; - if (!(this->y() <= 0 && this->y() >= 0)) { - total_size += 1 + 4; - } - - // float a = 7; - if (!(this->a() <= 0 && this->a() >= 0)) { - total_size += 1 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Frame::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:libopenshotstabilize.Frame) - GOOGLE_DCHECK_NE(&from, this); - const Frame* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:libopenshotstabilize.Frame) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:libopenshotstabilize.Frame) - MergeFrom(*source); - } -} - -void Frame::MergeFrom(const Frame& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:libopenshotstabilize.Frame) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.id() != 0) { - _internal_set_id(from._internal_id()); - } - if (!(from.dx() <= 0 && from.dx() >= 0)) { - _internal_set_dx(from._internal_dx()); - } - if (!(from.dy() <= 0 && from.dy() >= 0)) { - _internal_set_dy(from._internal_dy()); - } - if (!(from.da() <= 0 && from.da() >= 0)) { - _internal_set_da(from._internal_da()); - } - if (!(from.x() <= 0 && from.x() >= 0)) { - _internal_set_x(from._internal_x()); - } - if (!(from.y() <= 0 && from.y() >= 0)) { - _internal_set_y(from._internal_y()); - } - if (!(from.a() <= 0 && from.a() >= 0)) { - _internal_set_a(from._internal_a()); - } -} - -void Frame::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:libopenshotstabilize.Frame) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Frame::CopyFrom(const Frame& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:libopenshotstabilize.Frame) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Frame::IsInitialized() const { - return true; -} - -void Frame::InternalSwap(Frame* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Frame, a_) - + sizeof(Frame::a_) - - PROTOBUF_FIELD_OFFSET(Frame, id_)>( - reinterpret_cast(&id_), - reinterpret_cast(&other->id_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Frame::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Stabilization::InitAsDefaultInstance() { - ::libopenshotstabilize::_Stabilization_default_instance_._instance.get_mutable()->last_updated_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>( - PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance()); -} -class Stabilization::_Internal { - public: - static const PROTOBUF_NAMESPACE_ID::Timestamp& last_updated(const Stabilization* msg); -}; - -const PROTOBUF_NAMESPACE_ID::Timestamp& -Stabilization::_Internal::last_updated(const Stabilization* msg) { - return *msg->last_updated_; -} -void Stabilization::clear_last_updated() { - if (GetArena() == nullptr && last_updated_ != nullptr) { - delete last_updated_; - } - last_updated_ = nullptr; -} -Stabilization::Stabilization(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - frame_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:libopenshotstabilize.Stabilization) -} -Stabilization::Stabilization(const Stabilization& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - frame_(from.frame_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_last_updated()) { - last_updated_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.last_updated_); - } else { - last_updated_ = nullptr; - } - // @@protoc_insertion_point(copy_constructor:libopenshotstabilize.Stabilization) -} - -void Stabilization::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Stabilization_stabilizedata_2eproto.base); - last_updated_ = nullptr; -} - -Stabilization::~Stabilization() { - // @@protoc_insertion_point(destructor:libopenshotstabilize.Stabilization) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Stabilization::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - if (this != internal_default_instance()) delete last_updated_; -} - -void Stabilization::ArenaDtor(void* object) { - Stabilization* _this = reinterpret_cast< Stabilization* >(object); - (void)_this; -} -void Stabilization::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Stabilization::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Stabilization& Stabilization::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Stabilization_stabilizedata_2eproto.base); - return *internal_default_instance(); -} - - -void Stabilization::Clear() { -// @@protoc_insertion_point(message_clear_start:libopenshotstabilize.Stabilization) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - frame_.Clear(); - if (GetArena() == nullptr && last_updated_ != nullptr) { - delete last_updated_; - } - last_updated_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Stabilization::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // repeated .libopenshotstabilize.Frame frame = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_frame(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else goto handle_unusual; - continue; - // .google.protobuf.Timestamp last_updated = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_last_updated(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Stabilization::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:libopenshotstabilize.Stabilization) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .libopenshotstabilize.Frame frame = 1; - for (unsigned int i = 0, - n = static_cast(this->_internal_frame_size()); i < n; i++) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, this->_internal_frame(i), target, stream); - } - - // .google.protobuf.Timestamp last_updated = 2; - if (this->has_last_updated()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 2, _Internal::last_updated(this), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:libopenshotstabilize.Stabilization) - return target; -} - -size_t Stabilization::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:libopenshotstabilize.Stabilization) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .libopenshotstabilize.Frame frame = 1; - total_size += 1UL * this->_internal_frame_size(); - for (const auto& msg : this->frame_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // .google.protobuf.Timestamp last_updated = 2; - if (this->has_last_updated()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *last_updated_); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Stabilization::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:libopenshotstabilize.Stabilization) - GOOGLE_DCHECK_NE(&from, this); - const Stabilization* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:libopenshotstabilize.Stabilization) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:libopenshotstabilize.Stabilization) - MergeFrom(*source); - } -} - -void Stabilization::MergeFrom(const Stabilization& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:libopenshotstabilize.Stabilization) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - frame_.MergeFrom(from.frame_); - if (from.has_last_updated()) { - _internal_mutable_last_updated()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_last_updated()); - } -} - -void Stabilization::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:libopenshotstabilize.Stabilization) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Stabilization::CopyFrom(const Stabilization& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:libopenshotstabilize.Stabilization) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Stabilization::IsInitialized() const { - return true; -} - -void Stabilization::InternalSwap(Stabilization* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - frame_.InternalSwap(&other->frame_); - swap(last_updated_, other->last_updated_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Stabilization::GetMetadata() const { - return GetMetadataStatic(); -} - - -// @@protoc_insertion_point(namespace_scope) -} // namespace libopenshotstabilize -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::libopenshotstabilize::Frame* Arena::CreateMaybeMessage< ::libopenshotstabilize::Frame >(Arena* arena) { - return Arena::CreateMessageInternal< ::libopenshotstabilize::Frame >(arena); -} -template<> PROTOBUF_NOINLINE ::libopenshotstabilize::Stabilization* Arena::CreateMaybeMessage< ::libopenshotstabilize::Stabilization >(Arena* arena) { - return Arena::CreateMessageInternal< ::libopenshotstabilize::Stabilization >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/src/stabilizedata.pb.h b/src/stabilizedata.pb.h deleted file mode 100644 index 208a4f8f..00000000 --- a/src/stabilizedata.pb.h +++ /dev/null @@ -1,723 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: stabilizedata.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_stabilizedata_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_stabilizedata_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3012000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3012003 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_stabilizedata_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_stabilizedata_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_stabilizedata_2eproto; -namespace libopenshotstabilize { -class Frame; -class FrameDefaultTypeInternal; -extern FrameDefaultTypeInternal _Frame_default_instance_; -class Stabilization; -class StabilizationDefaultTypeInternal; -extern StabilizationDefaultTypeInternal _Stabilization_default_instance_; -} // namespace libopenshotstabilize -PROTOBUF_NAMESPACE_OPEN -template<> ::libopenshotstabilize::Frame* Arena::CreateMaybeMessage<::libopenshotstabilize::Frame>(Arena*); -template<> ::libopenshotstabilize::Stabilization* Arena::CreateMaybeMessage<::libopenshotstabilize::Stabilization>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace libopenshotstabilize { - -// =================================================================== - -class Frame PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:libopenshotstabilize.Frame) */ { - public: - inline Frame() : Frame(nullptr) {}; - virtual ~Frame(); - - Frame(const Frame& from); - Frame(Frame&& from) noexcept - : Frame() { - *this = ::std::move(from); - } - - inline Frame& operator=(const Frame& from) { - CopyFrom(from); - return *this; - } - inline Frame& operator=(Frame&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Frame& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Frame* internal_default_instance() { - return reinterpret_cast( - &_Frame_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(Frame& a, Frame& b) { - a.Swap(&b); - } - inline void Swap(Frame* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Frame* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Frame* New() const final { - return CreateMaybeMessage(nullptr); - } - - Frame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Frame& from); - void MergeFrom(const Frame& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Frame* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "libopenshotstabilize.Frame"; - } - protected: - explicit Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_stabilizedata_2eproto); - return ::descriptor_table_stabilizedata_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kIdFieldNumber = 1, - kDxFieldNumber = 2, - kDyFieldNumber = 3, - kDaFieldNumber = 4, - kXFieldNumber = 5, - kYFieldNumber = 6, - kAFieldNumber = 7, - }; - // int32 id = 1; - void clear_id(); - ::PROTOBUF_NAMESPACE_ID::int32 id() const; - void set_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_id() const; - void _internal_set_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float dx = 2; - void clear_dx(); - float dx() const; - void set_dx(float value); - private: - float _internal_dx() const; - void _internal_set_dx(float value); - public: - - // float dy = 3; - void clear_dy(); - float dy() const; - void set_dy(float value); - private: - float _internal_dy() const; - void _internal_set_dy(float value); - public: - - // float da = 4; - void clear_da(); - float da() const; - void set_da(float value); - private: - float _internal_da() const; - void _internal_set_da(float value); - public: - - // float x = 5; - void clear_x(); - float x() const; - void set_x(float value); - private: - float _internal_x() const; - void _internal_set_x(float value); - public: - - // float y = 6; - void clear_y(); - float y() const; - void set_y(float value); - private: - float _internal_y() const; - void _internal_set_y(float value); - public: - - // float a = 7; - void clear_a(); - float a() const; - void set_a(float value); - private: - float _internal_a() const; - void _internal_set_a(float value); - public: - - // @@protoc_insertion_point(class_scope:libopenshotstabilize.Frame) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::int32 id_; - float dx_; - float dy_; - float da_; - float x_; - float y_; - float a_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_stabilizedata_2eproto; -}; -// ------------------------------------------------------------------- - -class Stabilization PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:libopenshotstabilize.Stabilization) */ { - public: - inline Stabilization() : Stabilization(nullptr) {}; - virtual ~Stabilization(); - - Stabilization(const Stabilization& from); - Stabilization(Stabilization&& from) noexcept - : Stabilization() { - *this = ::std::move(from); - } - - inline Stabilization& operator=(const Stabilization& from) { - CopyFrom(from); - return *this; - } - inline Stabilization& operator=(Stabilization&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Stabilization& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Stabilization* internal_default_instance() { - return reinterpret_cast( - &_Stabilization_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(Stabilization& a, Stabilization& b) { - a.Swap(&b); - } - inline void Swap(Stabilization* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Stabilization* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Stabilization* New() const final { - return CreateMaybeMessage(nullptr); - } - - Stabilization* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Stabilization& from); - void MergeFrom(const Stabilization& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Stabilization* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "libopenshotstabilize.Stabilization"; - } - protected: - explicit Stabilization(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_stabilizedata_2eproto); - return ::descriptor_table_stabilizedata_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kFrameFieldNumber = 1, - kLastUpdatedFieldNumber = 2, - }; - // repeated .libopenshotstabilize.Frame frame = 1; - int frame_size() const; - private: - int _internal_frame_size() const; - public: - void clear_frame(); - ::libopenshotstabilize::Frame* mutable_frame(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotstabilize::Frame >* - mutable_frame(); - private: - const ::libopenshotstabilize::Frame& _internal_frame(int index) const; - ::libopenshotstabilize::Frame* _internal_add_frame(); - public: - const ::libopenshotstabilize::Frame& frame(int index) const; - ::libopenshotstabilize::Frame* add_frame(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotstabilize::Frame >& - frame() const; - - // .google.protobuf.Timestamp last_updated = 2; - bool has_last_updated() const; - private: - bool _internal_has_last_updated() const; - public: - void clear_last_updated(); - const PROTOBUF_NAMESPACE_ID::Timestamp& last_updated() const; - PROTOBUF_NAMESPACE_ID::Timestamp* release_last_updated(); - PROTOBUF_NAMESPACE_ID::Timestamp* mutable_last_updated(); - void set_allocated_last_updated(PROTOBUF_NAMESPACE_ID::Timestamp* last_updated); - private: - const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_last_updated() const; - PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_last_updated(); - public: - void unsafe_arena_set_allocated_last_updated( - PROTOBUF_NAMESPACE_ID::Timestamp* last_updated); - PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_last_updated(); - - // @@protoc_insertion_point(class_scope:libopenshotstabilize.Stabilization) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotstabilize::Frame > frame_; - PROTOBUF_NAMESPACE_ID::Timestamp* last_updated_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_stabilizedata_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// Frame - -// int32 id = 1; -inline void Frame::clear_id() { - id_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Frame::_internal_id() const { - return id_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Frame::id() const { - // @@protoc_insertion_point(field_get:libopenshotstabilize.Frame.id) - return _internal_id(); -} -inline void Frame::_internal_set_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - - id_ = value; -} -inline void Frame::set_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_id(value); - // @@protoc_insertion_point(field_set:libopenshotstabilize.Frame.id) -} - -// float dx = 2; -inline void Frame::clear_dx() { - dx_ = 0; -} -inline float Frame::_internal_dx() const { - return dx_; -} -inline float Frame::dx() const { - // @@protoc_insertion_point(field_get:libopenshotstabilize.Frame.dx) - return _internal_dx(); -} -inline void Frame::_internal_set_dx(float value) { - - dx_ = value; -} -inline void Frame::set_dx(float value) { - _internal_set_dx(value); - // @@protoc_insertion_point(field_set:libopenshotstabilize.Frame.dx) -} - -// float dy = 3; -inline void Frame::clear_dy() { - dy_ = 0; -} -inline float Frame::_internal_dy() const { - return dy_; -} -inline float Frame::dy() const { - // @@protoc_insertion_point(field_get:libopenshotstabilize.Frame.dy) - return _internal_dy(); -} -inline void Frame::_internal_set_dy(float value) { - - dy_ = value; -} -inline void Frame::set_dy(float value) { - _internal_set_dy(value); - // @@protoc_insertion_point(field_set:libopenshotstabilize.Frame.dy) -} - -// float da = 4; -inline void Frame::clear_da() { - da_ = 0; -} -inline float Frame::_internal_da() const { - return da_; -} -inline float Frame::da() const { - // @@protoc_insertion_point(field_get:libopenshotstabilize.Frame.da) - return _internal_da(); -} -inline void Frame::_internal_set_da(float value) { - - da_ = value; -} -inline void Frame::set_da(float value) { - _internal_set_da(value); - // @@protoc_insertion_point(field_set:libopenshotstabilize.Frame.da) -} - -// float x = 5; -inline void Frame::clear_x() { - x_ = 0; -} -inline float Frame::_internal_x() const { - return x_; -} -inline float Frame::x() const { - // @@protoc_insertion_point(field_get:libopenshotstabilize.Frame.x) - return _internal_x(); -} -inline void Frame::_internal_set_x(float value) { - - x_ = value; -} -inline void Frame::set_x(float value) { - _internal_set_x(value); - // @@protoc_insertion_point(field_set:libopenshotstabilize.Frame.x) -} - -// float y = 6; -inline void Frame::clear_y() { - y_ = 0; -} -inline float Frame::_internal_y() const { - return y_; -} -inline float Frame::y() const { - // @@protoc_insertion_point(field_get:libopenshotstabilize.Frame.y) - return _internal_y(); -} -inline void Frame::_internal_set_y(float value) { - - y_ = value; -} -inline void Frame::set_y(float value) { - _internal_set_y(value); - // @@protoc_insertion_point(field_set:libopenshotstabilize.Frame.y) -} - -// float a = 7; -inline void Frame::clear_a() { - a_ = 0; -} -inline float Frame::_internal_a() const { - return a_; -} -inline float Frame::a() const { - // @@protoc_insertion_point(field_get:libopenshotstabilize.Frame.a) - return _internal_a(); -} -inline void Frame::_internal_set_a(float value) { - - a_ = value; -} -inline void Frame::set_a(float value) { - _internal_set_a(value); - // @@protoc_insertion_point(field_set:libopenshotstabilize.Frame.a) -} - -// ------------------------------------------------------------------- - -// Stabilization - -// repeated .libopenshotstabilize.Frame frame = 1; -inline int Stabilization::_internal_frame_size() const { - return frame_.size(); -} -inline int Stabilization::frame_size() const { - return _internal_frame_size(); -} -inline void Stabilization::clear_frame() { - frame_.Clear(); -} -inline ::libopenshotstabilize::Frame* Stabilization::mutable_frame(int index) { - // @@protoc_insertion_point(field_mutable:libopenshotstabilize.Stabilization.frame) - return frame_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotstabilize::Frame >* -Stabilization::mutable_frame() { - // @@protoc_insertion_point(field_mutable_list:libopenshotstabilize.Stabilization.frame) - return &frame_; -} -inline const ::libopenshotstabilize::Frame& Stabilization::_internal_frame(int index) const { - return frame_.Get(index); -} -inline const ::libopenshotstabilize::Frame& Stabilization::frame(int index) const { - // @@protoc_insertion_point(field_get:libopenshotstabilize.Stabilization.frame) - return _internal_frame(index); -} -inline ::libopenshotstabilize::Frame* Stabilization::_internal_add_frame() { - return frame_.Add(); -} -inline ::libopenshotstabilize::Frame* Stabilization::add_frame() { - // @@protoc_insertion_point(field_add:libopenshotstabilize.Stabilization.frame) - return _internal_add_frame(); -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshotstabilize::Frame >& -Stabilization::frame() const { - // @@protoc_insertion_point(field_list:libopenshotstabilize.Stabilization.frame) - return frame_; -} - -// .google.protobuf.Timestamp last_updated = 2; -inline bool Stabilization::_internal_has_last_updated() const { - return this != internal_default_instance() && last_updated_ != nullptr; -} -inline bool Stabilization::has_last_updated() const { - return _internal_has_last_updated(); -} -inline const PROTOBUF_NAMESPACE_ID::Timestamp& Stabilization::_internal_last_updated() const { - const PROTOBUF_NAMESPACE_ID::Timestamp* p = last_updated_; - return p != nullptr ? *p : *reinterpret_cast( - &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const PROTOBUF_NAMESPACE_ID::Timestamp& Stabilization::last_updated() const { - // @@protoc_insertion_point(field_get:libopenshotstabilize.Stabilization.last_updated) - return _internal_last_updated(); -} -inline void Stabilization::unsafe_arena_set_allocated_last_updated( - PROTOBUF_NAMESPACE_ID::Timestamp* last_updated) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(last_updated_); - } - last_updated_ = last_updated; - if (last_updated) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:libopenshotstabilize.Stabilization.last_updated) -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* Stabilization::release_last_updated() { - auto temp = unsafe_arena_release_last_updated(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* Stabilization::unsafe_arena_release_last_updated() { - // @@protoc_insertion_point(field_release:libopenshotstabilize.Stabilization.last_updated) - - PROTOBUF_NAMESPACE_ID::Timestamp* temp = last_updated_; - last_updated_ = nullptr; - return temp; -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* Stabilization::_internal_mutable_last_updated() { - - if (last_updated_ == nullptr) { - auto* p = CreateMaybeMessage(GetArena()); - last_updated_ = p; - } - return last_updated_; -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* Stabilization::mutable_last_updated() { - // @@protoc_insertion_point(field_mutable:libopenshotstabilize.Stabilization.last_updated) - return _internal_mutable_last_updated(); -} -inline void Stabilization::set_allocated_last_updated(PROTOBUF_NAMESPACE_ID::Timestamp* last_updated) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(last_updated_); - } - if (last_updated) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(last_updated)->GetArena(); - if (message_arena != submessage_arena) { - last_updated = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, last_updated, submessage_arena); - } - - } else { - - } - last_updated_ = last_updated; - // @@protoc_insertion_point(field_set_allocated:libopenshotstabilize.Stabilization.last_updated) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace libopenshotstabilize - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_stabilizedata_2eproto diff --git a/src/trackerdata.pb.cc b/src/trackerdata.pb.cc deleted file mode 100644 index 8536f459..00000000 --- a/src/trackerdata.pb.cc +++ /dev/null @@ -1,961 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: trackerdata.proto - -#include "trackerdata.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_trackerdata_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Frame_trackerdata_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_trackerdata_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Frame_Box_trackerdata_2eproto; -namespace libopenshottracker { -class Frame_BoxDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Frame_Box_default_instance_; -class FrameDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Frame_default_instance_; -class TrackerDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _Tracker_default_instance_; -} // namespace libopenshottracker -static void InitDefaultsscc_info_Frame_trackerdata_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::libopenshottracker::_Frame_default_instance_; - new (ptr) ::libopenshottracker::Frame(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::libopenshottracker::Frame::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Frame_trackerdata_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Frame_trackerdata_2eproto}, { - &scc_info_Frame_Box_trackerdata_2eproto.base,}}; - -static void InitDefaultsscc_info_Frame_Box_trackerdata_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::libopenshottracker::_Frame_Box_default_instance_; - new (ptr) ::libopenshottracker::Frame_Box(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::libopenshottracker::Frame_Box::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Frame_Box_trackerdata_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Frame_Box_trackerdata_2eproto}, {}}; - -static void InitDefaultsscc_info_Tracker_trackerdata_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void* ptr = &::libopenshottracker::_Tracker_default_instance_; - new (ptr) ::libopenshottracker::Tracker(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::libopenshottracker::Tracker::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Tracker_trackerdata_2eproto = - {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_Tracker_trackerdata_2eproto}, { - &scc_info_Frame_trackerdata_2eproto.base, - &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}}; - -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_trackerdata_2eproto[3]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_trackerdata_2eproto = nullptr; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_trackerdata_2eproto = nullptr; - -const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_trackerdata_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Frame_Box, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Frame_Box, x1_), - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Frame_Box, y1_), - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Frame_Box, x2_), - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Frame_Box, y2_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Frame, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Frame, id_), - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Frame, rotation_), - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Frame, bounding_box_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Tracker, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Tracker, frame_), - PROTOBUF_FIELD_OFFSET(::libopenshottracker::Tracker, last_updated_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::libopenshottracker::Frame_Box)}, - { 9, -1, sizeof(::libopenshottracker::Frame)}, - { 17, -1, sizeof(::libopenshottracker::Tracker)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { - reinterpret_cast(&::libopenshottracker::_Frame_Box_default_instance_), - reinterpret_cast(&::libopenshottracker::_Frame_default_instance_), - reinterpret_cast(&::libopenshottracker::_Tracker_default_instance_), -}; - -const char descriptor_table_protodef_trackerdata_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\021trackerdata.proto\022\022libopenshottracker\032" - "\037google/protobuf/timestamp.proto\"\221\001\n\005Fra" - "me\022\n\n\002id\030\001 \001(\005\022\020\n\010rotation\030\002 \001(\002\0223\n\014boun" - "ding_box\030\003 \001(\0132\035.libopenshottracker.Fram" - "e.Box\0325\n\003Box\022\n\n\002x1\030\001 \001(\002\022\n\n\002y1\030\002 \001(\002\022\n\n\002" - "x2\030\003 \001(\002\022\n\n\002y2\030\004 \001(\002\"e\n\007Tracker\022(\n\005frame" - "\030\001 \003(\0132\031.libopenshottracker.Frame\0220\n\014las" - "t_updated\030\002 \001(\0132\032.google.protobuf.Timest" - "ampb\006proto3" - ; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_trackerdata_2eproto_deps[1] = { - &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_trackerdata_2eproto_sccs[3] = { - &scc_info_Frame_trackerdata_2eproto.base, - &scc_info_Frame_Box_trackerdata_2eproto.base, - &scc_info_Tracker_trackerdata_2eproto.base, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_trackerdata_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_trackerdata_2eproto = { - false, false, descriptor_table_protodef_trackerdata_2eproto, "trackerdata.proto", 331, - &descriptor_table_trackerdata_2eproto_once, descriptor_table_trackerdata_2eproto_sccs, descriptor_table_trackerdata_2eproto_deps, 3, 1, - schemas, file_default_instances, TableStruct_trackerdata_2eproto::offsets, - file_level_metadata_trackerdata_2eproto, 3, file_level_enum_descriptors_trackerdata_2eproto, file_level_service_descriptors_trackerdata_2eproto, -}; - -// Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_trackerdata_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_trackerdata_2eproto)), true); -namespace libopenshottracker { - -// =================================================================== - -void Frame_Box::InitAsDefaultInstance() { -} -class Frame_Box::_Internal { - public: -}; - -Frame_Box::Frame_Box(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:libopenshottracker.Frame.Box) -} -Frame_Box::Frame_Box(const Frame_Box& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::memcpy(&x1_, &from.x1_, - static_cast(reinterpret_cast(&y2_) - - reinterpret_cast(&x1_)) + sizeof(y2_)); - // @@protoc_insertion_point(copy_constructor:libopenshottracker.Frame.Box) -} - -void Frame_Box::SharedCtor() { - ::memset(&x1_, 0, static_cast( - reinterpret_cast(&y2_) - - reinterpret_cast(&x1_)) + sizeof(y2_)); -} - -Frame_Box::~Frame_Box() { - // @@protoc_insertion_point(destructor:libopenshottracker.Frame.Box) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Frame_Box::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); -} - -void Frame_Box::ArenaDtor(void* object) { - Frame_Box* _this = reinterpret_cast< Frame_Box* >(object); - (void)_this; -} -void Frame_Box::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Frame_Box::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Frame_Box& Frame_Box::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Frame_Box_trackerdata_2eproto.base); - return *internal_default_instance(); -} - - -void Frame_Box::Clear() { -// @@protoc_insertion_point(message_clear_start:libopenshottracker.Frame.Box) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&x1_, 0, static_cast( - reinterpret_cast(&y2_) - - reinterpret_cast(&x1_)) + sizeof(y2_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Frame_Box::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // float x1 = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { - x1_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float y1 = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - y1_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float x2 = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29)) { - x2_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // float y2 = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 37)) { - y2_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Frame_Box::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:libopenshottracker.Frame.Box) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // float x1 = 1; - if (!(this->x1() <= 0 && this->x1() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x1(), target); - } - - // float y1 = 2; - if (!(this->y1() <= 0 && this->y1() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y1(), target); - } - - // float x2 = 3; - if (!(this->x2() <= 0 && this->x2() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_x2(), target); - } - - // float y2 = 4; - if (!(this->y2() <= 0 && this->y2() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_y2(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:libopenshottracker.Frame.Box) - return target; -} - -size_t Frame_Box::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:libopenshottracker.Frame.Box) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // float x1 = 1; - if (!(this->x1() <= 0 && this->x1() >= 0)) { - total_size += 1 + 4; - } - - // float y1 = 2; - if (!(this->y1() <= 0 && this->y1() >= 0)) { - total_size += 1 + 4; - } - - // float x2 = 3; - if (!(this->x2() <= 0 && this->x2() >= 0)) { - total_size += 1 + 4; - } - - // float y2 = 4; - if (!(this->y2() <= 0 && this->y2() >= 0)) { - total_size += 1 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Frame_Box::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:libopenshottracker.Frame.Box) - GOOGLE_DCHECK_NE(&from, this); - const Frame_Box* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:libopenshottracker.Frame.Box) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:libopenshottracker.Frame.Box) - MergeFrom(*source); - } -} - -void Frame_Box::MergeFrom(const Frame_Box& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:libopenshottracker.Frame.Box) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (!(from.x1() <= 0 && from.x1() >= 0)) { - _internal_set_x1(from._internal_x1()); - } - if (!(from.y1() <= 0 && from.y1() >= 0)) { - _internal_set_y1(from._internal_y1()); - } - if (!(from.x2() <= 0 && from.x2() >= 0)) { - _internal_set_x2(from._internal_x2()); - } - if (!(from.y2() <= 0 && from.y2() >= 0)) { - _internal_set_y2(from._internal_y2()); - } -} - -void Frame_Box::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:libopenshottracker.Frame.Box) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Frame_Box::CopyFrom(const Frame_Box& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:libopenshottracker.Frame.Box) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Frame_Box::IsInitialized() const { - return true; -} - -void Frame_Box::InternalSwap(Frame_Box* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Frame_Box, y2_) - + sizeof(Frame_Box::y2_) - - PROTOBUF_FIELD_OFFSET(Frame_Box, x1_)>( - reinterpret_cast(&x1_), - reinterpret_cast(&other->x1_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Frame_Box::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Frame::InitAsDefaultInstance() { - ::libopenshottracker::_Frame_default_instance_._instance.get_mutable()->bounding_box_ = const_cast< ::libopenshottracker::Frame_Box*>( - ::libopenshottracker::Frame_Box::internal_default_instance()); -} -class Frame::_Internal { - public: - static const ::libopenshottracker::Frame_Box& bounding_box(const Frame* msg); -}; - -const ::libopenshottracker::Frame_Box& -Frame::_Internal::bounding_box(const Frame* msg) { - return *msg->bounding_box_; -} -Frame::Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:libopenshottracker.Frame) -} -Frame::Frame(const Frame& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_bounding_box()) { - bounding_box_ = new ::libopenshottracker::Frame_Box(*from.bounding_box_); - } else { - bounding_box_ = nullptr; - } - ::memcpy(&id_, &from.id_, - static_cast(reinterpret_cast(&rotation_) - - reinterpret_cast(&id_)) + sizeof(rotation_)); - // @@protoc_insertion_point(copy_constructor:libopenshottracker.Frame) -} - -void Frame::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Frame_trackerdata_2eproto.base); - ::memset(&bounding_box_, 0, static_cast( - reinterpret_cast(&rotation_) - - reinterpret_cast(&bounding_box_)) + sizeof(rotation_)); -} - -Frame::~Frame() { - // @@protoc_insertion_point(destructor:libopenshottracker.Frame) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Frame::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - if (this != internal_default_instance()) delete bounding_box_; -} - -void Frame::ArenaDtor(void* object) { - Frame* _this = reinterpret_cast< Frame* >(object); - (void)_this; -} -void Frame::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Frame::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Frame& Frame::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Frame_trackerdata_2eproto.base); - return *internal_default_instance(); -} - - -void Frame::Clear() { -// @@protoc_insertion_point(message_clear_start:libopenshottracker.Frame) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - if (GetArena() == nullptr && bounding_box_ != nullptr) { - delete bounding_box_; - } - bounding_box_ = nullptr; - ::memset(&id_, 0, static_cast( - reinterpret_cast(&rotation_) - - reinterpret_cast(&id_)) + sizeof(rotation_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Frame::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // int32 id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - // float rotation = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { - rotation_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); - ptr += sizeof(float); - } else goto handle_unusual; - continue; - // .libopenshottracker.Frame.Box bounding_box = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { - ptr = ctx->ParseMessage(_internal_mutable_bounding_box(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Frame::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:libopenshottracker.Frame) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // int32 id = 1; - if (this->id() != 0) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target); - } - - // float rotation = 2; - if (!(this->rotation() <= 0 && this->rotation() >= 0)) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_rotation(), target); - } - - // .libopenshottracker.Frame.Box bounding_box = 3; - if (this->has_bounding_box()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 3, _Internal::bounding_box(this), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:libopenshottracker.Frame) - return target; -} - -size_t Frame::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:libopenshottracker.Frame) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // .libopenshottracker.Frame.Box bounding_box = 3; - if (this->has_bounding_box()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *bounding_box_); - } - - // int32 id = 1; - if (this->id() != 0) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( - this->_internal_id()); - } - - // float rotation = 2; - if (!(this->rotation() <= 0 && this->rotation() >= 0)) { - total_size += 1 + 4; - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Frame::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:libopenshottracker.Frame) - GOOGLE_DCHECK_NE(&from, this); - const Frame* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:libopenshottracker.Frame) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:libopenshottracker.Frame) - MergeFrom(*source); - } -} - -void Frame::MergeFrom(const Frame& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:libopenshottracker.Frame) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (from.has_bounding_box()) { - _internal_mutable_bounding_box()->::libopenshottracker::Frame_Box::MergeFrom(from._internal_bounding_box()); - } - if (from.id() != 0) { - _internal_set_id(from._internal_id()); - } - if (!(from.rotation() <= 0 && from.rotation() >= 0)) { - _internal_set_rotation(from._internal_rotation()); - } -} - -void Frame::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:libopenshottracker.Frame) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Frame::CopyFrom(const Frame& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:libopenshottracker.Frame) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Frame::IsInitialized() const { - return true; -} - -void Frame::InternalSwap(Frame* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(Frame, rotation_) - + sizeof(Frame::rotation_) - - PROTOBUF_FIELD_OFFSET(Frame, bounding_box_)>( - reinterpret_cast(&bounding_box_), - reinterpret_cast(&other->bounding_box_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Frame::GetMetadata() const { - return GetMetadataStatic(); -} - - -// =================================================================== - -void Tracker::InitAsDefaultInstance() { - ::libopenshottracker::_Tracker_default_instance_._instance.get_mutable()->last_updated_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>( - PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance()); -} -class Tracker::_Internal { - public: - static const PROTOBUF_NAMESPACE_ID::Timestamp& last_updated(const Tracker* msg); -}; - -const PROTOBUF_NAMESPACE_ID::Timestamp& -Tracker::_Internal::last_updated(const Tracker* msg) { - return *msg->last_updated_; -} -void Tracker::clear_last_updated() { - if (GetArena() == nullptr && last_updated_ != nullptr) { - delete last_updated_; - } - last_updated_ = nullptr; -} -Tracker::Tracker(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : ::PROTOBUF_NAMESPACE_ID::Message(arena), - frame_(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:libopenshottracker.Tracker) -} -Tracker::Tracker(const Tracker& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - frame_(from.frame_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_last_updated()) { - last_updated_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.last_updated_); - } else { - last_updated_ = nullptr; - } - // @@protoc_insertion_point(copy_constructor:libopenshottracker.Tracker) -} - -void Tracker::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Tracker_trackerdata_2eproto.base); - last_updated_ = nullptr; -} - -Tracker::~Tracker() { - // @@protoc_insertion_point(destructor:libopenshottracker.Tracker) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void Tracker::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - if (this != internal_default_instance()) delete last_updated_; -} - -void Tracker::ArenaDtor(void* object) { - Tracker* _this = reinterpret_cast< Tracker* >(object); - (void)_this; -} -void Tracker::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { -} -void Tracker::SetCachedSize(int size) const { - _cached_size_.Set(size); -} -const Tracker& Tracker::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Tracker_trackerdata_2eproto.base); - return *internal_default_instance(); -} - - -void Tracker::Clear() { -// @@protoc_insertion_point(message_clear_start:libopenshottracker.Tracker) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - frame_.Clear(); - if (GetArena() == nullptr && last_updated_ != nullptr) { - delete last_updated_; - } - last_updated_ = nullptr; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* Tracker::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { -#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // repeated .libopenshottracker.Frame frame = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(_internal_add_frame(), ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); - } else goto handle_unusual; - continue; - // .google.protobuf.Timestamp last_updated = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - ptr = ctx->ParseMessage(_internal_mutable_last_updated(), ptr); - CHK_(ptr); - } else goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse(tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8* Tracker::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:libopenshottracker.Tracker) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .libopenshottracker.Frame frame = 1; - for (unsigned int i = 0, - n = static_cast(this->_internal_frame_size()); i < n; i++) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, this->_internal_frame(i), target, stream); - } - - // .google.protobuf.Timestamp last_updated = 2; - if (this->has_last_updated()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 2, _Internal::last_updated(this), target, stream); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:libopenshottracker.Tracker) - return target; -} - -size_t Tracker::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:libopenshottracker.Tracker) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // repeated .libopenshottracker.Frame frame = 1; - total_size += 1UL * this->_internal_frame_size(); - for (const auto& msg : this->frame_) { - total_size += - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); - } - - // .google.protobuf.Timestamp last_updated = 2; - if (this->has_last_updated()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *last_updated_); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( - _internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void Tracker::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:libopenshottracker.Tracker) - GOOGLE_DCHECK_NE(&from, this); - const Tracker* source = - ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( - &from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:libopenshottracker.Tracker) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:libopenshottracker.Tracker) - MergeFrom(*source); - } -} - -void Tracker::MergeFrom(const Tracker& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:libopenshottracker.Tracker) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - frame_.MergeFrom(from.frame_); - if (from.has_last_updated()) { - _internal_mutable_last_updated()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_last_updated()); - } -} - -void Tracker::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:libopenshottracker.Tracker) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void Tracker::CopyFrom(const Tracker& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:libopenshottracker.Tracker) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Tracker::IsInitialized() const { - return true; -} - -void Tracker::InternalSwap(Tracker* other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - frame_.InternalSwap(&other->frame_); - swap(last_updated_, other->last_updated_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata Tracker::GetMetadata() const { - return GetMetadataStatic(); -} - - -// @@protoc_insertion_point(namespace_scope) -} // namespace libopenshottracker -PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::libopenshottracker::Frame_Box* Arena::CreateMaybeMessage< ::libopenshottracker::Frame_Box >(Arena* arena) { - return Arena::CreateMessageInternal< ::libopenshottracker::Frame_Box >(arena); -} -template<> PROTOBUF_NOINLINE ::libopenshottracker::Frame* Arena::CreateMaybeMessage< ::libopenshottracker::Frame >(Arena* arena) { - return Arena::CreateMessageInternal< ::libopenshottracker::Frame >(arena); -} -template<> PROTOBUF_NOINLINE ::libopenshottracker::Tracker* Arena::CreateMaybeMessage< ::libopenshottracker::Tracker >(Arena* arena) { - return Arena::CreateMessageInternal< ::libopenshottracker::Tracker >(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/src/trackerdata.pb.h b/src/trackerdata.pb.h deleted file mode 100644 index d30c6ef1..00000000 --- a/src/trackerdata.pb.h +++ /dev/null @@ -1,931 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: trackerdata.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_trackerdata_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_trackerdata_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3012000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3012003 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include // IWYU pragma: export -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_trackerdata_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_trackerdata_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3] - PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_trackerdata_2eproto; -namespace libopenshottracker { -class Frame; -class FrameDefaultTypeInternal; -extern FrameDefaultTypeInternal _Frame_default_instance_; -class Frame_Box; -class Frame_BoxDefaultTypeInternal; -extern Frame_BoxDefaultTypeInternal _Frame_Box_default_instance_; -class Tracker; -class TrackerDefaultTypeInternal; -extern TrackerDefaultTypeInternal _Tracker_default_instance_; -} // namespace libopenshottracker -PROTOBUF_NAMESPACE_OPEN -template<> ::libopenshottracker::Frame* Arena::CreateMaybeMessage<::libopenshottracker::Frame>(Arena*); -template<> ::libopenshottracker::Frame_Box* Arena::CreateMaybeMessage<::libopenshottracker::Frame_Box>(Arena*); -template<> ::libopenshottracker::Tracker* Arena::CreateMaybeMessage<::libopenshottracker::Tracker>(Arena*); -PROTOBUF_NAMESPACE_CLOSE -namespace libopenshottracker { - -// =================================================================== - -class Frame_Box PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:libopenshottracker.Frame.Box) */ { - public: - inline Frame_Box() : Frame_Box(nullptr) {}; - virtual ~Frame_Box(); - - Frame_Box(const Frame_Box& from); - Frame_Box(Frame_Box&& from) noexcept - : Frame_Box() { - *this = ::std::move(from); - } - - inline Frame_Box& operator=(const Frame_Box& from) { - CopyFrom(from); - return *this; - } - inline Frame_Box& operator=(Frame_Box&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Frame_Box& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Frame_Box* internal_default_instance() { - return reinterpret_cast( - &_Frame_Box_default_instance_); - } - static constexpr int kIndexInFileMessages = - 0; - - friend void swap(Frame_Box& a, Frame_Box& b) { - a.Swap(&b); - } - inline void Swap(Frame_Box* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Frame_Box* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Frame_Box* New() const final { - return CreateMaybeMessage(nullptr); - } - - Frame_Box* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Frame_Box& from); - void MergeFrom(const Frame_Box& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Frame_Box* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "libopenshottracker.Frame.Box"; - } - protected: - explicit Frame_Box(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_trackerdata_2eproto); - return ::descriptor_table_trackerdata_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kX1FieldNumber = 1, - kY1FieldNumber = 2, - kX2FieldNumber = 3, - kY2FieldNumber = 4, - }; - // float x1 = 1; - void clear_x1(); - float x1() const; - void set_x1(float value); - private: - float _internal_x1() const; - void _internal_set_x1(float value); - public: - - // float y1 = 2; - void clear_y1(); - float y1() const; - void set_y1(float value); - private: - float _internal_y1() const; - void _internal_set_y1(float value); - public: - - // float x2 = 3; - void clear_x2(); - float x2() const; - void set_x2(float value); - private: - float _internal_x2() const; - void _internal_set_x2(float value); - public: - - // float y2 = 4; - void clear_y2(); - float y2() const; - void set_y2(float value); - private: - float _internal_y2() const; - void _internal_set_y2(float value); - public: - - // @@protoc_insertion_point(class_scope:libopenshottracker.Frame.Box) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - float x1_; - float y1_; - float x2_; - float y2_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_trackerdata_2eproto; -}; -// ------------------------------------------------------------------- - -class Frame PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:libopenshottracker.Frame) */ { - public: - inline Frame() : Frame(nullptr) {}; - virtual ~Frame(); - - Frame(const Frame& from); - Frame(Frame&& from) noexcept - : Frame() { - *this = ::std::move(from); - } - - inline Frame& operator=(const Frame& from) { - CopyFrom(from); - return *this; - } - inline Frame& operator=(Frame&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Frame& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Frame* internal_default_instance() { - return reinterpret_cast( - &_Frame_default_instance_); - } - static constexpr int kIndexInFileMessages = - 1; - - friend void swap(Frame& a, Frame& b) { - a.Swap(&b); - } - inline void Swap(Frame* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Frame* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Frame* New() const final { - return CreateMaybeMessage(nullptr); - } - - Frame* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Frame& from); - void MergeFrom(const Frame& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Frame* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "libopenshottracker.Frame"; - } - protected: - explicit Frame(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_trackerdata_2eproto); - return ::descriptor_table_trackerdata_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - typedef Frame_Box Box; - - // accessors ------------------------------------------------------- - - enum : int { - kBoundingBoxFieldNumber = 3, - kIdFieldNumber = 1, - kRotationFieldNumber = 2, - }; - // .libopenshottracker.Frame.Box bounding_box = 3; - bool has_bounding_box() const; - private: - bool _internal_has_bounding_box() const; - public: - void clear_bounding_box(); - const ::libopenshottracker::Frame_Box& bounding_box() const; - ::libopenshottracker::Frame_Box* release_bounding_box(); - ::libopenshottracker::Frame_Box* mutable_bounding_box(); - void set_allocated_bounding_box(::libopenshottracker::Frame_Box* bounding_box); - private: - const ::libopenshottracker::Frame_Box& _internal_bounding_box() const; - ::libopenshottracker::Frame_Box* _internal_mutable_bounding_box(); - public: - void unsafe_arena_set_allocated_bounding_box( - ::libopenshottracker::Frame_Box* bounding_box); - ::libopenshottracker::Frame_Box* unsafe_arena_release_bounding_box(); - - // int32 id = 1; - void clear_id(); - ::PROTOBUF_NAMESPACE_ID::int32 id() const; - void set_id(::PROTOBUF_NAMESPACE_ID::int32 value); - private: - ::PROTOBUF_NAMESPACE_ID::int32 _internal_id() const; - void _internal_set_id(::PROTOBUF_NAMESPACE_ID::int32 value); - public: - - // float rotation = 2; - void clear_rotation(); - float rotation() const; - void set_rotation(float value); - private: - float _internal_rotation() const; - void _internal_set_rotation(float value); - public: - - // @@protoc_insertion_point(class_scope:libopenshottracker.Frame) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::libopenshottracker::Frame_Box* bounding_box_; - ::PROTOBUF_NAMESPACE_ID::int32 id_; - float rotation_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_trackerdata_2eproto; -}; -// ------------------------------------------------------------------- - -class Tracker PROTOBUF_FINAL : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:libopenshottracker.Tracker) */ { - public: - inline Tracker() : Tracker(nullptr) {}; - virtual ~Tracker(); - - Tracker(const Tracker& from); - Tracker(Tracker&& from) noexcept - : Tracker() { - *this = ::std::move(from); - } - - inline Tracker& operator=(const Tracker& from) { - CopyFrom(from); - return *this; - } - inline Tracker& operator=(Tracker&& from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return GetMetadataStatic().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return GetMetadataStatic().reflection; - } - static const Tracker& default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const Tracker* internal_default_instance() { - return reinterpret_cast( - &_Tracker_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(Tracker& a, Tracker& b) { - a.Swap(&b); - } - inline void Swap(Tracker* other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(Tracker* other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline Tracker* New() const final { - return CreateMaybeMessage(nullptr); - } - - Tracker* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; - void CopyFrom(const Tracker& from); - void MergeFrom(const Tracker& from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(Tracker* other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "libopenshottracker.Tracker"; - } - protected: - explicit Tracker(::PROTOBUF_NAMESPACE_ID::Arena* arena); - private: - static void ArenaDtor(void* object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); - public: - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_trackerdata_2eproto); - return ::descriptor_table_trackerdata_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kFrameFieldNumber = 1, - kLastUpdatedFieldNumber = 2, - }; - // repeated .libopenshottracker.Frame frame = 1; - int frame_size() const; - private: - int _internal_frame_size() const; - public: - void clear_frame(); - ::libopenshottracker::Frame* mutable_frame(int index); - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshottracker::Frame >* - mutable_frame(); - private: - const ::libopenshottracker::Frame& _internal_frame(int index) const; - ::libopenshottracker::Frame* _internal_add_frame(); - public: - const ::libopenshottracker::Frame& frame(int index) const; - ::libopenshottracker::Frame* add_frame(); - const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshottracker::Frame >& - frame() const; - - // .google.protobuf.Timestamp last_updated = 2; - bool has_last_updated() const; - private: - bool _internal_has_last_updated() const; - public: - void clear_last_updated(); - const PROTOBUF_NAMESPACE_ID::Timestamp& last_updated() const; - PROTOBUF_NAMESPACE_ID::Timestamp* release_last_updated(); - PROTOBUF_NAMESPACE_ID::Timestamp* mutable_last_updated(); - void set_allocated_last_updated(PROTOBUF_NAMESPACE_ID::Timestamp* last_updated); - private: - const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_last_updated() const; - PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_last_updated(); - public: - void unsafe_arena_set_allocated_last_updated( - PROTOBUF_NAMESPACE_ID::Timestamp* last_updated); - PROTOBUF_NAMESPACE_ID::Timestamp* unsafe_arena_release_last_updated(); - - // @@protoc_insertion_point(class_scope:libopenshottracker.Tracker) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshottracker::Frame > frame_; - PROTOBUF_NAMESPACE_ID::Timestamp* last_updated_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_trackerdata_2eproto; -}; -// =================================================================== - - -// =================================================================== - -#ifdef __GNUC__ - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// Frame_Box - -// float x1 = 1; -inline void Frame_Box::clear_x1() { - x1_ = 0; -} -inline float Frame_Box::_internal_x1() const { - return x1_; -} -inline float Frame_Box::x1() const { - // @@protoc_insertion_point(field_get:libopenshottracker.Frame.Box.x1) - return _internal_x1(); -} -inline void Frame_Box::_internal_set_x1(float value) { - - x1_ = value; -} -inline void Frame_Box::set_x1(float value) { - _internal_set_x1(value); - // @@protoc_insertion_point(field_set:libopenshottracker.Frame.Box.x1) -} - -// float y1 = 2; -inline void Frame_Box::clear_y1() { - y1_ = 0; -} -inline float Frame_Box::_internal_y1() const { - return y1_; -} -inline float Frame_Box::y1() const { - // @@protoc_insertion_point(field_get:libopenshottracker.Frame.Box.y1) - return _internal_y1(); -} -inline void Frame_Box::_internal_set_y1(float value) { - - y1_ = value; -} -inline void Frame_Box::set_y1(float value) { - _internal_set_y1(value); - // @@protoc_insertion_point(field_set:libopenshottracker.Frame.Box.y1) -} - -// float x2 = 3; -inline void Frame_Box::clear_x2() { - x2_ = 0; -} -inline float Frame_Box::_internal_x2() const { - return x2_; -} -inline float Frame_Box::x2() const { - // @@protoc_insertion_point(field_get:libopenshottracker.Frame.Box.x2) - return _internal_x2(); -} -inline void Frame_Box::_internal_set_x2(float value) { - - x2_ = value; -} -inline void Frame_Box::set_x2(float value) { - _internal_set_x2(value); - // @@protoc_insertion_point(field_set:libopenshottracker.Frame.Box.x2) -} - -// float y2 = 4; -inline void Frame_Box::clear_y2() { - y2_ = 0; -} -inline float Frame_Box::_internal_y2() const { - return y2_; -} -inline float Frame_Box::y2() const { - // @@protoc_insertion_point(field_get:libopenshottracker.Frame.Box.y2) - return _internal_y2(); -} -inline void Frame_Box::_internal_set_y2(float value) { - - y2_ = value; -} -inline void Frame_Box::set_y2(float value) { - _internal_set_y2(value); - // @@protoc_insertion_point(field_set:libopenshottracker.Frame.Box.y2) -} - -// ------------------------------------------------------------------- - -// Frame - -// int32 id = 1; -inline void Frame::clear_id() { - id_ = 0; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Frame::_internal_id() const { - return id_; -} -inline ::PROTOBUF_NAMESPACE_ID::int32 Frame::id() const { - // @@protoc_insertion_point(field_get:libopenshottracker.Frame.id) - return _internal_id(); -} -inline void Frame::_internal_set_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - - id_ = value; -} -inline void Frame::set_id(::PROTOBUF_NAMESPACE_ID::int32 value) { - _internal_set_id(value); - // @@protoc_insertion_point(field_set:libopenshottracker.Frame.id) -} - -// float rotation = 2; -inline void Frame::clear_rotation() { - rotation_ = 0; -} -inline float Frame::_internal_rotation() const { - return rotation_; -} -inline float Frame::rotation() const { - // @@protoc_insertion_point(field_get:libopenshottracker.Frame.rotation) - return _internal_rotation(); -} -inline void Frame::_internal_set_rotation(float value) { - - rotation_ = value; -} -inline void Frame::set_rotation(float value) { - _internal_set_rotation(value); - // @@protoc_insertion_point(field_set:libopenshottracker.Frame.rotation) -} - -// .libopenshottracker.Frame.Box bounding_box = 3; -inline bool Frame::_internal_has_bounding_box() const { - return this != internal_default_instance() && bounding_box_ != nullptr; -} -inline bool Frame::has_bounding_box() const { - return _internal_has_bounding_box(); -} -inline void Frame::clear_bounding_box() { - if (GetArena() == nullptr && bounding_box_ != nullptr) { - delete bounding_box_; - } - bounding_box_ = nullptr; -} -inline const ::libopenshottracker::Frame_Box& Frame::_internal_bounding_box() const { - const ::libopenshottracker::Frame_Box* p = bounding_box_; - return p != nullptr ? *p : *reinterpret_cast( - &::libopenshottracker::_Frame_Box_default_instance_); -} -inline const ::libopenshottracker::Frame_Box& Frame::bounding_box() const { - // @@protoc_insertion_point(field_get:libopenshottracker.Frame.bounding_box) - return _internal_bounding_box(); -} -inline void Frame::unsafe_arena_set_allocated_bounding_box( - ::libopenshottracker::Frame_Box* bounding_box) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(bounding_box_); - } - bounding_box_ = bounding_box; - if (bounding_box) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:libopenshottracker.Frame.bounding_box) -} -inline ::libopenshottracker::Frame_Box* Frame::release_bounding_box() { - auto temp = unsafe_arena_release_bounding_box(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline ::libopenshottracker::Frame_Box* Frame::unsafe_arena_release_bounding_box() { - // @@protoc_insertion_point(field_release:libopenshottracker.Frame.bounding_box) - - ::libopenshottracker::Frame_Box* temp = bounding_box_; - bounding_box_ = nullptr; - return temp; -} -inline ::libopenshottracker::Frame_Box* Frame::_internal_mutable_bounding_box() { - - if (bounding_box_ == nullptr) { - auto* p = CreateMaybeMessage<::libopenshottracker::Frame_Box>(GetArena()); - bounding_box_ = p; - } - return bounding_box_; -} -inline ::libopenshottracker::Frame_Box* Frame::mutable_bounding_box() { - // @@protoc_insertion_point(field_mutable:libopenshottracker.Frame.bounding_box) - return _internal_mutable_bounding_box(); -} -inline void Frame::set_allocated_bounding_box(::libopenshottracker::Frame_Box* bounding_box) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete bounding_box_; - } - if (bounding_box) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(bounding_box); - if (message_arena != submessage_arena) { - bounding_box = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, bounding_box, submessage_arena); - } - - } else { - - } - bounding_box_ = bounding_box; - // @@protoc_insertion_point(field_set_allocated:libopenshottracker.Frame.bounding_box) -} - -// ------------------------------------------------------------------- - -// Tracker - -// repeated .libopenshottracker.Frame frame = 1; -inline int Tracker::_internal_frame_size() const { - return frame_.size(); -} -inline int Tracker::frame_size() const { - return _internal_frame_size(); -} -inline void Tracker::clear_frame() { - frame_.Clear(); -} -inline ::libopenshottracker::Frame* Tracker::mutable_frame(int index) { - // @@protoc_insertion_point(field_mutable:libopenshottracker.Tracker.frame) - return frame_.Mutable(index); -} -inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshottracker::Frame >* -Tracker::mutable_frame() { - // @@protoc_insertion_point(field_mutable_list:libopenshottracker.Tracker.frame) - return &frame_; -} -inline const ::libopenshottracker::Frame& Tracker::_internal_frame(int index) const { - return frame_.Get(index); -} -inline const ::libopenshottracker::Frame& Tracker::frame(int index) const { - // @@protoc_insertion_point(field_get:libopenshottracker.Tracker.frame) - return _internal_frame(index); -} -inline ::libopenshottracker::Frame* Tracker::_internal_add_frame() { - return frame_.Add(); -} -inline ::libopenshottracker::Frame* Tracker::add_frame() { - // @@protoc_insertion_point(field_add:libopenshottracker.Tracker.frame) - return _internal_add_frame(); -} -inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::libopenshottracker::Frame >& -Tracker::frame() const { - // @@protoc_insertion_point(field_list:libopenshottracker.Tracker.frame) - return frame_; -} - -// .google.protobuf.Timestamp last_updated = 2; -inline bool Tracker::_internal_has_last_updated() const { - return this != internal_default_instance() && last_updated_ != nullptr; -} -inline bool Tracker::has_last_updated() const { - return _internal_has_last_updated(); -} -inline const PROTOBUF_NAMESPACE_ID::Timestamp& Tracker::_internal_last_updated() const { - const PROTOBUF_NAMESPACE_ID::Timestamp* p = last_updated_; - return p != nullptr ? *p : *reinterpret_cast( - &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); -} -inline const PROTOBUF_NAMESPACE_ID::Timestamp& Tracker::last_updated() const { - // @@protoc_insertion_point(field_get:libopenshottracker.Tracker.last_updated) - return _internal_last_updated(); -} -inline void Tracker::unsafe_arena_set_allocated_last_updated( - PROTOBUF_NAMESPACE_ID::Timestamp* last_updated) { - if (GetArena() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(last_updated_); - } - last_updated_ = last_updated; - if (last_updated) { - - } else { - - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:libopenshottracker.Tracker.last_updated) -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* Tracker::release_last_updated() { - auto temp = unsafe_arena_release_last_updated(); - if (GetArena() != nullptr) { - temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); - } - return temp; -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* Tracker::unsafe_arena_release_last_updated() { - // @@protoc_insertion_point(field_release:libopenshottracker.Tracker.last_updated) - - PROTOBUF_NAMESPACE_ID::Timestamp* temp = last_updated_; - last_updated_ = nullptr; - return temp; -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* Tracker::_internal_mutable_last_updated() { - - if (last_updated_ == nullptr) { - auto* p = CreateMaybeMessage(GetArena()); - last_updated_ = p; - } - return last_updated_; -} -inline PROTOBUF_NAMESPACE_ID::Timestamp* Tracker::mutable_last_updated() { - // @@protoc_insertion_point(field_mutable:libopenshottracker.Tracker.last_updated) - return _internal_mutable_last_updated(); -} -inline void Tracker::set_allocated_last_updated(PROTOBUF_NAMESPACE_ID::Timestamp* last_updated) { - ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena(); - if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(last_updated_); - } - if (last_updated) { - ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(last_updated)->GetArena(); - if (message_arena != submessage_arena) { - last_updated = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, last_updated, submessage_arena); - } - - } else { - - } - last_updated_ = last_updated; - // @@protoc_insertion_point(field_set_allocated:libopenshottracker.Tracker.last_updated) -} - -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace libopenshottracker - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_trackerdata_2eproto From 6342d4350a3b579a27989a9e5d5209fa55418134 Mon Sep 17 00:00:00 2001 From: Brenno Date: Thu, 17 Dec 2020 22:15:10 -0300 Subject: [PATCH 03/27] Fixed protobuf message compiling on Mac --- src/protobuf_messages/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/protobuf_messages/CMakeLists.txt b/src/protobuf_messages/CMakeLists.txt index 5752a216..af8239d8 100644 --- a/src/protobuf_messages/CMakeLists.txt +++ b/src/protobuf_messages/CMakeLists.txt @@ -27,6 +27,7 @@ # Dependencies find_package(Protobuf 3) +include_directories(${PROTOBUF_INCLUDE_DIRS}) file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto") PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles}) From 591590e58c37f0df299ea57439ec131aee7bf03d Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Tue, 22 Dec 2020 00:36:00 -0500 Subject: [PATCH 04/27] Refresh Codecov configs (#603) --- codecov.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/codecov.yml b/codecov.yml index e5c073f6..6b9f43f4 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,10 +1,8 @@ -codecov: - branch: default coverage: status: project: default: - base: pr # Only post a status to pull requests + only_pulls: true # Only post a status to pull requests informational: true # Don't block PRs based on coverage stats (yet?) ignore: - "examples" From bdb3eea92fdbf6f1c4c0ead2de65235ac435f2f7 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Tue, 22 Dec 2020 00:39:59 -0500 Subject: [PATCH 05/27] Correct OpenMP function name (#601) --- src/OpenMPUtilities.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenMPUtilities.h b/src/OpenMPUtilities.h index b523bbd1..4d4cc2cc 100644 --- a/src/OpenMPUtilities.h +++ b/src/OpenMPUtilities.h @@ -44,7 +44,7 @@ // Set max-active-levels to the max supported, if possible // (supported_active_levels is OpenMP 5.0 (November 2018) or later, only.) #if (_OPENMP >= 201811) - #define OPEN_MP_MAX_ACTIVE openmp_get_supported_active_levels() + #define OPEN_MP_MAX_ACTIVE omp_get_supported_active_levels() #else #define OPEN_MP_MAX_ACTIVE OPEN_MP_NUM_PROCESSORS #endif From 5cfe52b9f7701a209f4fc380396bf4a91f7f1ca0 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Thu, 24 Dec 2020 10:07:08 -0500 Subject: [PATCH 06/27] CMake: Add ENABLE_OPENCV option, use targets --- CMakeLists.txt | 1 + bindings/python/CMakeLists.txt | 10 --- src/CMakeLists.txt | 64 ++++++++++--------- .../compileProtobufMessages.sh | 6 -- tests/CMakeLists.txt | 36 ++--------- 5 files changed, 40 insertions(+), 77 deletions(-) delete mode 100644 src/protobuf_messages/compileProtobufMessages.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 294639bf..ff71dde7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,7 @@ option(ENABLE_COVERAGE "Scan test coverage using gcov and report" OFF) option(ENABLE_DOCS "Build API documentation (requires Doxygen)" ON) option(APPIMAGE_BUILD "Build to install in an AppImage (Linux only)" OFF) option(ENABLE_MAGICK "Use ImageMagick, if available" ON) +option(ENABLE_OPENCV "Build with OpenCV algorithms (requires Boost, Protobuf 3)" ON) # Legacy commandline override if (DISABLE_TESTS) diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index defbd9bd..b020592b 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -54,16 +54,6 @@ if (CMAKE_VERSION VERSION_LESS 3.12) "${PROJECT_BINARY_DIR}/src") endif() -################ OPENCV ################## -find_package( OpenCV 4 ) -if (OpenCV_FOUND) - message("\nCOMPILING WITH OPENCV\n") - set(CMAKE_SWIG_FLAGS "-DUSE_OPENCV=1") - add_definitions( -DUSE_OPENCV=1 ) -else() - message("\nOPENCV NOT FOUND, SOME FUNCTIONALITIES WILL BE DISABLED\n") -endif() - ### Enable C++ in SWIG set_property(SOURCE openshot.i PROPERTY CPLUSPLUS ON) set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 12eab3b6..0ae1c2ff 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -392,36 +392,39 @@ if (ENABLE_BLACKMAGIC) endif() ################## OPENCV ################### - -find_package( OpenCV 4 ) -if (OpenCV_FOUND) - message("\nCOMPILING WITH OPENCV\n") - list(APPEND CMAKE_SWIG_FLAGS -DUSE_OPENCV=1) - target_compile_definitions(openshot PUBLIC USE_OPENCV=1) -else() - message("\nOPENCV NOT FOUND, SOME FUNCTIONALITIES WILL BE DISABLED\n") -endif() - -################## PROTOBUF ################## -if (OpenCV_FOUND) - find_package(Protobuf 3) - - if (NOT Protobuf_FOUND) - # Protobuf is required when compiling with opencv - message(FATAL_ERROR "\nPLEASE INSTALL PROTOBUF. Protobuf is required when compiling with opencv.\n") +if(ENABLE_OPENCV) + find_package(OpenCV 4) + if(NOT OpenCV_FOUND) + set(ENABLE_OPENCV FALSE CACHE BOOL + "Build with OpenCV algorithms (requires Boost, Protobuf 3)" FORCE) + else() + find_package(Protobuf 3 REQUIRED) + find_package(Boost REQUIRED) + set(PROTOBUF_SOURCE_FILES + protobuf_messages/objdetectdata.proto + protobuf_messages/stabilizedata.proto + protobuf_messages/trackerdata.proto + ) + protobuf_generate_cpp(ProtoSources ProtoHeaders ${PROTOBUF_SOURCE_FILES}) + # Add OpenCV source files and generated protobuf sources + target_sources(openshot PRIVATE + ${OPENSHOT_CV_SOURCES} + ${ProtoSources} + ${ProtoHeaders} + ) + list(APPEND CMAKE_SWIG_FLAGS -DUSE_OPENCV=1) + target_compile_definitions(openshot PUBLIC USE_OPENCV=1) + target_link_libraries(openshot PUBLIC + opencv_core + opencv_video + opencv_highgui + opencv_dnn + opencv_tracking + protobuf::libprotobuf + ) endif() - - add_subdirectory(protobuf_messages) - - target_include_directories(openshot PUBLIC ${ProtobufMessagePath}) - - # Add OpenCV target sources - target_sources(openshot PRIVATE - ${OPENSHOT_CV_SOURCES}) - - # Link libopenshot with OpenCV libs - target_link_libraries(openshot PUBLIC ProtoMessages ${OpenCV_LIBS} ${PROTOBUF_LIBRARY} ${Protobuf_INCLUDE_DIRS}) endif() +add_feature_info("OpenCV algorithms" ENABLE_OPENCV "Use OpenCV algorithms") ############### LINK LIBRARY ################# # Link remaining dependency libraries @@ -450,6 +453,9 @@ install( DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libopenshot FILES_MATCHING PATTERN "*.h" ) +install(FILES ${ProtobufHeaders} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libopenshot +) ############### CPACK PACKAGING ############## if(MINGW) @@ -464,5 +470,3 @@ endif() set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Jonathan Thomas") #required include(CPack) - - diff --git a/src/protobuf_messages/compileProtobufMessages.sh b/src/protobuf_messages/compileProtobufMessages.sh deleted file mode 100644 index df127ef2..00000000 --- a/src/protobuf_messages/compileProtobufMessages.sh +++ /dev/null @@ -1,6 +0,0 @@ -protoc -I=./ --cpp_out=./ stabilizedata.proto -protoc -I=./ --cpp_out=./ trackerdata.proto -protoc -I=./ --cpp_out=./ objdetectdata.proto - -mv *.cc ../ -mv *.h ../ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f480b6d3..a928bbb6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -56,25 +56,6 @@ if(ENABLE_BLACKMAGIC) endif() endif() -####################### OPENCV ########################## -find_package( OpenCV 4 ) -if (OpenCV_FOUND) - add_definitions( -DUSE_OPENCV=1 ) -else() - message("\nOPENCV NOT FOUND, OPENCV RELATED TESTS ARE DISABLED\n") -endif() - -################ PROTOBUF ################## -if (OpenCV_FOUND) - find_package(Protobuf 3) - - if (NOT Protobuf_FOUND) - # Protobuf is required when compiling with opencv - message(FATAL_ERROR "\nPLEASE INSTALL PROTOBUF. Protobuf is required when compiling with opencv.\n") - endif() - include_directories(${PROTOBUF_INCLUDE_DIR}) -endif() - ############### SET TEST SOURCE FILES ################# set(OPENSHOT_TEST_FILES Cache_Tests.cpp @@ -95,15 +76,11 @@ set(OPENSHOT_TEST_FILES Timeline_Tests.cpp) ########## SET OPENCV RELATED TEST FILES ############### -if(OpenCV_FOUND) - set(OPENSHOT_CV_TEST_FILES +if(ENABLE_OPENCV) + list(APPEND OPENSHOT_TEST_FILES CVTracker_Tests.cpp CVStabilizer_Tests.cpp # CVObjectDetection_Tests.cpp - ) - set(OPENSHOT_CV_LIBRARIES - ${OpenCV_LIBS} - ${PROTOBUF_LIBRARY} ) endif() @@ -113,16 +90,14 @@ message (STATUS "Tests enabled, test executable will be built as tests/openshot- add_executable(openshot-test tests.cpp - ${OPENSHOT_TEST_FILES} - ${OPENSHOT_CV_TEST_FILES} - ) + ${OPENSHOT_TEST_FILES} +) # Link libraries to the new executable target_link_libraries(openshot-test openshot ${UnitTest++_LIBRARIES} - ${OPENSHOT_CV_LIBRARIES} - ) +) ##### RUNNING TESTS (make os_test / make test) ##### # Hook up the 'make os_test' target to the 'openshot-test' executable, @@ -130,4 +105,3 @@ target_link_libraries(openshot-test if(NOT ENABLE_COVERAGE) add_custom_target(os_test COMMAND openshot-test) endif() - From ed77db81d2c5456163230dac2695f2d618fbf228 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 26 Dec 2020 06:03:30 -0500 Subject: [PATCH 07/27] Unit tests: Don't use OpenShot.h header - To prevent slow compiles of unit tests, replace all of the '#include "OpenShot.h"' invocations with includes of the individual headers actually needed by each test file. Revert "Unit tests: Don't use OpenShot.h header" This reverts commit e5cc4f8bf91fc60697996023a86dc618637f6161. Unit tests: Don't use OpenShot.h header - To prevent slow compiles of unit tests, replace all of the '#include "OpenShot.h"' invocations with includes of the individual headers actually needed by each test file. --- tests/Cache_Tests.cpp | 7 ++++++- tests/Clip_Tests.cpp | 10 ++++++++-- tests/Color_Tests.cpp | 7 ++++++- tests/Coordinate_Tests.cpp | 3 +-- tests/DummyReader_Tests.cpp | 9 +++++++-- tests/FFmpegReader_Tests.cpp | 9 +++++++-- tests/FFmpegWriter_Tests.cpp | 8 +++++++- tests/Fraction_Tests.cpp | 2 +- tests/Frame_Tests.cpp | 7 ++++++- tests/ImageWriter_Tests.cpp | 11 +++++++++-- tests/KeyFrame_Tests.cpp | 5 ++++- tests/Point_Tests.cpp | 5 ++++- tests/ReaderBase_Tests.cpp | 7 ++++++- tests/Settings_Tests.cpp | 2 +- tests/Timeline_Tests.cpp | 11 ++++++++++- 15 files changed, 83 insertions(+), 20 deletions(-) diff --git a/tests/Cache_Tests.cpp b/tests/Cache_Tests.cpp index d834a003..1220cf14 100644 --- a/tests/Cache_Tests.cpp +++ b/tests/Cache_Tests.cpp @@ -28,12 +28,17 @@ * along with OpenShot Library. If not, see . */ +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "CacheDisk.h" +#include "CacheMemory.h" #include "Json.h" +#include + using namespace openshot; TEST(Cache_Default_Constructor) diff --git a/tests/Clip_Tests.cpp b/tests/Clip_Tests.cpp index 17757be2..87272427 100644 --- a/tests/Clip_Tests.cpp +++ b/tests/Clip_Tests.cpp @@ -28,6 +28,9 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Work around older versions of UnitTest++ without REQUIRE @@ -37,7 +40,11 @@ // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Clip.h" +#include "Frame.h" +#include "Fraction.h" +#include "Timeline.h" +#include "Json.h" using namespace openshot; @@ -255,4 +262,3 @@ TEST(Verify_Parent_Timeline) } } // SUITE - diff --git a/tests/Color_Tests.cpp b/tests/Color_Tests.cpp index 388ac5ef..6827ddf0 100644 --- a/tests/Color_Tests.cpp +++ b/tests/Color_Tests.cpp @@ -28,10 +28,15 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Color.h" +#include "KeyFrame.h" +#include "Json.h" SUITE(Color) { diff --git a/tests/Coordinate_Tests.cpp b/tests/Coordinate_Tests.cpp index b57af38f..0ed4a46a 100644 --- a/tests/Coordinate_Tests.cpp +++ b/tests/Coordinate_Tests.cpp @@ -31,9 +31,8 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Coordinate.h" -using namespace std; using namespace openshot; TEST(Coordinate_Default_Constructor) diff --git a/tests/DummyReader_Tests.cpp b/tests/DummyReader_Tests.cpp index b889391f..f2f1823d 100644 --- a/tests/DummyReader_Tests.cpp +++ b/tests/DummyReader_Tests.cpp @@ -28,11 +28,16 @@ * along with OpenShot Library. If not, see . */ +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "DummyReader.h" +#include "CacheMemory.h" +#include "Fraction.h" +#include "Frame.h" using namespace std; using namespace openshot; @@ -146,4 +151,4 @@ TEST (DummyReader_Invalid_Fake_Frame) { // Clean up cache.Clear(); r.Close(); -} \ No newline at end of file +} diff --git a/tests/FFmpegReader_Tests.cpp b/tests/FFmpegReader_Tests.cpp index b1827432..a72fd90e 100644 --- a/tests/FFmpegReader_Tests.cpp +++ b/tests/FFmpegReader_Tests.cpp @@ -28,10 +28,16 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "FFmpegReader.h" +#include "Frame.h" +#include "Timeline.h" +#include "Json.h" using namespace std; using namespace openshot; @@ -272,4 +278,3 @@ TEST(Verify_Parent_Timeline) } } // SUITE(FFmpegReader) - diff --git a/tests/FFmpegWriter_Tests.cpp b/tests/FFmpegWriter_Tests.cpp index 83764b61..606b359d 100644 --- a/tests/FFmpegWriter_Tests.cpp +++ b/tests/FFmpegWriter_Tests.cpp @@ -28,10 +28,16 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "FFmpegWriter.h" +#include "FFmpegReader.h" +#include "Fraction.h" +#include "Frame.h" using namespace std; using namespace openshot; diff --git a/tests/Fraction_Tests.cpp b/tests/Fraction_Tests.cpp index b061ba48..d2ef24ad 100644 --- a/tests/Fraction_Tests.cpp +++ b/tests/Fraction_Tests.cpp @@ -31,7 +31,7 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Fraction.h" using namespace std; using namespace openshot; diff --git a/tests/Frame_Tests.cpp b/tests/Frame_Tests.cpp index e5562523..f1049ca0 100644 --- a/tests/Frame_Tests.cpp +++ b/tests/Frame_Tests.cpp @@ -29,10 +29,15 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Frame.h" +#include "Clip.h" +#include "Fraction.h" #include diff --git a/tests/ImageWriter_Tests.cpp b/tests/ImageWriter_Tests.cpp index e4e500dd..36b1288a 100644 --- a/tests/ImageWriter_Tests.cpp +++ b/tests/ImageWriter_Tests.cpp @@ -28,15 +28,22 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" + +#ifdef USE_IMAGEMAGICK +#include "ImageWriter.h" +#include "ImageReader.h" +#include "FFmpegReader.h" +#include "Frame.h" using namespace std; using namespace openshot; -#ifdef USE_IMAGEMAGICK SUITE(ImageWriter) { diff --git a/tests/KeyFrame_Tests.cpp b/tests/KeyFrame_Tests.cpp index 84025165..24573f92 100644 --- a/tests/KeyFrame_Tests.cpp +++ b/tests/KeyFrame_Tests.cpp @@ -31,7 +31,10 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "KeyFrame.h" +#include "Coordinate.h" +#include "Fraction.h" +#include "Point.h" using namespace std; using namespace openshot; diff --git a/tests/Point_Tests.cpp b/tests/Point_Tests.cpp index cce78337..6a94dda5 100644 --- a/tests/Point_Tests.cpp +++ b/tests/Point_Tests.cpp @@ -31,7 +31,10 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Point.h" +#include "Enums.h" +#include "Coordinate.h" +#include "Json.h" SUITE(POINT) { diff --git a/tests/ReaderBase_Tests.cpp b/tests/ReaderBase_Tests.cpp index 3e68b40d..dec61efd 100644 --- a/tests/ReaderBase_Tests.cpp +++ b/tests/ReaderBase_Tests.cpp @@ -28,10 +28,15 @@ * along with OpenShot Library. If not, see . */ +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "ReaderBase.h" +#include "CacheBase.h" +#include "Frame.h" +#include "Json.h" using namespace std; using namespace openshot; diff --git a/tests/Settings_Tests.cpp b/tests/Settings_Tests.cpp index cc7b86d2..62dd2e23 100644 --- a/tests/Settings_Tests.cpp +++ b/tests/Settings_Tests.cpp @@ -31,7 +31,7 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Settings.h" using namespace std; using namespace openshot; diff --git a/tests/Timeline_Tests.cpp b/tests/Timeline_Tests.cpp index 0956366f..2a9cd632 100644 --- a/tests/Timeline_Tests.cpp +++ b/tests/Timeline_Tests.cpp @@ -28,10 +28,19 @@ * along with OpenShot Library. If not, see . */ +#include +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Timeline.h" +#include "Clip.h" +#include "Frame.h" +#include "Fraction.h" +#include "effects/Blur.h" +#include "effects/Negate.h" using namespace std; using namespace openshot; From f21cf35d361b14e4d2011170deae7049caf97c6a Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sat, 26 Dec 2020 06:03:30 -0500 Subject: [PATCH 08/27] Remove OpenShot.h from OpenCV unit tests --- tests/CVObjectDetection_Tests.cpp | 11 +++++++---- tests/CVStabilizer_Tests.cpp | 17 ++++++++++------- tests/CVTracker_Tests.cpp | 23 +++++++++++++---------- tests/Frame_Tests.cpp | 4 ++++ 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/tests/CVObjectDetection_Tests.cpp b/tests/CVObjectDetection_Tests.cpp index 3ab6b105..e6c997a0 100644 --- a/tests/CVObjectDetection_Tests.cpp +++ b/tests/CVObjectDetection_Tests.cpp @@ -29,13 +29,16 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" -//#include "ProcessingController.h" -//#include "Json.h" -#include +#include "Clip.h" +#include "CVObjectDetection.h" +#include "ProcessingController.h" +#include "Json.h" using namespace openshot; diff --git a/tests/CVStabilizer_Tests.cpp b/tests/CVStabilizer_Tests.cpp index 401884d7..4d1f9305 100644 --- a/tests/CVStabilizer_Tests.cpp +++ b/tests/CVStabilizer_Tests.cpp @@ -29,12 +29,15 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" -//#include "ProcessingController.h" -#include +#include "Clip.h" +#include "CVStabilization.h" // for TransformParam, CamTrajectory, CVStabilization +#include "ProcessingController.h" using namespace openshot; @@ -56,10 +59,10 @@ SUITE(CVStabilizer_Tests) std::string json_data = R"proto( { - "protobuf_data_path": "stabilizer.data", - "smoothing-window": 30 + "protobuf_data_path": "stabilizer.data", + "smoothing-window": 30 } )proto"; - + // Create stabilizer CVStabilization stabilizer(json_data, processingController); @@ -100,7 +103,7 @@ SUITE(CVStabilizer_Tests) std::string json_data = R"proto( { - "protobuf_data_path": "stabilizer.data", + "protobuf_data_path": "stabilizer.data", "smoothing-window": 30 } )proto"; diff --git a/tests/CVTracker_Tests.cpp b/tests/CVTracker_Tests.cpp index 5e1bf709..cab85062 100644 --- a/tests/CVTracker_Tests.cpp +++ b/tests/CVTracker_Tests.cpp @@ -29,12 +29,15 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" -//#include "ProcessingController.h" -#include +#include "Clip.h" +#include "CVTracker.h" // for FrameData, CVTracker +#include "ProcessingController.h" using namespace openshot; @@ -56,14 +59,14 @@ SUITE(CVTracker_Tests) std::string json_data = R"proto( { - "protobuf_data_path": "kcf_tracker.data", - "tracker-type": "KCF", + "protobuf_data_path": "kcf_tracker.data", + "tracker-type": "KCF", "region": {"x": 294, "y": 102, "width": 180, "height": 166, "first-frame": 0} } )proto"; // Create tracker CVTracker kcfTracker(json_data, processingController); - + // Track clip for frames 0-20 kcfTracker.trackClip(c1, 0, 20, true); // Get tracked data @@ -94,8 +97,8 @@ SUITE(CVTracker_Tests) std::string json_data = R"proto( { - "protobuf_data_path": "kcf_tracker.data", - "tracker-type": "KCF", + "protobuf_data_path": "kcf_tracker.data", + "tracker-type": "KCF", "region": {"x": 294, "y": 102, "width": 180, "height": 166, "first-frame": 0} } )proto"; @@ -119,8 +122,8 @@ SUITE(CVTracker_Tests) std::string proto_data_1 = R"proto( { - "protobuf_data_path": "kcf_tracker.data", - "tracker_type": "", + "protobuf_data_path": "kcf_tracker.data", + "tracker_type": "", "region": {"x": -1, "y": -1, "width": -1, "height": -1, "first-frame": 0} } )proto"; diff --git a/tests/Frame_Tests.cpp b/tests/Frame_Tests.cpp index f1049ca0..9038f8b8 100644 --- a/tests/Frame_Tests.cpp +++ b/tests/Frame_Tests.cpp @@ -41,6 +41,10 @@ #include +#ifdef USE_OPENCV +#include +#endif + using namespace openshot; SUITE(Frame_Tests) From 35d3fa9ee39e6504c703dbf553e53d0cf54e2f62 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Sat, 26 Dec 2020 06:24:11 -0500 Subject: [PATCH 09/27] Add Dependabot checking for Actions (#606) --- .github/dependabot.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..f2333859 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Set update schedule for GitHub Actions + +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" From 48d2aacd835d25e478598a90891fa850188fe86c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Dec 2020 21:47:58 -0500 Subject: [PATCH 10/27] Delete actions/labeler config (#608) * Delete label.yml Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Frank Dana --- .github/workflows/label.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/workflows/label.yml diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml deleted file mode 100644 index e90b599b..00000000 --- a/.github/workflows/label.yml +++ /dev/null @@ -1,19 +0,0 @@ -# This workflow will triage pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler/blob/master/README.md - -name: Labeler -on: [pull_request] - -jobs: - label: - - runs-on: ubuntu-latest - - steps: - - uses: actions/labeler@v2 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" From 2699e7d1d0c0fb1936808f2d20110c0d78051485 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Sat, 26 Dec 2020 21:51:24 -0500 Subject: [PATCH 11/27] Unit tests: Don't use OpenShot.h header (#607) - To prevent slow compiles of unit tests, replace all of the '#include "OpenShot.h"' invocations with includes of the individual headers actually needed by each test file. --- tests/Cache_Tests.cpp | 7 ++++++- tests/Clip_Tests.cpp | 10 ++++++++-- tests/Color_Tests.cpp | 7 ++++++- tests/Coordinate_Tests.cpp | 3 +-- tests/DummyReader_Tests.cpp | 9 +++++++-- tests/FFmpegReader_Tests.cpp | 9 +++++++-- tests/FFmpegWriter_Tests.cpp | 8 +++++++- tests/Fraction_Tests.cpp | 2 +- tests/Frame_Tests.cpp | 7 ++++++- tests/ImageWriter_Tests.cpp | 11 +++++++++-- tests/KeyFrame_Tests.cpp | 5 ++++- tests/Point_Tests.cpp | 5 ++++- tests/ReaderBase_Tests.cpp | 7 ++++++- tests/Settings_Tests.cpp | 2 +- tests/Timeline_Tests.cpp | 11 ++++++++++- 15 files changed, 83 insertions(+), 20 deletions(-) diff --git a/tests/Cache_Tests.cpp b/tests/Cache_Tests.cpp index d834a003..1220cf14 100644 --- a/tests/Cache_Tests.cpp +++ b/tests/Cache_Tests.cpp @@ -28,12 +28,17 @@ * along with OpenShot Library. If not, see . */ +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "CacheDisk.h" +#include "CacheMemory.h" #include "Json.h" +#include + using namespace openshot; TEST(Cache_Default_Constructor) diff --git a/tests/Clip_Tests.cpp b/tests/Clip_Tests.cpp index 17757be2..87272427 100644 --- a/tests/Clip_Tests.cpp +++ b/tests/Clip_Tests.cpp @@ -28,6 +28,9 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Work around older versions of UnitTest++ without REQUIRE @@ -37,7 +40,11 @@ // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Clip.h" +#include "Frame.h" +#include "Fraction.h" +#include "Timeline.h" +#include "Json.h" using namespace openshot; @@ -255,4 +262,3 @@ TEST(Verify_Parent_Timeline) } } // SUITE - diff --git a/tests/Color_Tests.cpp b/tests/Color_Tests.cpp index 388ac5ef..6827ddf0 100644 --- a/tests/Color_Tests.cpp +++ b/tests/Color_Tests.cpp @@ -28,10 +28,15 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Color.h" +#include "KeyFrame.h" +#include "Json.h" SUITE(Color) { diff --git a/tests/Coordinate_Tests.cpp b/tests/Coordinate_Tests.cpp index b57af38f..0ed4a46a 100644 --- a/tests/Coordinate_Tests.cpp +++ b/tests/Coordinate_Tests.cpp @@ -31,9 +31,8 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Coordinate.h" -using namespace std; using namespace openshot; TEST(Coordinate_Default_Constructor) diff --git a/tests/DummyReader_Tests.cpp b/tests/DummyReader_Tests.cpp index b889391f..f2f1823d 100644 --- a/tests/DummyReader_Tests.cpp +++ b/tests/DummyReader_Tests.cpp @@ -28,11 +28,16 @@ * along with OpenShot Library. If not, see . */ +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "DummyReader.h" +#include "CacheMemory.h" +#include "Fraction.h" +#include "Frame.h" using namespace std; using namespace openshot; @@ -146,4 +151,4 @@ TEST (DummyReader_Invalid_Fake_Frame) { // Clean up cache.Clear(); r.Close(); -} \ No newline at end of file +} diff --git a/tests/FFmpegReader_Tests.cpp b/tests/FFmpegReader_Tests.cpp index b1827432..a72fd90e 100644 --- a/tests/FFmpegReader_Tests.cpp +++ b/tests/FFmpegReader_Tests.cpp @@ -28,10 +28,16 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "FFmpegReader.h" +#include "Frame.h" +#include "Timeline.h" +#include "Json.h" using namespace std; using namespace openshot; @@ -272,4 +278,3 @@ TEST(Verify_Parent_Timeline) } } // SUITE(FFmpegReader) - diff --git a/tests/FFmpegWriter_Tests.cpp b/tests/FFmpegWriter_Tests.cpp index 83764b61..606b359d 100644 --- a/tests/FFmpegWriter_Tests.cpp +++ b/tests/FFmpegWriter_Tests.cpp @@ -28,10 +28,16 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "FFmpegWriter.h" +#include "FFmpegReader.h" +#include "Fraction.h" +#include "Frame.h" using namespace std; using namespace openshot; diff --git a/tests/Fraction_Tests.cpp b/tests/Fraction_Tests.cpp index b061ba48..d2ef24ad 100644 --- a/tests/Fraction_Tests.cpp +++ b/tests/Fraction_Tests.cpp @@ -31,7 +31,7 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Fraction.h" using namespace std; using namespace openshot; diff --git a/tests/Frame_Tests.cpp b/tests/Frame_Tests.cpp index 8c2ebc40..0568efe9 100644 --- a/tests/Frame_Tests.cpp +++ b/tests/Frame_Tests.cpp @@ -29,10 +29,15 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Frame.h" +#include "Clip.h" +#include "Fraction.h" #include diff --git a/tests/ImageWriter_Tests.cpp b/tests/ImageWriter_Tests.cpp index e4e500dd..36b1288a 100644 --- a/tests/ImageWriter_Tests.cpp +++ b/tests/ImageWriter_Tests.cpp @@ -28,15 +28,22 @@ * along with OpenShot Library. If not, see . */ +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" + +#ifdef USE_IMAGEMAGICK +#include "ImageWriter.h" +#include "ImageReader.h" +#include "FFmpegReader.h" +#include "Frame.h" using namespace std; using namespace openshot; -#ifdef USE_IMAGEMAGICK SUITE(ImageWriter) { diff --git a/tests/KeyFrame_Tests.cpp b/tests/KeyFrame_Tests.cpp index 84025165..24573f92 100644 --- a/tests/KeyFrame_Tests.cpp +++ b/tests/KeyFrame_Tests.cpp @@ -31,7 +31,10 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "KeyFrame.h" +#include "Coordinate.h" +#include "Fraction.h" +#include "Point.h" using namespace std; using namespace openshot; diff --git a/tests/Point_Tests.cpp b/tests/Point_Tests.cpp index cce78337..6a94dda5 100644 --- a/tests/Point_Tests.cpp +++ b/tests/Point_Tests.cpp @@ -31,7 +31,10 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Point.h" +#include "Enums.h" +#include "Coordinate.h" +#include "Json.h" SUITE(POINT) { diff --git a/tests/ReaderBase_Tests.cpp b/tests/ReaderBase_Tests.cpp index 3e68b40d..dec61efd 100644 --- a/tests/ReaderBase_Tests.cpp +++ b/tests/ReaderBase_Tests.cpp @@ -28,10 +28,15 @@ * along with OpenShot Library. If not, see . */ +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "ReaderBase.h" +#include "CacheBase.h" +#include "Frame.h" +#include "Json.h" using namespace std; using namespace openshot; diff --git a/tests/Settings_Tests.cpp b/tests/Settings_Tests.cpp index cc7b86d2..62dd2e23 100644 --- a/tests/Settings_Tests.cpp +++ b/tests/Settings_Tests.cpp @@ -31,7 +31,7 @@ #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Settings.h" using namespace std; using namespace openshot; diff --git a/tests/Timeline_Tests.cpp b/tests/Timeline_Tests.cpp index 0956366f..2a9cd632 100644 --- a/tests/Timeline_Tests.cpp +++ b/tests/Timeline_Tests.cpp @@ -28,10 +28,19 @@ * along with OpenShot Library. If not, see . */ +#include +#include +#include + #include "UnitTest++.h" // Prevent name clashes with juce::UnitTest #define DONT_SET_USING_JUCE_NAMESPACE 1 -#include "OpenShot.h" +#include "Timeline.h" +#include "Clip.h" +#include "Frame.h" +#include "Fraction.h" +#include "effects/Blur.h" +#include "effects/Negate.h" using namespace std; using namespace openshot; From 75c4dbbaaa4bc904c282d95766c782c4f153d119 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 31 Dec 2020 17:35:49 -0600 Subject: [PATCH 12/27] Fixing alpha videos, by handling the conversion to premultiplied RGBA separately --- src/FFmpegReader.cpp | 8 +++++++- src/FFmpegUtilities.h | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index 02bb931e..01f37158 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -1352,7 +1352,13 @@ void FFmpegReader::ProcessVideoPacket(int64_t requested_frame) { std::shared_ptr f = CreateFrame(current_frame); // Add Image data to frame - f->AddImage(width, height, 4, QImage::Format_RGBA8888_Premultiplied, buffer); + if (!ffmpeg_has_alpha(AV_GET_CODEC_PIXEL_FORMAT(pStream, pCodecCtx))) { + // Add image with no alpha channel, Speed optimization + f->AddImage(width, height, 4, QImage::Format_RGBA8888_Premultiplied, buffer); + } else { + // Add image with alpha channel (this will be converted to premultipled when needed, but is slower) + f->AddImage(width, height, 4, QImage::Format_RGBA8888, buffer); + } // Update working cache working_cache.Add(f); diff --git a/src/FFmpegUtilities.h b/src/FFmpegUtilities.h index c637f944..c1a7ccd3 100644 --- a/src/FFmpegUtilities.h +++ b/src/FFmpegUtilities.h @@ -126,6 +126,16 @@ #define PIX_FMT_YUV444P AV_PIX_FMT_YUV444P #endif + // Does ffmpeg pixel format contain an alpha channel? + inline static const bool ffmpeg_has_alpha(PixelFormat pix_fmt) + { + if (pix_fmt == AV_PIX_FMT_ARGB || pix_fmt == AV_PIX_FMT_RGBA || pix_fmt == AV_PIX_FMT_ABGR || pix_fmt == AV_PIX_FMT_BGRA || pix_fmt == AV_PIX_FMT_YUVA420P) { + return true; + } else { + return false; + } + } + // FFmpeg's libavutil/common.h defines an RSHIFT incompatible with Ruby's // definition in ruby/config.h, so we move it to FF_RSHIFT #ifdef RSHIFT From f5d6ee22e79926708f876ed53072ba1ce3ebe160 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Thu, 31 Dec 2020 18:09:39 -0600 Subject: [PATCH 13/27] Reverting 'clear the cache when the user seeks' experiment. It was a failed experiement, not to mention that it destroys performance on the "Transform" tool. --- src/Timeline.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/Timeline.cpp b/src/Timeline.cpp index d7377a28..44b1d959 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -725,15 +725,6 @@ std::shared_ptr Timeline::GetFrame(int64_t requested_frame) return frame; } - // Check if previous frame was cached? (if not, assume we are seeking somewhere else on the Timeline, and need - // to clear all cache (for continuity sake). For example, jumping back to a previous spot can cause issues with audio - // data where the new jump location doesn't match up with the previously cached audio data. - std::shared_ptr previous_frame = final_cache->GetFrame(requested_frame - 1); - if (!previous_frame) { - // Seeking to new place on timeline (destroy cache) - ClearAllCache(); - } - // Minimum number of frames to process (for performance reasons) int minimum_frames = OPEN_MP_NUM_PROCESSORS; From 6009a26e4c7c58032d15b03284e512d7d1d9de31 Mon Sep 17 00:00:00 2001 From: Frank Dana Date: Fri, 1 Jan 2021 05:24:48 -0500 Subject: [PATCH 14/27] Eliminate TooManySeeks exception (#611) Since commit bfa050409c22bd7e5cbc1d7e23c72b11751ded07 (2015-08-24), there is no code in libopenshot which ever throws TooManySeeks. - Removed catch() statements for TooManySeeks from multiple functions - Removed the exception from Exceptions.h - in Qt/AudioPlaybackThread.h: - Removed the "SafeTimeSliceThread" class definition, as it only existed to catch TooManySeeks. - Replaced SafeTimeSliceThread with a standard juce::TimeSliceThread --- src/AudioReaderSource.cpp | 2 -- src/Clip.cpp | 2 -- src/Exceptions.h | 16 ---------------- src/FrameMapper.cpp | 2 -- src/Qt/AudioPlaybackThread.h | 15 +-------------- src/Qt/PlayerPrivate.cpp | 2 -- src/Timeline.cpp | 2 -- 7 files changed, 1 insertion(+), 40 deletions(-) diff --git a/src/AudioReaderSource.cpp b/src/AudioReaderSource.cpp index b6a01a89..f5f0a4c8 100644 --- a/src/AudioReaderSource.cpp +++ b/src/AudioReaderSource.cpp @@ -97,8 +97,6 @@ void AudioReaderSource::GetMoreSamplesFromReader() } catch (const ReaderClosed & e) { break; - } catch (const TooManySeeks & e) { - break; } catch (const OutOfBoundsFrame & e) { break; } diff --git a/src/Clip.cpp b/src/Clip.cpp index 302f7729..f11f5cb7 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -717,8 +717,6 @@ std::shared_ptr Clip::GetOrCreateFrame(int64_t number) } catch (const ReaderClosed & e) { // ... - } catch (const TooManySeeks & e) { - // ... } catch (const OutOfBoundsFrame & e) { // ... } diff --git a/src/Exceptions.h b/src/Exceptions.h index f23cda7a..9cced313 100644 --- a/src/Exceptions.h +++ b/src/Exceptions.h @@ -365,22 +365,6 @@ namespace openshot { virtual ~ResampleError() noexcept {} }; - /// Exception when too many seek attempts happen - class TooManySeeks : public ExceptionBase - { - public: - std::string file_path; - /** - * @brief Constructor - * - * @param message A message to accompany the exception - * @param file_path (optional) The input file being processed - */ - TooManySeeks(std::string message, std::string file_path="") - : ExceptionBase(message), file_path(file_path) { } - virtual ~TooManySeeks() noexcept {} - }; - /// Exception when a writer is closed, and a frame is requested class WriterClosed : public ExceptionBase { diff --git a/src/FrameMapper.cpp b/src/FrameMapper.cpp index b7e18daf..d6613825 100644 --- a/src/FrameMapper.cpp +++ b/src/FrameMapper.cpp @@ -369,8 +369,6 @@ std::shared_ptr FrameMapper::GetOrCreateFrame(int64_t number) } catch (const ReaderClosed & e) { // ... - } catch (const TooManySeeks & e) { - // ... } catch (const OutOfBoundsFrame & e) { // ... } diff --git a/src/Qt/AudioPlaybackThread.h b/src/Qt/AudioPlaybackThread.h index 9a159448..bf9aaf32 100644 --- a/src/Qt/AudioPlaybackThread.h +++ b/src/Qt/AudioPlaybackThread.h @@ -40,18 +40,6 @@ namespace openshot { - struct SafeTimeSliceThread : juce::TimeSliceThread - { - SafeTimeSliceThread(const String & s) : juce::TimeSliceThread(s) {} - void run() - { - try { - juce::TimeSliceThread::run(); - } catch (const TooManySeeks & e) { - // ... - } - } - }; /** * @brief Singleton wrapper for AudioDeviceManager (to prevent multiple instances). @@ -96,8 +84,7 @@ namespace openshot juce::WaitableEvent played; int buffer_size; bool is_playing; - SafeTimeSliceThread time_thread; - + juce::TimeSliceThread time_thread; /// Constructor AudioPlaybackThread(); /// Destructor diff --git a/src/Qt/PlayerPrivate.cpp b/src/Qt/PlayerPrivate.cpp index 75052fc3..9f53a0c5 100644 --- a/src/Qt/PlayerPrivate.cpp +++ b/src/Qt/PlayerPrivate.cpp @@ -174,8 +174,6 @@ namespace openshot } catch (const ReaderClosed & e) { // ... - } catch (const TooManySeeks & e) { - // ... } catch (const OutOfBoundsFrame & e) { // ... } diff --git a/src/Timeline.cpp b/src/Timeline.cpp index 44b1d959..60dfdbca 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -461,8 +461,6 @@ std::shared_ptr Timeline::GetOrCreateFrame(Clip* clip, int64_t number) } catch (const ReaderClosed & e) { // ... - } catch (const TooManySeeks & e) { - // ... } catch (const OutOfBoundsFrame & e) { // ... } From da83d572f6b1879e6207b134e01857ffab0bb4b1 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Mon, 11 Jan 2021 16:36:01 -0600 Subject: [PATCH 15/27] Changing name of ProtoBufMessage to openshot_protobuf for clarity, also installing it in PREFIX/lib --- src/protobuf_messages/CMakeLists.txt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/protobuf_messages/CMakeLists.txt b/src/protobuf_messages/CMakeLists.txt index af8239d8..602e1b9e 100644 --- a/src/protobuf_messages/CMakeLists.txt +++ b/src/protobuf_messages/CMakeLists.txt @@ -31,9 +31,21 @@ include_directories(${PROTOBUF_INCLUDE_DIRS}) file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto") PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles}) -add_library(ProtoMessages SHARED ${ProtoSources} ${ProtoHeaders}) +add_library(openshot_protobuf SHARED ${ProtoSources} ${ProtoHeaders}) set(ProtobufMessagePath ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "Path to generated protobuf header files.") -target_link_libraries(ProtoMessages ${Boost_LIBRARIES} ${PROTOBUF_LIBRARY}) +target_link_libraries(openshot_protobuf ${Boost_LIBRARIES} ${PROTOBUF_LIBRARY}) + +# Set SONAME and other library properties +set_target_properties(openshot_protobuf PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_SO_VERSION} + INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" + ) + +# Install primary library +install(TARGETS openshot_protobuf + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + From ad73d238663a666d06057a82cc94b5b330a165a5 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Mon, 11 Jan 2021 16:38:55 -0600 Subject: [PATCH 16/27] Updating link to renamed protobuf library --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 12eab3b6..e0b06f1f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -420,7 +420,7 @@ if (OpenCV_FOUND) ${OPENSHOT_CV_SOURCES}) # Link libopenshot with OpenCV libs - target_link_libraries(openshot PUBLIC ProtoMessages ${OpenCV_LIBS} ${PROTOBUF_LIBRARY} ${Protobuf_INCLUDE_DIRS}) + target_link_libraries(openshot PUBLIC openshot_protobuf ${OpenCV_LIBS} ${PROTOBUF_LIBRARY} ${Protobuf_INCLUDE_DIRS}) endif() ############### LINK LIBRARY ################# From e19c9310e58143e89e2be1137d236497b99928c0 Mon Sep 17 00:00:00 2001 From: "Brenno A. C. Caldato" Date: Mon, 11 Jan 2021 21:21:36 -0300 Subject: [PATCH 17/27] Apply suggestions from code review Co-authored-by: Frank Dana --- src/effects/Stabilizer.h | 8 ++++---- src/effects/Tracker.h | 6 +++--- src/sort_filter/KalmanTracker.cpp | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/effects/Stabilizer.h b/src/effects/Stabilizer.h index daac6077..b73b0053 100644 --- a/src/effects/Stabilizer.h +++ b/src/effects/Stabilizer.h @@ -95,9 +95,9 @@ namespace openshot Keyframe zoom; public: - std::string teste; - std::map trajectoryData; // Save camera trajectory data - std::map transformationData; // Save transormation data + std::string teste; + std::map trajectoryData; // Save camera trajectory data + std::map transformationData; // Save transormation data /// Blank constructor, useful when using Json to load the effect properties Stabilizer(std::string clipTrackerDataPath); @@ -119,7 +119,7 @@ namespace openshot std::shared_ptr GetFrame(int64_t frame_number) override { return GetFrame(std::shared_ptr (new Frame()), frame_number); } // Load protobuf data file - bool LoadStabilizedData(std::string inputFilePath); + bool LoadStabilizedData(std::string inputFilePath); /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object diff --git a/src/effects/Tracker.h b/src/effects/Tracker.h index abc816e1..65997061 100644 --- a/src/effects/Tracker.h +++ b/src/effects/Tracker.h @@ -92,7 +92,7 @@ namespace openshot public: - std::map trackedDataById; // Save object tracking box data + std::map trackedDataById; // Save object tracking box data /// Blank constructor, useful when using Json to load the effect properties Tracker(std::string clipTrackerDataPath); @@ -113,10 +113,10 @@ namespace openshot std::shared_ptr GetFrame(int64_t frame_number) override { return GetFrame(std::shared_ptr (new Frame()), frame_number); } // Load protobuf data file - bool LoadTrackedData(std::string inputFilePath); + bool LoadTrackedData(std::string inputFilePath); // Get tracker info for the desired frame - EffectFrameData GetTrackedData(size_t frameId); + EffectFrameData GetTrackedData(size_t frameId); /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object diff --git a/src/sort_filter/KalmanTracker.cpp b/src/sort_filter/KalmanTracker.cpp index 0762ba56..bb8519c2 100644 --- a/src/sort_filter/KalmanTracker.cpp +++ b/src/sort_filter/KalmanTracker.cpp @@ -19,7 +19,8 @@ void KalmanTracker::init_kf( measurement = Mat::zeros(measureNum, 1, CV_32F); - kf.transitionMatrix = (Mat_(stateNum, stateNum) << 1, 0, 0, 0, 1, 0, 0, + kf.transitionMatrix = (Mat_(7, 7) << 1, 0, 0, 0, 1, 0, 0, + 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, From b6975ae4cf5c1919bb78ed32484d890b9b07b2b9 Mon Sep 17 00:00:00 2001 From: "Brenno A. C. Caldato" Date: Mon, 11 Jan 2021 21:22:36 -0300 Subject: [PATCH 18/27] Update src/effects/Stabilizer.h Co-authored-by: Frank Dana --- src/effects/Stabilizer.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/effects/Stabilizer.h b/src/effects/Stabilizer.h index b73b0053..31e9d2e3 100644 --- a/src/effects/Stabilizer.h +++ b/src/effects/Stabilizer.h @@ -116,7 +116,9 @@ namespace openshot /// @param frame_number The frame number (starting at 1) of the effect on the timeline. std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; - std::shared_ptr GetFrame(int64_t frame_number) override { return GetFrame(std::shared_ptr (new Frame()), frame_number); } + std::shared_ptr GetFrame(int64_t frame_number) override { + return GetFrame(std::make_shared(), frame_number); + }; // Load protobuf data file bool LoadStabilizedData(std::string inputFilePath); From 8bc959bbb2f134d19e9b555df653667a9f54e60c Mon Sep 17 00:00:00 2001 From: FeRD Date: Tue, 12 Jan 2021 21:00:03 -0500 Subject: [PATCH 19/27] Results of include-what-you-use run --- iwyu.txt | 4174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 4174 insertions(+) create mode 100644 iwyu.txt diff --git a/iwyu.txt b/iwyu.txt new file mode 100644 index 00000000..15b7fda0 --- /dev/null +++ b/iwyu.txt @@ -0,0 +1,4174 @@ +error: no such file or directory: '/home/ferd/devel/libopenshot/build/src/openshot_autogen/mocs_compilation.cpp' +error: no input files +error: unable to handle compilation, expected exactly one compiler job in '' + + +/home/ferd/devel/libopenshot/src/AudioResampler.h should add these lines: +#include // for AudioS... +#include // for AudioS... +namespace juce { class ResamplingAudioSource; } +namespace openshot { class AudioBufferSource; } + +/home/ferd/devel/libopenshot/src/AudioResampler.h should remove these lines: +- #include "AudioBufferSource.h" // lines 34-34 +- #include "Exceptions.h" // lines 35-35 +- #include "JuceHeader.h" // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/AudioResampler.h: +#include // for AudioS... +#include // for AudioS... +namespace juce { class ResamplingAudioSource; } +namespace openshot { class AudioBufferSource; } +--- + +/home/ferd/devel/libopenshot/src/AudioResampler.cpp should add these lines: +#include +#include // for round +#include // for NULL +#include "AudioBufferSource.h" + +/home/ferd/devel/libopenshot/src/AudioResampler.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/AudioResampler.cpp: +#include "AudioResampler.h" +#include +#include // for round +#include // for NULL +#include "AudioBufferSource.h" +--- + + +/home/ferd/devel/libopenshot/src/AudioBufferSource.h should add these lines: +#include +#include +#include +namespace juce { struct AudioSourceChannelInfo; } + +/home/ferd/devel/libopenshot/src/AudioBufferSource.h should remove these lines: +- #include // lines 34-34 +- #include "JuceHeader.h" // lines 35-35 + +The full include-list for /home/ferd/devel/libopenshot/src/AudioBufferSource.h: +#include +#include +#include +namespace juce { struct AudioSourceChannelInfo; } +--- + +/home/ferd/devel/libopenshot/src/AudioBufferSource.cpp should add these lines: +#include // for AudioSourceC... +#include // for NULL, std + +/home/ferd/devel/libopenshot/src/AudioBufferSource.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/AudioBufferSource.cpp: +#include "AudioBufferSource.h" +#include // for AudioSourceC... +#include // for NULL, std +--- + + +/home/ferd/devel/libopenshot/src/AudioReaderSource.h should add these lines: +#include +#include +#include +#include +#include +namespace juce { struct AudioSourceChannelInfo; } +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/AudioReaderSource.h should remove these lines: +- #include // lines 34-34 +- #include "JuceHeader.h" // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/AudioReaderSource.h: +#include +#include +#include +#include +#include +#include "ReaderBase.h" +namespace juce { struct AudioSourceChannelInfo; } +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/AudioReaderSource.cpp should add these lines: +#include // for AudioSourceC... +#include // for NULL, std +#include "Exceptions.h" // for OutOfBoundsF... +#include "Frame.h" // for Frame +#include "Settings.h" // for openshot +#include "ZmqLogger.h" // for ZmqLogger + +/home/ferd/devel/libopenshot/src/AudioReaderSource.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/AudioReaderSource.cpp: +#include "AudioReaderSource.h" +#include // for AudioSourceC... +#include // for NULL, std +#include "Exceptions.h" // for OutOfBoundsF... +#include "Frame.h" // for Frame +#include "Settings.h" // for openshot +#include "ZmqLogger.h" // for ZmqLogger +--- + + +/home/ferd/devel/libopenshot/src/CacheBase.h should add these lines: +#include // for int64_t +#include // for string +#include "json/json.h" // for Value +namespace juce { class CriticalSection; } +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/CacheBase.h should remove these lines: +- #include // lines 35-35 +- #include "Exceptions.h" // lines 37-37 +- #include "Frame.h" // lines 36-36 +- #include "Json.h" // lines 38-38 + +The full include-list for /home/ferd/devel/libopenshot/src/CacheBase.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "json/json.h" // for Value +namespace juce { class CriticalSection; } +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/CacheBase.cpp should add these lines: +#include // for CriticalSection +#include // for stringstream +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/CacheBase.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/CacheBase.cpp: +#include "CacheBase.h" +#include // for CriticalSection +#include // for stringstream +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/CacheDisk.h should add these lines: +#include // for QDir +#include // for int64_t +#include // for string +#include // for vector +#include "json/json.h" // for Value +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/CacheDisk.h should remove these lines: +- #include // lines 40-40 +- #include "Exceptions.h" // lines 39-39 +- #include "Frame.h" // lines 38-38 + +The full include-list for /home/ferd/devel/libopenshot/src/CacheDisk.h: +#include // for QDir +#include // for int64_t +#include // for deque +#include // for map +#include // for shared_ptr +#include // for string +#include // for vector +#include "CacheBase.h" // for CacheBase +#include "json/json.h" // for Value +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/CacheDisk.cpp should add these lines: +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for QFile +#include // for QImage, QImage::... +#include // for QIODevice, QIODe... +#include // for QString, operator+ +#include // for QTextStream, ope... +#include // for NULL +#include // for sort +#include // for int64_t +#include // for operator!= +#include // for stringstream +#include "ChannelLayouts.h" // for ChannelLayout +#include "Exceptions.h" // for InvalidJSON +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/CacheDisk.cpp should remove these lines: +- #include // lines 34-34 +- #include // lines 35-35 +- #include // lines 33-33 + +The full include-list for /home/ferd/devel/libopenshot/src/CacheDisk.cpp: +#include "CacheDisk.h" +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for QFile +#include // for QImage, QImage::... +#include // for QIODevice, QIODe... +#include // for QString, operator+ +#include // for QTextStream, ope... +#include // for NULL +#include // for sort +#include // for int64_t +#include // for operator!= +#include // for stringstream +#include "ChannelLayouts.h" // for ChannelLayout +#include "Exceptions.h" // for InvalidJSON +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "QtUtilities.h" // for endl +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/CacheMemory.h should add these lines: +#include // for int64_t +#include // for string +#include // for vector +#include "json/json.h" // for Value +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/CacheMemory.h should remove these lines: +- #include "Exceptions.h" // lines 39-39 +- #include "Frame.h" // lines 38-38 + +The full include-list for /home/ferd/devel/libopenshot/src/CacheMemory.h: +#include // for int64_t +#include // for deque +#include // for map +#include // for shared_ptr +#include // for string +#include // for vector +#include "CacheBase.h" // for CacheBase +#include "json/json.h" // for Value +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/CacheMemory.cpp should add these lines: +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for sort +#include // for NULL, std +#include // for int64_t +#include // for operator!=, reve... +#include "Exceptions.h" // for InvalidJSON +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/CacheMemory.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/CacheMemory.cpp: +#include "CacheMemory.h" +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for sort +#include // for NULL, std +#include // for int64_t +#include // for operator!=, reve... +#include "Exceptions.h" // for InvalidJSON +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/Color.h should add these lines: +#include // for int64_t +#include // for string +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/Color.h should remove these lines: +- #include // lines 35-35 + +The full include-list for /home/ferd/devel/libopenshot/src/Color.h: +#include // for int64_t +#include // for string +#include "KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/Color.cpp should add these lines: +#include // for exception +#include // for sqrt +#include // for QColor +#include // for QString +#include "Exceptions.h" // for InvalidJSON, openshot +#include "Json.h" // for stringToJson + +/home/ferd/devel/libopenshot/src/Color.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Color.cpp: +#include "Color.h" +#include // for exception +#include // for sqrt +#include // for QColor +#include // for QString +#include "Exceptions.h" // for InvalidJSON, openshot +#include "Json.h" // for stringToJson +--- + + +/home/ferd/devel/libopenshot/src/ChunkWriter.h should add these lines: +#include // for int64_t +#include // for shared_ptr +#include // for string +namespace openshot { class FFmpegWriter; } +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } + +/home/ferd/devel/libopenshot/src/ChunkWriter.h should remove these lines: +- #include // lines 48-48 +- #include // lines 47-47 +- #include // lines 49-49 +- #include // lines 41-41 +- #include // lines 45-45 +- #include // lines 42-42 +- #include // lines 44-44 +- #include // lines 43-43 +- #include // lines 46-46 +- #include "CacheMemory.h" // lines 37-37 +- #include "Exceptions.h" // lines 38-38 +- #include "FFmpegWriter.h" // lines 36-36 +- #include "Json.h" // lines 39-39 +- #include "ReaderBase.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/src/ChunkWriter.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "WriterBase.h" // for WriterBase +namespace openshot { class FFmpegWriter; } +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } +--- + +/home/ferd/devel/libopenshot/src/ChunkWriter.cpp should add these lines: +#include // for QDir +#include // for operator+, QString +#include // for ofstream, basic_ostream, stringstream, endl +#include "Exceptions.h" // for WriterClosed +#include "FFmpegWriter.h" // for FFmpegWriter +#include "Frame.h" // for Frame +#include "ReaderBase.h" // for ReaderBase +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/ChunkWriter.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/ChunkWriter.cpp: +#include "ChunkWriter.h" +#include // for QDir +#include // for operator+, QString +#include // for ofstream, basic_ostream, stringstream, endl +#include "Exceptions.h" // for WriterClosed +#include "FFmpegWriter.h" // for FFmpegWriter +#include "Frame.h" // for Frame +#include "ReaderBase.h" // for ReaderBase +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/effects/../ChunkReader.h should add these lines: +#include // for NULL + +/home/ferd/devel/libopenshot/src/effects/../ChunkReader.h should remove these lines: +- #include // lines 36-36 +- #include // lines 35-35 +- #include "CacheMemory.h" // lines 40-40 +- #include "Frame.h" // lines 38-38 +- #include "Json.h" // lines 39-39 +- #include "ReaderBase.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/../ChunkReader.h: +#include // for NULL +--- + +/home/ferd/devel/libopenshot/src/ChunkReader.cpp should add these lines: +#include // for exception +#include // for QDir +#include // for operator+, QString +#include // for int64_t +#include // for shared_ptr, __shared_ptr_access +#include // for stringstream, ifstream, basic_o... +#include // for string, stoll, getline, operator<< +#include "Settings.h" // for openshot +#include "effects/../ChunkReader.h" // for ChunkReader, ChunkLocation, Chu... +#include "effects/../Exceptions.h" // for InvalidJSON, InvalidFile, Chunk... +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../ReaderBase.h" // for ReaderInfo, ReaderBase +#include "json/json.h" // for Value, parseFromStream, CharRea... + +/home/ferd/devel/libopenshot/src/ChunkReader.cpp should remove these lines: +- #include // lines 34-34 +- #include "FFmpegReader.h" // lines 32-32 + +The full include-list for /home/ferd/devel/libopenshot/src/ChunkReader.cpp: +#include "ChunkReader.h" +#include // for exception +#include // for QDir +#include // for operator+, QString +#include // for int64_t +#include // for shared_ptr, __shared_ptr_access +#include // for stringstream, ifstream, basic_o... +#include // for string, stoll, getline, operator<< +#include "Settings.h" // for openshot +#include "effects/../ChunkReader.h" // for ChunkReader, ChunkLocation, Chu... +#include "effects/../Exceptions.h" // for InvalidJSON, InvalidFile, Chunk... +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../ReaderBase.h" // for ReaderInfo, ReaderBase +#include "json/json.h" // for Value, parseFromStream, CharRea... +--- + + +/home/ferd/devel/libopenshot/src/Coordinate.h should add these lines: +#include // for string +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/Coordinate.h should remove these lines: +- #include // lines 34-34 +- #include "Exceptions.h" // lines 35-35 +- #include "Fraction.h" // lines 36-36 +- #include "Json.h" // lines 37-37 + +The full include-list for /home/ferd/devel/libopenshot/src/Coordinate.h: +#include // for string +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/Coordinate.cpp should add these lines: +#include // for exception +#include // for std +#include "Exceptions.h" // for InvalidJSON, openshot +#include "Json.h" // for stringToJson + +/home/ferd/devel/libopenshot/src/Coordinate.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Coordinate.cpp: +#include "Coordinate.h" +#include // for exception +#include // for std +#include "Exceptions.h" // for InvalidJSON, openshot +#include "Json.h" // for stringToJson +--- + + +/home/ferd/devel/libopenshot/src/ClipBase.h should add these lines: +#include // for NULL +#include // for int64_t +#include // for string +#include "json/json.h" // for Value +namespace openshot { class Frame; } +namespace openshot { class Keyframe; } +namespace openshot { class TimelineBase; } + +/home/ferd/devel/libopenshot/src/ClipBase.h should remove these lines: +- #include // lines 35-35 +- #include "Exceptions.h" // lines 37-37 +- #include "Frame.h" // lines 38-38 +- #include "Json.h" // lines 41-41 +- #include "KeyFrame.h" // lines 40-40 +- #include "Point.h" // lines 39-39 +- #include "TimelineBase.h" // lines 42-42 + +The full include-list for /home/ferd/devel/libopenshot/src/ClipBase.h: +#include // for NULL +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "CacheMemory.h" // for CacheMemory +#include "json/json.h" // for Value +namespace openshot { class Frame; } +namespace openshot { class Keyframe; } +namespace openshot { class TimelineBase; } +--- + +/home/ferd/devel/libopenshot/src/ClipBase.cpp should add these lines: +#include "Coordinate.h" // for Coordinate +#include "KeyFrame.h" // for Keyframe +#include "Point.h" // for Point, CONSTANT +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/ClipBase.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/ClipBase.cpp: +#include "ClipBase.h" +#include "Coordinate.h" // for Coordinate +#include "KeyFrame.h" // for Keyframe +#include "Point.h" // for Point, CONSTANT +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/CrashHandler.h should add these lines: +#include // for siginfo_t + +/home/ferd/devel/libopenshot/src/CrashHandler.h should remove these lines: +- #include // lines 45-45 +- #include // lines 44-44 +- #include // lines 42-42 +- #include // lines 36-36 +- #include // lines 34-34 +- #include "ZmqLogger.h" // lines 46-46 + +The full include-list for /home/ferd/devel/libopenshot/src/CrashHandler.h: +#include // for siginfo_t +#include // for FILE +--- + +/home/ferd/devel/libopenshot/src/CrashHandler.cpp should add these lines: +#include // for __cxa_demangle +#include // for backtrace, backtrace_symbols +#include // for sigaction, sigemptyset, SIGABRT, SIGBUS, SIGFPE +#include // for NULL, exit, free +#include // for operator<<, setw, left +#include // for operator<<, basic_ostream, char_traits, endl +#include "Settings.h" // for openshot +#include "ZmqLogger.h" // for ZmqLogger + +/home/ferd/devel/libopenshot/src/CrashHandler.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/CrashHandler.cpp: +#include "CrashHandler.h" +#include // for __cxa_demangle +#include // for backtrace, backtrace_symbols +#include // for sigaction, sigemptyset, SIGABRT, SIGBUS, SIGFPE +#include // for NULL, exit, free +#include // for operator<<, setw, left +#include // for operator<<, basic_ostream, char_traits, endl +#include "Settings.h" // for openshot +#include "ZmqLogger.h" // for ZmqLogger +--- + + +/home/ferd/devel/libopenshot/src/Clip.h should add these lines: +#include // for AudioS... +#include // for Critic... +#include // for int64_t +#include // for list +#include "CacheMemory.h" // for CacheM... +#include "effects/../Color.h" // for Color +#include "effects/../EffectBase.h" // for Effect... +#include "json/json.h" // for Value +namespace openshot { class AudioResampler; } +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/Clip.h should remove these lines: +- #include // lines 36-36 +- #include "AudioResampler.h" // lines 37-37 +- #include "Color.h" // lines 39-39 +- #include "EffectBase.h" // lines 41-41 +- #include "EffectInfo.h" // lines 43-43 +- #include "Effects.h" // lines 42-42 +- #include "Fraction.h" // lines 44-44 +- #include "Frame.h" // lines 45-45 +- #include "JuceHeader.h" // lines 48-48 + +The full include-list for /home/ferd/devel/libopenshot/src/Clip.h: +#include // for AudioS... +#include // for Critic... +#include // for int64_t +#include // for list +#include // for shared... +#include // for string +#include "CacheMemory.h" // for CacheM... +#include "ClipBase.h" // for ClipBase +#include "Enums.h" // for Anchor... +#include "KeyFrame.h" // for Keyframe +#include "ReaderBase.h" // for Reader... +#include "effects/../Color.h" // for Color +#include "effects/../EffectBase.h" // for Effect... +#include "json/json.h" // for Value +namespace openshot { class AudioResampler; } +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/Clip.cpp should add these lines: +#include // for QFlags +#include // for exception +#include // for tolower +#include // for GenericScopedLock +#include // for fabs, round, abs +#include // for QColor +#include // for QImage +#include // for KeepAspectRatio, Igno... +#include // for QPainter, operator| +#include // for QSize +#include // for QString +#include // for QTransform +#include // for NULL, abs, strtof +#include // for transform +#include // for map +#include // for operator<<, stringstream +#include "AudioBufferSource.h" // for openshot +#include "AudioResampler.h" // for AudioResampler +#include "EffectInfo.h" // for EffectInfo +#include "OpenMPUtilities.h" // for OPEN_MP_NUM_PROCESSORS +#include "TimelineBase.h" // for TimelineBase +#include "ZmqLogger.h" // for ZmqLogger +#include "effects/../Exceptions.h" // for ReaderClosed, Invalid... +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/Clip.cpp should remove these lines: +- #include "FrameMapper.h" // lines 33-33 + +The full include-list for /home/ferd/devel/libopenshot/src/Clip.cpp: +#include "Clip.h" +#include // for QFlags +#include // for exception +#include // for tolower +#include // for GenericScopedLock +#include // for fabs, round, abs +#include // for QColor +#include // for QImage +#include // for KeepAspectRatio, Igno... +#include // for QPainter, operator| +#include // for QSize +#include // for QString +#include // for QTransform +#include // for NULL, abs, strtof +#include // for transform +#include // for map +#include // for operator<<, stringstream +#include "AudioBufferSource.h" // for openshot +#include "AudioResampler.h" // for AudioResampler +#include "ChunkReader.h" // for ChunkReader, ChunkVer... +#include "DummyReader.h" // for DummyReader +#include "EffectInfo.h" // for EffectInfo +#include "FFmpegReader.h" // for FFmpegReader +#include "OpenMPUtilities.h" // for OPEN_MP_NUM_PROCESSORS +#include "QtImageReader.h" // for QtImageReader +#include "Timeline.h" // for Timeline +#include "TimelineBase.h" // for TimelineBase +#include "ZmqLogger.h" // for ZmqLogger +#include "effects/../Exceptions.h" // for ReaderClosed, Invalid... +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/RendererBase.h should add these lines: +#include // for int64_t +class QImage; + +/home/ferd/devel/libopenshot/src/RendererBase.h should remove these lines: +- #include // lines 35-35 +- #include "Frame.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/src/RendererBase.h: +#include // for int64_t +#include // for shared_ptr +class QImage; +namespace openshot { class Frame; } // lines 40-40 +--- + +/home/ferd/devel/libopenshot/src/RendererBase.cpp should add these lines: +#include "Frame.h" // for Frame +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/RendererBase.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/RendererBase.cpp: +#include "RendererBase.h" +#include "Frame.h" // for Frame +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/DummyReader.h should add these lines: +#include // for int64_t +#include // for string +#include "json/json.h" // for Value +namespace openshot { class CacheBase; } +namespace openshot { class Fraction; } +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/DummyReader.h should remove these lines: +- #include // lines 39-39 +- #include // lines 40-40 +- #include // lines 36-36 +- #include // lines 38-38 +- #include "Exceptions.h" // lines 43-43 +- #include "Fraction.h" // lines 44-44 + +The full include-list for /home/ferd/devel/libopenshot/src/DummyReader.h: +#include // for int64_t +#include // for NULL +#include // for shared_ptr +#include // for string +#include "CacheMemory.h" // for CacheMemory +#include "ReaderBase.h" // for ReaderBase +#include "json/json.h" // for Value +namespace openshot { class CacheBase; } +namespace openshot { class Fraction; } +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/DummyReader.cpp should add these lines: +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include "CacheBase.h" // for CacheBase +#include "Exceptions.h" // for InvalidFile, Inv... +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/DummyReader.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/DummyReader.cpp: +#include "DummyReader.h" +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include "CacheBase.h" // for CacheBase +#include "Exceptions.h" // for InvalidFile, Inv... +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/ReaderBase.h should add these lines: +#include // for CriticalSection +#include // for int64_t +#include // for map +#include // for string +#include "json/json.h" // for Value +namespace openshot { class CacheBase; } +namespace openshot { class ClipBase; } +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/ReaderBase.h should remove these lines: +- #include // lines 47-47 +- #include // lines 49-49 +- #include // lines 48-48 +- #include // lines 50-50 +- #include // lines 46-46 +- #include // lines 37-37 +- #include // lines 35-35 +- #include // lines 34-34 +- #include // lines 38-38 +- #include "CacheMemory.h" // lines 39-39 +- #include "ClipBase.h" // lines 41-41 +- #include "Frame.h" // lines 43-43 +- #include "Json.h" // lines 44-44 +- #include "ZmqLogger.h" // lines 45-45 + +The full include-list for /home/ferd/devel/libopenshot/src/ReaderBase.h: +#include // for CriticalSection +#include // for int64_t +#include // for map +#include // for shared_ptr +#include // for string +#include "ChannelLayouts.h" // for ChannelLayout +#include "Fraction.h" // for Fraction +#include "json/json.h" // for Value +namespace openshot { class CacheBase; } +namespace openshot { class ClipBase; } +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/ReaderBase.cpp should add these lines: +#include // for NULL +#include // for operator<<, setprecision +#include // for operator<<, endl, basic_ostream, basic_ostream... +#include // for pair +#include "Settings.h" // for openshot +namespace openshot { class ClipBase; } + +/home/ferd/devel/libopenshot/src/ReaderBase.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/ReaderBase.cpp: +#include "ReaderBase.h" +#include // for NULL +#include // for operator<<, setprecision +#include // for operator<<, endl, basic_ostream, basic_ostream... +#include // for pair +#include "Settings.h" // for openshot +namespace openshot { class ClipBase; } +--- + + +/home/ferd/devel/libopenshot/src/EffectBase.h should add these lines: +#include // for string +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/EffectBase.h should remove these lines: +- #include // lines 35-35 +- #include // lines 34-34 +- #include // lines 36-36 +- #include "Frame.h" // lines 39-39 +- #include "Json.h" // lines 38-38 + +The full include-list for /home/ferd/devel/libopenshot/src/EffectBase.h: +#include // for string +#include "ClipBase.h" // for ClipBase +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/EffectBase.cpp should add these lines: +#include // for exception +#include // for NULL +#include // for operator<<, setprecision +#include // for operator<<, endl, basic_ostream, cout +#include "Exceptions.h" // for InvalidJSON +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/EffectBase.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/EffectBase.cpp: +#include "EffectBase.h" +#include // for exception +#include // for NULL +#include // for operator<<, setprecision +#include // for operator<<, endl, basic_ostream, cout +#include "Exceptions.h" // for InvalidJSON +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/WriterBase.h should add these lines: +#include // for int64_t +#include // for map +#include // for shared_ptr +#include // for string +#include "json/json.h" // for Value +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } + +/home/ferd/devel/libopenshot/src/WriterBase.h should remove these lines: +- #include // lines 35-35 +- #include // lines 34-34 +- #include "Frame.h" // lines 38-38 +- #include "ReaderBase.h" // lines 39-39 +- #include "ZmqLogger.h" // lines 40-40 + +The full include-list for /home/ferd/devel/libopenshot/src/WriterBase.h: +#include // for int64_t +#include // for map +#include // for shared_ptr +#include // for string +#include "ChannelLayouts.h" // for ChannelLayout +#include "Fraction.h" // for Fraction +#include "json/json.h" // for Value +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } +--- + +/home/ferd/devel/libopenshot/src/WriterBase.cpp should add these lines: +#include // for exception +#include // for operator<<, setprecision +#include // for operator<<, endl, basic_ostream, basic_o... +#include "Exceptions.h" // for InvalidJSON +#include "Json.h" // for stringToJson +#include "ReaderBase.h" // for ReaderBase, ReaderInfo + +/home/ferd/devel/libopenshot/src/WriterBase.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/WriterBase.cpp: +#include "WriterBase.h" +#include // for exception +#include // for operator<<, setprecision +#include // for operator<<, endl, basic_ostream, basic_o... +#include "Exceptions.h" // for InvalidJSON +#include "Json.h" // for stringToJson +#include "ReaderBase.h" // for ReaderBase, ReaderInfo +--- + + +/home/ferd/devel/libopenshot/src/EffectInfo.h should add these lines: +#include // for string +#include "json/json.h" // for Value +namespace openshot { class EffectBase; } + +/home/ferd/devel/libopenshot/src/EffectInfo.h should remove these lines: +- #include "Effects.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/src/EffectInfo.h: +#include // for string +#include "json/json.h" // for Value +namespace openshot { class EffectBase; } +--- + +/home/ferd/devel/libopenshot/src/EffectInfo.cpp should add these lines: +#include // for NULL +#include "Settings.h" // for openshot +#include "effects/Bars.h" // for Bars +#include "effects/Blur.h" // for Blur +#include "effects/Brightness.h" // for Brightness +#include "effects/Caption.h" // for Caption +#include "effects/ChromaKey.h" // for ChromaKey +#include "effects/ColorShift.h" // for ColorShift +#include "effects/Crop.h" // for Crop +#include "effects/Deinterlace.h" // for Deinterlace +#include "effects/Hue.h" // for Hue +#include "effects/Mask.h" // for Mask +#include "effects/Negate.h" // for Negate +#include "effects/Pixelate.h" // for Pixelate +#include "effects/Saturation.h" // for Saturation +#include "effects/Shift.h" // for Shift +#include "effects/Wave.h" // for Wave +namespace openshot { class EffectBase; } + +/home/ferd/devel/libopenshot/src/EffectInfo.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/EffectInfo.cpp: +#include "EffectInfo.h" +#include // for NULL +#include "Settings.h" // for openshot +#include "effects/Bars.h" // for Bars +#include "effects/Blur.h" // for Blur +#include "effects/Brightness.h" // for Brightness +#include "effects/Caption.h" // for Caption +#include "effects/ChromaKey.h" // for ChromaKey +#include "effects/ColorShift.h" // for ColorShift +#include "effects/Crop.h" // for Crop +#include "effects/Deinterlace.h" // for Deinterlace +#include "effects/Hue.h" // for Hue +#include "effects/Mask.h" // for Mask +#include "effects/Negate.h" // for Negate +#include "effects/Pixelate.h" // for Pixelate +#include "effects/Saturation.h" // for Saturation +#include "effects/Shift.h" // for Shift +#include "effects/Wave.h" // for Wave +namespace openshot { class EffectBase; } +--- + + +/home/ferd/devel/libopenshot/src/Fraction.h should add these lines: + +/home/ferd/devel/libopenshot/src/Fraction.h should remove these lines: +- #include // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/src/Fraction.h: +--- + +/home/ferd/devel/libopenshot/src/Fraction.cpp should add these lines: +#include // for round + +/home/ferd/devel/libopenshot/src/Fraction.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Fraction.cpp: +#include "Fraction.h" +#include // for round +--- + +/home/ferd/devel/libopenshot/src/FFmpegReader.cpp:42:9: warning: You are compiling with experimental hardware decode [-W#pragma-messages] +#pragma message "You are compiling with experimental hardware decode" + ^ + +/home/ferd/devel/libopenshot/src/effects/../FFmpegReader.h should add these lines: + +/home/ferd/devel/libopenshot/src/effects/../FFmpegReader.h should remove these lines: +- #include // lines 45-45 +- #include // lines 42-42 +- #include // lines 43-43 +- #include // lines 44-44 +- #include // lines 46-46 +- #include "CacheMemory.h" // lines 47-47 +- #include "Clip.h" // lines 48-48 +- #include "Exceptions.h" // lines 49-49 +- #include "FFmpegUtilities.h" // lines 40-40 +- #include "OpenMPUtilities.h" // lines 50-50 +- #include "ReaderBase.h" // lines 37-37 +- #include "Settings.h" // lines 51-51 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/../FFmpegReader.h: +--- + +/home/ferd/devel/libopenshot/src/FFmpegReader.cpp should add these lines: +#include // for exception +#include // for EAGAIN, EINVAL +#include // for CriticalSection +#include // for GenericScopedLock +#include // for AVCodecContext +#include // for AVStream, AVForm... +#include // for avio_size +#include // for AVMEDIA_TYPE_AUDIO +#include // for av_buffer_unref +#include // for av_get_default_c... +#include // for AVDictionaryEntry +#include // for AVERROR, AVERROR... +#include // for AVFrame, av_fram... +#include // for AVHWFramesConstr... +#include // for av_image_alloc +#include // for av_freep, av_free +#include // for av_opt_set_int +#include // for AVPixelFormat +#include // for AVRational +#include // for AV_SAMPLE_FMT_S16 +#include // for sws_freeContext +#include // for omp_set_max_acti... +#include // for QImage, QImage::... +#include // for QSize +#include // for QString +#include // for fprintf, snprintf +#include // for abs +#include // for memcpy +#include // for access, W_OK +#include // for max, min +#include // for round, abs +#include // for int64_t, uint8_t +#include // for NULL +#include // for multimap, map +#include // for shared_ptr, __sh... +#include // for string +#include // for pair +#include "CacheMemory.h" // for CacheMemory +#include "ChannelLayouts.h" // for ChannelLayout +#include "Clip.h" // for Clip +#include "Coordinate.h" // for Coordinate +#include "Enums.h" // for SCALE_CROP, SCAL... +#include "FFmpegUtilities.h" // for AV_GET_CODEC_ATT... +#include "OpenMPUtilities.h" // for OPEN_MP_NUM_PROC... +#include "Point.h" // for Point +#include "Settings.h" // for Settings, openshot +#include "TimelineBase.h" // for TimelineBase +#include "ZmqLogger.h" // for ZmqLogger +#include "effects/../Exceptions.h" // for InvalidCodec +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +#include "effects/../ReaderBase.h" // for ReaderInfo, Read... +#include "json/json.h" // for Value +struct SwsContext; + +/home/ferd/devel/libopenshot/src/FFmpegReader.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/FFmpegReader.cpp: +#include "FFmpegReader.h" +#include // for exception +#include // for EAGAIN, EINVAL +#include // for CriticalSection +#include // for GenericScopedLock +#include // for AVCodecContext +#include // for AVStream, AVForm... +#include // for avio_size +#include // for AVMEDIA_TYPE_AUDIO +#include // for av_buffer_unref +#include // for av_get_default_c... +#include // for AVDictionaryEntry +#include // for AVERROR, AVERROR... +#include // for AVFrame, av_fram... +#include // for AVHWFramesConstr... +#include // for av_image_alloc +#include // for av_freep, av_free +#include // for av_opt_set_int +#include // for AVPixelFormat +#include // for AVRational +#include // for AV_SAMPLE_FMT_S16 +#include // for sws_freeContext +#include // for omp_set_max_acti... +#include // for QImage, QImage::... +#include // for QSize +#include // for QString +#include // for fprintf, snprintf +#include // for abs +#include // for memcpy +#include // for access, W_OK +#include // for max, min +#include // for milliseconds +#include // for round, abs +#include // for int64_t, uint8_t +#include // for NULL +#include // for multimap, map +#include // for shared_ptr, __sh... +#include // for string +#include // for sleep_for +#include // for pair +#include "CacheMemory.h" // for CacheMemory +#include "ChannelLayouts.h" // for ChannelLayout +#include "Clip.h" // for Clip +#include "Coordinate.h" // for Coordinate +#include "Enums.h" // for SCALE_CROP, SCAL... +#include "FFmpegUtilities.h" // for AV_GET_CODEC_ATT... +#include "OpenMPUtilities.h" // for OPEN_MP_NUM_PROC... +#include "Point.h" // for Point +#include "Settings.h" // for Settings, openshot +#include "TimelineBase.h" // for TimelineBase +#include "ZmqLogger.h" // for ZmqLogger +#include "effects/../Exceptions.h" // for InvalidCodec +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +#include "effects/../ReaderBase.h" // for ReaderInfo, Read... +#include "json/json.h" // for Value +struct SwsContext; +--- + + +/home/ferd/devel/libopenshot/src/Frame.h should add these lines: +#include // for AudioS... +#include // for Critic... +#include // for QImage +#include // for int64_t +#include // for string +class QApplication; +namespace openshot { class AudioResampler; } + +/home/ferd/devel/libopenshot/src/Frame.h should remove these lines: +- #include // lines 40-40 +- #include // lines 37-37 +- #include // lines 38-38 +- #include // lines 34-34 +- #include // lines 36-36 +- #include // lines 35-35 +- #include "AudioBufferSource.h" // lines 43-43 +- #include "AudioResampler.h" // lines 44-44 +- #include "JuceHeader.h" // lines 46-46 +- #include "ZmqLogger.h" // lines 41-41 + +The full include-list for /home/ferd/devel/libopenshot/src/Frame.h: +#include // for AudioS... +#include // for Critic... +#include // for QImage +#include // for int64_t +#include // for shared... +#include // for string +#include "ChannelLayouts.h" // for Channe... +#include "Fraction.h" // for Fraction +class QApplication; +namespace openshot { class AudioResampler; } +--- + +/home/ferd/devel/libopenshot/src/Frame.cpp should add these lines: +#include +#include +#include +#include +#include +#include +#include +#include +#include // for fmod +#include +#include +#include +#include +#include +#include +#include +#include +#include // for qGray +#include // for QSize +#include +#include +#include +#include +#include +#include // for max +#include // for cout +#include +#include "AudioBufferSource.h" +#include "AudioResampler.h" +#include "Settings.h" + +/home/ferd/devel/libopenshot/src/Frame.cpp should remove these lines: +- #include // lines 34-34 +- #include // lines 37-37 +- #include // lines 38-38 +- #include // lines 42-42 +- #include // lines 35-35 +- #include // lines 44-44 +- #include // lines 41-41 +- #include // lines 36-36 +- #include // lines 45-45 +- #include // lines 39-39 +- #include // lines 40-40 +- #include // lines 43-43 +- #include // lines 46-46 +- #include "JuceHeader.h" // lines 32-32 + +The full include-list for /home/ferd/devel/libopenshot/src/Frame.cpp: +#include "Frame.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include // for fmod +#include +#include +#include +#include +#include +#include +#include +#include +#include // for qGray +#include // for QSize +#include +#include +#include +#include +#include +#include // for max +#include +#include // for cout +#include +#include +#include "AudioBufferSource.h" +#include "AudioResampler.h" +#include "Settings.h" +--- + +/home/ferd/devel/libopenshot/src/FFmpegWriter.cpp:41:9: warning: You are compiling with experimental hardware encode [-W#pragma-messages] +#pragma message "You are compiling with experimental hardware encode" + ^ +/home/ferd/devel/libopenshot/src/FFmpegWriter.cpp:562:13: warning: 456 enumeration values not handled in switch: 'AV_CODEC_ID_NONE', 'AV_CODEC_ID_MPEG1VIDEO', 'AV_CODEC_ID_MPEG2VIDEO'... [-Wswitch] + switch (c->codec_id) { + ^ + +/home/ferd/devel/libopenshot/src/FFmpegWriter.h should add these lines: +#include // for AVCodecContext +#include // for AVStream, AVFormatContext, AVOutpu... +#include // for AVFrame +#include // for int64_t, uint8_t, int16_t +#include // for deque +#include // for map +#include // for shared_ptr +#include // for string +#include // for vector +#include "ChannelLayouts.h" // for ChannelLayout +namespace openshot { class Fraction; } +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } +struct SwsContext; + +/home/ferd/devel/libopenshot/src/FFmpegWriter.h should remove these lines: +- #include // lines 50-50 +- #include // lines 48-48 +- #include // lines 49-49 +- #include "CacheMemory.h" // lines 51-51 +- #include "Exceptions.h" // lines 52-52 +- #include "OpenMPUtilities.h" // lines 53-53 +- #include "ReaderBase.h" // lines 42-42 +- #include "Settings.h" // lines 55-55 +- #include "ZmqLogger.h" // lines 54-54 + +The full include-list for /home/ferd/devel/libopenshot/src/FFmpegWriter.h: +#include // for AVCodecContext +#include // for AVStream, AVFormatContext, AVOutpu... +#include // for AVFrame +#include // for int64_t, uint8_t, int16_t +#include // for deque +#include // for map +#include // for shared_ptr +#include // for string +#include // for vector +#include "ChannelLayouts.h" // for ChannelLayout +#include "FFmpegUtilities.h" // for SWRCONTEXT, PixelFormat +#include "WriterBase.h" // for WriterBase +namespace openshot { class Fraction; } +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } +struct SwsContext; +--- + +/home/ferd/devel/libopenshot/src/FFmpegWriter.cpp should add these lines: +#include // for EAGAIN, EINVAL, ENOMEM +#include // for LIBAVCODEC_VERSION_MAJOR, LIBAVCO... +#include // for avio_close, avio_open, AVIO_FLAG_... +#include // for LIBAVFORMAT_VERSION_MAJOR +#include // for AV_NOPTS_VALUE, AVMEDIA_TYPE_VIDEO +#include // for av_buffer_unref, AVBufferRef, av_... +#include // for av_dict_set, av_dict_free, AVDict... +#include // for AVERROR, AVERROR_EOF +#include // for AVHWFramesContext, av_hwdevice_ct... +#include // for av_rescale_q +#include // for av_freep, av_malloc +#include // for av_opt_set_int, av_opt_set, av_op... +#include // for av_get_pix_fmt_name +#include // for AV_PIX_FMT_NV12, AVPixelFormat +#include // for av_make_q, AVRational, av_inv_q +#include // for av_get_bytes_per_sample, AV_SAMPL... +#include // for AV_VERSION_INT +#include // for sws_getContext, sws_freeContext +#include // for omp_set_max_active_levels, omp_se... +#include // for uchar +#include // for snprintf +#include // for strstr, memcpy, strcmp +#include // for access, W_OK +#include // for min, max +#include // for NULL +#include // for pair +#include "Exceptions.h" // for InvalidCodec, InvalidOptions, Inv... +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "OpenMPUtilities.h" // for FF_NUM_PROCESSORS, OPEN_MP_MAX_AC... +#include "ReaderBase.h" // for ReaderBase +#include "Settings.h" // for Settings, openshot +#include "ZmqLogger.h" // for ZmqLogger +#include "common.h" // for FFMIN +struct SwsContext; + +/home/ferd/devel/libopenshot/src/FFmpegWriter.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/FFmpegWriter.cpp: +#include "FFmpegWriter.h" +#include // for EAGAIN, EINVAL, ENOMEM +#include // for LIBAVCODEC_VERSION_MAJOR, LIBAVCO... +#include // for avio_close, avio_open, AVIO_FLAG_... +#include // for LIBAVFORMAT_VERSION_MAJOR +#include // for AV_NOPTS_VALUE, AVMEDIA_TYPE_VIDEO +#include // for av_buffer_unref, AVBufferRef, av_... +#include // for av_dict_set, av_dict_free, AVDict... +#include // for AVERROR, AVERROR_EOF +#include // for AVHWFramesContext, av_hwdevice_ct... +#include // for av_rescale_q +#include // for av_freep, av_malloc +#include // for av_opt_set_int, av_opt_set, av_op... +#include // for av_get_pix_fmt_name +#include // for AV_PIX_FMT_NV12, AVPixelFormat +#include // for av_make_q, AVRational, av_inv_q +#include // for av_get_bytes_per_sample, AV_SAMPL... +#include // for AV_VERSION_INT +#include // for sws_getContext, sws_freeContext +#include // for omp_set_max_active_levels, omp_se... +#include // for uchar +#include // for snprintf +#include // for strstr, memcpy, strcmp +#include // for access, W_OK +#include // for min, max +#include // for NULL +#include // for operator<<, basic_istream::operat... +#include // for pair +#include "Exceptions.h" // for InvalidCodec, InvalidOptions, Inv... +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "OpenMPUtilities.h" // for FF_NUM_PROCESSORS, OPEN_MP_MAX_AC... +#include "ReaderBase.h" // for ReaderBase +#include "Settings.h" // for Settings, openshot +#include "ZmqLogger.h" // for ZmqLogger +#include "common.h" // for FFMIN +struct SwsContext; +--- + + +/home/ferd/devel/libopenshot/src/Json.h should add these lines: + +/home/ferd/devel/libopenshot/src/Json.h should remove these lines: +- #include "Exceptions.h" // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/Json.h: +#include // for string +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/Json.cpp should add these lines: +#include "Exceptions.h" // for InvalidJSON + +/home/ferd/devel/libopenshot/src/Json.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Json.cpp: +#include "Json.h" +#include "Exceptions.h" // for InvalidJSON +--- + + +/home/ferd/devel/libopenshot/build/src/OpenShotVersion.h should add these lines: +#include // for string + +/home/ferd/devel/libopenshot/build/src/OpenShotVersion.h should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/build/src/OpenShotVersion.h: +#include // for basic_ostream::operator<<, operator<<, basic_ostream +#include // for string +--- + +(/home/ferd/devel/libopenshot/src/OpenShotVersion.cpp has correct #includes/fwd-decls) + + +/home/ferd/devel/libopenshot/src/KeyFrame.h should add these lines: +#include // for int64_t +#include // for string +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/KeyFrame.h should remove these lines: +- #include // lines 37-37 +- #include // lines 36-36 +- #include // lines 35-35 +- #include // lines 34-34 +- #include "Coordinate.h" // lines 41-41 +- #include "Exceptions.h" // lines 39-39 +- #include "Json.h" // lines 43-43 + +The full include-list for /home/ferd/devel/libopenshot/src/KeyFrame.h: +#include // for int64_t +#include // for string +#include // for vector +#include "Fraction.h" // for Fraction +#include "Point.h" // for Point, InterpolationType +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/KeyFrame.cpp should add these lines: +#include // for assert +#include // for exception +#include // for __alloc_traits<>::value_type +#include // for size_t +#include // for round, fabs +#include // for operator<<, setprecision +#include // for operator<<, basic_ostream<>::__ostream... +#include // for end, begin +#include // for allocator_traits<>::value_type +#include "Coordinate.h" // for Coordinate +#include "Exceptions.h" // for OutOfBoundsPoint, InvalidJSON, openshot +#include "Json.h" // for stringToJson + +/home/ferd/devel/libopenshot/src/KeyFrame.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/KeyFrame.cpp: +#include "KeyFrame.h" +#include // for assert +#include // for exception +#include // for __alloc_traits<>::value_type +#include // for size_t +#include // for lower_bound, move_backward +#include // for round, fabs +#include // for greater, greater_equal, less, less_equal +#include // for operator<<, setprecision +#include // for operator<<, basic_ostream<>::__ostream... +#include // for end, begin +#include // for allocator_traits<>::value_type +#include // for swap +#include "Coordinate.h" // for Coordinate +#include "Exceptions.h" // for OutOfBoundsPoint, InvalidJSON, openshot +#include "Json.h" // for stringToJson +--- + + +/home/ferd/devel/libopenshot/src/ZmqLogger.h should add these lines: +#include // for CriticalSection +namespace zmq { class context_t; } +namespace zmq { class socket_t; } + +/home/ferd/devel/libopenshot/src/ZmqLogger.h should remove these lines: +- #include // lines 44-44 +- #include // lines 41-41 +- #include // lines 38-38 +- #include // lines 42-42 +- #include // lines 36-36 +- #include // lines 35-35 +- #include // lines 40-40 +- #include // lines 43-43 +- #include "JuceHeader.h" // lines 45-45 +- #include "Settings.h" // lines 46-46 + +The full include-list for /home/ferd/devel/libopenshot/src/ZmqLogger.h: +#include // for CriticalSection +#include // for ofstream +#include // for string +namespace zmq { class context_t; } +namespace zmq { class socket_t; } +--- + +/home/ferd/devel/libopenshot/src/ZmqLogger.cpp should add these lines: +#include // for GenericScopedLock +#include // for memcpy +#include // for ZMQ_MAKE_VERSION, ZMQ... +#include // for NULL +#include // for socket_t, message_t +#include "Settings.h" // for Settings, openshot +struct tm; + +/home/ferd/devel/libopenshot/src/ZmqLogger.cpp should remove these lines: +- #include // lines 39-39 + +The full include-list for /home/ferd/devel/libopenshot/src/ZmqLogger.cpp: +#include "ZmqLogger.h" +#include // for GenericScopedLock +#include // for memcpy +#include // for ZMQ_MAKE_VERSION, ZMQ... +#include // for milliseconds +#include // for NULL +#include // for asctime, localtime, time +#include // for operator<<, setprecision +#include // for cout +#include // for sleep_for +#include // for socket_t, message_t +#include "Settings.h" // for Settings, openshot +struct tm; +--- + + +/home/ferd/devel/libopenshot/src/FrameMapper.h should add these lines: +#include // for int64_t +#include // for string +#include "ChannelLayouts.h" // for ChannelLayout +#include "effects/../Fraction.h" // for Fraction +#include "effects/../ReaderBase.h" // for ReaderBase +#include "json/json.h" // for Value +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/FrameMapper.h should remove these lines: +- #include // lines 34-34 +- #include // lines 36-36 +- #include // lines 35-35 +- #include "Exceptions.h" // lines 43-43 +- #include "Fraction.h" // lines 42-42 +- #include "Frame.h" // lines 41-41 +- #include "KeyFrame.h" // lines 44-44 +- #include "OpenMPUtilities.h" // lines 49-49 +- #include "ReaderBase.h" // lines 40-40 + +The full include-list for /home/ferd/devel/libopenshot/src/FrameMapper.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include // for vector +#include "CacheMemory.h" // for CacheMemory +#include "ChannelLayouts.h" // for ChannelLayout +#include "FFmpegUtilities.h" // for SWRCONTEXT +#include "effects/../Fraction.h" // for Fraction +#include "effects/../ReaderBase.h" // for ReaderBase +#include "json/json.h" // for Value +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/FrameMapper.cpp should add these lines: +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for avcodec_fill_aud... +#include // for AVFrame +#include // for av_freep, av_malloc +#include // for av_opt_set_int +#include // for AV_SAMPLE_FMT_S16 +#include // for QImage +#include // for NULL, memcpy +#include // for fabs, round +#include // for operator<<, basi... +#include "OpenMPUtilities.h" // for OPEN_MP_NUM_PROC... +#include "Settings.h" // for openshot +#include "ZmqLogger.h" // for ZmqLogger +#include "effects/../Exceptions.h" // for ReaderClosed +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson + +/home/ferd/devel/libopenshot/src/FrameMapper.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/FrameMapper.cpp: +#include "FrameMapper.h" +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for avcodec_fill_aud... +#include // for AVFrame +#include // for av_freep, av_malloc +#include // for av_opt_set_int +#include // for AV_SAMPLE_FMT_S16 +#include // for QImage +#include // for NULL, memcpy +#include // for fabs, round +#include // for operator<<, basi... +#include "Clip.h" // for Clip +#include "OpenMPUtilities.h" // for OPEN_MP_NUM_PROC... +#include "Settings.h" // for openshot +#include "ZmqLogger.h" // for ZmqLogger +#include "effects/../Exceptions.h" // for ReaderClosed +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +--- + + +/home/ferd/devel/libopenshot/src/Point.h should add these lines: +#include // for string +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/Point.h should remove these lines: +- #include "Exceptions.h" // lines 35-35 +- #include "Json.h" // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/Point.h: +#include // for string +#include "Coordinate.h" // for Coordinate +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/Point.cpp should add these lines: +#include // for exception +#include // for std +#include "Exceptions.h" // for InvalidJSON, openshot +#include "Json.h" // for stringToJson + +/home/ferd/devel/libopenshot/src/Point.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Point.cpp: +#include "Point.h" +#include // for exception +#include // for std +#include "Exceptions.h" // for InvalidJSON, openshot +#include "Json.h" // for stringToJson +--- + + +/home/ferd/devel/libopenshot/src/PlayerBase.h should add these lines: +#include // for int64_t +namespace openshot { class ReaderBase; } + +/home/ferd/devel/libopenshot/src/PlayerBase.h should remove these lines: +- #include // lines 34-34 +- #include "ReaderBase.h" // lines 35-35 + +The full include-list for /home/ferd/devel/libopenshot/src/PlayerBase.h: +#include // for int64_t +namespace openshot { class ReaderBase; } +--- + +/home/ferd/devel/libopenshot/src/PlayerBase.cpp should add these lines: +#include "Settings.h" // for openshot +namespace openshot { class ReaderBase; } + +/home/ferd/devel/libopenshot/src/PlayerBase.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/PlayerBase.cpp: +#include "PlayerBase.h" +#include "Settings.h" // for openshot +namespace openshot { class ReaderBase; } +--- + + +/home/ferd/devel/libopenshot/src/Profiles.h should add these lines: +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/Profiles.h should remove these lines: +- #include // lines 41-41 +- #include // lines 40-40 +- #include // lines 38-38 +- #include // lines 39-39 +- #include // lines 42-42 +- #include // lines 43-43 +- #include // lines 37-37 +- #include // lines 34-34 +- #include // lines 36-36 +- #include "Exceptions.h" // lines 44-44 +- #include "Json.h" // lines 46-46 + +The full include-list for /home/ferd/devel/libopenshot/src/Profiles.h: +#include // for string +#include "Fraction.h" // for Fraction +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/Profiles.cpp should add these lines: +#include // for exception +#include // for QFile +#include // for QIODevice, QIODevice::ReadOnly +#include // for QList +#include // for QString +#include // for QStringList +#include // for QTextStream +#include // for operator>>, stringstream +#include "Exceptions.h" // for InvalidFile, InvalidJSON, openshot +#include "Json.h" // for stringToJson + +/home/ferd/devel/libopenshot/src/Profiles.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Profiles.cpp: +#include "Profiles.h" +#include // for exception +#include // for QFile +#include // for QIODevice, QIODevice::ReadOnly +#include // for QList +#include // for QString +#include // for QStringList +#include // for QTextStream +#include // for operator>>, stringstream +#include "Exceptions.h" // for InvalidFile, InvalidJSON, openshot +#include "Json.h" // for stringToJson +--- + + +/home/ferd/devel/libopenshot/src/QtHtmlReader.h should add these lines: +#include // for int64_t +#include // for string +#include "CacheBase.h" // for CacheBase +#include "json/json.h" // for Value +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/QtHtmlReader.h should remove these lines: +- #include // lines 41-41 +- #include // lines 42-42 +- #include // lines 38-38 +- #include // lines 40-40 +- #include "CacheMemory.h" // lines 44-44 +- #include "Exceptions.h" // lines 46-46 +- namespace openshot { class CacheBase; } // lines 53-53 + +The full include-list for /home/ferd/devel/libopenshot/src/QtHtmlReader.h: +#include // for int64_t +#include // for NULL +#include // for shared_ptr +#include // for string +#include "CacheBase.h" // for CacheBase +#include "Enums.h" // for GravityType +#include "ReaderBase.h" // for ReaderBase +#include "json/json.h" // for Value +class QImage; // lines 48-48 +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/QtHtmlReader.cpp should add these lines: +#include // for exception +#include // for QAbstractTextDocumentLayout +#include // for QBrush +#include // for QColor +#include // for QImage, QImage::Format_RGBA... +#include // for AlignHCenter, AlignLeft +#include // for QPainter +#include // for QSize, QSizeF +#include // for QTextDocument +#include // for QTextOption +#include // for round +#include "Exceptions.h" // for InvalidJSON +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/QtHtmlReader.cpp should remove these lines: +- #include // lines 38-38 +- #include // lines 37-37 +- #include // lines 34-34 +- #include // lines 35-35 +- #include // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/QtHtmlReader.cpp: +#include "QtHtmlReader.h" +#include // for exception +#include // for QAbstractTextDocumentLayout +#include // for QBrush +#include // for QColor +#include // for QImage, QImage::Format_RGBA... +#include // for AlignHCenter, AlignLeft +#include // for QPainter +#include // for QSize, QSizeF +#include // for QTextDocument +#include // for QTextOption +#include // for round +#include "Exceptions.h" // for InvalidJSON +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/effects/../QtImageReader.h should add these lines: + +/home/ferd/devel/libopenshot/src/effects/../QtImageReader.h should remove these lines: +- #include // lines 37-37 +- #include // lines 38-38 +- #include // lines 34-34 +- #include // lines 36-36 +- #include // lines 39-39 +- #include "Exceptions.h" // lines 40-40 +- #include "ReaderBase.h" // lines 41-41 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/../QtImageReader.h: +#include // for NULL +--- + +/home/ferd/devel/libopenshot/src/QtImageReader.cpp should add these lines: +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for QT_VERSION, QT_V... +#include // for QImage +#include // for KeepAspectRatio +#include // for QSize +#include // for QString +#include // for int64_t +#include // for max +#include // for round +#include // for shared_ptr, make... +#include // for string +#include "Coordinate.h" // for Coordinate +#include "Enums.h" // for SCALE_CROP, SCAL... +#include "Point.h" // for Point +#include "TimelineBase.h" // for TimelineBase +#include "effects/../Exceptions.h" // for InvalidJSON, Inv... +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +#include "effects/../QtImageReader.h" // for QtImageReader +#include "effects/../ReaderBase.h" // for ReaderInfo, Read... +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/QtImageReader.cpp should remove these lines: +- #include // lines 35-35 +- #include // lines 36-36 +- #include // lines 37-37 +- #include "CacheMemory.h" // lines 34-34 +- #include "Settings.h" // lines 32-32 + +The full include-list for /home/ferd/devel/libopenshot/src/QtImageReader.cpp: +#include "QtImageReader.h" +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for QT_VERSION, QT_V... +#include // for QImage +#include // for KeepAspectRatio +#include // for QSize +#include // for QString +#include // for int64_t +#include // for max +#include // for round +#include // for shared_ptr, make... +#include // for string +#include "Clip.h" // for Clip +#include "Coordinate.h" // for Coordinate +#include "Enums.h" // for SCALE_CROP, SCAL... +#include "Point.h" // for Point +#include "TimelineBase.h" // for TimelineBase +#include "effects/../Exceptions.h" // for InvalidJSON, Inv... +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +#include "effects/../QtImageReader.h" // for QtImageReader +#include "effects/../ReaderBase.h" // for ReaderInfo, Read... +#include "json/json.h" // for Value +--- + + +/home/ferd/devel/libopenshot/src/QtPlayer.h should add these lines: +#include // for int64_t +#include // for string +#include "Qt/../ReaderBase.h" // for ReaderBase +namespace openshot { class PlayerPrivate; } +namespace openshot { class RendererBase; } +namespace openshot { struct AudioDeviceInfo; } + +/home/ferd/devel/libopenshot/src/QtPlayer.h should remove these lines: +- #include // lines 35-35 +- #include "Qt/PlayerPrivate.h" // lines 38-38 +- #include "RendererBase.h" // lines 39-39 + +The full include-list for /home/ferd/devel/libopenshot/src/QtPlayer.h: +#include // for int64_t +#include // for string +#include // for vector +#include "PlayerBase.h" // for PlaybackMode, PlayerBase +#include "Qt/../ReaderBase.h" // for ReaderBase +namespace openshot { class PlayerPrivate; } +namespace openshot { class RendererBase; } +namespace openshot { struct AudioDeviceInfo; } +--- + +/home/ferd/devel/libopenshot/src/QtPlayer.cpp should add these lines: +#include // for NULL +#include "Qt/../AudioDeviceInfo.h" // for AudioDeviceInfo +#include "Qt/../Qt/AudioPlaybackThread.h" // for AudioPlaybackThread, Audio... +#include "Qt/../Qt/VideoCacheThread.h" // for VideoCacheThread +#include "RendererBase.h" // for RendererBase + +/home/ferd/devel/libopenshot/src/QtPlayer.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/QtPlayer.cpp: +#include "QtPlayer.h" +#include // for NULL +#include "Clip.h" // for Clip +#include "FFmpegReader.h" // for FFmpegReader +#include "Qt/../AudioDeviceInfo.h" // for AudioDeviceInfo +#include "Qt/../Qt/AudioPlaybackThread.h" // for AudioPlaybackThread, Audio... +#include "Qt/../Qt/VideoCacheThread.h" // for VideoCacheThread +#include "Qt/PlayerPrivate.h" // for PlayerPrivate +#include "Qt/VideoRenderer.h" // for VideoRenderer +#include "RendererBase.h" // for RendererBase +#include "Timeline.h" // for Timeline +--- + + +(/home/ferd/devel/libopenshot/src/TimelineBase.h has correct #includes/fwd-decls) + +(/home/ferd/devel/libopenshot/src/TimelineBase.cpp has correct #includes/fwd-decls) + + +/home/ferd/devel/libopenshot/src/Settings.h should add these lines: + +/home/ferd/devel/libopenshot/src/Settings.h should remove these lines: +- #include // lines 44-44 +- #include // lines 41-41 +- #include // lines 38-38 +- #include // lines 42-42 +- #include // lines 37-37 +- #include // lines 36-36 +- #include // lines 35-35 +- #include // lines 40-40 +- #include // lines 43-43 +- #include "JuceHeader.h" // lines 45-45 + +The full include-list for /home/ferd/devel/libopenshot/src/Settings.h: +#include // for string +--- + +/home/ferd/devel/libopenshot/src/Settings.cpp should add these lines: +#include // for NULL +#include // for std + +/home/ferd/devel/libopenshot/src/Settings.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Settings.cpp: +#include "Settings.h" +#include // for NULL +#include // for std +--- + + +/home/ferd/devel/libopenshot/src/QtTextReader.h should add these lines: +#include // for QFont +#include // for int64_t +#include // for string +#include "CacheBase.h" // for CacheBase +#include "json/json.h" // for Value +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/QtTextReader.h should remove these lines: +- #include // lines 41-41 +- #include // lines 42-42 +- #include // lines 38-38 +- #include // lines 40-40 +- #include "CacheMemory.h" // lines 44-44 +- #include "Exceptions.h" // lines 46-46 +- namespace openshot { class CacheBase; } // lines 53-53 + +The full include-list for /home/ferd/devel/libopenshot/src/QtTextReader.h: +#include // for QFont +#include // for int64_t +#include // for NULL +#include // for shared_ptr +#include // for string +#include "CacheBase.h" // for CacheBase +#include "Enums.h" // for GravityType +#include "ReaderBase.h" // for ReaderBase +#include "json/json.h" // for Value +class QImage; // lines 48-48 +namespace openshot { class Frame; } +--- + +/home/ferd/devel/libopenshot/src/QtTextReader.cpp should add these lines: +#include // for QFlags +#include // for exception +#include // for QBrush +#include // for QColor +#include // for QImage, QImage::Format_RGBA8888_Premulti... +#include // for operator|, AlignBottom, AlignLeft, Align... +#include // for QPainter +#include // for QPen +#include // for QSize +#include // for QString +#include // for round +#include "Exceptions.h" // for InvalidJSON +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot + +/home/ferd/devel/libopenshot/src/QtTextReader.cpp should remove these lines: +- #include // lines 34-34 +- #include // lines 35-35 + +The full include-list for /home/ferd/devel/libopenshot/src/QtTextReader.cpp: +#include "QtTextReader.h" +#include // for QFlags +#include // for exception +#include // for QBrush +#include // for QColor +#include // for QImage, QImage::Format_RGBA8888_Premulti... +#include // for operator|, AlignBottom, AlignLeft, Align... +#include // for QPainter +#include // for QPen +#include // for QSize +#include // for QString +#include // for round +#include "Exceptions.h" // for InvalidJSON +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +--- + + +/home/ferd/devel/libopenshot/src/Timeline.h should add these lines: +#include // for int64_t +#include // for map +#include // for string +#include // for vector +#include "ChannelLayouts.h" // for ChannelLayout +#include "effects/../Color.h" // for Color +#include "json/json.h" // for Value +namespace openshot { class Fraction; } +namespace openshot { class Frame; } +namespace openshot { class FrameMapper; } + +/home/ferd/devel/libopenshot/src/Timeline.h should remove these lines: +- #include // lines 40-40 +- #include // lines 38-38 +- #include // lines 39-39 +- #include "CacheDisk.h" // lines 42-42 +- #include "CacheMemory.h" // lines 43-43 +- #include "Color.h" // lines 44-44 +- #include "CrashHandler.h" // lines 46-46 +- #include "EffectInfo.h" // lines 50-50 +- #include "Effects.h" // lines 49-49 +- #include "Fraction.h" // lines 51-51 +- #include "Frame.h" // lines 52-52 +- #include "FrameMapper.h" // lines 53-53 +- #include "OpenMPUtilities.h" // lines 55-55 +- #include "Point.h" // lines 47-47 +- #include "Settings.h" // lines 57-57 + +The full include-list for /home/ferd/devel/libopenshot/src/Timeline.h: +#include // for int64_t +#include // for list +#include // for map +#include // for shared_ptr +#include // for mutex +#include // for set +#include // for string +#include // for vector +#include "CacheBase.h" // for CacheBase +#include "ChannelLayouts.h" // for ChannelLayout +#include "Clip.h" // for Clip +#include "EffectBase.h" // for EffectBase +#include "KeyFrame.h" // for Keyframe +#include "ReaderBase.h" // for ReaderBase +#include "TimelineBase.h" // for TimelineBase +#include "effects/../Color.h" // for Color +#include "json/json.h" // for Value +namespace openshot { class Fraction; } +namespace openshot { class Frame; } +namespace openshot { class FrameMapper; } +--- + +/home/ferd/devel/libopenshot/src/Timeline.cpp should add these lines: +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for round, fabs +#include // for omp_get_thread_num +#include // for QByteArray +#include // for QDir +#include // for QFile +#include // for QFileInfo +#include // for uint +#include // for QImage +#include // for QIODevice::ReadOnly +#include // for KeepAspectRatio +#include // for QPainter, QPaint... +#include // for QRegularExpressi... +#include // for QSize +#include // for QString, operator+ +#include // for QStaticStringData +#include // for NULL +#include // for max, max_element +#include "CacheMemory.h" // for CacheMemory +#include "CrashHandler.h" // for CrashHandler +#include "EffectInfo.h" // for EffectInfo +#include "Enums.h" // for VOLUME_MIX_AVERAGE +#include "FrameMapper.h" // for FrameMapper, PUL... +#include "OpenMPUtilities.h" // for OPEN_MP_NUM_PROC... +#include "Settings.h" // for Settings, openshot +#include "ZmqLogger.h" // for ZmqLogger +#include "effects/../EffectBase.h" // for EffectBase +#include "effects/../Exceptions.h" // for InvalidFile, Inv... +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/Timeline.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Timeline.cpp: +#include "Timeline.h" +#include // for exception +#include // for CriticalSection +#include // for GenericScopedLock +#include // for round, fabs +#include // for omp_get_thread_num +#include // for QByteArray +#include // for QDir +#include // for QFile +#include // for QFileInfo +#include // for uint +#include // for QImage +#include // for QIODevice::ReadOnly +#include // for KeepAspectRatio +#include // for QPainter, QPaint... +#include // for QRegularExpressi... +#include // for QSize +#include // for QString, operator+ +#include // for QStaticStringData +#include // for NULL +#include // for max, max_element +#include "CacheMemory.h" // for CacheMemory +#include "CrashHandler.h" // for CrashHandler +#include "EffectInfo.h" // for EffectInfo +#include "Enums.h" // for VOLUME_MIX_AVERAGE +#include "FrameMapper.h" // for FrameMapper, PUL... +#include "OpenMPUtilities.h" // for OPEN_MP_NUM_PROC... +#include "Settings.h" // for Settings, openshot +#include "ZmqLogger.h" // for ZmqLogger +#include "effects/../EffectBase.h" // for EffectBase +#include "effects/../Exceptions.h" // for InvalidFile, Inv... +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Bars.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Bars.h should remove these lines: +- #include "../Json.h" // lines 38-38 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Bars.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../Color.h" // for Color +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "../KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Bars.cpp should add these lines: +#include // for exception +#include // for QColor +#include // for QImage, QImage::Format_RGBA8888_P... +#include // for QString +#include // for memcpy, NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../Color.h" // for Color +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Bars.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Bars.cpp: +#include "Bars.h" +#include // for exception +#include // for QColor +#include // for QImage, QImage::Format_RGBA8888_P... +#include // for QString +#include // for memcpy, NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../Color.h" // for Color +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Blur.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Blur.h should remove these lines: +- #include "../Json.h" // lines 37-37 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Blur.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "../KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Blur.cpp should add these lines: +#include // for exception +#include // for round +#include // for QImage +#include // for NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Blur.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Blur.cpp: +#include "Blur.h" +#include // for exception +#include // for round +#include // for QImage +#include // for NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Brightness.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Brightness.h should remove these lines: +- #include "../Json.h" // lines 37-37 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Brightness.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "../KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Brightness.cpp should add these lines: +#include // for exception +#include // for QImage +#include // for NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Brightness.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Brightness.cpp: +#include "Brightness.h" +#include // for exception +#include // for QImage +#include // for NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/ChromaKey.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/ChromaKey.h should remove these lines: +- #include "../Exceptions.h" // lines 38-38 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/ChromaKey.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../Color.h" // for Color +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "../KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/ChromaKey.cpp should add these lines: +#include // for exception +#include // for QImage +#include // for NULL +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +#include "effects/../Color.h" // for Color +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Exceptions.h" // for InvalidJSON +#include "effects/../Frame.h" // for Frame +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/ChromaKey.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/ChromaKey.cpp: +#include "ChromaKey.h" +#include // for exception +#include // for QImage +#include // for NULL +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +#include "effects/../Color.h" // for Color +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Exceptions.h" // for InvalidJSON +#include "effects/../Frame.h" // for Frame +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Caption.h should add these lines: +#include // for QRegularExpressionMatch +#include // for int64_t +#include // for string +#include // for vector +#include "Color.h" // for Color +#include "EffectBase.h" // for EffectBase +#include "effects/../Frame.h" // for Frame +#include "json/json.h" // for Value +class QFont; +class QFontMetrics; + +/home/ferd/devel/libopenshot/src/effects/Caption.h should remove these lines: +- #include // lines 35-35 +- #include // lines 37-37 +- #include // lines 34-34 +- #include "../Color.h" // lines 38-38 +- #include "../EffectBase.h" // lines 39-39 +- #include "../Fraction.h" // lines 40-40 +- #include "../Json.h" // lines 41-41 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Caption.h: +#include // for QRegularExpressionMatch +#include // for int64_t +#include // for shared_ptr +#include // for string +#include // for vector +#include "../KeyFrame.h" // for Keyframe +#include "Color.h" // for Color +#include "EffectBase.h" // for EffectBase +#include "effects/../Frame.h" // for Frame +#include "json/json.h" // for Value +class QFont; +class QFontMetrics; +--- + +/home/ferd/devel/libopenshot/src/effects/Caption.cpp should add these lines: +#include // for QFlags +#include // for exception +#include // for QBrush +#include // for QColor +#include // for QFont +#include // for QFontMetricsF +#include // for QImage +#include // for QList +#include // for NoPen, SolidPattern, TextSingleLine +#include // for QPainter, operator|, QPainter::An... +#include // for QPainterPath +#include // for QPen +#include // for QPoint +#include // for QRectF +#include // for QString +#include // for QStringList +#include // for QStaticStringData, QStringLiteral +#include // for NULL +#include // for max +#include "Clip.h" // for Clip +#include "ReaderBase.h" // for ReaderInfo, ReaderBase +#include "effects/../Exceptions.h" // for InvalidJSON, openshot +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Caption.cpp should remove these lines: +- #include "../Clip.h" // lines 32-32 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Caption.cpp: +#include "Caption.h" +#include // for QFlags +#include // for exception +#include // for QBrush +#include // for QColor +#include // for QFont +#include // for QFontMetricsF +#include // for QImage +#include // for QList +#include // for NoPen, SolidPattern, TextSingleLine +#include // for QPainter, operator|, QPainter::An... +#include // for QPainterPath +#include // for QPen +#include // for QPoint +#include // for QRectF +#include // for QString +#include // for QStringList +#include // for QStaticStringData, QStringLiteral +#include // for NULL +#include // for max +#include "../Timeline.h" // for Timeline +#include "Clip.h" // for Clip +#include "ReaderBase.h" // for ReaderInfo, ReaderBase +#include "effects/../Exceptions.h" // for InvalidJSON, openshot +#include "effects/../Fraction.h" // for Fraction +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/ColorShift.h should add these lines: +#include // for int64_t +#include // for string +#include "Frame.h" // for Frame +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/ColorShift.h should remove these lines: +- #include // lines 37-37 +- #include // lines 36-36 +- #include "../Json.h" // lines 39-39 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/ColorShift.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../EffectBase.h" // for EffectBase +#include "../KeyFrame.h" // for Keyframe +#include "Frame.h" // for Frame +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/ColorShift.cpp should add these lines: +#include // for exception +#include // for QImage +#include // for NULL +#include // for memcpy +#include // for round, fabs, fmod +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/ColorShift.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/ColorShift.cpp: +#include "ColorShift.h" +#include // for exception +#include // for QImage +#include // for NULL +#include // for memcpy +#include // for round, fabs, fmod +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Deinterlace.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Deinterlace.h should remove these lines: +- #include "../Json.h" // lines 39-39 +- #include "../KeyFrame.h" // lines 40-40 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Deinterlace.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Deinterlace.cpp should add these lines: +#include // for exception +#include // for QImage, QImage::Format_RGBA8888_P... +#include // for FastTransformation, IgnoreAspectR... +#include // for NULL, memcpy +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson + +/home/ferd/devel/libopenshot/src/effects/Deinterlace.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Deinterlace.cpp: +#include "Deinterlace.h" +#include // for exception +#include // for QImage, QImage::Format_RGBA8888_P... +#include // for FastTransformation, IgnoreAspectR... +#include // for NULL, memcpy +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +--- + + +/home/ferd/devel/libopenshot/src/effects/Crop.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Crop.h should remove these lines: +- #include "../Json.h" // lines 38-38 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Crop.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../Color.h" // for Color +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "../KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Crop.cpp should add these lines: +#include // for exception +#include // for QColor +#include // for QImage, QImage::Format_RGBA8888_P... +#include // for QString +#include // for memcpy, NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Crop.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Crop.cpp: +#include "Crop.h" +#include // for exception +#include // for QColor +#include // for QImage, QImage::Format_RGBA8888_P... +#include // for QString +#include // for memcpy, NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Hue.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Hue.h should remove these lines: +- #include "../Json.h" // lines 37-37 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Hue.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "../KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Hue.cpp should add these lines: +#include // for exception +#include // for sqrtf, cos, sin +#include // for QImage +#include // for NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Hue.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Hue.cpp: +#include "Hue.h" +#include // for exception +#include // for sqrtf, cos, sin +#include // for QImage +#include // for NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Mask.h should add these lines: +#include // for int64_t +#include "EffectBase.h" // for EffectBase +#include "effects/../Frame.h" // for Frame +#include "json/json.h" // for Value +class QImage; + +/home/ferd/devel/libopenshot/src/effects/Mask.h should remove these lines: +- #include "../EffectBase.h" // lines 34-34 +- #include "../Json.h" // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Mask.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../KeyFrame.h" // for Keyframe +#include "EffectBase.h" // for EffectBase +#include "effects/../Frame.h" // for Frame +#include "json/json.h" // for Value +class QImage; +namespace openshot { class ReaderBase; } // lines 45-45 +--- + +/home/ferd/devel/libopenshot/src/effects/Mask.cpp should add these lines: +#include // for exception +#include // for QImage +#include // for IgnoreAspectRatio, SmoothTrans... +#include // for qGray +#include // for operator!=, QSize +#include // for NULL +#include "Settings.h" // for openshot +#include "effects/../ChunkReader.h" // for ChunkReader, ChunkVersion +#include "effects/../Exceptions.h" // for InvalidJSON +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +#include "effects/../QtImageReader.h" // for QtImageReader + +/home/ferd/devel/libopenshot/src/effects/Mask.cpp should remove these lines: +- #include "FFmpegReader.h" // lines 32-32 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Mask.cpp: +#include "Mask.h" +#include // for exception +#include // for QImage +#include // for IgnoreAspectRatio, SmoothTrans... +#include // for qGray +#include // for operator!=, QSize +#include // for NULL +#include "ReaderBase.h" // for ReaderBase, ReaderInfo +#include "Settings.h" // for openshot +#include "effects/../ChunkReader.h" // for ChunkReader, ChunkVersion +#include "effects/../Exceptions.h" // for InvalidJSON +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +#include "effects/../QtImageReader.h" // for QtImageReader +--- + + +/home/ferd/devel/libopenshot/src/effects/Negate.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Negate.h should remove these lines: +- #include // lines 42-42 +- #include "../KeyFrame.h" // lines 37-37 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Negate.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Negate.cpp should add these lines: +#include // for exception +#include // for QImage +#include // for NULL +#include "Exceptions.h" // for InvalidJSON +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame + +/home/ferd/devel/libopenshot/src/effects/Negate.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Negate.cpp: +#include "Negate.h" +#include // for exception +#include // for QImage +#include // for NULL +#include "Exceptions.h" // for InvalidJSON +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +--- + + +/home/ferd/devel/libopenshot/src/effects/Pixelate.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Pixelate.h should remove these lines: +- #include "../Json.h" // lines 37-37 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Pixelate.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "../KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Pixelate.cpp should add these lines: +#include // for exception +#include // for fabs, pow +#include // for QImage +#include // for SmoothTransformation +#include // for QPainter +#include // for QPoint +#include // for QRect +#include // for NULL +#include // for min +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Pixelate.cpp should remove these lines: +- #include // lines 34-34 +- #include // lines 35-35 +- #include // lines 37-37 +- #include // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Pixelate.cpp: +#include "Pixelate.h" +#include // for exception +#include // for fabs, pow +#include // for QImage +#include // for SmoothTransformation +#include // for QPainter +#include // for QPoint +#include // for QRect +#include // for NULL +#include // for min +#include "Exceptions.h" // for InvalidJSON +#include "Json.h" // for stringToJson +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Saturation.h should add these lines: +#include // for int64_t +#include // for string +#include "EffectBase.h" // for EffectBase +#include "effects/../Frame.h" // for Frame +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Saturation.h should remove these lines: +- #include // lines 39-39 +- #include // lines 40-40 +- #include // lines 36-36 +- #include // lines 37-37 +- #include // lines 38-38 +- #include "../ChunkReader.h" // lines 49-49 +- #include "../Color.h" // lines 42-42 +- #include "../EffectBase.h" // lines 34-34 +- #include "../Exceptions.h" // lines 43-43 +- #include "../FFmpegReader.h" // lines 47-47 +- #include "../Json.h" // lines 44-44 +- #include "../QtImageReader.h" // lines 48-48 +- #include "../ReaderBase.h" // lines 46-46 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Saturation.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../KeyFrame.h" // for Keyframe +#include "EffectBase.h" // for EffectBase +#include "effects/../Frame.h" // for Frame +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Saturation.cpp should add these lines: +#include // for exception +#include // for QImage +#include // for sqrt +#include // for NULL +#include "Settings.h" // for openshot +#include "effects/../Exceptions.h" // for InvalidJSON +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Saturation.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Saturation.cpp: +#include "Saturation.h" +#include // for exception +#include // for QImage +#include // for sqrt +#include // for NULL +#include "Settings.h" // for openshot +#include "effects/../Exceptions.h" // for InvalidJSON +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Shift.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Shift.h should remove these lines: +- #include "../Json.h" // lines 37-37 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Shift.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "../KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Shift.cpp should add these lines: +#include // for exception +#include // for round, fabs, fmod +#include // for QImage +#include // for memcpy, NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Shift.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Shift.cpp: +#include "Shift.h" +#include // for exception +#include // for round, fabs, fmod +#include // for QImage +#include // for memcpy, NULL +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/effects/Wave.h should add these lines: +#include // for int64_t +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/src/effects/Wave.h should remove these lines: +- #include "../Json.h" // lines 37-37 + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Wave.h: +#include // for int64_t +#include // for shared_ptr +#include // for string +#include "../EffectBase.h" // for EffectBase +#include "../Frame.h" // for Frame +#include "../KeyFrame.h" // for Keyframe +#include "json/json.h" // for Value +--- + +/home/ferd/devel/libopenshot/src/effects/Wave.cpp should add these lines: +#include // for exception +#include // for sin, round +#include // for QImage +#include // for NULL, memcpy +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/src/effects/Wave.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/effects/Wave.cpp: +#include "Wave.h" +#include // for exception +#include // for sin, round +#include // for QImage +#include // for NULL, memcpy +#include "Exceptions.h" // for InvalidJSON +#include "Settings.h" // for openshot +#include "effects/../EffectBase.h" // for EffectInfoStruct, EffectBase +#include "effects/../Frame.h" // for Frame +#include "effects/../Json.h" // for stringToJson +#include "effects/../KeyFrame.h" // for Keyframe +--- + + +/home/ferd/devel/libopenshot/src/Qt/AudioPlaybackThread.h should add these lines: +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } + +/home/ferd/devel/libopenshot/src/Qt/AudioPlaybackThread.h should remove these lines: +- #include "../ReaderBase.h" // lines 35-35 +- #include "../RendererBase.h" // lines 36-36 +- #include "../Settings.h" // lines 39-39 + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/AudioPlaybackThread.h: +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../AudioDeviceInfo.h" +#include "../AudioReaderSource.h" +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } +--- + +/home/ferd/devel/libopenshot/src/Qt/AudioPlaybackThread.cpp should add these lines: +#include // for Audi... +#include // for Owne... +#include // for String +#include // for Stri... +#include // for NULL +#include "Qt/../AudioDeviceInfo.h" // for Audi... +#include "Qt/../AudioReaderSource.h" // for Audi... +#include "Qt/../Settings.h" // for Sett... +#include "ReaderBase.h" // for Read... +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/src/Qt/AudioPlaybackThread.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/AudioPlaybackThread.cpp: +#include "AudioPlaybackThread.h" +#include // for Audi... +#include // for Owne... +#include // for String +#include // for Stri... +#include // for NULL +#include // for mill... +#include // for slee... +#include "Qt/../AudioDeviceInfo.h" // for Audi... +#include "Qt/../AudioReaderSource.h" // for Audi... +#include "Qt/../Settings.h" // for Sett... +#include "ReaderBase.h" // for Read... +namespace openshot { class Frame; } +--- + + +/home/ferd/devel/libopenshot/src/Qt/PlayerDemo.h should add these lines: +#include // for Q_DECL_OVERRIDE +#include // for Q_OBJECT, slots +#include // for QString +#include // for QWidget +class QCloseEvent; +class QKeyEvent; +class QMenuBar; +class QObject; +class QVBoxLayout; +class VideoRenderWidget; + +/home/ferd/devel/libopenshot/src/Qt/PlayerDemo.h should remove these lines: +- #include // lines 37-37 +- #include // lines 36-36 +- #include // lines 39-39 +- #include // lines 34-34 +- #include // lines 38-38 +- #include // lines 35-35 +- #include "VideoRenderWidget.h" // lines 41-41 + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/PlayerDemo.h: +#include // for Q_DECL_OVERRIDE +#include // for Q_OBJECT, slots +#include // for QString +#include // for QWidget +class QCloseEvent; +class QKeyEvent; +class QMenuBar; +class QObject; +class QVBoxLayout; +class VideoRenderWidget; +namespace openshot { class QtPlayer; } // lines 46-46 +--- + +/home/ferd/devel/libopenshot/src/Qt/PlayerDemo.cpp should add these lines: +#include // for QAction +#include // for QApplication +#include // for QVBoxLayout +#include // for QKeyEvent, QCloseEvent (ptr only) +#include // for QFileDialog +#include // for QMenuBar +#include // for Key_Escape, Key_J, Key_K, Key_L +#include // for NULL +#include "PlayerBase.h" // for PLAYBACK_PAUSED, PLAYBACK_PLAY +#include "Qt/../ReaderBase.h" // for ReaderBase, ReaderInfo +#include "Qt/VideoRenderWidget.h" // for VideoRenderWidget +#include "Qt/VideoRenderer.h" // for VideoRenderer + +/home/ferd/devel/libopenshot/src/Qt/PlayerDemo.cpp should remove these lines: +- #include // lines 44-44 +- #include // lines 39-39 +- #include // lines 43-43 +- #include // lines 37-37 +- #include // lines 42-42 +- #include // lines 41-41 +- #include // lines 40-40 +- #include // lines 36-36 +- #include // lines 38-38 +- #include // lines 31-31 + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/PlayerDemo.cpp: +#include "PlayerDemo.h" +#include // for QAction +#include // for QApplication +#include // for QVBoxLayout +#include // for QKeyEvent, QCloseEvent (ptr only) +#include // for QFileDialog +#include // for QMenuBar +#include // for Key_Escape, Key_J, Key_K, Key_L +#include // for NULL +#include "../QtPlayer.h" // for QtPlayer +#include "PlayerBase.h" // for PLAYBACK_PAUSED, PLAYBACK_PLAY +#include "Qt/../ReaderBase.h" // for ReaderBase, ReaderInfo +#include "Qt/VideoRenderWidget.h" // for VideoRenderWidget +#include "Qt/VideoRenderer.h" // for VideoRenderer +--- + + +/home/ferd/devel/libopenshot/src/Qt/PlayerPrivate.h should add these lines: +#include // for Thread +#include // for int64_t +#include // for shared_ptr +namespace openshot { class AudioPlaybackThread; } +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } +namespace openshot { class RendererBase; } +namespace openshot { class VideoCacheThread; } + +/home/ferd/devel/libopenshot/src/Qt/PlayerPrivate.h should remove these lines: +- #include "../AudioReaderSource.h" // lines 37-37 +- #include "../Qt/AudioPlaybackThread.h" // lines 38-38 +- #include "../Qt/VideoCacheThread.h" // lines 40-40 +- #include "../ReaderBase.h" // lines 35-35 +- #include "../RendererBase.h" // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/PlayerPrivate.h: +#include // for Thread +#include // for int64_t +#include // for shared_ptr +#include "../Qt/VideoPlaybackThread.h" // for Thread +namespace openshot { class AudioPlaybackThread; } +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } +namespace openshot { class RendererBase; } +namespace openshot { class VideoCacheThread; } +--- + +/home/ferd/devel/libopenshot/src/Qt/PlayerPrivate.cpp should add these lines: +#include // for WaitableEvent +#include // for NULL +#include // for int64_t +#include "Exceptions.h" // for OutOfBoundsFrame +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Qt/../Qt/AudioPlaybackThread.h" // for AudioPlaybackThread +#include "Qt/../Qt/VideoCacheThread.h" // for VideoCacheThread +#include "Qt/../Qt/VideoPlaybackThread.h" // for VideoPlaybackThread +#include "ReaderBase.h" // for ReaderBase, Reader... +#include "ZmqLogger.h" // for ZmqLogger +namespace openshot { class RendererBase; } + +/home/ferd/devel/libopenshot/src/Qt/PlayerPrivate.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/PlayerPrivate.cpp: +#include "PlayerPrivate.h" +#include // for WaitableEvent +#include // for NULL +#include // for duration, duration... +#include // for int64_t +#include // for sleep_for +#include "Exceptions.h" // for OutOfBoundsFrame +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Qt/../Qt/AudioPlaybackThread.h" // for AudioPlaybackThread +#include "Qt/../Qt/VideoCacheThread.h" // for VideoCacheThread +#include "Qt/../Qt/VideoPlaybackThread.h" // for VideoPlaybackThread +#include "ReaderBase.h" // for ReaderBase, Reader... +#include "ZmqLogger.h" // for ZmqLogger +namespace openshot { class RendererBase; } +--- + + +/home/ferd/devel/libopenshot/src/Qt/VideoCacheThread.h should add these lines: +#include // for Thread +#include // for int64_t +#include // for atomic_int +#include // for shared_ptr +namespace juce { class WaitableEvent; } +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } + +/home/ferd/devel/libopenshot/src/Qt/VideoCacheThread.h should remove these lines: +- #include "../OpenMPUtilities.h" // lines 34-34 +- #include "../ReaderBase.h" // lines 35-35 +- #include "../RendererBase.h" // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/VideoCacheThread.h: +#include // for Thread +#include // for int64_t +#include // for atomic_int +#include // for shared_ptr +namespace juce { class WaitableEvent; } +namespace openshot { class Frame; } +namespace openshot { class ReaderBase; } +--- + +/home/ferd/devel/libopenshot/src/Qt/VideoCacheThread.cpp should add these lines: +#include // for NULL +#include "CacheBase.h" // for CacheBase +#include "Exceptions.h" // for OutOfBoundsFrame +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Qt/../OpenMPUtilities.h" // for OPEN_MP_NUM_PROCESSORS +#include "Qt/../ReaderBase.h" // for ReaderBase, ReaderInfo +#include "ZmqLogger.h" // for ZmqLogger + +/home/ferd/devel/libopenshot/src/Qt/VideoCacheThread.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/VideoCacheThread.cpp: +#include "VideoCacheThread.h" +#include // for NULL +#include // for min +#include // for duration, duration<>::period, mil... +#include // for sleep_for +#include "CacheBase.h" // for CacheBase +#include "Exceptions.h" // for OutOfBoundsFrame +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Qt/../OpenMPUtilities.h" // for OPEN_MP_NUM_PROCESSORS +#include "Qt/../ReaderBase.h" // for ReaderBase, ReaderInfo +#include "ZmqLogger.h" // for ZmqLogger +--- + + +/home/ferd/devel/libopenshot/src/Qt/VideoPlaybackThread.h should add these lines: +#include // for Thread +#include // for WaitableEvent +#include // for int64_t +#include // for shared_ptr +namespace openshot { class Frame; } +namespace openshot { class RendererBase; } + +/home/ferd/devel/libopenshot/src/Qt/VideoPlaybackThread.h should remove these lines: +- #include "../ReaderBase.h" // lines 35-35 +- #include "../RendererBase.h" // lines 36-36 + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/VideoPlaybackThread.h: +#include // for Thread +#include // for WaitableEvent +#include // for int64_t +#include // for shared_ptr +namespace openshot { class Frame; } +namespace openshot { class RendererBase; } +--- + +/home/ferd/devel/libopenshot/src/Qt/VideoPlaybackThread.cpp should add these lines: +#include "Frame.h" // for Frame +#include "Qt/../RendererBase.h" // for RendererBase +#include "ZmqLogger.h" // for ZmqLogger + +/home/ferd/devel/libopenshot/src/Qt/VideoPlaybackThread.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/VideoPlaybackThread.cpp: +#include "VideoPlaybackThread.h" +#include "Frame.h" // for Frame +#include "Qt/../RendererBase.h" // for RendererBase +#include "ZmqLogger.h" // for ZmqLogger +--- + + +/home/ferd/devel/libopenshot/src/Qt/VideoRenderer.h should add these lines: +#include // for QObject +#include // for Q_OBJECT, signals, slots +#include // for QString +#include // for int64_t +class QImage; +class QWidget; + +/home/ferd/devel/libopenshot/src/Qt/VideoRenderer.h should remove these lines: +- #include // lines 35-35 +- #include // lines 36-36 +- class QPainter; // lines 40-40 + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/VideoRenderer.h: +#include // for QObject +#include // for Q_OBJECT, signals, slots +#include // for QString +#include // for int64_t +#include // for shared_ptr +#include "../RendererBase.h" // for RendererBase +class QImage; +class QWidget; +--- + +/home/ferd/devel/libopenshot/src/Qt/VideoRenderer.cpp should add these lines: +class QImage; +class QWidget; + +/home/ferd/devel/libopenshot/src/Qt/VideoRenderer.cpp should remove these lines: + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/VideoRenderer.cpp: +#include "VideoRenderer.h" +class QImage; +class QWidget; +--- + +error: no such file or directory: '/home/ferd/devel/libopenshot/build/examples/openshot-player_autogen/mocs_compilation.cpp' +error: no input files +error: unable to handle compilation, expected exactly one compiler job in '' + + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should add these lines: +#include // for free, malloc +#include // for array, array<>::value_type +#include // for deque +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for vector, vector<>::const_iterator + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should remove these lines: +- #include // lines 2440-2440 +- #include // lines 4154-4154 +- #include // lines 4163-4163 +- #include // lines 4164-4164 +- #include // lines 2442-2442 +- #include // lines 4155-4155 +- #include // lines 4156-4156 +- #include // lines 4157-4157 +- #include // lines 4158-4158 +- #include // lines 253-253 +- #include // lines 2443-2443 +- #include // lines 4159-4159 +- #include // lines 2444-2444 +- #include // lines 4160-4160 + +The full include-list for /home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp: +#include // for free, malloc +#include // for min +#include // for array, array<>::value_type +#include // for assert +#include // for localeconv, lconv +#include // for isfinite, isnan, modf +#include // for size_t, ptrdiff_t +#include // for sscanf, size_t, EOF +#include // for strlen, memcmp, memcpy, strchr +#include // for deque +#include // for operator<<, char_traits, basic_ostream, basic... +#include // for numeric_limits +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for allocator, unique_ptr, allocator_traits<>::va... +#include // for set, operator==, _Rb_tree_iterator, operator!= +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for move, pair, swap +#include // for vector, vector<>::const_iterator +#include "json/json.h" // for Value, String, Reader, Value::ValueHolder +--- + + +/home/ferd/devel/libopenshot/src/Qt/VideoRenderWidget.h should add these lines: +#include // for QImage +#include // for Q_OBJECT, slots +#include // for QRect +#include // for QString +#include // for QWidget +#include "Fraction.h" // for Fraction +class QObject; +class QPaintEvent; +class VideoRenderer; + +/home/ferd/devel/libopenshot/src/Qt/VideoRenderWidget.h should remove these lines: +- #include // lines 38-38 +- #include // lines 39-39 +- #include // lines 40-40 +- #include // lines 37-37 +- #include "../Fraction.h" // lines 34-34 +- #include "VideoRenderer.h" // lines 35-35 + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/VideoRenderWidget.h: +#include // for QImage +#include // for Q_OBJECT, slots +#include // for QRect +#include // for QString +#include // for QWidget +#include "Fraction.h" // for Fraction +class QObject; +class QPaintEvent; +class VideoRenderer; +--- + +/home/ferd/devel/libopenshot/src/Qt/VideoRenderWidget.cpp should add these lines: +#include // for QPaintEvent +#include // for WA_OpaquePaintEvent, black +#include // for QPainter +#include // for QPalette, QPalette::Window +#include // for QSizePolicy, QSizePolicy::Preferred +#include "Qt/VideoRenderer.h" // for VideoRenderer + +/home/ferd/devel/libopenshot/src/Qt/VideoRenderWidget.cpp should remove these lines: +- #include // lines 33-33 +- #include // lines 35-35 +- #include // lines 34-34 +- #include // lines 37-37 +- #include // lines 36-36 +- #include // lines 32-32 + +The full include-list for /home/ferd/devel/libopenshot/src/Qt/VideoRenderWidget.cpp: +#include "VideoRenderWidget.h" +#include // for QPaintEvent +#include // for WA_OpaquePaintEvent, black +#include // for QPainter +#include // for QPalette, QPalette::Window +#include // for QSizePolicy, QSizePolicy::Preferred +#include "Qt/VideoRenderer.h" // for VideoRenderer +--- + + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should add these lines: +#include // for free, malloc +#include // for array, array<>::value_type +#include // for deque +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for vector, vector<>::const_iterator + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should remove these lines: +- #include // lines 2440-2440 +- #include // lines 4154-4154 +- #include // lines 4163-4163 +- #include // lines 4164-4164 +- #include // lines 2442-2442 +- #include // lines 4155-4155 +- #include // lines 4156-4156 +- #include // lines 4157-4157 +- #include // lines 4158-4158 +- #include // lines 253-253 +- #include // lines 2443-2443 +- #include // lines 4159-4159 +- #include // lines 2444-2444 +- #include // lines 4160-4160 + +The full include-list for /home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp: +#include // for free, malloc +#include // for min +#include // for array, array<>::value_type +#include // for assert +#include // for localeconv, lconv +#include // for isfinite, isnan, modf +#include // for size_t, ptrdiff_t +#include // for sscanf, size_t, EOF +#include // for strlen, memcmp, memcpy, strchr +#include // for deque +#include // for operator<<, char_traits, basic_ostream, basic... +#include // for numeric_limits +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for allocator, unique_ptr, allocator_traits<>::va... +#include // for set, operator==, _Rb_tree_iterator, operator!= +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for move, pair, swap +#include // for vector, vector<>::const_iterator +#include "json/json.h" // for Value, String, Reader, Value::ValueHolder +--- + + +/home/ferd/devel/libopenshot/examples/qt-demo/main.cpp should add these lines: +#include // for QApplication + +/home/ferd/devel/libopenshot/examples/qt-demo/main.cpp should remove these lines: +- #include // lines 33-33 + +The full include-list for /home/ferd/devel/libopenshot/examples/qt-demo/main.cpp: +#include // for QApplication +#include "Qt/PlayerDemo.h" // for PlayerDemo +--- + + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should add these lines: +#include // for free, malloc +#include // for array, array<>::value_type +#include // for deque +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for vector, vector<>::const_iterator + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should remove these lines: +- #include // lines 2440-2440 +- #include // lines 4154-4154 +- #include // lines 4163-4163 +- #include // lines 4164-4164 +- #include // lines 2442-2442 +- #include // lines 4155-4155 +- #include // lines 4156-4156 +- #include // lines 4157-4157 +- #include // lines 4158-4158 +- #include // lines 253-253 +- #include // lines 2443-2443 +- #include // lines 4159-4159 +- #include // lines 2444-2444 +- #include // lines 4160-4160 + +The full include-list for /home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp: +#include // for free, malloc +#include // for min +#include // for array, array<>::value_type +#include // for assert +#include // for localeconv, lconv +#include // for isfinite, isnan, modf +#include // for size_t, ptrdiff_t +#include // for sscanf, size_t, EOF +#include // for strlen, memcmp, memcpy, strchr +#include // for deque +#include // for operator<<, char_traits, basic_ostream, basic... +#include // for numeric_limits +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for allocator, unique_ptr, allocator_traits<>::va... +#include // for set, operator==, _Rb_tree_iterator, operator!= +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for move, pair, swap +#include // for vector, vector<>::const_iterator +#include "json/json.h" // for Value, String, Reader, Value::ValueHolder +--- + + +/home/ferd/devel/libopenshot/examples/ExampleHtml.cpp should add these lines: +#include // for QGuiApplication +#include // for SLOT +#include // for QTimer +#include // for map, map<>::mapped_type +#include // for string +#include "Enums.h" // for GRAVITY_BOTTOM_RIGHT +#include "FFmpegWriter.h" // for FFmpegWriter +#include "OpenShotVersion.h" // for openshot +#include "QtHtmlReader.h" // for QtHtmlReader +#include "WriterBase.h" // for WriterInfo +#include "effects/../Fraction.h" // for Fraction +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/examples/ExampleHtml.cpp should remove these lines: +- #include // lines 35-35 +- #include // lines 36-36 +- #include // lines 32-32 +- #include // lines 33-33 +- #include "CrashHandler.h" // lines 39-39 +- #include "OpenShot.h" // lines 38-38 + +The full include-list for /home/ferd/devel/libopenshot/examples/ExampleHtml.cpp: +#include // for QGuiApplication +#include // for SLOT +#include // for QTimer +#include // for map, map<>::mapped_type +#include // for shared_ptr +#include // for string +#include "Enums.h" // for GRAVITY_BOTTOM_RIGHT +#include "FFmpegWriter.h" // for FFmpegWriter +#include "OpenShotVersion.h" // for openshot +#include "QtHtmlReader.h" // for QtHtmlReader +#include "WriterBase.h" // for WriterInfo +#include "effects/../Fraction.h" // for Fraction +namespace openshot { class Frame; } +--- + +error: no such file or directory: '/home/ferd/devel/libopenshot/build/bindings/python/CMakeFiles/pyopenshot.dir/openshotPYTHON_wrap.cxx' +error: no input files +error: unable to handle compilation, expected exactly one compiler job in '' + + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should add these lines: +#include // for free, malloc +#include // for array, array<>::value_type +#include // for deque +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for vector, vector<>::const_iterator + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should remove these lines: +- #include // lines 2440-2440 +- #include // lines 4154-4154 +- #include // lines 4163-4163 +- #include // lines 4164-4164 +- #include // lines 2442-2442 +- #include // lines 4155-4155 +- #include // lines 4156-4156 +- #include // lines 4157-4157 +- #include // lines 4158-4158 +- #include // lines 253-253 +- #include // lines 2443-2443 +- #include // lines 4159-4159 +- #include // lines 2444-2444 +- #include // lines 4160-4160 + +The full include-list for /home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp: +#include // for free, malloc +#include // for min +#include // for array, array<>::value_type +#include // for assert +#include // for localeconv, lconv +#include // for isfinite, isnan, modf +#include // for size_t, ptrdiff_t +#include // for sscanf, size_t, EOF +#include // for strlen, memcmp, memcpy, strchr +#include // for deque +#include // for operator<<, char_traits, basic_ostream, basic... +#include // for numeric_limits +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for allocator, unique_ptr, allocator_traits<>::va... +#include // for set, operator==, _Rb_tree_iterator, operator!= +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for move, pair, swap +#include // for vector, vector<>::const_iterator +#include "json/json.h" // for Value, String, Reader, Value::ValueHolder +--- + + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should add these lines: +#include // for free, malloc +#include // for array, array<>::value_type +#include // for deque +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for vector, vector<>::const_iterator + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should remove these lines: +- #include // lines 2440-2440 +- #include // lines 4154-4154 +- #include // lines 4163-4163 +- #include // lines 4164-4164 +- #include // lines 2442-2442 +- #include // lines 4155-4155 +- #include // lines 4156-4156 +- #include // lines 4157-4157 +- #include // lines 4158-4158 +- #include // lines 253-253 +- #include // lines 2443-2443 +- #include // lines 4159-4159 +- #include // lines 2444-2444 +- #include // lines 4160-4160 + +The full include-list for /home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp: +#include // for free, malloc +#include // for min +#include // for array, array<>::value_type +#include // for assert +#include // for localeconv, lconv +#include // for isfinite, isnan, modf +#include // for size_t, ptrdiff_t +#include // for sscanf, size_t, EOF +#include // for strlen, memcmp, memcpy, strchr +#include // for deque +#include // for operator<<, char_traits, basic_ostream, basic... +#include // for numeric_limits +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for allocator, unique_ptr, allocator_traits<>::va... +#include // for set, operator==, _Rb_tree_iterator, operator!= +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for move, pair, swap +#include // for vector, vector<>::const_iterator +#include "json/json.h" // for Value, String, Reader, Value::ValueHolder +--- + + +/home/ferd/devel/libopenshot/tests/tests.cpp should add these lines: +#include "TestDetails.h" // for UnitTest +#include "TestRunner.h" // for RunAllTests + +/home/ferd/devel/libopenshot/tests/tests.cpp should remove these lines: +- #include "UnitTest++.h" // lines 32-32 + +The full include-list for /home/ferd/devel/libopenshot/tests/tests.cpp: +#include // for operator<<, endl, basic_ostream, cout, ostream +#include "TestDetails.h" // for UnitTest +#include "TestRunner.h" // for RunAllTests +--- + + +/home/ferd/devel/libopenshot/examples/Example.cpp should add these lines: +#include // for map, map<>::mapped_type +#include // for string +#include "FFmpegReader.h" // for FFmpegReader +#include "FFmpegWriter.h" // for FFmpegWriter +#include "OpenShotVersion.h" // for openshot +#include "Settings.h" // for Settings +#include "WriterBase.h" // for WriterInfo +#include "effects/../Fraction.h" // for Fraction +#include "effects/../ReaderBase.h" // for ReaderInfo +namespace openshot { class Frame; } + +/home/ferd/devel/libopenshot/examples/Example.cpp should remove these lines: +- #include // lines 31-31 +- #include "CrashHandler.h" // lines 35-35 +- #include "OpenShot.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/examples/Example.cpp: +#include // for operator<<, endl, basic_ostream +#include // for map, map<>::mapped_type +#include // for shared_ptr +#include // for string +#include "FFmpegReader.h" // for FFmpegReader +#include "FFmpegWriter.h" // for FFmpegWriter +#include "OpenShotVersion.h" // for openshot +#include "Settings.h" // for Settings +#include "WriterBase.h" // for WriterInfo +#include "effects/../Fraction.h" // for Fraction +#include "effects/../ReaderBase.h" // for ReaderInfo +namespace openshot { class Frame; } +--- + + +/home/ferd/devel/libopenshot/tests/Color_Tests.cpp should add these lines: +#include // for int64_t +#include "CheckMacros.h" // for CHECK_CLOSE, CHECK_EQUAL, CHECK_THROW +#include "TestMacros.h" // for TEST, SUITE +#include "json/json.h" // for Value +namespace openshot { class InvalidJSON; } + +/home/ferd/devel/libopenshot/tests/Color_Tests.cpp should remove these lines: +- #include "Json.h" // lines 39-39 +- #include "UnitTest++.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/tests/Color_Tests.cpp: +#include // for int64_t +#include // for string +#include // for vector +#include "CheckMacros.h" // for CHECK_CLOSE, CHECK_EQUAL, CHECK_THROW +#include "Color.h" // for Color +#include "KeyFrame.h" // for Keyframe +#include "TestMacros.h" // for TEST, SUITE +#include "json/json.h" // for Value +namespace openshot { class InvalidJSON; } +--- + + +/home/ferd/devel/libopenshot/tests/Clip_Tests.cpp should add these lines: +#include // for QImage +#include // for list +#include // for string +#include "AudioBufferSource.h" // for openshot +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE, CHECK_THROW +#include "Enums.h" // for ANCHOR_CANVAS, GRAVITY_CENTER, SCAL... +#include "RequireMacros.h" // for REQUIRE +#include "TestMacros.h" // for TEST, SUITE +#include "effects/../KeyFrame.h" // for Keyframe +#include "effects/Negate.h" // for Negate +#include "json/json.h" // for Value, CharReader, CharReaderBuilder +namespace openshot { class ReaderClosed; } + +/home/ferd/devel/libopenshot/tests/Clip_Tests.cpp should remove these lines: +- #include "Json.h" // lines 47-47 +- #include "UnitTest++.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/tests/Clip_Tests.cpp: +#include // for QImage +#include // for list +#include // for shared_ptr, __shared_ptr_access +#include // for operator<<, stringstream, basic_ost... +#include // for string +#include "AudioBufferSource.h" // for openshot +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE, CHECK_THROW +#include "Clip.h" // for Clip +#include "Enums.h" // for ANCHOR_CANVAS, GRAVITY_CENTER, SCAL... +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "RequireMacros.h" // for REQUIRE +#include "TestMacros.h" // for TEST, SUITE +#include "Timeline.h" // for Timeline +#include "effects/../KeyFrame.h" // for Keyframe +#include "effects/Negate.h" // for Negate +#include "json/json.h" // for Value, CharReader, CharReaderBuilder +namespace openshot { class ReaderClosed; } +--- + + +/home/ferd/devel/libopenshot/tests/Coordinate_Tests.cpp should add these lines: +#include "CheckMacros.h" // for CHECK_CLOSE +#include "Exceptions.h" // for openshot +#include "TestMacros.h" // for TEST + +/home/ferd/devel/libopenshot/tests/Coordinate_Tests.cpp should remove these lines: +- #include "UnitTest++.h" // lines 31-31 + +The full include-list for /home/ferd/devel/libopenshot/tests/Coordinate_Tests.cpp: +#include "CheckMacros.h" // for CHECK_CLOSE +#include "Coordinate.h" // for Coordinate +#include "Exceptions.h" // for openshot +#include "TestMacros.h" // for TEST +--- + + +/home/ferd/devel/libopenshot/tests/Cache_Tests.cpp should add these lines: +#include // for QDir +#include // for operator+, QString +#include // for NULL +#include // for string +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL +#include "Frame.h" // for Frame +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/tests/Cache_Tests.cpp should remove these lines: +- #include // lines 40-40 +- #include "Json.h" // lines 38-38 +- #include "UnitTest++.h" // lines 33-33 + +The full include-list for /home/ferd/devel/libopenshot/tests/Cache_Tests.cpp: +#include // for QDir +#include // for operator+, QString +#include // for NULL +#include // for shared_ptr, operator!=, __shared_ptr_access +#include // for string +#include "CacheDisk.h" // for CacheDisk +#include "CacheMemory.h" // for CacheMemory +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL +#include "Frame.h" // for Frame +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST +#include "json/json.h" // for Value +--- + + +/home/ferd/devel/libopenshot/tests/ImageWriter_Tests.cpp should add these lines: + +/home/ferd/devel/libopenshot/tests/ImageWriter_Tests.cpp should remove these lines: +- #include // lines 32-32 +- #include // lines 31-31 +- #include "UnitTest++.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/tests/ImageWriter_Tests.cpp: +--- + +/home/ferd/devel/libopenshot/tests/DummyReader_Tests.cpp:149:29: warning: expression result unused [-Wunused-value] + CHECK_THROW(r.GetFrame(3)->number, InvalidFile); + ~~~~~~~~~~~~~ ^~~~~~ +/usr/include/UnitTest++/CheckMacros.h:205:27: note: expanded from macro 'CHECK_THROW' + #define CHECK_THROW UNITTEST_CHECK_THROW + ^ +/usr/include/UnitTest++/CheckMacros.h:185:10: note: expanded from macro 'UNITTEST_CHECK_THROW' + try { expression; } \ + ^~~~~~~~~~ + +/home/ferd/devel/libopenshot/tests/DummyReader_Tests.cpp should add these lines: +#include // for int64_t +#include // for std +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE, CHECK_THROW +#include "ReaderBase.h" // for ReaderInfo +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST +namespace openshot { class InvalidFile; } + +/home/ferd/devel/libopenshot/tests/DummyReader_Tests.cpp should remove these lines: +- #include "UnitTest++.h" // lines 33-33 + +The full include-list for /home/ferd/devel/libopenshot/tests/DummyReader_Tests.cpp: +#include // for int64_t +#include // for std +#include // for shared_ptr, __shared_ptr_access +#include "CacheMemory.h" // for CacheMemory +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE, CHECK_THROW +#include "DummyReader.h" // for DummyReader +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "ReaderBase.h" // for ReaderInfo +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST +namespace openshot { class InvalidFile; } +--- + + +/home/ferd/devel/libopenshot/tests/ReaderBase_Tests.cpp should add these lines: +#include // for int64_t +#include // for NULL, std +#include // for string +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE +#include "Fraction.h" // for Fraction +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/tests/ReaderBase_Tests.cpp should remove these lines: +- #include "Json.h" // lines 39-39 +- #include "UnitTest++.h" // lines 33-33 + +The full include-list for /home/ferd/devel/libopenshot/tests/ReaderBase_Tests.cpp: +#include // for int64_t +#include // for NULL, std +#include // for shared_ptr +#include // for string +#include "CacheBase.h" // for CacheBase +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "ReaderBase.h" // for ReaderInfo, ReaderBase +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST +#include "json/json.h" // for Value +--- + + +/home/ferd/devel/libopenshot/tests/FFmpegReader_Tests.cpp should add these lines: +#include // for QImage +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE, CHECK... +#include "Clip.h" // for Clip +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../Fraction.h" // for Fraction +#include "effects/../ReaderBase.h" // for ReaderInfo +namespace openshot { class InvalidFile; } +namespace openshot { class ReaderClosed; } + +/home/ferd/devel/libopenshot/tests/FFmpegReader_Tests.cpp should remove these lines: +- #include "FFmpegReader.h" // lines 37-37 +- #include "Json.h" // lines 40-40 +- #include "UnitTest++.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/tests/FFmpegReader_Tests.cpp: +#include // for QImage +#include // for shared_ptr, __shared_ptr_access +#include // for operator<<, stringstream, basic... +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE, CHECK... +#include "Clip.h" // for Clip +#include "Frame.h" // for Frame +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +#include "Timeline.h" // for Timeline +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../Fraction.h" // for Fraction +#include "effects/../ReaderBase.h" // for ReaderInfo +namespace openshot { class InvalidFile; } +namespace openshot { class ReaderClosed; } +--- + + +/home/ferd/devel/libopenshot/tests/Fraction_Tests.cpp should add these lines: +#include // for std +#include "CheckMacros.h" // for CHECK_CLOSE, CHECK_EQUAL +#include "TestMacros.h" // for TEST + +/home/ferd/devel/libopenshot/tests/Fraction_Tests.cpp should remove these lines: +- #include "UnitTest++.h" // lines 31-31 + +The full include-list for /home/ferd/devel/libopenshot/tests/Fraction_Tests.cpp: +#include // for std +#include "CheckMacros.h" // for CHECK_CLOSE, CHECK_EQUAL +#include "Fraction.h" // for Fraction, openshot +#include "TestMacros.h" // for TEST +--- + + +/home/ferd/devel/libopenshot/tests/FFmpegWriter_Tests.cpp should add these lines: +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../ReaderBase.h" // for ReaderInfo + +/home/ferd/devel/libopenshot/tests/FFmpegWriter_Tests.cpp should remove these lines: +- #include "FFmpegReader.h" // lines 38-38 +- #include "UnitTest++.h" // lines 34-34 + +The full include-list for /home/ferd/devel/libopenshot/tests/FFmpegWriter_Tests.cpp: +#include // for shared_ptr, __shared_ptr_access +#include // for operator<<, stringstream, basic... +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE +#include "FFmpegWriter.h" // for FFmpegWriter +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +#include "effects/../FFmpegReader.h" // for FFmpegReader +#include "effects/../ReaderBase.h" // for ReaderInfo +--- + + +/home/ferd/devel/libopenshot/tests/FrameMapper_Tests.cpp should add these lines: +#include // for sin, M_PI, abs +#include // for int64_t +#include // for abs +#include // for shared_ptr, __shared_ptr_access +#include // for operator<<, stringstream, basic_ostream +#include // for char_traits, string +#include // for vector +#include "ChannelLayouts.h" // for LAYOUT_STEREO, LAYOUT_MONO, LAYOUT_SURROUND +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE, CHECK_THROW +#include "ReaderBase.h" // for ReaderInfo +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +namespace openshot { class OutOfBoundsFrame; } +namespace openshot { class ReaderClosed; } + +/home/ferd/devel/libopenshot/tests/FrameMapper_Tests.cpp should remove these lines: +- #include "UnitTest++.h" // lines 31-31 + +The full include-list for /home/ferd/devel/libopenshot/tests/FrameMapper_Tests.cpp: +#include // for sin, M_PI, abs +#include // for int64_t +#include // for abs +#include // for shared_ptr, __shared_ptr_access +#include // for operator<<, stringstream, basic_ostream +#include // for char_traits, string +#include // for vector +#include "CacheMemory.h" // for CacheMemory +#include "ChannelLayouts.h" // for LAYOUT_STEREO, LAYOUT_MONO, LAYOUT_SURROUND +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE, CHECK_THROW +#include "Clip.h" // for Clip +#include "DummyReader.h" // for DummyReader +#include "FFmpegReader.h" // for FFmpegReader +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "FrameMapper.h" // for FrameMapper, MappedFrame, Field, PULLDOW... +#include "ReaderBase.h" // for ReaderInfo +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +#include "Timeline.h" // for Timeline +namespace openshot { class OutOfBoundsFrame; } +namespace openshot { class ReaderClosed; } +--- + + +/home/ferd/devel/libopenshot/tests/Frame_Tests.cpp should add these lines: +#include // for QImage +#include // for QString +#include // for string +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +#include "effects/../Frame.h" // for Frame + +/home/ferd/devel/libopenshot/tests/Frame_Tests.cpp should remove these lines: +- #include // lines 42-42 +- #include "Frame.h" // lines 38-38 +- #include "UnitTest++.h" // lines 35-35 + +The full include-list for /home/ferd/devel/libopenshot/tests/Frame_Tests.cpp: +#include // for QImage +#include // for QString +#include // for shared_ptr, __shared_ptr_access, opera... +#include // for operator<<, stringstream, basic_ostream +#include // for string +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK +#include "Clip.h" // for Clip +#include "Fraction.h" // for Fraction +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +#include "effects/../Frame.h" // for Frame +--- + + +/home/ferd/devel/libopenshot/tests/KeyFrame_Tests.cpp should add these lines: +#include // for int64_t +#include // for std +#include "CheckMacros.h" // for CHECK_CLOSE, CHECK_EQUAL, CHECK_THROW +#include "Exceptions.h" // for OutOfBoundsPoint (ptr only), openshot +#include "TestMacros.h" // for TEST +#include "TimeConstraint.h" // for UNITTEST_TIME_CONSTRAINT + +/home/ferd/devel/libopenshot/tests/KeyFrame_Tests.cpp should remove these lines: +- #include "UnitTest++.h" // lines 31-31 + +The full include-list for /home/ferd/devel/libopenshot/tests/KeyFrame_Tests.cpp: +#include // for int64_t +#include // for std +#include "CheckMacros.h" // for CHECK_CLOSE, CHECK_EQUAL, CHECK_THROW +#include "Coordinate.h" // for Coordinate +#include "Exceptions.h" // for OutOfBoundsPoint (ptr only), openshot +#include "Fraction.h" // for Fraction +#include "KeyFrame.h" // for Keyframe +#include "Point.h" // for Point, BEZIER, CONSTANT, LINEAR +#include "TestMacros.h" // for TEST +#include "TimeConstraint.h" // for UNITTEST_TIME_CONSTRAINT +--- + + +/home/ferd/devel/libopenshot/tests/Point_Tests.cpp should add these lines: +#include // for operator<<, stringstream, basic_ostream +#include "CheckMacros.h" // for CHECK_EQUAL +#include "TestMacros.h" // for TEST, SUITE +#include "json/json.h" // for Value + +/home/ferd/devel/libopenshot/tests/Point_Tests.cpp should remove these lines: +- #include "Enums.h" // lines 35-35 +- #include "Json.h" // lines 37-37 +- #include "UnitTest++.h" // lines 31-31 + +The full include-list for /home/ferd/devel/libopenshot/tests/Point_Tests.cpp: +#include // for operator<<, stringstream, basic_ostream +#include "CheckMacros.h" // for CHECK_EQUAL +#include "Coordinate.h" // for Coordinate +#include "Point.h" // for Point, InterpolationType, BEZIER, HandleType +#include "TestMacros.h" // for TEST, SUITE +#include "json/json.h" // for Value +--- + + +/home/ferd/devel/libopenshot/tests/Settings_Tests.cpp should add these lines: +#include // for std +#include "CheckMacros.h" // for CHECK_EQUAL +#include "TestMacros.h" // for TEST + +/home/ferd/devel/libopenshot/tests/Settings_Tests.cpp should remove these lines: +- #include "UnitTest++.h" // lines 31-31 + +The full include-list for /home/ferd/devel/libopenshot/tests/Settings_Tests.cpp: +#include // for std +#include "CheckMacros.h" // for CHECK_EQUAL +#include "Settings.h" // for Settings, openshot +#include "TestMacros.h" // for TEST +--- + + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should add these lines: +#include // for free, malloc +#include // for array, array<>::value_type +#include // for deque +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for vector, vector<>::const_iterator + +/home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp should remove these lines: +- #include // lines 2440-2440 +- #include // lines 4154-4154 +- #include // lines 4163-4163 +- #include // lines 4164-4164 +- #include // lines 2442-2442 +- #include // lines 4155-4155 +- #include // lines 4156-4156 +- #include // lines 4157-4157 +- #include // lines 4158-4158 +- #include // lines 253-253 +- #include // lines 2443-2443 +- #include // lines 4159-4159 +- #include // lines 2444-2444 +- #include // lines 4160-4160 + +The full include-list for /home/ferd/devel/libopenshot/thirdparty/jsoncpp/jsoncpp.cpp: +#include // for free, malloc +#include // for min +#include // for array, array<>::value_type +#include // for assert +#include // for localeconv, lconv +#include // for isfinite, isnan, modf +#include // for size_t, ptrdiff_t +#include // for sscanf, size_t, EOF +#include // for strlen, memcmp, memcpy, strchr +#include // for deque +#include // for operator<<, char_traits, basic_ostream, basic... +#include // for numeric_limits +#include // for map<>::iterator, map<>::const_iterator, opera... +#include // for allocator, unique_ptr, allocator_traits<>::va... +#include // for set, operator==, _Rb_tree_iterator, operator!= +#include // for stack +#include // for basic_string, operator+, operator<<, operator== +#include // for move, pair, swap +#include // for vector, vector<>::const_iterator +#include "json/json.h" // for Value, String, Reader, Value::ValueHolder +--- + + +/home/ferd/devel/libopenshot/tests/Timeline_Tests.cpp should add these lines: +#include // for string +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE +#include "ReaderBase.h" // for ReaderInfo +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +#include "effects/../EffectBase.h" // for EffectBase +#include "effects/../KeyFrame.h" // for Keyframe + +/home/ferd/devel/libopenshot/tests/Timeline_Tests.cpp should remove these lines: +- #include "UnitTest++.h" // lines 35-35 + +The full include-list for /home/ferd/devel/libopenshot/tests/Timeline_Tests.cpp: +#include // for list, list<>::iterator, operator!= +#include // for shared_ptr, __shared_ptr_access +#include // for operator<<, stringstream, basic_o... +#include // for string +#include "ChannelLayouts.h" // for LAYOUT_STEREO +#include "CheckMacros.h" // for CHECK_EQUAL, CHECK_CLOSE +#include "Clip.h" // for Clip +#include "Fraction.h" // for Fraction +#include "Frame.h" // for Frame +#include "ReaderBase.h" // for ReaderInfo +#include "Settings.h" // for openshot +#include "TestMacros.h" // for TEST, SUITE +#include "Timeline.h" // for Timeline +#include "effects/../EffectBase.h" // for EffectBase +#include "effects/../KeyFrame.h" // for Keyframe +#include "effects/Blur.h" // for Blur +#include "effects/Negate.h" // for Negate +--- + From b445d6df6c18fe255ba8b1ad8a0a98376ee0a86b Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 13 Jan 2021 08:31:34 -0500 Subject: [PATCH 20/27] Propagate library defs to swig --- bindings/python/CMakeLists.txt | 6 ++++++ bindings/ruby/CMakeLists.txt | 12 +++++++++--- src/CMakeLists.txt | 7 ++----- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index b020592b..1b779cbe 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -58,6 +58,12 @@ endif() set_property(SOURCE openshot.i PROPERTY CPLUSPLUS ON) set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot) +# Set the SWIG_FLAGS from the library target, IFF its +# COMPILE_DEFINITIONS property is set (in practice, always true) +set(defs $) +set_property(SOURCE openshot.i PROPERTY + SWIG_FLAGS $<$:-D$>) + ### Suppress a ton of warnings in the generated SWIG C++ code set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \ -Wno-deprecated-copy -Wno-class-memaccess -Wno-cast-function-type \ diff --git a/bindings/ruby/CMakeLists.txt b/bindings/ruby/CMakeLists.txt index 72d1a985..8c416b50 100644 --- a/bindings/ruby/CMakeLists.txt +++ b/bindings/ruby/CMakeLists.txt @@ -74,6 +74,12 @@ endif() set_property(SOURCE openshot.i PROPERTY CPLUSPLUS ON) set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot) +# Set the SWIG_FLAGS from the library target, IFF its +# COMPILE_DEFINITIONS property is set (in practice, always true) +set(defs $) +set_property(SOURCE openshot.i PROPERTY + SWIG_FLAGS $<$:-D$>) + ### Suppress a ton of warnings in the generated SWIG C++ code set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \ -Wno-deprecated-copy -Wno-class-memaccess -Wno-cast-function-type \ @@ -83,9 +89,9 @@ set_property(SOURCE openshot.i PROPERTY GENERATED_COMPILE_OPTIONS ${sw_flags}) ### Take include dirs from target, automatically if possible if (CMAKE_VERSION VERSION_GREATER 3.13) - set_property(SOURCE openshot.i PROPERTY USE_TARGET_INCLUDE_DIRECTORIES True) -else () - set_property(SOURCE openshot.i PROPERTY + set_property(SOURCE openshot.i PROPERTY USE_TARGET_INCLUDE_DIRECTORIES True) +elseif (CMAKE_VERSION VERSION_GREATER 3.12) + set_property(SOURCE openshot.i PROPERTY INCLUDE_DIRECTORIES $) endif () diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6b88e67d..ee9adf56 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -212,7 +212,6 @@ if(ImageMagick_FOUND) # define a preprocessor macro (used in the C++ source) target_compile_definitions(openshot PUBLIC USE_IMAGEMAGICK=1) - list(APPEND CMAKE_SWIG_FLAGS -DUSE_IMAGEMAGICK=1) # Link with ImageMagick library target_link_libraries(openshot PUBLIC ImageMagick::Magick++) @@ -346,8 +345,7 @@ if (TARGET Resvg::Resvg) #include_directories(${Resvg_INCLUDE_DIRS}) target_link_libraries(openshot PUBLIC Resvg::Resvg) - target_compile_definitions(openshot PUBLIC -DUSE_RESVG=1) - list(APPEND CMAKE_SWIG_FLAGS -DUSE_RESVG=1) + target_compile_definitions(openshot PUBLIC USE_RESVG=1) set(HAVE_RESVG TRUE CACHE BOOL "Building with Resvg support" FORCE) mark_as_advanced(HAVE_RESVG) @@ -373,8 +371,7 @@ if (ENABLE_BLACKMAGIC) target_link_libraries(openshot PUBLIC ${BLACKMAGIC_LIBRARY_DIR}) # define a preprocessor macro (used in the C++) - target_compile_definitions(openshot PUBLIC -DUSE_BLACKMAGIC=1) - list(APPEND CMAKE_SWIG_FLAGS -DUSE_BLACKMAGIC=1) + target_compile_definitions(openshot PUBLIC USE_BLACKMAGIC=1) endif() endif() From 3a0d88adcf509e07fda7c6b7446ef4bc6be9f879 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 13 Jan 2021 10:39:46 -0500 Subject: [PATCH 21/27] Property fixes for bindings --- bindings/python/CMakeLists.txt | 36 ++++++++++++++++++++++++---------- bindings/ruby/CMakeLists.txt | 36 ++++++++++++++++++++++++---------- 2 files changed, 52 insertions(+), 20 deletions(-) diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 1b779cbe..7d588921 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -60,9 +60,23 @@ set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot) # Set the SWIG_FLAGS from the library target, IFF its # COMPILE_DEFINITIONS property is set (in practice, always true) -set(defs $) -set_property(SOURCE openshot.i PROPERTY - SWIG_FLAGS $<$:-D$>) +if(CMAKE_VERSION VERSION_GREATER 3.15) + set(_defs + $>) +elseif(CMAKE_VERSION VERSION_GREATER 3.12) + set(_defs $) +endif() +if(DEFINED _defs) + set_property(SOURCE openshot.i PROPERTY + COMPILE_DEFINITIONS ${_defs}) +else() + get_property(_defs TARGET openshot PROPERTY COMPILE_DEFINITIONS) + foreach(_d ${_defs}) + list(APPEND _flags -D${_d}) + endforeach() + set_property(SOURCE openshot.i PROPERTY + SWIG_FLAGS ${_flags}) +endif() ### Suppress a ton of warnings in the generated SWIG C++ code set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \ @@ -71,13 +85,15 @@ set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \ separate_arguments(sw_flags UNIX_COMMAND ${SWIG_CXX_FLAGS}) set_property(SOURCE openshot.i PROPERTY GENERATED_COMPILE_OPTIONS ${sw_flags}) -### Take include dirs from target, automatically if possible -if (CMAKE_VERSION VERSION_GREATER 3.13) - set_property(SOURCE openshot.i PROPERTY USE_TARGET_INCLUDE_DIRECTORIES True) -elseif (CMAKE_VERSION VERSION_GREATER 3.12) - set_property(SOURCE openshot.i PROPERTY - INCLUDE_DIRECTORIES $) -endif () +### Take include dirs from target +if(CMAKE_VERSION VERSION_GREATER 3.15) + set(_inc $>) +elseif(CMAKE_VERSION VERSION_GREATER 3.12) + set(_inc $) +endif() +if (DEFINED _inc) + set_property(SOURCE openshot.i PROPERTY INCLUDE_DIRECTORIES ${_inc}) +endif() ### Add the SWIG interface file (which defines all the SWIG methods) if (CMAKE_VERSION VERSION_LESS 3.8.0) diff --git a/bindings/ruby/CMakeLists.txt b/bindings/ruby/CMakeLists.txt index 8c416b50..b145494b 100644 --- a/bindings/ruby/CMakeLists.txt +++ b/bindings/ruby/CMakeLists.txt @@ -76,9 +76,23 @@ set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot) # Set the SWIG_FLAGS from the library target, IFF its # COMPILE_DEFINITIONS property is set (in practice, always true) -set(defs $) -set_property(SOURCE openshot.i PROPERTY - SWIG_FLAGS $<$:-D$>) +if(CMAKE_VERSION VERSION_GREATER 3.15) + set(_defs + $>) +elseif(CMAKE_VERSION VERSION_GREATER 3.12) + set(_defs $) +endif() +if(DEFINED _defs) + set_property(SOURCE openshot.i PROPERTY + COMPILE_DEFINITIONS ${_defs}) +else() + get_property(_defs TARGET openshot PROPERTY COMPILE_DEFINITIONS) + foreach(_d ${_defs}) + list(APPEND _flags -D${_d}) + endforeach() + set_property(SOURCE openshot.i PROPERTY + SWIG_FLAGS ${_flags}) +endif() ### Suppress a ton of warnings in the generated SWIG C++ code set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \ @@ -87,13 +101,15 @@ set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \ separate_arguments(sw_flags UNIX_COMMAND ${SWIG_CXX_FLAGS}) set_property(SOURCE openshot.i PROPERTY GENERATED_COMPILE_OPTIONS ${sw_flags}) -### Take include dirs from target, automatically if possible -if (CMAKE_VERSION VERSION_GREATER 3.13) - set_property(SOURCE openshot.i PROPERTY USE_TARGET_INCLUDE_DIRECTORIES True) -elseif (CMAKE_VERSION VERSION_GREATER 3.12) - set_property(SOURCE openshot.i PROPERTY - INCLUDE_DIRECTORIES $) -endif () +### Take include dirs from target +if(CMAKE_VERSION VERSION_GREATER 3.15) + set(_inc $>) +elseif(CMAKE_VERSION VERSION_GREATER 3.12) + set(_inc $) +endif() +if (DEFINED _inc) + set_property(SOURCE openshot.i PROPERTY INCLUDE_DIRECTORIES ${_inc}) +endif() ### Add the SWIG interface file (which defines all the SWIG methods) if (CMAKE_VERSION VERSION_LESS 3.8.0) From 8dfaf741777d1fe923437955ee2a79da6f4e691c Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 13 Jan 2021 10:59:34 -0500 Subject: [PATCH 22/27] Fix FindResvg for older CMake --- cmake/Modules/FindResvg.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/Modules/FindResvg.cmake b/cmake/Modules/FindResvg.cmake index 452a81c8..7a03c33e 100644 --- a/cmake/Modules/FindResvg.cmake +++ b/cmake/Modules/FindResvg.cmake @@ -50,6 +50,7 @@ endif() find_path(Resvg_INCLUDE_DIRS ResvgQt.h PATHS + ${Resvg_ROOT} ${RESVGDIR} ${RESVGDIR}/include $ENV{RESVGDIR} @@ -65,6 +66,7 @@ find_path(Resvg_INCLUDE_DIRS find_library(Resvg_LIBRARIES NAMES resvg PATHS + ${Resvg_ROOT} ${RESVGDIR} ${RESVGDIR}/lib $ENV{RESVGDIR} From 0fcb84bda33c8bbbe01236cf5e8140820e27a0db Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 13 Jan 2021 12:06:32 -0500 Subject: [PATCH 23/27] OpenCV/Protobuf: Install library and headers --- src/CMakeLists.txt | 6 ++++-- src/CVObjectDetection.h | 4 ++-- src/CVStabilization.h | 2 +- src/CVTracker.h | 4 ++-- src/OpenShotVersion.h.in | 1 + src/effects/ObjectDetection.h | 2 +- src/effects/Stabilizer.h | 2 +- src/effects/Tracker.h | 8 ++++---- src/protobuf_messages/CMakeLists.txt | 26 ++++++++++++++++++++------ 9 files changed, 36 insertions(+), 19 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e277a021..9f4a1376 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -395,7 +395,7 @@ if(ENABLE_OPENCV) set(ENABLE_OPENCV FALSE CACHE BOOL "Build with OpenCV algorithms (requires Boost, Protobuf 3)" FORCE) else() - add_subdirectory(protobuf_messsages) + add_subdirectory(protobuf_messages) # Add OpenCV source files target_sources(openshot PRIVATE ${OPENSHOT_CV_SOURCES} @@ -407,8 +407,10 @@ if(ENABLE_OPENCV) opencv_highgui opencv_dnn opencv_tracking - protobuf::libprotobuf + openshot_protobuf ) + set(HAVE_OPENCV TRUE CACHE BOOL "Building with OpenCV effects" FORCE) + mark_as_advanced(HAVE_OPENCV) endif() endif() add_feature_info("OpenCV algorithms" ENABLE_OPENCV "Use OpenCV algorithms") diff --git a/src/CVObjectDetection.h b/src/CVObjectDetection.h index 4ca55fc6..30b19ce6 100644 --- a/src/CVObjectDetection.h +++ b/src/CVObjectDetection.h @@ -42,9 +42,9 @@ #include "Json.h" #include "ProcessingController.h" #include "Clip.h" -#include "objdetectdata.pb.h" +#include "protobuf_messages/objdetectdata.pb.h" -#include "../src/sort_filter/sort.hpp" +#include "sort_filter/sort.hpp" namespace openshot { diff --git a/src/CVStabilization.h b/src/CVStabilization.h index f6502be3..4c40b811 100644 --- a/src/CVStabilization.h +++ b/src/CVStabilization.h @@ -40,7 +40,7 @@ #undef uint64 #undef int64 #include -#include "stabilizedata.pb.h" +#include "protobuf_messages/stabilizedata.pb.h" #include "ProcessingController.h" #include "Clip.h" #include "Json.h" diff --git a/src/CVTracker.h b/src/CVTracker.h index 8ea72371..d644e478 100644 --- a/src/CVTracker.h +++ b/src/CVTracker.h @@ -47,9 +47,9 @@ #include "Frame.h" #include "Json.h" #include "ProcessingController.h" -#include "trackerdata.pb.h" +#include "protobuf_messages/trackerdata.pb.h" -#include "../src/sort_filter/sort.hpp" +#include "sort_filter/sort.hpp" using namespace std; using google::protobuf::util::TimeUtil; diff --git a/src/OpenShotVersion.h.in b/src/OpenShotVersion.h.in index 5e86e8ce..e0829c00 100644 --- a/src/OpenShotVersion.h.in +++ b/src/OpenShotVersion.h.in @@ -49,6 +49,7 @@ #cmakedefine AVUTIL_VERSION_STR "@AVUTIL_VERSION_STR@" #cmakedefine01 HAVE_IMAGEMAGICK #cmakedefine01 HAVE_RESVG +#cmakedefine01 HAVE_OPENCV #cmakedefine01 APPIMAGE_BUILD #include diff --git a/src/effects/ObjectDetection.h b/src/effects/ObjectDetection.h index 45d30d58..f0d0f1bc 100644 --- a/src/effects/ObjectDetection.h +++ b/src/effects/ObjectDetection.h @@ -40,7 +40,7 @@ #include "../Color.h" #include "../Json.h" #include "../KeyFrame.h" -#include "objdetectdata.pb.h" +#include "protobuf_messages/objdetectdata.pb.h" // Struct that stores the detected bounding boxes for all the clip frames struct DetectionData{ diff --git a/src/effects/Stabilizer.h b/src/effects/Stabilizer.h index 31e9d2e3..8cc6f8d7 100644 --- a/src/effects/Stabilizer.h +++ b/src/effects/Stabilizer.h @@ -41,7 +41,7 @@ #include "../Color.h" #include "../Json.h" #include "../KeyFrame.h" -#include "stabilizedata.pb.h" +#include "protobuf_messages/stabilizedata.pb.h" using namespace std; using google::protobuf::util::TimeUtil; diff --git a/src/effects/Tracker.h b/src/effects/Tracker.h index 65997061..a64ab824 100644 --- a/src/effects/Tracker.h +++ b/src/effects/Tracker.h @@ -42,7 +42,7 @@ #include "../Color.h" #include "../Json.h" #include "../KeyFrame.h" -#include "trackerdata.pb.h" +#include "protobuf_messages/trackerdata.pb.h" using namespace std; using google::protobuf::util::TimeUtil; @@ -111,11 +111,11 @@ namespace openshot /// @param frame_number The frame number (starting at 1) of the effect on the timeline. std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; std::shared_ptr GetFrame(int64_t frame_number) override { return GetFrame(std::shared_ptr (new Frame()), frame_number); } - + // Load protobuf data file bool LoadTrackedData(std::string inputFilePath); - - // Get tracker info for the desired frame + + // Get tracker info for the desired frame EffectFrameData GetTrackedData(size_t frameId); /// Get and Set JSON methods diff --git a/src/protobuf_messages/CMakeLists.txt b/src/protobuf_messages/CMakeLists.txt index 602e1b9e..e62fca64 100644 --- a/src/protobuf_messages/CMakeLists.txt +++ b/src/protobuf_messages/CMakeLists.txt @@ -26,8 +26,16 @@ ################################################################################ # Dependencies -find_package(Protobuf 3) -include_directories(${PROTOBUF_INCLUDE_DIRS}) +find_package(Protobuf 3 REQUIRED) + +# Create a target for libprotobuf, if necessary (CMake < 3.9) +if(NOT TARGET protobuf::libprotobuf) + add_library(protobuf_TARGET INTERFACE) + target_include_directories(protobuf_TARGET + INTERFACE ${Protobuf_INCLUDE_DIRS}) + target_link_libraries(protobuf_TARGET INTERFACE ${Protobuf_LIBRARIES}) + add_library(protobuf::libprotobuf ALIAS protobuf_TARGET) +endif() file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto") PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles}) @@ -36,7 +44,7 @@ add_library(openshot_protobuf SHARED ${ProtoSources} ${ProtoHeaders}) set(ProtobufMessagePath ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "Path to generated protobuf header files.") -target_link_libraries(openshot_protobuf ${Boost_LIBRARIES} ${PROTOBUF_LIBRARY}) +target_link_libraries(openshot_protobuf protobuf::libprotobuf) # Set SONAME and other library properties set_target_properties(openshot_protobuf PROPERTIES @@ -45,7 +53,13 @@ set_target_properties(openshot_protobuf PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" ) -# Install primary library +# Install protobuf library and generated headers install(TARGETS openshot_protobuf - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libopenshot + ) +install(FILES ${ProtoHeaders} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libopenshot/protobuf_messages +) From d71631a6c74f3958da1b0d2d609a99db1977d40f Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 13 Jan 2021 12:08:33 -0500 Subject: [PATCH 24/27] OpenCV: Move 'using ns std', scrub whitespace --- src/CVObjectDetection.cpp | 49 +++++++++++++++++---------------- src/CVObjectDetection.h | 8 +++--- src/CVStabilization.cpp | 35 +++++++++++------------ src/CVStabilization.h | 19 ++++++------- src/CVTracker.cpp | 33 +++++++++++----------- src/CVTracker.h | 25 ++++++++--------- src/effects/ObjectDetection.cpp | 19 +++++++------ src/effects/ObjectDetection.h | 8 +++--- src/effects/Stabilizer.cpp | 19 +++++++------ src/effects/Stabilizer.h | 9 +++--- src/effects/Tracker.cpp | 9 +++--- src/effects/Tracker.h | 1 - 12 files changed, 118 insertions(+), 116 deletions(-) diff --git a/src/CVObjectDetection.cpp b/src/CVObjectDetection.cpp index a4e92e0d..0ac0a0ba 100644 --- a/src/CVObjectDetection.cpp +++ b/src/CVObjectDetection.cpp @@ -30,6 +30,7 @@ #include "CVObjectDetection.h" +using namespace std; using namespace openshot; CVObjectDetection::CVObjectDetection(std::string processInfoJson, ProcessingController &processingController) @@ -58,9 +59,9 @@ void CVObjectDetection::detectObjectsClip(openshot::Clip &video, size_t _start, if(error){ return; } - + processingController->SetError(false, ""); - + // Load names of classes std::ifstream ifs(classesFile.c_str()); std::string line; @@ -90,7 +91,7 @@ void CVObjectDetection::detectObjectsClip(openshot::Clip &video, size_t _start, } std::shared_ptr f = video.GetFrame(frame_number); - + // Grab OpenCV Mat image cv::Mat cvimage = f->GetImageCV(); @@ -104,7 +105,7 @@ void CVObjectDetection::detectObjectsClip(openshot::Clip &video, size_t _start, } void CVObjectDetection::DetectObjects(const cv::Mat &frame, size_t frameId){ - // Get frame as OpenCV Mat + // Get frame as OpenCV Mat cv::Mat blob; // Create a 4D blob from the frame. @@ -112,10 +113,10 @@ void CVObjectDetection::DetectObjects(const cv::Mat &frame, size_t frameId){ inpWidth = inpHeight = 416; cv::dnn::blobFromImage(frame, blob, 1/255.0, cv::Size(inpWidth, inpHeight), cv::Scalar(0,0,0), true, false); - + //Sets the input to the network net.setInput(blob); - + // Runs the forward pass to get output of the output layers std::vector outs; net.forward(outs, getOutputsNames(net)); @@ -132,7 +133,7 @@ void CVObjectDetection::postprocess(const cv::Size &frameDims, const std::vector std::vector classIds; std::vector confidences; std::vector boxes; - + for (size_t i = 0; i < outs.size(); ++i) { // Scan through all the bounding boxes output from the network and keep only the @@ -154,14 +155,14 @@ void CVObjectDetection::postprocess(const cv::Size &frameDims, const std::vector int height = (int)(data[3] * frameDims.height); int left = centerX - width / 2; int top = centerY - height / 2; - + classIds.push_back(classIdPoint.x); confidences.push_back((float)confidence); boxes.push_back(cv::Rect(left, top, width, height)); } } } - + // Perform non maximum suppression to eliminate redundant overlapping boxes with // lower confidences std::vector indices; @@ -189,7 +190,7 @@ void CVObjectDetection::postprocess(const cv::Size &frameDims, const std::vector for(uint j = i+1; j= confidences[j]){ @@ -213,7 +214,7 @@ void CVObjectDetection::postprocess(const cv::Size &frameDims, const std::vector // Remove boxes based in IOU score for(uint i = 0; i= confidences[j]){ @@ -233,7 +234,7 @@ void CVObjectDetection::postprocess(const cv::Size &frameDims, const std::vector } } } - + // Normalize boxes coordinates std::vector> normalized_boxes; for(auto box : boxes){ @@ -244,7 +245,7 @@ void CVObjectDetection::postprocess(const cv::Size &frameDims, const std::vector normalized_box.height = (box.height)/(float)frameDims.height; normalized_boxes.push_back(normalized_box); } - + detectionsData[frameId] = CVDetectionData(classIds, confidences, normalized_boxes, frameId); } @@ -276,13 +277,13 @@ bool CVObjectDetection::iou(cv::Rect pred_box, cv::Rect sort_box){ std::vector CVObjectDetection::getOutputsNames(const cv::dnn::Net& net) { static std::vector names; - + //Get the indices of the output layers, i.e. the layers with unconnected outputs std::vector outLayers = net.getUnconnectedOutLayers(); - + //get the names of all the layers in the network std::vector layersNames = net.getLayerNames(); - + // Get the names of the output layers in names names.resize(outLayers.size()); for (size_t i = 0; i < outLayers.size(); ++i) @@ -293,10 +294,10 @@ std::vector CVObjectDetection::getOutputsNames(const cv::dnn::Net& n CVDetectionData CVObjectDetection::GetDetectionData(size_t frameId){ // Check if the stabilizer info for the requested frame exists if ( detectionsData.find(frameId) == detectionsData.end() ) { - + return CVDetectionData(); } else { - + return detectionsData[frameId]; } } @@ -386,13 +387,13 @@ void CVObjectDetection::SetJsonValue(const Json::Value root) { processingDevice = (root["processing-device"].asString()); } if (!root["model-config"].isNull()){ - modelConfiguration = (root["model-config"].asString()); + modelConfiguration = (root["model-config"].asString()); std::ifstream infile(modelConfiguration); if(!infile.good()){ processingController->SetError(true, "Incorrect path to model config file"); error = true; } - + } if (!root["model-weights"].isNull()){ modelWeights= (root["model-weights"].asString()); @@ -424,7 +425,7 @@ void CVObjectDetection::SetJsonValue(const Json::Value root) { // Load protobuf data file bool CVObjectDetection::_LoadObjDetectdData(){ // Create tracker message - libopenshotobjdetect::ObjDetect objMessage; + libopenshotobjdetect::ObjDetect objMessage; { // Read the existing tracker message. @@ -453,7 +454,7 @@ bool CVObjectDetection::_LoadObjDetectdData(){ // Load bounding box data const google::protobuf::RepeatedPtrField &pBox = pbFrameData.bounding_box(); - + // Construct data vectors related to detections in the current frame std::vector classIds; std::vector confidences; std::vector> boxes; @@ -475,8 +476,8 @@ bool CVObjectDetection::_LoadObjDetectdData(){ detectionsData[id] = CVDetectionData(classIds, confidences, boxes, id); } - // Show the time stamp from the last update in object detector data file - if (objMessage.has_last_updated()) + // Show the time stamp from the last update in object detector data file + if (objMessage.has_last_updated()) cout << " Loaded Data. Saved Time Stamp: " << TimeUtil::ToString(objMessage.last_updated()) << endl; // Delete all global objects allocated by libprotobuf. diff --git a/src/CVObjectDetection.h b/src/CVObjectDetection.h index 30b19ce6..ad8d9158 100644 --- a/src/CVObjectDetection.h +++ b/src/CVObjectDetection.h @@ -67,13 +67,13 @@ namespace openshot /** * @brief This class runs trought a clip to detect objects and returns the bounding boxes and its properties. - * - * Object detection is performed using YoloV3 model with OpenCV DNN module + * + * Object detection is performed using YoloV3 model with OpenCV DNN module */ class CVObjectDetection{ private: - + cv::dnn::Net net; std::vector classNames; float confThreshold, nmsThreshold; @@ -97,7 +97,7 @@ namespace openshot ProcessingController *processingController; void setProcessingDevice(); - + // Detect onbects on a single frame void DetectObjects(const cv::Mat &frame, size_t frame_number); diff --git a/src/CVStabilization.cpp b/src/CVStabilization.cpp index 6e647f19..e115d0dd 100644 --- a/src/CVStabilization.cpp +++ b/src/CVStabilization.cpp @@ -30,10 +30,11 @@ #include "CVStabilization.h" +using namespace std; using namespace openshot; -// Set default smoothing window value to compute stabilization +// Set default smoothing window value to compute stabilization CVStabilization::CVStabilization(std::string processInfoJson, ProcessingController &processingController) : processingController(&processingController){ SetJson(processInfoJson); @@ -52,7 +53,7 @@ void CVStabilization::stabilizeClip(openshot::Clip& video, size_t _start, size_t avr_dx=0; avr_dy=0; avr_da=0; max_dx=0; max_dy=0; max_da=0; video.Open(); - // Save original video width and height + // Save original video width and height cv::Size readerDims(video.Reader()->info.width, video.Reader()->info.height); size_t frame_number; @@ -71,7 +72,7 @@ void CVStabilization::stabilizeClip(openshot::Clip& video, size_t _start, size_t } std::shared_ptr f = video.GetFrame(frame_number); - + // Grab OpenCV Mat image cv::Mat cvimage = f->GetImageCV(); // Resize frame to original video width and height if they differ @@ -174,7 +175,7 @@ bool CVStabilization::TrackFrameFeatures(cv::Mat frame, size_t frameNum){ return false; } - // Keep computing average and max transformation parameters + // Keep computing average and max transformation parameters avr_dx+=fabs(dx); avr_dy+=fabs(dy); avr_da+=fabs(da); @@ -184,7 +185,7 @@ bool CVStabilization::TrackFrameFeatures(cv::Mat frame, size_t frameNum){ max_dy = dy; if(fabs(da) > max_da) max_da = da; - + T.copyTo(last_T); prev_to_cur_transform.push_back(TransformParam(dx, dy, da)); @@ -204,8 +205,8 @@ std::vector CVStabilization::ComputeFramesTrajectory(){ double y = 0; vector trajectory; // trajectory at all frames - - // Compute global camera trajectory. First frame is the origin + + // Compute global camera trajectory. First frame is the origin for(size_t i=0; i < prev_to_cur_transform.size(); i++) { x += prev_to_cur_transform[i].dx; y += prev_to_cur_transform[i].dy; @@ -307,7 +308,7 @@ bool CVStabilization::SaveStabilizedData(){ // Add frame stabilization data into protobuf message void CVStabilization::AddFrameDataToProto(libopenshotstabilize::Frame* pbFrameData, CamTrajectory& trajData, TransformParam& transData, size_t frame_number){ - // Save frame number + // Save frame number pbFrameData->set_id(frame_number); // Save camera trajectory data @@ -325,10 +326,10 @@ TransformParam CVStabilization::GetTransformParamData(size_t frameId){ // Check if the stabilizer info for the requested frame exists if ( transformationData.find(frameId) == transformationData.end() ) { - + return TransformParam(); } else { - + return transformationData[frameId]; } } @@ -337,10 +338,10 @@ CamTrajectory CVStabilization::GetCamTrajectoryTrackedData(size_t frameId){ // Check if the stabilizer info for the requested frame exists if ( trajectoryData.find(frameId) == trajectoryData.end() ) { - + return CamTrajectory(); } else { - + return trajectoryData[frameId]; } } @@ -395,11 +396,11 @@ bool CVStabilization::_LoadStabilizedData(){ transformationData.clear(); trajectoryData.clear(); - // Iterate over all frames of the saved message and assign to the data maps + // Iterate over all frames of the saved message and assign to the data maps for (size_t i = 0; i < stabilizationMessage.frame_size(); i++) { const libopenshotstabilize::Frame& pbFrameData = stabilizationMessage.frame(i); - - // Load frame number + + // Load frame number size_t id = pbFrameData.id(); // Load camera trajectory data @@ -419,7 +420,7 @@ bool CVStabilization::_LoadStabilizedData(){ transformationData[id] = TransformParam(dx,dy,da); } - // Show the time stamp from the last update in stabilization data file + // Show the time stamp from the last update in stabilization data file if (stabilizationMessage.has_last_updated()) { cout << " Loaded Data. Saved Time Stamp: " << TimeUtil::ToString(stabilizationMessage.last_updated()) << endl; } @@ -428,4 +429,4 @@ bool CVStabilization::_LoadStabilizedData(){ google::protobuf::ShutdownProtobufLibrary(); return true; -} \ No newline at end of file +} diff --git a/src/CVStabilization.h b/src/CVStabilization.h index 4c40b811..68dd40f9 100644 --- a/src/CVStabilization.h +++ b/src/CVStabilization.h @@ -45,7 +45,6 @@ #include "Clip.h" #include "Json.h" -using namespace std; using google::protobuf::util::TimeUtil; // Store the relative transformation parameters between consecutive frames @@ -82,22 +81,22 @@ struct CamTrajectory /** * @brief This class stabilizes a video frame using optical flow * - * The relative motion between two consecutive frames is computed to obtain the global camera trajectory. + * The relative motion between two consecutive frames is computed to obtain the global camera trajectory. * The camera trajectory is then smoothed to reduce jittering. */ -class CVStabilization { +class CVStabilization { private: int smoothingWindow; // In frames. The larger the more stable the video, but less reactive to sudden panning - + size_t start; size_t end; double avr_dx, avr_dy, avr_da, max_dx, max_dy, max_da; - + cv::Mat last_T; cv::Mat prev_grey; - std::vector prev_to_cur_transform; // Previous to current + std::vector prev_to_cur_transform; // Previous to current std::string protobuf_data_path; uint progress; @@ -108,7 +107,7 @@ class CVStabilization { // Track current frame features and find the relative transformation bool TrackFrameFeatures(cv::Mat frame, size_t frameNum); - + std::vector ComputeFramesTrajectory(); std::map SmoothTrajectory(std::vector &trajectory); @@ -120,12 +119,12 @@ class CVStabilization { std::map trajectoryData; // Save camera trajectory data std::map transformationData; // Save transormation data - // Set default smoothing window value to compute stabilization + // Set default smoothing window value to compute stabilization CVStabilization(std::string processInfoJson, ProcessingController &processingController); // Process clip and store necessary stabilization data void stabilizeClip(openshot::Clip& video, size_t _start=0, size_t _end=0, bool process_interval=false); - + /// Protobuf Save and Load methods // Save stabilization data to protobuf file bool SaveStabilizedData(); @@ -144,4 +143,4 @@ class CVStabilization { bool _LoadStabilizedData(); }; -#endif \ No newline at end of file +#endif diff --git a/src/CVTracker.cpp b/src/CVTracker.cpp index 1833c581..0066eca1 100644 --- a/src/CVTracker.cpp +++ b/src/CVTracker.cpp @@ -30,12 +30,13 @@ #include "CVTracker.h" +using namespace std; using namespace openshot; // Constructor CVTracker::CVTracker(std::string processInfoJson, ProcessingController &processingController) -: processingController(&processingController), json_interval(false){ +: processingController(&processingController), json_interval(false){ SetJson(processInfoJson); } @@ -78,11 +79,11 @@ void CVTracker::trackClip(openshot::Clip& video, size_t _start, size_t _end, boo start = start + video.Start() * video.Reader()->info.fps.ToInt(); end = video.End() * video.Reader()->info.fps.ToInt(); } - + if(error){ return; - } - + } + processingController->SetError(false, ""); bool trackerInit = false; @@ -99,22 +100,22 @@ void CVTracker::trackClip(openshot::Clip& video, size_t _start, size_t _end, boo size_t frame_number = frame; // Get current frame std::shared_ptr f = video.GetFrame(frame_number); - + // Grab OpenCV Mat image cv::Mat cvimage = f->GetImageCV(); // Pass the first frame to initialize the tracker if(!trackerInit){ - + // Initialize the tracker initTracker(cvimage, frame_number); trackerInit = true; } else{ - // Update the object tracker according to frame + // Update the object tracker according to frame trackerInit = trackFrame(cvimage, frame_number); - + // Draw box on image FrameData fd = GetTrackedData(frame_number); @@ -155,7 +156,7 @@ bool CVTracker::initTracker(cv::Mat &frame, size_t frameId){ return true; } -// Update the object tracker according to frame +// Update the object tracker according to frame bool CVTracker::trackFrame(cv::Mat &frame, size_t frameId){ // Update the tracking result bool ok = tracker->update(frame, bbox); @@ -170,7 +171,7 @@ bool CVTracker::trackFrame(cv::Mat &frame, size_t frameId){ std::vector bboxes = {bbox}; std::vector confidence = {1.0}; std::vector classId = {1}; - + sort.update(bboxes, frameId, sqrt(pow(frame.rows, 2) + pow(frame.cols, 2)), confidence, classId); for(auto TBox : sort.frameTrackingResult) @@ -236,15 +237,15 @@ void CVTracker::AddFrameDataToProto(libopenshottracker::Frame* pbFrameData, Fram box->set_y2(fData.y2); } -// Get tracker info for the desired frame +// Get tracker info for the desired frame FrameData CVTracker::GetTrackedData(size_t frameId){ // Check if the tracker info for the requested frame exists if ( trackedDataById.find(frameId) == trackedDataById.end() ) { - + return FrameData(); } else { - + return trackedDataById[frameId]; } @@ -269,7 +270,7 @@ void CVTracker::SetJson(const std::string value) { // Load Json::Value into this object void CVTracker::SetJsonValue(const Json::Value root) { - + // Set data from Json (if key is found) if (!root["protobuf_data_path"].isNull()){ protobuf_data_path = (root["protobuf_data_path"].asString()); @@ -277,7 +278,7 @@ void CVTracker::SetJsonValue(const Json::Value root) { if (!root["tracker-type"].isNull()){ trackerType = (root["tracker-type"].asString()); } - + if (!root["region"].isNull()){ double x = root["region"]["x"].asDouble(); double y = root["region"]["y"].asDouble(); @@ -343,7 +344,7 @@ bool CVTracker::_LoadTrackedData(){ trackedDataById[id] = FrameData(id, rotation, x1, y1, x2, y2); } - // Show the time stamp from the last update in tracker data file + // Show the time stamp from the last update in tracker data file if (trackerMessage.has_last_updated()) { cout << " Loaded Data. Saved Time Stamp: " << TimeUtil::ToString(trackerMessage.last_updated()) << endl; } diff --git a/src/CVTracker.h b/src/CVTracker.h index d644e478..9aa9ef8f 100644 --- a/src/CVTracker.h +++ b/src/CVTracker.h @@ -51,12 +51,11 @@ #include "sort_filter/sort.hpp" -using namespace std; using google::protobuf::util::TimeUtil; namespace openshot { - + // Store the tracked object information for one frame struct FrameData{ size_t frame_id = -1; @@ -88,13 +87,13 @@ namespace openshot * @brief The tracker class will receive one bounding box provided by the user and then iterate over the clip frames * to return the object position in all the frames. */ - class CVTracker { + class CVTracker { private: - std::map trackedDataById; // Save tracked data + std::map trackedDataById; // Save tracked data std::string trackerType; // Name of the chosen tracker cv::Ptr tracker; // Pointer of the selected tracker - cv::Rect2d bbox; // Bounding box coords + cv::Rect2d bbox; // Bounding box coords SortTracker sort; std::string protobuf_data_path; // Path to protobuf data file @@ -103,34 +102,34 @@ namespace openshot /// Will handle a Thread safely comutication between ClipProcessingJobs and the processing effect classes ProcessingController *processingController; - + bool json_interval; size_t start; size_t end; bool error = false; - + // Initialize the tracker bool initTracker(cv::Mat &frame, size_t frameId); - - // Update the object tracker according to frame + + // Update the object tracker according to frame bool trackFrame(cv::Mat &frame, size_t frameId); public: // Constructor CVTracker(std::string processInfoJson, ProcessingController &processingController); - + // Set desirable tracker method cv::Ptr selectTracker(std::string trackerType); // Track object in the hole clip or in a given interval - // If start, end and process_interval are passed as argument, clip will be processed in [start,end) + // If start, end and process_interval are passed as argument, clip will be processed in [start,end) void trackClip(openshot::Clip& video, size_t _start=0, size_t _end=0, bool process_interval=false); // Get tracked data for a given frame FrameData GetTrackedData(size_t frameId); - + /// Protobuf Save and Load methods // Save protobuf file bool SaveTrackedData(); @@ -146,4 +145,4 @@ namespace openshot }; } -#endif \ No newline at end of file +#endif diff --git a/src/effects/ObjectDetection.cpp b/src/effects/ObjectDetection.cpp index 2b9745e5..d4e1e077 100644 --- a/src/effects/ObjectDetection.cpp +++ b/src/effects/ObjectDetection.cpp @@ -31,11 +31,12 @@ #include "effects/ObjectDetection.h" #include "effects/Tracker.h" +using namespace std; using namespace openshot; /// Blank constructor, useful when using Json to load the effect properties ObjectDetection::ObjectDetection(std::string clipObDetectDataPath) -{ +{ // Init effect properties init_effect_details(); @@ -113,14 +114,14 @@ void ObjectDetection::drawPred(int classId, float conf, cv::Rect2d box, cv::Mat& CV_Assert(classId < (int)classNames.size()); label = classNames[classId] + ":" + label; } - + //Display the label at the top of the bounding box int baseLine; cv::Size labelSize = cv::getTextSize(label, cv::FONT_HERSHEY_SIMPLEX, 0.5, 1, &baseLine); double left = box.x; double top = std::max((int)box.y, labelSize.height); - + cv::rectangle(frame, cv::Point(left, top - round(1.025*labelSize.height)), cv::Point(left + round(1.025*labelSize.width), top + baseLine), classesColor[classId], cv::FILLED); putText(frame, label, cv::Point(left+1, top), cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(0,0,0),1); std::cout<<"X1: "< &pBox = pbFrameData.bounding_box(); - + // Construct data vectors related to detections in the current frame std::vector classIds; std::vector confidences; @@ -193,8 +194,8 @@ bool ObjectDetection::LoadObjDetectdData(std::string inputFilePath){ detectionsData[id] = DetectionData(classIds, confidences, boxes, id); } - // Show the time stamp from the last update in object detector data file - if (objMessage.has_last_updated()) + // Show the time stamp from the last update in object detector data file + if (objMessage.has_last_updated()) cout << " Loaded Data. Saved Time Stamp: " << TimeUtil::ToString(objMessage.last_updated()) << endl; // Delete all global objects allocated by libprotobuf. @@ -203,7 +204,7 @@ bool ObjectDetection::LoadObjDetectdData(std::string inputFilePath){ return true; } -// Get tracker info for the desired frame +// Get tracker info for the desired frame DetectionData ObjectDetection::GetTrackedData(size_t frameId){ // Check if the tracker info for the requested frame exists @@ -259,7 +260,7 @@ void ObjectDetection::SetJsonValue(const Json::Value root) { // Set data from Json (if key is found) if (!root["protobuf_data_path"].isNull()){ protobuf_data_path = (root["protobuf_data_path"].asString()); - + if(!LoadObjDetectdData(protobuf_data_path)){ std::cout<<"Invalid protobuf data path"; protobuf_data_path = ""; diff --git a/src/effects/ObjectDetection.h b/src/effects/ObjectDetection.h index f0d0f1bc..31518c86 100644 --- a/src/effects/ObjectDetection.h +++ b/src/effects/ObjectDetection.h @@ -68,7 +68,7 @@ namespace openshot std::string protobuf_data_path; std::map detectionsData; std::vector classNames; - + std::vector classesColor; /// Init effect settings @@ -94,14 +94,14 @@ namespace openshot /// @param frame The frame object that needs the effect applied to it /// @param frame_number The frame number (starting at 1) of the effect on the timeline. std::shared_ptr GetFrame(std::shared_ptr frame, int64_t frame_number) override; - + std::shared_ptr GetFrame(int64_t frame_number) override { return GetFrame(std::shared_ptr (new Frame()), frame_number); } - + // Load protobuf data file bool LoadObjDetectdData(std::string inputFilePath); DetectionData GetTrackedData(size_t frameId); - + /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object void SetJson(const std::string value) override; ///< Load JSON string into this object diff --git a/src/effects/Stabilizer.cpp b/src/effects/Stabilizer.cpp index 40d66bc3..09d2e09f 100644 --- a/src/effects/Stabilizer.cpp +++ b/src/effects/Stabilizer.cpp @@ -30,11 +30,12 @@ #include "effects/Stabilizer.h" +using namespace std; using namespace openshot; /// Blank constructor, useful when using Json to load the effect properties Stabilizer::Stabilizer(std::string clipStabilizedDataPath):protobuf_data_path(clipStabilizedDataPath) -{ +{ // Init effect properties init_effect_details(); // Tries to load the stabilization data from protobuf @@ -80,7 +81,7 @@ std::shared_ptr Stabilizer::GetFrame(std::shared_ptr frame, int64_ if(transformationData.find(frame_number) != transformationData.end()){ float zoom_value = zoom.GetValue(frame_number); - + // Create empty rotation matrix cv::Mat T(2,3,CV_64F); @@ -98,8 +99,8 @@ std::shared_ptr Stabilizer::GetFrame(std::shared_ptr frame, int64_ cv::warpAffine(frame_image, frame_stabilized, T, frame_image.size()); // Scale up the image to remove black borders - cv::Mat T_scale = cv::getRotationMatrix2D(cv::Point2f(frame_stabilized.cols/2, frame_stabilized.rows/2), 0, zoom_value); - cv::warpAffine(frame_stabilized, frame_stabilized, T_scale, frame_stabilized.size()); + cv::Mat T_scale = cv::getRotationMatrix2D(cv::Point2f(frame_stabilized.cols/2, frame_stabilized.rows/2), 0, zoom_value); + cv::warpAffine(frame_stabilized, frame_stabilized, T_scale, frame_stabilized.size()); frame_image = frame_stabilized; } } @@ -126,13 +127,13 @@ bool Stabilizer::LoadStabilizedData(std::string inputFilePath){ transformationData.clear(); trajectoryData.clear(); - // Iterate over all frames of the saved message and assign to the data maps + // Iterate over all frames of the saved message and assign to the data maps for (size_t i = 0; i < stabilizationMessage.frame_size(); i++) { // Create stabilization message const libopenshotstabilize::Frame& pbFrameData = stabilizationMessage.frame(i); - - // Load frame number + + // Load frame number size_t id = pbFrameData.id(); // Load camera trajectory data @@ -152,7 +153,7 @@ bool Stabilizer::LoadStabilizedData(std::string inputFilePath){ transformationData[id] = EffectTransformParam(dx,dy,da); } - // Show the time stamp from the last update in stabilization data file + // Show the time stamp from the last update in stabilization data file if (stabilizationMessage.has_last_updated()) { cout << " Loaded Data. Saved Time Stamp: " << TimeUtil::ToString(stabilizationMessage.last_updated()) << endl; } @@ -211,7 +212,7 @@ void Stabilizer::SetJsonValue(const Json::Value root) { // Set data from Json (if key is found) if (!root["protobuf_data_path"].isNull()){ protobuf_data_path = (root["protobuf_data_path"].asString()); - + if(!LoadStabilizedData(protobuf_data_path)){ std::cout<<"Invalid protobuf data path"; protobuf_data_path = ""; diff --git a/src/effects/Stabilizer.h b/src/effects/Stabilizer.h index 8cc6f8d7..724d5849 100644 --- a/src/effects/Stabilizer.h +++ b/src/effects/Stabilizer.h @@ -43,7 +43,6 @@ #include "../KeyFrame.h" #include "protobuf_messages/stabilizedata.pb.h" -using namespace std; using google::protobuf::util::TimeUtil; // Store the relative transformation parameters between consecutive frames @@ -79,11 +78,11 @@ struct EffectCamTrajectory namespace openshot { - + /** * @brief This class stabilizes video clip to remove undesired shaking and jitter. * - * Adding stabilization is useful to increase video quality overall, since it removes + * Adding stabilization is useful to increase video quality overall, since it removes * from subtle to harsh unexpected camera movements. */ class Stabilizer : public EffectBase @@ -97,7 +96,7 @@ namespace openshot public: std::string teste; std::map trajectoryData; // Save camera trajectory data - std::map transformationData; // Save transormation data + std::map transformationData; // Save transormation data /// Blank constructor, useful when using Json to load the effect properties Stabilizer(std::string clipTrackerDataPath); @@ -122,7 +121,7 @@ namespace openshot // Load protobuf data file bool LoadStabilizedData(std::string inputFilePath); - + /// Get and Set JSON methods std::string Json() const override; ///< Generate JSON string of this object void SetJson(const std::string value) override; ///< Load JSON string into this object diff --git a/src/effects/Tracker.cpp b/src/effects/Tracker.cpp index 78fd3e07..0dd7af67 100644 --- a/src/effects/Tracker.cpp +++ b/src/effects/Tracker.cpp @@ -30,11 +30,12 @@ #include "effects/Tracker.h" +using namespace std; using namespace openshot; /// Blank constructor, useful when using Json to load the effect properties Tracker::Tracker(std::string clipTrackerDataPath) -{ +{ // Init effect properties init_effect_details(); @@ -134,7 +135,7 @@ bool Tracker::LoadTrackedData(std::string inputFilePath){ trackedDataById[id] = EffectFrameData(id, rotation, x1, y1, x2, y2); } - // Show the time stamp from the last update in tracker data file + // Show the time stamp from the last update in tracker data file if (trackerMessage.has_last_updated()) { cout << " Loaded Data. Saved Time Stamp: " << TimeUtil::ToString(trackerMessage.last_updated()) << endl; } @@ -145,7 +146,7 @@ bool Tracker::LoadTrackedData(std::string inputFilePath){ return true; } -// Get tracker info for the desired frame +// Get tracker info for the desired frame EffectFrameData Tracker::GetTrackedData(size_t frameId){ // Check if the tracker info for the requested frame exists @@ -201,7 +202,7 @@ void Tracker::SetJsonValue(const Json::Value root) { // Set data from Json (if key is found) if (!root["protobuf_data_path"].isNull()){ protobuf_data_path = (root["protobuf_data_path"].asString()); - + if(!LoadTrackedData(protobuf_data_path)){ std::cout<<"Invalid protobuf data path"; protobuf_data_path = ""; diff --git a/src/effects/Tracker.h b/src/effects/Tracker.h index a64ab824..854ffdfc 100644 --- a/src/effects/Tracker.h +++ b/src/effects/Tracker.h @@ -44,7 +44,6 @@ #include "../KeyFrame.h" #include "protobuf_messages/trackerdata.pb.h" -using namespace std; using google::protobuf::util::TimeUtil; From da02180c79148ffcae27cfdddcfae10e10093799 Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Wed, 13 Jan 2021 13:36:15 -0500 Subject: [PATCH 25/27] Rename protobuf packages to pb_foo --- src/CVObjectDetection.cpp | 14 +++++++------- src/CVObjectDetection.h | 2 +- src/CVStabilization.cpp | 8 ++++---- src/CVStabilization.h | 2 +- src/CVTracker.cpp | 14 +++++++------- src/CVTracker.h | 2 +- src/effects/ObjectDetection.cpp | 6 +++--- src/effects/Stabilizer.cpp | 4 ++-- src/effects/Tracker.cpp | 6 +++--- src/protobuf_messages/objdetectdata.proto | 8 ++++---- src/protobuf_messages/stabilizedata.proto | 8 ++++---- src/protobuf_messages/trackerdata.proto | 4 ++-- 12 files changed, 39 insertions(+), 39 deletions(-) diff --git a/src/CVObjectDetection.cpp b/src/CVObjectDetection.cpp index 0ac0a0ba..44a46fec 100644 --- a/src/CVObjectDetection.cpp +++ b/src/CVObjectDetection.cpp @@ -304,7 +304,7 @@ CVDetectionData CVObjectDetection::GetDetectionData(size_t frameId){ bool CVObjectDetection::SaveObjDetectedData(){ // Create tracker message - libopenshotobjdetect::ObjDetect objMessage; + pb_objdetect::ObjDetect objMessage; //Save class names in protobuf message for(int i = 0; i::iterator it=detectionsData.begin(); it!=detectionsData.end(); ++it){ CVDetectionData dData = it->second; - libopenshotobjdetect::Frame* pbFrameData; + pb_objdetect::Frame* pbFrameData; AddFrameDataToProto(objMessage.add_frame(), dData); } @@ -339,13 +339,13 @@ bool CVObjectDetection::SaveObjDetectedData(){ } // Add frame object detection into protobuf message. -void CVObjectDetection::AddFrameDataToProto(libopenshotobjdetect::Frame* pbFrameData, CVDetectionData& dData) { +void CVObjectDetection::AddFrameDataToProto(pb_objdetect::Frame* pbFrameData, CVDetectionData& dData) { // Save frame number and rotation pbFrameData->set_id(dData.frameId); for(size_t i = 0; i < dData.boxes.size(); i++){ - libopenshotobjdetect::Frame_Box* box = pbFrameData->add_bounding_box(); + pb_objdetect::Frame_Box* box = pbFrameData->add_bounding_box(); // Save bounding box data box->set_x(dData.boxes.at(i).x); @@ -425,7 +425,7 @@ void CVObjectDetection::SetJsonValue(const Json::Value root) { // Load protobuf data file bool CVObjectDetection::_LoadObjDetectdData(){ // Create tracker message - libopenshotobjdetect::ObjDetect objMessage; + pb_objdetect::ObjDetect objMessage; { // Read the existing tracker message. @@ -447,13 +447,13 @@ bool CVObjectDetection::_LoadObjDetectdData(){ // Iterate over all frames of the saved message for (size_t i = 0; i < objMessage.frame_size(); i++) { // Create protobuf message reader - const libopenshotobjdetect::Frame& pbFrameData = objMessage.frame(i); + const pb_objdetect::Frame& pbFrameData = objMessage.frame(i); // Get frame Id size_t id = pbFrameData.id(); // Load bounding box data - const google::protobuf::RepeatedPtrField &pBox = pbFrameData.bounding_box(); + const google::protobuf::RepeatedPtrField &pBox = pbFrameData.bounding_box(); // Construct data vectors related to detections in the current frame std::vector classIds; std::vector confidences; std::vector> boxes; diff --git a/src/CVObjectDetection.h b/src/CVObjectDetection.h index ad8d9158..61abd48e 100644 --- a/src/CVObjectDetection.h +++ b/src/CVObjectDetection.h @@ -124,7 +124,7 @@ namespace openshot // Save protobuf file bool SaveObjDetectedData(); // Add frame object detection data into protobuf message. - void AddFrameDataToProto(libopenshotobjdetect::Frame* pbFrameData, CVDetectionData& dData); + void AddFrameDataToProto(pb_objdetect::Frame* pbFrameData, CVDetectionData& dData); /// Get and Set JSON methods void SetJson(const std::string value); ///< Load JSON string into this object diff --git a/src/CVStabilization.cpp b/src/CVStabilization.cpp index e115d0dd..f8f2332a 100644 --- a/src/CVStabilization.cpp +++ b/src/CVStabilization.cpp @@ -280,7 +280,7 @@ std::map CVStabilization::GenNewCamPosition(std::map ::iterator trajData = trajectoryData.begin(); std::map::iterator transData = transformationData.begin(); @@ -306,7 +306,7 @@ bool CVStabilization::SaveStabilizedData(){ } // Add frame stabilization data into protobuf message -void CVStabilization::AddFrameDataToProto(libopenshotstabilize::Frame* pbFrameData, CamTrajectory& trajData, TransformParam& transData, size_t frame_number){ +void CVStabilization::AddFrameDataToProto(pb_stabilize::Frame* pbFrameData, CamTrajectory& trajData, TransformParam& transData, size_t frame_number){ // Save frame number pbFrameData->set_id(frame_number); @@ -384,7 +384,7 @@ void CVStabilization::SetJsonValue(const Json::Value root) { // Load protobuf data file bool CVStabilization::_LoadStabilizedData(){ // Create stabilization message - libopenshotstabilize::Stabilization stabilizationMessage; + pb_stabilize::Stabilization stabilizationMessage; // Read the existing tracker message. fstream input(protobuf_data_path, ios::in | ios::binary); if (!stabilizationMessage.ParseFromIstream(&input)) { @@ -398,7 +398,7 @@ bool CVStabilization::_LoadStabilizedData(){ // Iterate over all frames of the saved message and assign to the data maps for (size_t i = 0; i < stabilizationMessage.frame_size(); i++) { - const libopenshotstabilize::Frame& pbFrameData = stabilizationMessage.frame(i); + const pb_stabilize::Frame& pbFrameData = stabilizationMessage.frame(i); // Load frame number size_t id = pbFrameData.id(); diff --git a/src/CVStabilization.h b/src/CVStabilization.h index 68dd40f9..961fb19f 100644 --- a/src/CVStabilization.h +++ b/src/CVStabilization.h @@ -129,7 +129,7 @@ class CVStabilization { // Save stabilization data to protobuf file bool SaveStabilizedData(); // Add frame stabilization data into protobuf message - void AddFrameDataToProto(libopenshotstabilize::Frame* pbFrameData, CamTrajectory& trajData, TransformParam& transData, size_t frame_number); + void AddFrameDataToProto(pb_stabilize::Frame* pbFrameData, CamTrajectory& trajData, TransformParam& transData, size_t frame_number); // Return requested struct info for a given frame TransformParam GetTransformParamData(size_t frameId); diff --git a/src/CVTracker.cpp b/src/CVTracker.cpp index 0066eca1..23310dda 100644 --- a/src/CVTracker.cpp +++ b/src/CVTracker.cpp @@ -194,12 +194,12 @@ bool CVTracker::trackFrame(cv::Mat &frame, size_t frameId){ bool CVTracker::SaveTrackedData(){ // Create tracker message - libopenshottracker::Tracker trackerMessage; + pb_tracker::Tracker trackerMessage; // Iterate over all frames data and save in protobuf message for(std::map::iterator it=trackedDataById.begin(); it!=trackedDataById.end(); ++it){ FrameData fData = it->second; - libopenshottracker::Frame* pbFrameData; + pb_tracker::Frame* pbFrameData; AddFrameDataToProto(trackerMessage.add_frame(), fData); } @@ -223,13 +223,13 @@ bool CVTracker::SaveTrackedData(){ } // Add frame tracked data into protobuf message. -void CVTracker::AddFrameDataToProto(libopenshottracker::Frame* pbFrameData, FrameData& fData) { +void CVTracker::AddFrameDataToProto(pb_tracker::Frame* pbFrameData, FrameData& fData) { // Save frame number and rotation pbFrameData->set_id(fData.frame_id); pbFrameData->set_rotation(0); - libopenshottracker::Frame::Box* box = pbFrameData->mutable_bounding_box(); + pb_tracker::Frame::Box* box = pbFrameData->mutable_bounding_box(); // Save bounding box data box->set_x1(fData.x1); box->set_y1(fData.y1); @@ -311,7 +311,7 @@ void CVTracker::SetJsonValue(const Json::Value root) { // Load protobuf data file bool CVTracker::_LoadTrackedData(){ // Create tracker message - libopenshottracker::Tracker trackerMessage; + pb_tracker::Tracker trackerMessage; { // Read the existing tracker message. @@ -327,14 +327,14 @@ bool CVTracker::_LoadTrackedData(){ // Iterate over all frames of the saved message for (size_t i = 0; i < trackerMessage.frame_size(); i++) { - const libopenshottracker::Frame& pbFrameData = trackerMessage.frame(i); + const pb_tracker::Frame& pbFrameData = trackerMessage.frame(i); // Load frame and rotation data size_t id = pbFrameData.id(); float rotation = pbFrameData.rotation(); // Load bounding box data - const libopenshottracker::Frame::Box& box = pbFrameData.bounding_box(); + const pb_tracker::Frame::Box& box = pbFrameData.bounding_box(); float x1 = box.x1(); float y1 = box.y1(); float x2 = box.x2(); diff --git a/src/CVTracker.h b/src/CVTracker.h index 9aa9ef8f..b845f280 100644 --- a/src/CVTracker.h +++ b/src/CVTracker.h @@ -134,7 +134,7 @@ namespace openshot // Save protobuf file bool SaveTrackedData(); // Add frame tracked data into protobuf message. - void AddFrameDataToProto(libopenshottracker::Frame* pbFrameData, FrameData& fData); + void AddFrameDataToProto(pb_tracker::Frame* pbFrameData, FrameData& fData); /// Get and Set JSON methods void SetJson(const std::string value); ///< Load JSON string into this object diff --git a/src/effects/ObjectDetection.cpp b/src/effects/ObjectDetection.cpp index d4e1e077..454b109d 100644 --- a/src/effects/ObjectDetection.cpp +++ b/src/effects/ObjectDetection.cpp @@ -131,7 +131,7 @@ void ObjectDetection::drawPred(int classId, float conf, cv::Rect2d box, cv::Mat& // Load protobuf data file bool ObjectDetection::LoadObjDetectdData(std::string inputFilePath){ // Create tracker message - libopenshotobjdetect::ObjDetect objMessage; + pb_objdetect::ObjDetect objMessage; { // Read the existing tracker message. @@ -157,13 +157,13 @@ bool ObjectDetection::LoadObjDetectdData(std::string inputFilePath){ // Iterate over all frames of the saved message for (size_t i = 0; i < objMessage.frame_size(); i++) { // Create protobuf message reader - const libopenshotobjdetect::Frame& pbFrameData = objMessage.frame(i); + const pb_objdetect::Frame& pbFrameData = objMessage.frame(i); // Get frame Id size_t id = pbFrameData.id(); // Load bounding box data - const google::protobuf::RepeatedPtrField &pBox = pbFrameData.bounding_box(); + const google::protobuf::RepeatedPtrField &pBox = pbFrameData.bounding_box(); // Construct data vectors related to detections in the current frame std::vector classIds; diff --git a/src/effects/Stabilizer.cpp b/src/effects/Stabilizer.cpp index 09d2e09f..f3e8fcf6 100644 --- a/src/effects/Stabilizer.cpp +++ b/src/effects/Stabilizer.cpp @@ -114,7 +114,7 @@ std::shared_ptr Stabilizer::GetFrame(std::shared_ptr frame, int64_ bool Stabilizer::LoadStabilizedData(std::string inputFilePath){ // Create stabilization message - libopenshotstabilize::Stabilization stabilizationMessage; + pb_stabilize::Stabilization stabilizationMessage; // Read the existing tracker message. fstream input(inputFilePath, ios::in | ios::binary); @@ -131,7 +131,7 @@ bool Stabilizer::LoadStabilizedData(std::string inputFilePath){ for (size_t i = 0; i < stabilizationMessage.frame_size(); i++) { // Create stabilization message - const libopenshotstabilize::Frame& pbFrameData = stabilizationMessage.frame(i); + const pb_stabilize::Frame& pbFrameData = stabilizationMessage.frame(i); // Load frame number size_t id = pbFrameData.id(); diff --git a/src/effects/Tracker.cpp b/src/effects/Tracker.cpp index 0dd7af67..02804ac5 100644 --- a/src/effects/Tracker.cpp +++ b/src/effects/Tracker.cpp @@ -102,7 +102,7 @@ std::shared_ptr Tracker::GetFrame(std::shared_ptr frame, int64_t f // Load protobuf data file bool Tracker::LoadTrackedData(std::string inputFilePath){ // Create tracker message - libopenshottracker::Tracker trackerMessage; + pb_tracker::Tracker trackerMessage; { // Read the existing tracker message. @@ -118,14 +118,14 @@ bool Tracker::LoadTrackedData(std::string inputFilePath){ // Iterate over all frames of the saved message for (size_t i = 0; i < trackerMessage.frame_size(); i++) { - const libopenshottracker::Frame& pbFrameData = trackerMessage.frame(i); + const pb_tracker::Frame& pbFrameData = trackerMessage.frame(i); // Load frame and rotation data size_t id = pbFrameData.id(); float rotation = pbFrameData.rotation(); // Load bounding box data - const libopenshottracker::Frame::Box& box = pbFrameData.bounding_box(); + const pb_tracker::Frame::Box& box = pbFrameData.bounding_box(); float x1 = box.x1(); float y1 = box.y1(); float x2 = box.x2(); diff --git a/src/protobuf_messages/objdetectdata.proto b/src/protobuf_messages/objdetectdata.proto index c3f540c9..49ad94af 100644 --- a/src/protobuf_messages/objdetectdata.proto +++ b/src/protobuf_messages/objdetectdata.proto @@ -1,7 +1,7 @@ // [START declaration] syntax = "proto3"; -package libopenshotobjdetect; +package pb_objdetect; import "google/protobuf/timestamp.proto"; // [END declaration] @@ -9,7 +9,7 @@ import "google/protobuf/timestamp.proto"; // [START messages] message Frame { int32 id = 1; // Frame ID. - + message Box{ float x = 1; float y = 2; @@ -24,9 +24,9 @@ message Frame { message ObjDetect { repeated Frame frame = 1; - + google.protobuf.Timestamp last_updated = 2; repeated string classNames = 3; } -// [END messages] \ No newline at end of file +// [END messages] diff --git a/src/protobuf_messages/stabilizedata.proto b/src/protobuf_messages/stabilizedata.proto index 83e12d0f..13a4b08c 100644 --- a/src/protobuf_messages/stabilizedata.proto +++ b/src/protobuf_messages/stabilizedata.proto @@ -1,7 +1,7 @@ // [START declaration] syntax = "proto3"; -package libopenshotstabilize; +package pb_stabilize; import "google/protobuf/timestamp.proto"; // [END declaration] @@ -9,8 +9,8 @@ import "google/protobuf/timestamp.proto"; // [START messages] message Frame { int32 id = 1; // Frame ID. - - // TransformParam: frame smothed transformation + + // TransformParam: frame smothed transformation float dx = 2; float dy = 3; float da = 4; @@ -25,7 +25,7 @@ message Frame { message Stabilization { repeated Frame frame = 1; - + google.protobuf.Timestamp last_updated = 2; } // [END messages] diff --git a/src/protobuf_messages/trackerdata.proto b/src/protobuf_messages/trackerdata.proto index 7b3b1a96..24b35bb6 100644 --- a/src/protobuf_messages/trackerdata.proto +++ b/src/protobuf_messages/trackerdata.proto @@ -1,7 +1,7 @@ // [START declaration] syntax = "proto3"; -package libopenshottracker; +package pb_tracker; import "google/protobuf/timestamp.proto"; // [END declaration] @@ -23,7 +23,7 @@ message Frame { message Tracker { repeated Frame frame = 1; - + google.protobuf.Timestamp last_updated = 2; } // [END messages] From 73bf7390e9a3ebfc3ec0265765c9983cab0713c7 Mon Sep 17 00:00:00 2001 From: "Brenno A. C. Caldato" Date: Wed, 13 Jan 2021 19:30:46 -0300 Subject: [PATCH 26/27] Apply suggestions from code review Co-authored-by: Frank Dana --- src/Frame.cpp | 2 +- src/Frame.h | 4 +++- src/effects/ObjectDetection.cpp | 31 ++++++++++++++++--------------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/Frame.cpp b/src/Frame.cpp index e25aa5ad..24acdc40 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -943,7 +943,7 @@ std::shared_ptr Frame::GetImage() // Convert Qimage to Mat cv::Mat Frame::Qimage2mat( std::shared_ptr& qimage) { - cv::Mat mat = cv::Mat(qimage->height(), qimage->width(), CV_8UC4, (uchar*)qimage->bits(), qimage->bytesPerLine()).clone(); + cv::Mat mat = cv::Mat(qimage->height(), qimage->width(), CV_8UC4, (const uchar*)qimage->constbits(), qimage->bytesPerLine()).clone(); cv::Mat mat2 = cv::Mat(mat.rows, mat.cols, CV_8UC3 ); int from_to[] = { 0,0, 1,1, 2,2 }; cv::mixChannels( &mat, 1, &mat2, 1, from_to, 3 ); diff --git a/src/Frame.h b/src/Frame.h index e241555e..75976f17 100644 --- a/src/Frame.h +++ b/src/Frame.h @@ -124,7 +124,7 @@ namespace openshot int64_t max_audio_sample; ///< The max audio sample count added to this frame #ifdef USE_OPENCV - cv::Mat imagecv; ///< OpenCV image. It will be always on BGR format + cv::Mat imagecv; ///< OpenCV image. It will always be in BGR format #endif /// Constrain a color value from 0 to 255 @@ -295,6 +295,8 @@ namespace openshot #ifdef USE_OPENCV /// Convert Qimage to Mat cv::Mat Qimage2mat( std::shared_ptr& qimage); + + /// Convert OpenCV Mat to QImage std::shared_ptr Mat2Qimage(cv::Mat img); /// Get pointer to OpenCV Mat image object diff --git a/src/effects/ObjectDetection.cpp b/src/effects/ObjectDetection.cpp index d4e1e077..e21a9a84 100644 --- a/src/effects/ObjectDetection.cpp +++ b/src/effects/ObjectDetection.cpp @@ -74,23 +74,24 @@ std::shared_ptr ObjectDetection::GetFrame(std::shared_ptr frame, i cv::Mat cv_image = frame->GetImageCV(); std::cout<<"Frame number: "< bb_nrml = detections.boxes.at(i); - cv::Rect2d box((int)(bb_nrml.x*fw), - (int)(bb_nrml.y*fh), - (int)(bb_nrml.width*fw), - (int)(bb_nrml.height*fh)); - drawPred(detections.classIds.at(i), detections.confidences.at(i), - box, cv_image); - } + DetectionData detections = detectionsData[frame_number]; + for(int i = 0; i bb_nrml = detections.boxes.at(i); + cv::Rect2d box((int)(bb_nrml.x*fw), + (int)(bb_nrml.y*fh), + (int)(bb_nrml.width*fw), + (int)(bb_nrml.height*fh)); + drawPred(detections.classIds.at(i), detections.confidences.at(i), + box, cv_image); } } From f6de53350f163faae4e496224594389de452ed9d Mon Sep 17 00:00:00 2001 From: Brenno Date: Wed, 13 Jan 2021 20:22:17 -0300 Subject: [PATCH 27/27] Minor fixes - Moved TimeUtil from header to src - Fixed issue with Qimage -> Mat conversion --- src/CVObjectDetection.cpp | 2 ++ src/CVObjectDetection.h | 4 ---- src/CVStabilization.cpp | 3 ++- src/CVStabilization.h | 4 ---- src/CVTracker.cpp | 2 ++ src/CVTracker.h | 4 ---- src/Frame.cpp | 2 +- src/effects/ObjectDetection.cpp | 8 +------- src/effects/Stabilizer.cpp | 2 ++ src/effects/Stabilizer.h | 4 ---- src/effects/Tracker.cpp | 2 ++ src/effects/Tracker.h | 5 ----- 12 files changed, 12 insertions(+), 30 deletions(-) diff --git a/src/CVObjectDetection.cpp b/src/CVObjectDetection.cpp index 44a46fec..ca0e92ae 100644 --- a/src/CVObjectDetection.cpp +++ b/src/CVObjectDetection.cpp @@ -29,9 +29,11 @@ */ #include "CVObjectDetection.h" +#include using namespace std; using namespace openshot; +using google::protobuf::util::TimeUtil; CVObjectDetection::CVObjectDetection(std::string processInfoJson, ProcessingController &processingController) : processingController(&processingController), processingDevice("CPU"){ diff --git a/src/CVObjectDetection.h b/src/CVObjectDetection.h index 61abd48e..ae3dbf7d 100644 --- a/src/CVObjectDetection.h +++ b/src/CVObjectDetection.h @@ -30,8 +30,6 @@ #pragma once -#include - #define int64 opencv_broken_int #define uint64 opencv_broken_uint #include @@ -48,8 +46,6 @@ namespace openshot { - using google::protobuf::util::TimeUtil; - // Stores the detected object bounding boxes and its properties. struct CVDetectionData{ CVDetectionData(){} diff --git a/src/CVStabilization.cpp b/src/CVStabilization.cpp index f8f2332a..b2f944b9 100644 --- a/src/CVStabilization.cpp +++ b/src/CVStabilization.cpp @@ -29,10 +29,11 @@ */ #include "CVStabilization.h" +#include using namespace std; using namespace openshot; - +using google::protobuf::util::TimeUtil; // Set default smoothing window value to compute stabilization CVStabilization::CVStabilization(std::string processInfoJson, ProcessingController &processingController) diff --git a/src/CVStabilization.h b/src/CVStabilization.h index 961fb19f..7c41ac7c 100644 --- a/src/CVStabilization.h +++ b/src/CVStabilization.h @@ -31,8 +31,6 @@ #ifndef OPENSHOT_STABILIZATION_H #define OPENSHOT_STABILIZATION_H -#include - #define int64 opencv_broken_int #define uint64 opencv_broken_uint #include @@ -45,8 +43,6 @@ #include "Clip.h" #include "Json.h" -using google::protobuf::util::TimeUtil; - // Store the relative transformation parameters between consecutive frames struct TransformParam { diff --git a/src/CVTracker.cpp b/src/CVTracker.cpp index 23310dda..75742025 100644 --- a/src/CVTracker.cpp +++ b/src/CVTracker.cpp @@ -29,9 +29,11 @@ */ #include "CVTracker.h" +#include using namespace std; using namespace openshot; +using google::protobuf::util::TimeUtil; // Constructor diff --git a/src/CVTracker.h b/src/CVTracker.h index b845f280..918072ce 100644 --- a/src/CVTracker.h +++ b/src/CVTracker.h @@ -31,8 +31,6 @@ #ifndef OPENSHOT_CVTRACKER_H #define OPENSHOT_CVTRACKER_H -#include - #define int64 opencv_broken_int #define uint64 opencv_broken_uint #include @@ -51,8 +49,6 @@ #include "sort_filter/sort.hpp" -using google::protobuf::util::TimeUtil; - namespace openshot { diff --git a/src/Frame.cpp b/src/Frame.cpp index 24acdc40..d25def6d 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -943,7 +943,7 @@ std::shared_ptr Frame::GetImage() // Convert Qimage to Mat cv::Mat Frame::Qimage2mat( std::shared_ptr& qimage) { - cv::Mat mat = cv::Mat(qimage->height(), qimage->width(), CV_8UC4, (const uchar*)qimage->constbits(), qimage->bytesPerLine()).clone(); + cv::Mat mat = cv::Mat(qimage->height(), qimage->width(), CV_8UC4, (uchar*)qimage->constBits(), qimage->bytesPerLine()).clone(); cv::Mat mat2 = cv::Mat(mat.rows, mat.cols, CV_8UC3 ); int from_to[] = { 0,0, 1,1, 2,2 }; cv::mixChannels( &mat, 1, &mat2, 1, from_to, 3 ); diff --git a/src/effects/ObjectDetection.cpp b/src/effects/ObjectDetection.cpp index 58febd98..7c84e716 100644 --- a/src/effects/ObjectDetection.cpp +++ b/src/effects/ObjectDetection.cpp @@ -72,7 +72,7 @@ std::shared_ptr ObjectDetection::GetFrame(std::shared_ptr frame, i { // Get the frame's image cv::Mat cv_image = frame->GetImageCV(); - std::cout<<"Frame number: "< using namespace std; using namespace openshot; +using google::protobuf::util::TimeUtil; /// Blank constructor, useful when using Json to load the effect properties Stabilizer::Stabilizer(std::string clipStabilizedDataPath):protobuf_data_path(clipStabilizedDataPath) diff --git a/src/effects/Stabilizer.h b/src/effects/Stabilizer.h index 724d5849..0d24b6c0 100644 --- a/src/effects/Stabilizer.h +++ b/src/effects/Stabilizer.h @@ -33,8 +33,6 @@ #include "../EffectBase.h" -#include - #include #include #include @@ -43,8 +41,6 @@ #include "../KeyFrame.h" #include "protobuf_messages/stabilizedata.pb.h" -using google::protobuf::util::TimeUtil; - // Store the relative transformation parameters between consecutive frames struct EffectTransformParam { diff --git a/src/effects/Tracker.cpp b/src/effects/Tracker.cpp index 02804ac5..6b4130a3 100644 --- a/src/effects/Tracker.cpp +++ b/src/effects/Tracker.cpp @@ -29,9 +29,11 @@ */ #include "effects/Tracker.h" +#include using namespace std; using namespace openshot; +using google::protobuf::util::TimeUtil; /// Blank constructor, useful when using Json to load the effect properties Tracker::Tracker(std::string clipTrackerDataPath) diff --git a/src/effects/Tracker.h b/src/effects/Tracker.h index 854ffdfc..ad39b6b9 100644 --- a/src/effects/Tracker.h +++ b/src/effects/Tracker.h @@ -33,8 +33,6 @@ #include "../EffectBase.h" -#include - #include #include #include @@ -44,9 +42,6 @@ #include "../KeyFrame.h" #include "protobuf_messages/trackerdata.pb.h" -using google::protobuf::util::TimeUtil; - - // Tracking info struct struct EffectFrameData{ size_t frame_id = -1;