mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
Origin commit data
------------------
Branch: master
Commit: c4422bcfbb
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-10-12 (Fri, 12 Oct 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
44 lines
954 B
C++
44 lines
954 B
C++
#ifndef __RECORD_TD_H
|
|
#define __RECORD_TD_H
|
|
|
|
#include <pthread.h>
|
|
#include "dmx_td.h"
|
|
|
|
#define REC_STATUS_OK 0
|
|
#define REC_STATUS_SLOW 1
|
|
#define REC_STATUS_OVERFLOW 2
|
|
|
|
typedef enum {
|
|
RECORD_RUNNING,
|
|
RECORD_STOPPED,
|
|
RECORD_FAILED_READ, /* failed to read from DMX */
|
|
RECORD_FAILED_OVERFLOW, /* cannot write fast enough */
|
|
RECORD_FAILED_FILE, /* cannot write to file */
|
|
RECORD_FAILED_MEMORY /* out of memory */
|
|
} record_state_t;
|
|
|
|
class cRecord
|
|
{
|
|
private:
|
|
int file_fd;
|
|
cDemux *dmx;
|
|
pthread_t record_thread;
|
|
bool record_thread_running;
|
|
record_state_t exit_flag;
|
|
int state;
|
|
public:
|
|
cRecord(int num = 0);
|
|
~cRecord();
|
|
|
|
bool Open();
|
|
bool Start(int fd, unsigned short vpid, unsigned short *apids, int numapids, uint64_t ch = 0);
|
|
bool Stop(void);
|
|
bool AddPid(unsigned short pid);
|
|
int GetStatus();
|
|
void ResetStatus();
|
|
bool ChangePids(unsigned short vpid, unsigned short *apids, int numapids);
|
|
|
|
void RecordThread();
|
|
};
|
|
#endif
|