mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 01:41:23 +02:00
CScreenShot: Remove OpenThreads and use pthread functions
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
Copyright (C) 2011 CoolStream International Ltd
|
||||
Copyright (C) 2017 M. Liebmann (micha-bbg)
|
||||
|
||||
License: GPLv2
|
||||
|
||||
@@ -22,9 +23,9 @@
|
||||
#ifndef __screenshot_h_
|
||||
#define __screenshot_h_
|
||||
|
||||
#include <OpenThreads/Thread>
|
||||
#include <pthread.h>
|
||||
|
||||
class CScreenShot : public OpenThreads::Thread
|
||||
class CScreenShot
|
||||
{
|
||||
public:
|
||||
typedef enum {
|
||||
@@ -43,6 +44,9 @@ class CScreenShot : public OpenThreads::Thread
|
||||
bool get_video;
|
||||
bool scale_to_video;
|
||||
FILE *fd;
|
||||
pthread_t scs_thread;
|
||||
pthread_mutex_t thread_mutex;
|
||||
pthread_mutex_t getData_mutex;
|
||||
|
||||
bool GetData();
|
||||
bool OpenFile();
|
||||
@@ -51,7 +55,11 @@ class CScreenShot : public OpenThreads::Thread
|
||||
bool SavePng();
|
||||
bool SaveJpg();
|
||||
bool SaveBmp();
|
||||
void run();
|
||||
|
||||
bool startThread();
|
||||
static void* initThread(void *arg);
|
||||
void runThread();
|
||||
static void cleanupThread(void *arg);
|
||||
|
||||
public:
|
||||
CScreenShot(const std::string fname = "", screenshot_format_t fmt = CScreenShot::FORMAT_JPG);
|
||||
|
Reference in New Issue
Block a user