Remove unused Processor::process_begin; some docs.
[dcpomatic.git] / src / lib / processor.h
1 /*
2     Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 /** @file  src/processor.h
21  *  @brief Parent class for classes which accept and then emit video or audio data.
22  */
23
24 #ifndef DVDOMATIC_PROCESSOR_H
25 #define DVDOMATIC_PROCESSOR_H
26
27 #include "video_source.h"
28 #include "video_sink.h"
29 #include "audio_source.h"
30 #include "audio_sink.h"
31
32 class Log;
33
34 /** @class Processor
35  *  @brief Base class for processors.
36  */
37 class Processor
38 {
39 public:
40         /** Construct a Processor.
41          *  @param log Log to use.
42          */
43         Processor (Log* log)
44                 : _log (log)
45         {}
46
47         /** Will be called at the end of a processing run */
48         virtual void process_end () {}
49
50 protected:
51         Log* _log; ///< log to write to
52 };
53
54 /** @class AudioVideoProcessor
55  *  @brief A processor which handles both video and audio data.
56  */
57 class AudioVideoProcessor : public Processor, public VideoSource, public VideoSink, public AudioSource, public AudioSink
58 {
59 public:
60         /** Construct an AudioVideoProcessor.
61          *  @param log Log to write to.
62          */
63         AudioVideoProcessor (Log* log)
64                 : Processor (log)
65         {}
66 };
67
68 /** @class AudioProcessor
69  *  @brief A processor which handles just audio data.
70  */
71 class AudioProcessor : public Processor, public AudioSource, public AudioSink
72 {
73 public:
74         /** Construct an AudioProcessor.
75          *  @param log Log to write to.
76          */
77         AudioProcessor (Log* log)
78                 : Processor (log)
79         {}
80 };
81
82 /** @class VideoProcessor
83  *  @brief A processor which handles just video data.
84  */
85 class VideoProcessor : public Processor, public VideoSource, public VideoSink
86 {
87 public:
88         /** Construct an VideoProcessor.
89          *  @param log Log to write to.
90          */
91         VideoProcessor (Log* log)
92                 : Processor (log)
93         {}
94 };
95
96 #endif