Ignition Common

API Reference

3.5.0
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 IGNITION_COMMON_VIDEO_HH_
18 #define IGNITION_COMMON_VIDEO_HH_
19 
20 #include <string>
21 #include <memory>
22 
23 #include <ignition/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 
64  public: bool NextFrame(unsigned char **_buffer);
65 
67  private: void Cleanup();
68 
71  private: std::unique_ptr<VideoPrivate> dataPtr;
73  };
74  }
75 }
76 #endif
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: SuppressWarning.hh:67
STL class.
Handle video encoding and decoding using libavcodec.
Definition: Video.hh:40
Forward declarations for the common classes.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: SuppressWarning.hh:64