mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-05 14:30:03 +01:00
updated
This commit is contained in:
@@ -27,6 +27,7 @@ Playback::Playback(QObject *parent) : QThread(parent) {
|
|||||||
fps_delay = 60;
|
fps_delay = 60;
|
||||||
draw_strings = ac::draw_strings;
|
draw_strings = ac::draw_strings;
|
||||||
filter_map_ex = filter_map;
|
filter_map_ex = filter_map;
|
||||||
|
blend_image_copy_set = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Playback::VideoRelease() {
|
bool Playback::VideoRelease() {
|
||||||
@@ -397,6 +398,10 @@ void Playback::run() {
|
|||||||
ac::orig_frame = frame.clone();
|
ac::orig_frame = frame.clone();
|
||||||
FilterValue current_filterx = current_filter, prev_filterx = prev_filter;
|
FilterValue current_filterx = current_filter, prev_filterx = prev_filter;
|
||||||
std::string png_pathx = png_path;
|
std::string png_pathx = png_path;
|
||||||
|
if(blend_image_copy_set) {
|
||||||
|
blend_image = blend_image_copy.clone();
|
||||||
|
blend_image_copy_set = false;
|
||||||
|
}
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
|
|
||||||
cv::Mat temp_frame;
|
cv::Mat temp_frame;
|
||||||
@@ -600,12 +605,15 @@ void Playback::setStep() {
|
|||||||
void Playback::setImage(const cv::Mat &frame) {
|
void Playback::setImage(const cv::Mat &frame) {
|
||||||
blend_set = true;
|
blend_set = true;
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
blend_image = frame;
|
blend_image_copy = frame.clone();
|
||||||
|
blend_image_copy_set = true;
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Playback::setFadeFilter(bool f) {
|
void Playback::setFadeFilter(bool f) {
|
||||||
|
mutex.lock();
|
||||||
fadefilter = f;
|
fadefilter = f;
|
||||||
|
mutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Playback::setColorKey(const cv::Mat &image) {
|
void Playback::setColorKey(const cv::Mat &image) {
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ private:
|
|||||||
cv::VideoCapture capture;
|
cv::VideoCapture capture;
|
||||||
cv::VideoWriter writer;
|
cv::VideoWriter writer;
|
||||||
cv::Mat rgb_frame;
|
cv::Mat rgb_frame;
|
||||||
|
cv::Mat blend_image_copy;
|
||||||
|
std::atomic<bool> blend_image_copy_set;
|
||||||
QImage img;
|
QImage img;
|
||||||
std::vector<FilterValue> current;
|
std::vector<FilterValue> current;
|
||||||
std::atomic<bool> isPaused, isStep;
|
std::atomic<bool> isPaused, isStep;
|
||||||
|
|||||||
Reference in New Issue
Block a user