Blame gst-libs/gst/video/gstvideodecoder.h

Packit 0652a1
/* GStreamer
Packit 0652a1
 * Copyright (C) 2008 David Schleef <ds@schleef.org>
Packit 0652a1
 * Copyright (C) 2011 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>.
Packit 0652a1
 * Copyright (C) 2011 Nokia Corporation. All rights reserved.
Packit 0652a1
 *   Contact: Stefan Kost <stefan.kost@nokia.com>
Packit 0652a1
 * Copyright (C) 2012 Collabora Ltd.
Packit 0652a1
 *	Author : Edward Hervey <edward@collabora.com>
Packit 0652a1
 *
Packit 0652a1
 * This library is free software; you can redistribute it and/or
Packit 0652a1
 * modify it under the terms of the GNU Library General Public
Packit 0652a1
 * License as published by the Free Software Foundation; either
Packit 0652a1
 * version 2 of the License, or (at your option) any later version.
Packit 0652a1
 *
Packit 0652a1
 * This library is distributed in the hope that it will be useful,
Packit 0652a1
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 0652a1
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 0652a1
 * Library General Public License for more details.
Packit 0652a1
 *
Packit 0652a1
 * You should have received a copy of the GNU Library General Public
Packit 0652a1
 * License along with this library; if not, write to the
Packit 0652a1
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit 0652a1
 * Boston, MA 02110-1301, USA.
Packit 0652a1
 */
Packit 0652a1
Packit 0652a1
#ifndef _GST_VIDEO_DECODER_H_
Packit 0652a1
#define _GST_VIDEO_DECODER_H_
Packit 0652a1
Packit 0652a1
#include <gst/base/gstadapter.h>
Packit 0652a1
#include <gst/video/gstvideoutils.h>
Packit 0652a1
Packit 0652a1
G_BEGIN_DECLS
Packit 0652a1
Packit 0652a1
#define GST_TYPE_VIDEO_DECODER \
Packit 0652a1
  (gst_video_decoder_get_type())
Packit 0652a1
#define GST_VIDEO_DECODER(obj) \
Packit 0652a1
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_DECODER,GstVideoDecoder))
Packit 0652a1
#define GST_VIDEO_DECODER_CLASS(klass) \
Packit 0652a1
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_DECODER,GstVideoDecoderClass))
Packit 0652a1
#define GST_VIDEO_DECODER_GET_CLASS(obj) \
Packit 0652a1
  (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_VIDEO_DECODER,GstVideoDecoderClass))
Packit 0652a1
#define GST_IS_VIDEO_DECODER(obj) \
Packit 0652a1
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_DECODER))
Packit 0652a1
#define GST_IS_VIDEO_DECODER_CLASS(klass) \
Packit 0652a1
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_DECODER))
Packit 0652a1
#define GST_VIDEO_DECODER_CAST(obj) ((GstVideoDecoder *)(obj))
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_SINK_NAME:
Packit 0652a1
 *
Packit 0652a1
 * The name of the templates for the sink pad.
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_SINK_NAME    "sink"
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_SRC_NAME:
Packit 0652a1
 *
Packit 0652a1
 * The name of the templates for the source pad.
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_SRC_NAME     "src"
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_SRC_PAD:
Packit 0652a1
 * @obj: a #GstVideoDecoder
Packit 0652a1
 *
Packit 0652a1
 * Gives the pointer to the source #GstPad object of the element.
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_SRC_PAD(obj)         (((GstVideoDecoder *) (obj))->srcpad)
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_SINK_PAD:
Packit 0652a1
 * @obj: a #GstVideoDecoder
Packit 0652a1
 *
Packit 0652a1
 * Gives the pointer to the sink #GstPad object of the element.
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_SINK_PAD(obj)        (((GstVideoDecoder *) (obj))->sinkpad)
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_FLOW_NEED_DATA:
Packit 0652a1
 *
Packit 0652a1
 * Returned while parsing to indicate more data is needed.
Packit 0652a1
 **/
