Ocean
ExplicitRecorder.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_MEDIA_EXPLICIT_RECORDER_H
9 #define META_OCEAN_MEDIA_EXPLICIT_RECORDER_H
10 
11 #include "ocean/media/Media.h"
12 #include "ocean/media/Recorder.h"
13 
15 
16 namespace Ocean
17 {
18 
19 namespace Media
20 {
21 
22 // Forward declaration.
23 class ExplicitRecorder;
24 
25 /**
26  * Definition of a object reference holding an explicit recorder.
27  * @see SmartObjectRef, ExplicitRecorder.
28  * @ingroup media
29  */
31 
32 /**
33  * This class is the base class for all explicit media recorder.
34  * An explicit recorder has to be started explicitly to start the recording process.<br>
35  * Instead, an implicit recorder may be started indirect by an external request.<br>
36  * @see ImplicitRecorder.
37  * @ingroup media
38  */
39 class OCEAN_MEDIA_EXPORT ExplicitRecorder : virtual public Recorder
40 {
41  public:
42 
43  /**
44  * Sets the recorder.
45  * @return True, the recorder started successfully
46  * @see stop().
47  */
48  virtual bool start() = 0;
49 
50  /**
51  * Stops the recorder.
52  * @return True, the recorder stopped successfully
53  * @see start().
54  */
55  virtual bool stop() = 0;
56 
57  protected:
58 
59  /**
60  * Creates a new explicit recorder.
61  */
63 
64  /**
65  * Destructs a explicit recorder.
66  */
67  ~ExplicitRecorder() override;
68 };
69 
70 }
71 
72 }
73 
74 #endif // META_OCEAN_MEDIA_EXPLICIT_RECORDER_H
This class is the base class for all explicit media recorder.
Definition: ExplicitRecorder.h:40
virtual bool start()=0
Sets the recorder.
virtual bool stop()=0
Stops the recorder.
ExplicitRecorder()
Creates a new explicit recorder.
~ExplicitRecorder() override
Destructs a explicit recorder.
This class is the base class for all recorder.
Definition: Recorder.h:37
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition: SmartObjectRef.h:90
Ocean::SmartObjectRef< ExplicitRecorder, Recorder > ExplicitRecorderRef
Definition of a object reference holding an explicit recorder.
Definition: ExplicitRecorder.h:23
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15