scenepic 1.1.0
3D Visualization Made Easy
video.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#ifndef _SCENEPIC_VIDEO_H_
5#define _SCENEPIC_VIDEO_H_
6
7#include "json_value.h"
8
9namespace scenepic
10{
12 class Video
13 {
14 public:
18 void load(const std::string& path);
19
21 std::string to_string() const;
22
27
29 const std::string& video_id() const;
30
32 const std::vector<std::uint8_t>& data() const;
33
35 std::vector<std::uint8_t>& data();
36
38 Video& data(const std::vector<std::uint8_t>& value);
39
41 const std::string& ext() const;
42
44 Video& ext(const std::string& value);
45
46 private:
47 friend class Scene;
48
52 Video(const std::string& video_id);
53
54 std::vector<std::uint8_t> m_data;
55 std::string m_video_id;
56 std::string m_ext;
57 };
58} // namespace scenepic
59
60#endif
Representation of a JSON value according to the specification at https://www.json....
Definition: json_value.h:30
Top level container representing an entire ScenePic.
Definition: scene.h:58
Video that can be connected to a canvas.
Definition: video.h:13
const std::string & ext() const
The extension of the video (e.g.
Video & ext(const std::string &value)
The extension of the video (e.g.
const std::string & video_id() const
A unique identifier for the video.
Video & data(const std::vector< std::uint8_t > &value)
The encoded binary video data.
std::string to_string() const
Return a JSON string representing the object.
JsonValue to_json() const
Convert this object into ScenePic json.
std::vector< std::uint8_t > & data()
The encoded binary video data.
const std::vector< std::uint8_t > & data() const
The encoded binary video data.
void load(const std::string &path)
Load an video file from the disk.
Definition: audio_track.h:14