Packit 0652a1
#define GST_VIDEO_DECODER_FLOW_NEED_DATA GST_FLOW_CUSTOM_SUCCESS
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_INPUT_SEGMENT:
Packit 0652a1
 * @obj: base decoder instance
Packit 0652a1
 *
Packit 0652a1
 * Gives the segment of the element.
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_INPUT_SEGMENT(obj)     (GST_VIDEO_DECODER_CAST (obj)->input_segment)
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_OUTPUT_SEGMENT:
Packit 0652a1
 * @obj: base decoder instance
Packit 0652a1
 *
Packit 0652a1
 * Gives the segment of the element.
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_OUTPUT_SEGMENT(obj)     (GST_VIDEO_DECODER_CAST (obj)->output_segment)
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_STREAM_LOCK:
Packit 0652a1
 * @decoder: video decoder instance
Packit 0652a1
 *
Packit 0652a1
 * Obtain a lock to protect the decoder function from concurrent access.
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_STREAM_LOCK(decoder) g_rec_mutex_lock (&GST_VIDEO_DECODER (decoder)->stream_lock)
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_STREAM_UNLOCK:
Packit 0652a1
 * @decoder: video decoder instance
Packit 0652a1
 *
Packit 0652a1
 * Release the lock that protects the decoder function from concurrent access.
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_STREAM_UNLOCK(decoder) g_rec_mutex_unlock (&GST_VIDEO_DECODER (decoder)->stream_lock)
Packit 0652a1
Packit 0652a1
typedef struct _GstVideoDecoder GstVideoDecoder;
Packit 0652a1
typedef struct _GstVideoDecoderClass GstVideoDecoderClass;
Packit 0652a1
typedef struct _GstVideoDecoderPrivate GstVideoDecoderPrivate;
Packit 0652a1
Packit 0652a1
Packit 0652a1
/* do not use this one, use macro below */
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstFlowReturn _gst_video_decoder_error (GstVideoDecoder *dec, gint weight,
Packit 0652a1
                                             GQuark domain, gint code,
Packit 0652a1
                                             gchar *txt, gchar *debug,
Packit 0652a1
                                             const gchar *file, const gchar *function,
Packit 0652a1
                                             gint line);
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_ERROR:
Packit 0652a1
 * @el:     the base video decoder element that generates the error
Packit 0652a1
 * @w:      element defined weight of the error, added to error count
