Loading...
Searching...
No Matches
ClipProcessingJobs.h
Go to the documentation of this file.
// Copyright (c) 2008-2019 OpenShot Studios, LLC
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifdef USE_OPENCV
#define int64 opencv_broken_int
#define uint64 opencv_broken_uint
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#undef uint64
#undef int64
#include "CVStabilization.h"
#include "CVTracker.h"
#include "CVObjectDetection.h"
#endif
#include <thread>
#include "ProcessingController.h"
#include "Clip.h"
namespace openshot {
// Constructor responsible to choose processing type and apply to clip
class ClipProcessingJobs{
private:
std::string processInfoJson;
std::string processingType;
bool processingDone = false;
bool stopProcessing = false;
uint processingProgress = 0;
std::thread t;
ProcessingController processingController;
// Apply object tracking to clip
void trackClip(Clip& clip, ProcessingController& controller);
// Apply stabilization to clip
void stabilizeClip(Clip& clip, ProcessingController& controller);
// Apply object detection to clip
void detectObjectsClip(Clip& clip, ProcessingController& controller);
public:
// Constructor
ClipProcessingJobs(std::string processingType, std::string processInfoJson);
// Process clip accordingly to processingType
void processClip(Clip& clip, std::string json);
// Thread related variables and methods
int GetProgress();
bool IsDone();
void CancelProcessing();
bool GetError();
std::string GetErrorMessage();
};
} // namespace openshot
CVObjectDetection.h
Header file for CVObjectDetection class.
CVStabilization.h
Header file for CVStabilization class.
CVTracker.h
Track an object selected by the user.
Clip.h
Header file for Clip class.
ProcessingController.h
This is a message class for thread safe comunication between ClipProcessingJobs and OpenCV classes.
ProcessingController
Definition ProcessingController.h:20
openshot::ClipProcessingJobs
Definition ClipProcessingJobs.h:34
openshot::ClipProcessingJobs::processClip
void processClip(Clip &clip, std::string json)
Definition ClipProcessingJobs.cpp:23
openshot::ClipProcessingJobs::IsDone
bool IsDone()
Definition ClipProcessingJobs.cpp:109
openshot::ClipProcessingJobs::GetProgress
int GetProgress()
Definition ClipProcessingJobs.cpp:103
openshot::ClipProcessingJobs::GetError
bool GetError()
Definition ClipProcessingJobs.cpp:123
openshot::ClipProcessingJobs::CancelProcessing
void CancelProcessing()
Definition ClipProcessingJobs.cpp:118
openshot::ClipProcessingJobs::GetErrorMessage
std::string GetErrorMessage()
Definition ClipProcessingJobs.cpp:128
openshot::Clip
This class represents a clip (used to arrange readers on the timeline)
Definition Clip.h:89
openshot
This namespace is the default namespace for all code in the openshot library.
Definition Compressor.h:29