OpenShot Library | libopenshot 0.3.3
Loading...
Searching...
No Matches
ClipProcessingJobs.h
Go to the documentation of this file.
1
10// Copyright (c) 2008-2019 OpenShot Studios, LLC
11//
12// SPDX-License-Identifier: LGPL-3.0-or-later
13
14#ifdef USE_OPENCV
15 #define int64 opencv_broken_int
16 #define uint64 opencv_broken_uint
17 #include <opencv2/opencv.hpp>
18 #include <opencv2/core.hpp>
19 #undef uint64
20 #undef int64
21
22 #include "CVStabilization.h"
23 #include "CVTracker.h"
24 #include "CVObjectDetection.h"
25#endif
26
27#include <thread>
29#include "Clip.h"
30
31namespace openshot {
32
33// Constructor responsible to choose processing type and apply to clip
35 private:
36 std::string processInfoJson;
37 std::string processingType;
38
39 bool processingDone = false;
40 bool stopProcessing = false;
41 uint processingProgress = 0;
42
43 std::thread t;
44
46 ProcessingController processingController;
47
48 // Apply object tracking to clip
49 void trackClip(Clip& clip, ProcessingController& controller);
50 // Apply stabilization to clip
51 void stabilizeClip(Clip& clip, ProcessingController& controller);
52 // Apply object detection to clip
53 void detectObjectsClip(Clip& clip, ProcessingController& controller);
54
55
56 public:
57 // Constructor
58 ClipProcessingJobs(std::string processingType, std::string processInfoJson);
59 // Process clip accordingly to processingType
60 void processClip(Clip& clip, std::string json);
61
62 // Thread related variables and methods
63 int GetProgress();
64 bool IsDone();
65 void CancelProcessing();
66 bool GetError();
67 std::string GetErrorMessage();
68};
69
70} // namespace openshot
Header file for CVObjectDetection class.
Header file for CVStabilization class.
Track an object selected by the user.
Header file for Clip class.
This is a message class for thread safe comunication between ClipProcessingJobs and OpenCV classes.
void processClip(Clip &clip, std::string json)
This class represents a clip (used to arrange readers on the timeline)
Definition Clip.h:89
This namespace is the default namespace for all code in the openshot library.
Definition Compressor.h:29