Packit 0652a1
 * @domain: like CORE, LIBRARY, RESOURCE or STREAM (see #gstreamer-GstGError)
Packit 0652a1
 * @code:   error code defined for that domain (see #gstreamer-GstGError)
Packit 0652a1
 * @text:   the message to display (format string and args enclosed in
Packit 0652a1
 *          parentheses)
Packit 0652a1
 * @debug:  debugging information for the message (format string and args
Packit 0652a1
 *          enclosed in parentheses)
Packit 0652a1
 * @ret:    variable to receive return value
Packit 0652a1
 *
Packit 0652a1
 * Utility function that video decoder elements can use in case they encountered
Packit 0652a1
 * a data processing error that may be fatal for the current "data unit" but
Packit 0652a1
 * need not prevent subsequent decoding.  Such errors are counted and if there
Packit 0652a1
 * are too many, as configured in the context's max_errors, the pipeline will
Packit 0652a1
 * post an error message and the application will be requested to stop further
Packit 0652a1
 * media processing.  Otherwise, it is considered a "glitch" and only a warning
Packit 0652a1
 * is logged. In either case, @ret is set to the proper value to
Packit 0652a1
 * return to upstream/caller (indicating either GST_FLOW_ERROR or GST_FLOW_OK).
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_ERROR(el, w, domain, code, text, debug, ret) \
Packit 0652a1
G_STMT_START {                                                              \
Packit 0652a1
  gchar *__txt = _gst_element_error_printf text;                            \
Packit 0652a1
  gchar *__dbg = _gst_element_error_printf debug;                           \
Packit 0652a1
  GstVideoDecoder *__dec = GST_VIDEO_DECODER (el);                   \
Packit 0652a1
  ret = _gst_video_decoder_error (__dec, w, GST_ ## domain ## _ERROR,    \
Packit 0652a1
      GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,            \
Packit 0652a1
      GST_FUNCTION, __LINE__);                                              \
Packit 0652a1
} G_STMT_END
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GST_VIDEO_DECODER_MAX_ERRORS:
Packit 0652a1
 *
Packit 0652a1
 * Default maximum number of errors tolerated before signaling error.
Packit 0652a1
 */
Packit 0652a1
#define GST_VIDEO_DECODER_MAX_ERRORS     10
Packit 0652a1
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GstVideoDecoder:
Packit 0652a1
 *
Packit 0652a1
 * The opaque #GstVideoDecoder data structure.
Packit 0652a1
 */
Packit 0652a1
struct _GstVideoDecoder
Packit 0652a1
{
Packit 0652a1
  /*< private >*/
Packit 0652a1
  GstElement     element;
Packit 0652a1
Packit 0652a1
  /*< protected >*/
Packit 0652a1
  GstPad         *sinkpad;
Packit 0652a1
  GstPad         *srcpad;
Packit 0652a1
Packit 0652a1
  /* protects all data processing, i.e. is locked
Packit 0652a1
   * in the chain function, finish_frame and when
Packit 0652a1
   * processing serialized events */
Packit 0652a1
  GRecMutex stream_lock;
Packit 0652a1
Packit 0652a1
  /* MT-protected (with STREAM_LOCK) */
Packit 0652a1
  GstSegment      input_segment;
Packit 0652a1
  GstSegment      output_segment;
Packit 0652a1
Packit 0652a1
  GstVideoDecoderPrivate *priv;
Packit 0652a1
Packit 0652a1
  /*< private >*/
Packit 0652a1
  gpointer padding[GST_PADDING_LARGE];
Packit 0652a1
};
Packit 0652a1
Packit 0652a1
/**
Packit 0652a1
 * GstVideoDecoderClass:
Packit 0652a1
 * @open:           Optional.
Packit 0652a1
 *                  Called when the element changes to GST_STATE_READY.
Packit 0652a1
 *                  Allows opening external resources.
Packit 0652a1
 * @close:          Optional.
Packit 0652a1
 *                  Called when the element changes to GST_STATE_NULL.
Packit 0652a1
 *                  Allows closing external resources.
Packit 0652a1
 * @start:          Optional.
Packit 0652a1
 *                  Called when the element starts processing.
Packit 0652a1
 *                  Allows opening external resources.
Packit 0652a1
 * @stop:           Optional.
Packit 0652a1
 *                  Called when the element stops processing.
Packit 0652a1
 *                  Allows closing external resources.
Packit 0652a1
 * @set_format:     Notifies subclass of incoming data format (caps).
Packit 0652a1
 * @parse:          Required for non-packetized input.
Packit 0652a1
 *                  Allows chopping incoming data into manageable units (frames)
Packit 0652a1
 *                  for subsequent decoding.
Packit 0652a1
 * @reset:          Optional.
Packit 0652a1
 *                  Allows subclass (decoder) to perform post-seek semantics reset.
Packit 0652a1
 *                  Deprecated.
Packit 0652a1
 * @handle_frame:   Provides input data frame to subclass.
Packit 0652a1
 * @finish:         Optional.
Packit 0652a1
 *                  Called to request subclass to dispatch any pending remaining
Packit 0652a1
 *                  data at EOS. Sub-classes can refuse to decode new data after.
Packit 0652a1
 * @drain:	    Optional.
Packit 0652a1
 *                  Called to request subclass to decode any data it can at this
Packit 0652a1
 *                  point, but that more data may arrive after. (e.g. at segment end).
Packit 0652a1
 *                  Sub-classes should be prepared to handle new data afterward,
Packit 0652a1
 *                  or seamless segment processing will break. Since: 1.6
Packit 0652a1
 * @sink_event:     Optional.
Packit 0652a1
 *                  Event handler on the sink pad. This function should return
Packit 0652a1
 *                  TRUE if the event was handled and should be discarded
Packit 0652a1
 *                  (i.e. not unref'ed).
Packit 0652a1
 *                  Subclasses should chain up to the parent implementation to
Packit 0652a1
 *                  invoke the default handler.
Packit 0652a1
 * @src_event:      Optional.
Packit 0652a1
 *                  Event handler on the source pad. This function should return
Packit 0652a1
 *                  TRUE if the event was handled and should be discarded
Packit 0652a1
 *                  (i.e. not unref'ed).
Packit 0652a1
 *                  Subclasses should chain up to the parent implementation to
Packit 0652a1
 *                  invoke the default handler.
Packit 0652a1
 * @negotiate:      Optional.
Packit 0652a1
 *                  Negotiate with downstream and configure buffer pools, etc.
Packit 0652a1
 *                  Subclasses should chain up to the parent implementation to
Packit 0652a1
 *                  invoke the default handler.
Packit 0652a1
 * @decide_allocation: Optional.
Packit 0652a1
 *                     Setup the allocation parameters for allocating output
Packit 0652a1
 *                     buffers. The passed in query contains the result of the
Packit 0652a1
 *                     downstream allocation query.
Packit 0652a1
 *                     Subclasses should chain up to the parent implementation to
Packit 0652a1
 *                     invoke the default handler.
Packit 0652a1
 * @propose_allocation: Optional.
Packit 0652a1
 *                      Propose buffer allocation parameters for upstream elements.
Packit 0652a1
 *                      Subclasses should chain up to the parent implementation to
Packit 0652a1
 *                      invoke the default handler.
Packit 0652a1
 * @flush:              Optional.
Packit 0652a1
 *                      Flush all remaining data from the decoder without
Packit 0652a1
 *                      pushing it downstream. Since: 1.2
Packit 0652a1
 * @sink_query:     Optional.
Packit 0652a1
 *                  Query handler on the sink pad. This function should
Packit 0652a1
 *                  return TRUE if the query could be performed. Subclasses
Packit 0652a1
 *                  should chain up to the parent implementation to invoke the
Packit 0652a1
 *                  default handler. Since: 1.4
Packit 0652a1
 * @src_query:      Optional.
Packit 0652a1
 *                  Query handler on the source pad. This function should
Packit 0652a1
 *                  return TRUE if the query could be performed. Subclasses
Packit 0652a1
 *                  should chain up to the parent implementation to invoke the
Packit 0652a1
 *                  default handler. Since: 1.4
Packit 0652a1
 * @getcaps:        Optional.
Packit 0652a1
 *                  Allows for a custom sink getcaps implementation.
Packit 0652a1
 *                  If not implemented, default returns
Packit 0652a1
 *                  gst_video_decoder_proxy_getcaps
Packit 0652a1
 *                  applied to sink template caps.
Packit 0652a1
 * @transform_meta: Optional. Transform the metadata on the input buffer to the
Packit 0652a1
 *                  output buffer. By default this method is copies all meta without
Packit 0652a1
 *                  tags and meta with only the "video" tag. subclasses can
Packit 0652a1
 *                  implement this method and return %TRUE if the metadata is to be
Packit 0652a1
 *                  copied. Since: 1.6
Packit 0652a1
 *
Packit 0652a1
 * Subclasses can override any of the available virtual methods or not, as
Packit 0652a1
 * needed. At minimum @handle_frame needs to be overridden, and @set_format
Packit 0652a1
 * and likely as well.  If non-packetized input is supported or expected,
Packit 0652a1
 * @parse needs to be overridden as well.
Packit 0652a1
 */
Packit 0652a1
struct _GstVideoDecoderClass
Packit 0652a1
{
Packit 0652a1
  /*< private >*/
Packit 0652a1
  GstElementClass element_class;
Packit 0652a1
Packit 0652a1
  /*< public >*/
Packit 0652a1
  gboolean      (*open)           (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
  gboolean      (*close)          (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
  gboolean      (*start)          (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
  gboolean      (*stop)           (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
  GstFlowReturn (*parse)          (GstVideoDecoder *decoder,
Packit 0652a1
				   GstVideoCodecFrame *frame,
Packit 0652a1
				   GstAdapter *adapter,
Packit 0652a1
				   gboolean at_eos);
Packit 0652a1
Packit 0652a1
  gboolean      (*set_format)     (GstVideoDecoder *decoder,
Packit 0652a1
				   GstVideoCodecState * state);
Packit 0652a1
Packit 0652a1
  gboolean      (*reset)          (GstVideoDecoder *decoder,
Packit 0652a1
				   gboolean hard);
Packit 0652a1
Packit 0652a1
  GstFlowReturn (*finish)         (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
  GstFlowReturn (*handle_frame)   (GstVideoDecoder *decoder,
Packit 0652a1
				   GstVideoCodecFrame *frame);
Packit 0652a1
Packit 0652a1
  gboolean      (*sink_event)     (GstVideoDecoder *decoder,
Packit 0652a1
				   GstEvent *event);
Packit 0652a1
Packit 0652a1
  gboolean      (*src_event)      (GstVideoDecoder *decoder,
Packit 0652a1
				   GstEvent *event);
Packit 0652a1
Packit 0652a1
  gboolean      (*negotiate)      (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
  gboolean      (*decide_allocation)  (GstVideoDecoder *decoder, GstQuery *query);
Packit 0652a1
Packit 0652a1
  gboolean      (*propose_allocation) (GstVideoDecoder *decoder, GstQuery * query);
Packit 0652a1
Packit 0652a1
  gboolean      (*flush)              (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
  gboolean      (*sink_query)     (GstVideoDecoder *decoder,
Packit 0652a1
				   GstQuery *query);
Packit 0652a1
Packit 0652a1
  gboolean      (*src_query)      (GstVideoDecoder *decoder,
Packit 0652a1
				   GstQuery *query);
Packit 0652a1
Packit 0652a1
  GstCaps*      (*getcaps)        (GstVideoDecoder *decoder,
Packit 0652a1
                                   GstCaps *filter);
Packit 0652a1
Packit 0652a1
  GstFlowReturn (*drain)          (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
  gboolean      (*transform_meta) (GstVideoDecoder *decoder,
Packit 0652a1
                                   GstVideoCodecFrame *frame,
Packit 0652a1
                                   GstMeta * meta);
Packit 0652a1
Packit 0652a1
  /*< private >*/
Packit 0652a1
  gpointer padding[GST_PADDING_LARGE-6];
Packit 0652a1
};
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GType    gst_video_decoder_get_type (void);
Packit 0652a1
Packit 0652a1
/* Context parameters */
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void     gst_video_decoder_set_packetized (GstVideoDecoder * decoder,
Packit 0652a1
					   gboolean packetized);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
gboolean gst_video_decoder_get_packetized (GstVideoDecoder * decoder);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void     gst_video_decoder_set_estimate_rate (GstVideoDecoder * dec,
Packit 0652a1
					      gboolean          enabled);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
gint     gst_video_decoder_get_estimate_rate (GstVideoDecoder * dec);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void     gst_video_decoder_set_max_errors (GstVideoDecoder * dec,
Packit 0652a1
					   gint              num);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
gint     gst_video_decoder_get_max_errors (GstVideoDecoder * dec);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void     gst_video_decoder_set_needs_format (GstVideoDecoder * dec,
Packit 0652a1
                                             gboolean enabled);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
gboolean gst_video_decoder_get_needs_format (GstVideoDecoder * dec);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void     gst_video_decoder_set_latency (GstVideoDecoder *decoder,
Packit 0652a1
					GstClockTime min_latency,
Packit 0652a1
					GstClockTime max_latency);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void     gst_video_decoder_get_latency (GstVideoDecoder *decoder,
Packit 0652a1
					GstClockTime *min_latency,
Packit 0652a1
					GstClockTime *max_latency);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void     gst_video_decoder_get_allocator (GstVideoDecoder *decoder,
Packit 0652a1
                                          GstAllocator **allocator,
Packit 0652a1
                                          GstAllocationParams *params);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstBufferPool *gst_video_decoder_get_buffer_pool (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
/* Object methods */
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstVideoCodecFrame *gst_video_decoder_get_frame        (GstVideoDecoder *decoder,
Packit 0652a1
						        int frame_number);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstVideoCodecFrame *gst_video_decoder_get_oldest_frame (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GList *             gst_video_decoder_get_frames       (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
/* Parsing related methods */
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void           gst_video_decoder_add_to_frame     (GstVideoDecoder *decoder,
Packit 0652a1
						   int n_bytes);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstFlowReturn  gst_video_decoder_have_frame       (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
gsize          gst_video_decoder_get_pending_frame_size (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstBuffer     *gst_video_decoder_allocate_output_buffer (GstVideoDecoder * decoder);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstFlowReturn  gst_video_decoder_allocate_output_frame_with_params (GstVideoDecoder *decoder,
Packit 0652a1
                                                                    GstVideoCodecFrame * frame,
Packit 0652a1
                                                                    GstBufferPoolAcquireParams *params);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstFlowReturn  gst_video_decoder_allocate_output_frame  (GstVideoDecoder *decoder,
Packit 0652a1
						         GstVideoCodecFrame *frame);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstVideoCodecState *gst_video_decoder_set_output_state (GstVideoDecoder *decoder,
Packit 0652a1
							GstVideoFormat fmt, guint width, guint height,
Packit 0652a1
							GstVideoCodecState *reference);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstVideoCodecState *gst_video_decoder_set_interlaced_output_state (GstVideoDecoder *decoder,
Packit 0652a1
                                                                   GstVideoFormat fmt, GstVideoInterlaceMode mode,
Packit 0652a1
                                                                   guint width, guint height, GstVideoCodecState *reference);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstVideoCodecState *gst_video_decoder_get_output_state (GstVideoDecoder *decoder);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
gboolean         gst_video_decoder_negotiate           (GstVideoDecoder * decoder);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstClockTimeDiff gst_video_decoder_get_max_decode_time (GstVideoDecoder *decoder,
Packit 0652a1
							GstVideoCodecFrame *frame);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
gdouble          gst_video_decoder_get_qos_proportion (GstVideoDecoder * decoder);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstFlowReturn    gst_video_decoder_finish_frame (GstVideoDecoder *decoder,
Packit 0652a1
						 GstVideoCodecFrame *frame);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstFlowReturn    gst_video_decoder_drop_frame (GstVideoDecoder *dec,
Packit 0652a1
					       GstVideoCodecFrame *frame);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void             gst_video_decoder_release_frame (GstVideoDecoder * dec,
Packit 0652a1
						  GstVideoCodecFrame * frame);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void             gst_video_decoder_merge_tags (GstVideoDecoder *decoder,
Packit 0652a1
                                               const GstTagList *tags,
Packit 0652a1
                                               GstTagMergeMode mode);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
GstCaps *        gst_video_decoder_proxy_getcaps (GstVideoDecoder * decoder,
Packit 0652a1
						  GstCaps         * caps,
Packit 0652a1
                                                  GstCaps         * filter);
Packit 0652a1
Packit 0652a1
GST_VIDEO_API
Packit 0652a1
void             gst_video_decoder_set_use_default_pad_acceptcaps (GstVideoDecoder * decoder,
Packit 0652a1
                                                                   gboolean use);
Packit 0652a1
Packit 0652a1
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
Packit 0652a1
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoDecoder, gst_object_unref)
Packit 0652a1
#endif
Packit 0652a1
Packit 0652a1
G_END_DECLS
Packit 0652a1
Packit 0652a1
#endif
Packit 0652a1