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 * This package provides an API to read recordings frame-by-frame of any type and obtain their metadata.
32 *
33 * Current available formats are:
34 *
35 * - Video formats (`.avi`, `.mp4`; provided by OpenCV2) via VideoPlaybackStrategy
36 * - Loose image collections (any image format) via ImageSequencePlaybackStrategy
37 * - Chunked image collections (ImageMonitor recording output) via ChunkedImageSequencePlaybackStrategy
38 *
39 * Required header:
40 *
41 * ```cpp
42 * // Include the required header. NOTE: Other header files are not part of the public API and may be subject to change
43 * #include <VisionX/libraries/playback.h>
44 * ```
45 *
46 * Example (Play back an AVI recording):
47 *
48 * ```cpp
49 * // Initialise replay
50 * const std::filesystem::path path = "/home/anon/recording_2010-10-10.avi";
51 * visionx::playback::Playback rep = visionx::playback::newPlayback(path);
52 *
53 * // Read frames
54 * while (rep->hasNextFrame())
55 * {
56 * cv::Mat frame;
57 * rep->getNextFrame(frame); // ::CByteImage or a raw unsigned char pointer are supported as well, albeit discouraged
58 * // ... process/display/manipulate frame ...
59 * }
60 *
61 * // Stop playback
62 * rep->stopPlayback();
63 *
64 * // {rep} is now uninitialised and should be destroyed
65 * ```
66 *
67 * @package visionx::playback
68 * @author Christian R. G. Dreher <christian.dreher@student.kit.edu>
69 * @date 2018
70 */
72{
73 // pass
74}