| 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 <gstreamermm/memory.h> |
| 21 |
|
| 22 |
namespace Gst |
| 23 |
{ |
| 24 |
|
| 25 |
static GstMapInfo empty_map_info() |
| 26 |
{ |
| 27 |
// TODO: GST_MAP_INFO_INIT has been fixed in the further GStreamer version (1.8.x) |
| 28 |
static GstMapInfo info = { NULL, (GstMapFlags) 0, NULL, 0, 0, { NULL, NULL, NULL, NULL}, {NULL, NULL, NULL, NULL}}; |
| 29 |
return info; |
| 30 |
} |
| 31 |
|
| 32 |
MapInfo::MapInfo() |
| 33 |
: m_spec(empty_map_info()) |
| 34 |
{ |
| 35 |
} |
| 36 |
|
| 37 |
MapInfo::MapInfo(const GstMapInfo& castitem) |
| 38 |
: m_spec(castitem) |
| 39 |
{ |
| 40 |
} |
| 41 |
|
| 42 |
MapInfo::MapInfo(MapInfo&& other) |
| 43 |
{ |
| 44 |
m_spec = other.m_spec; |
| 45 |
other.m_spec = empty_map_info(); |
| 46 |
} |
| 47 |
|
| 48 |
MapInfo& MapInfo::operator=(MapInfo&& other) |
| 49 |
{ |
| 50 |
m_spec = other.m_spec; |
| 51 |
other.m_spec = empty_map_info(); |
| 52 |
return *this; |
| 53 |
} |
| 54 |
|
| 55 |
} |
| 56 |
|
| 57 |
|