| 1 |
/* gstreamermm - a C++ wrapper for gstreamer |
| 2 |
* |
| 3 |
* Copyright 2013-2016 The gstreamermm Development Team |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public |
| 16 |
* License along with this library; if not, write to the Free |
| 17 |
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 18 |
*/ |
| 19 |
|
| 20 |
#include <gst/gst.h> |
| 21 |
|
| 22 |
_DEFS(gstreamermm,gst) |
| 23 |
|
| 24 |
namespace Gst |
| 25 |
{ |
| 26 |
|
| 27 |
class Memory; |
| 28 |
|
| 29 |
_WRAP_ENUM(MapFlags, GstMapFlags) |
| 30 |
|
| 31 |
/* A structure containing the result of a map operation such as |
| 32 |
* Memory::map(). It contains the data and size. |
| 33 |
* |
| 34 |
* Last reviewed on 2016-06-05 (1.8.0) |
| 35 |
*/ |
| 36 |
class MapInfo |
| 37 |
{ |
| 38 |
_CLASS_GENERIC(MapInfo, GstMapInfo) |
| 39 |
public: |
| 40 |
MapInfo(); |
| 41 |
|
| 42 |
explicit MapInfo(const GstMapInfo& castitem); |
| 43 |
|
| 44 |
MapInfo(MapInfo&& other); |
| 45 |
MapInfo& operator=(MapInfo&& other); |
| 46 |
|
| 47 |
/** Get flags used when mapping the memory. |
| 48 |
*/ |
| 49 |
_MEMBER_GET(flags, flags, MapFlags, GstMapFlags) |
| 50 |
|
| 51 |
/** Get a pointer to the mapped data. |
| 52 |
*/ |
| 53 |
_MEMBER_GET_PTR(data, data, guint8*, guint8*) |
| 54 |
|
| 55 |
/** Get the maximum bytes in data. |
| 56 |
*/ |
| 57 |
_MEMBER_GET(maxsize, maxsize, gsize, gsize) |
| 58 |
|
| 59 |
/** Get the valid size in data. |
| 60 |
*/ |
| 61 |
_MEMBER_GET(size, size, gsize, gsize) |
| 62 |
|
| 63 |
/** Get a Glib::RefPtr to the mapped memory. |
| 64 |
*/ |
| 65 |
_MEMBER_GET_GOBJECT(memory, memory, Gst::Memory, GstMemory*) |
| 66 |
|
| 67 |
GstMapInfo* gobj() { return &m_spec; }; |
| 68 |
const GstMapInfo* gobj() const { return &m_spec; }; |
| 69 |
|
| 70 |
protected: |
| 71 |
#ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 72 |
GstMapInfo m_spec; |
| 73 |
#endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 74 |
}; |
| 75 |
|
| 76 |
}//namespace Gst |