/* gstreamermm - a C++ wrapper for gstreamer
 *
 * Copyright 2008-2015 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/video/video-chroma.h>

_DEFS(gstreamermm,gst)

namespace Gst
{
  _WRAP_ENUM(VideoChromaSite, GstVideoChromaSite)
  _WRAP_ENUM(VideoChromaMethod, GstVideoChromaMethod)
  _WRAP_ENUM(VideoChromaFlags, GstVideoChromaFlags)
}

#include <gstreamermm/videoformat.h>

namespace Gst
{

namespace Enums
{
/** Converts @a site to its string representation.
 * @param site A Gst::VideoChromaSite.
 * @return a string describing @a site.
 */
Glib::ustring get_name(VideoChromaSite site);

/** Convert @a s to a Gst::VideoChromaSite.
 * @param s A chromasite string.
 * @return A Gst::VideoChromaSite or Gst::VIDEO_CHROMA_SITE_UNKNOWN when @a s does
 * not contain a valid chroma description.
 */
VideoChromaSite video_chroma_site_from_string(const Glib::ustring& s);
}

class VideoChromaResample
{
  _CLASS_GENERIC(VideoChromaResample, GstVideoChromaResample)
public:
  VideoChromaResample(Gst::VideoChromaMethod method, Gst::VideoChromaSite site, Gst::VideoChromaFlags flags,
    Gst::VideoFormat format, gint h_factor, gint v_factor);

  // it takes ownership of castitem
  explicit VideoChromaResample(GstVideoChromaResample* castitem);

  ~VideoChromaResample();

  GstVideoChromaResample*       gobj()       { return gobject_; }
  const GstVideoChromaResample* gobj() const { return gobject_; }

  _WRAP_METHOD(void get_info(guint& n_lines, gint& offset) const, gst_video_chroma_resample_get_info)

protected:
  GstVideoChromaResample* gobject_;
};

}
