summaryrefslogtreecommitdiff
path: root/queue.h
blob: e81990190ff7ae024f5b8ee0db9edd1f7ab8a95c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//
// queue.h
//

#ifndef __QUEUE_H
#define __QUEUE_H

#define QUEUEFILE "queue.vdrrip"
#define LOCKFILE "lock.vdrrip"
#define ENCODEFILE "encode.vdrrip"

struct QueueData {
  const char *Dir;
  char *Name;
  int FileSize;
  int FileNumbers;
  char *VCodec;
  int BitrateVideo;
  int MinQuant;
  int MaxQuant;
  int CropWidth;
  int CropHeight;
  int CropPosX;
  int CropPosY;
  int ScaleWidth;
  int ScaleHeight;
  char *ACodec;
  int BitrateAudio;
  int AudioID;
  const char *PPValues;
  int Rename;
  char *Container;
  int Preview;
};

class cQueue {
  private:
    struct QueueData *Q;
    int NumMovies;
    bool Locked;

    void Load();
    void Set(char *s, int c);

  public:
    cQueue();
    ~cQueue();

    bool Save();
    bool New(struct QueueData *q);
    bool Del(int i);
    bool Up(int i);
    bool Down(int i);
    bool Switch(int i);

    void Lock();
    void Unlock();
    void WaitUnlock();
    bool IsEncoding();
    char *getQueueStat();

    struct QueueData* getData(int i);
    char *getName(int i);
    char *getShortname(int i);
    int getNumMovies();
    bool getLockStat();
};

#endif // __QUEUE_H