Gazebo Common

API Reference

3.17.0
gz/common/Video.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef GZ_COMMON_VIDEO_HH_
18 #define GZ_COMMON_VIDEO_HH_
19 
20 #include <string>
21 #include <memory>
22 
23 #include <gz/common/av/Export.hh>
25 
26 struct AVFormatContext;
27 struct AVCodecContext;
28 struct AVFrame;
29 struct AVPicture;
30 struct SwsContext;
31 
32 namespace ignition
33 {
34  namespace common
35  {
36  // Forward declare private data class
37  class VideoPrivate;
38 
40  class IGNITION_COMMON_AV_VISIBLE Video
41  {
43  public: Video();
44 
46  public: virtual ~Video();
47 
51  public: bool Load(const std::string &_filename);
52 
55  public: int Width() const;
56 
59  public: int Height() const;
60 
63  public:
65 
68  public: Length Duration() const;
69 
74  public: bool NextFrame(unsigned char **_buffer);
75 
77  private: void Cleanup();
78 
81  private: std::unique_ptr<VideoPrivate> dataPtr;
83  };
84  }
85 }
86 #endif
Forward declarations for the common classes.
STL class.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: gz/common/SuppressWarning.hh:65
Handle video encoding and decoding using libavcodec.
Definition: gz/common/Video.hh:40
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: gz/common/SuppressWarning.hh:68