/*
 * sample.hg
 *
 *  Created on: Jul 30, 2013
 *      Author: m.kolny
 */
/* gstreamermm - a C++ wrapper for gstreamer
 *
 * Copyright 2008 The gstreamermm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gst/gst.h>
#include <gstreamermm/miniobject.h>
#include <gstreamermm/buffer.h>
#include <gstreamermm/caps.h>
#include <gstreamermm/segment.h>
#include <gstreamermm/structure.h>


_DEFS(gstreamermm,gst)

namespace Gst
{

/**
 * A Gst::Sample is a small object containing data, a type, timing and
 * extra arbitrary information.
 */
class Sample : public MiniObject
{
  _CLASS_OPAQUE_REFCOUNTED(Sample, GstSample, NONE, gst_sample_ref, gst_sample_unref)
  _IGNORE(gst_sample_ref, gst_sample_unref)

  static Glib::RefPtr<Gst::Buffer> create(Glib::RefPtr<Gst::Buffer> buffer, Glib::RefPtr<Gst::Caps> caps,
          Glib::RefPtr<const Gst::Segment> segment, Glib::RefPtr<Gst::Structure> info);

public:
  _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> get_buffer(), gst_sample_get_buffer, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const Gst::Buffer> get_buffer() const, gst_sample_get_buffer, constversion)
  _WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_caps(), gst_sample_get_caps)
  _WRAP_METHOD(Glib::RefPtr<const Gst::Caps> get_caps() const, gst_sample_get_caps, constversion)

};

}//namespace Gst
