playback.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package visionx::playback
17  * @author Christian R. G. Dreher <christian.dreher@student.kit.edu>
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 
24 #pragma once
25 
26 
27 #include <VisionX/libraries/playback/AbstractPlaybackStrategy.h>
28 #include <VisionX/libraries/playback/public_api.h>
29 
30 
31 
32 
33 /**
34  * This package provides an API to read recordings frame-by-frame of any type and obtain their metadata.
35  *
36  * Current available formats are:
37  *
38  * - Video formats (`.avi`, `.mp4`; provided by OpenCV2) via VideoPlaybackStrategy
39  * - Loose image collections (any image format) via ImageSequencePlaybackStrategy
40  * - Chunked image collections (ImageMonitor recording output) via ChunkedImageSequencePlaybackStrategy
41  *
42  * Required header:
43  *
44  * ```cpp
45  * // Include the required header. NOTE: Other header files are not part of the public API and may be subject to change
46  * #include <VisionX/libraries/playback.h>
47  * ```
48  *
49  * Example (Play back an AVI recording):
50  *
51  * ```cpp
52  * // Initialise replay
53  * const std::filesystem::path path = "/home/anon/recording_2010-10-10.avi";
54  * visionx::playback::Playback rep = visionx::playback::newPlayback(path);
55  *
56  * // Read frames
57  * while (rep->hasNextFrame())
58  * {
59  * cv::Mat frame;
60  * rep->getNextFrame(frame); // ::CByteImage or a raw unsigned char pointer are supported as well, albeit discouraged
61  * // ... process/display/manipulate frame ...
62  * }
63  *
64  * // Stop playback
65  * rep->stopPlayback();
66  *
67  * // {rep} is now uninitialised and should be destroyed
68  * ```
69  *
70  * @package visionx::playback
71  * @author Christian R. G. Dreher <christian.dreher@student.kit.edu>
72  * @date 2018
73  */
75 {
76  // pass
77 }
78 
visionx::playback
Definition: playback.h:74