summaryrefslogtreecommitdiff
path: root/cutter.h
blob: c67429a1583026d4ab703913ef444161a7bac6c7 (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
/*
 * cutter.h: The video cutting facilities
 *
 * See the main source file 'vdr.c' for copyright information and
 * how to reach the author.
 *
 * $Id: cutter.h 3.1 2013/10/05 11:34:55 kls Exp $
 */

#ifndef __CUTTER_H
#define __CUTTER_H

#include "thread.h"
#include "tools.h"

class cCuttingThread;

class cCutter {
private:
  cString originalVersionName;
  cString editedVersionName;
  cCuttingThread *cuttingThread;
  bool error;
public:
  cCutter(const char *FileName);
      ///< Sets up a new cutter for the given FileName, which must be the full path
      ///< name of an existing recording directory.
  ~cCutter();
  static cString EditedFileName(const char *FileName);
      ///< Returns the full path name of the edited version of the recording with
      ///< the given FileName. This static function can be used independent of any
      ///< cCutter object, to determine the file name beforehand.
      ///< Returns NULL in case of error.
  bool Start(void);
      ///< Starts the actual cutting process.
      ///< Returns true if successful.
      ///< If Start() is called while the cutting process is already active, nothing
      ///< happens and false will be returned.
  void Stop(void);
      ///< Stops an ongoing cutting process.
  bool Active(void);
      ///< Returns true if the cutter is currently active.
  bool Error(void);
      ///< Returns true if an error occurred while cutting the recording.
  };

bool CutRecording(const char *FileName);

#endif //__CUTTER_H