2012-03-07 09:18:49 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2008 David Schleef <ds@schleef.org>
|
|
|
|
* Copyright (C) 2011 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>.
|
|
|
|
* Copyright (C) 2011 Nokia Corporation. All rights reserved.
|
|
|
|
* Contact: Stefan Kost <stefan.kost@nokia.com>
|
|
|
|
* Copyright (C) 2012 Collabora Ltd.
|
|
|
|
* Author : Edward Hervey <edward@collabora.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 23:05:09 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2012-03-07 09:18:49 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GST_VIDEO_ENCODER_H_
|
|
|
|
#define _GST_VIDEO_ENCODER_H_
|
|
|
|
|
|
|
|
#include <gst/video/gstvideoutils.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GST_TYPE_VIDEO_ENCODER \
|
|
|
|
(gst_video_encoder_get_type())
|
|
|
|
#define GST_VIDEO_ENCODER(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_ENCODER,GstVideoEncoder))
|
|
|
|
#define GST_VIDEO_ENCODER_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_ENCODER,GstVideoEncoderClass))
|
|
|
|
#define GST_VIDEO_ENCODER_GET_CLASS(obj) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_VIDEO_ENCODER,GstVideoEncoderClass))
|
|
|
|
#define GST_IS_VIDEO_ENCODER(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_ENCODER))
|
2016-05-10 07:01:12 +00:00
|
|
|
#define GST_IS_VIDEO_ENCODER_CLASS(klass) \
|
2012-03-07 09:18:49 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_ENCODER))
|
|
|
|
#define GST_VIDEO_ENCODER_CAST(enc) ((GstVideoEncoder*)enc)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_SINK_NAME:
|
|
|
|
*
|
|
|
|
* The name of the templates for the sink pad.
|
|
|
|
*/
|
|
|
|
#define GST_VIDEO_ENCODER_SINK_NAME "sink"
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_SRC_NAME:
|
|
|
|
*
|
|
|
|
* The name of the templates for the source pad.
|
|
|
|
*/
|
|
|
|
#define GST_VIDEO_ENCODER_SRC_NAME "src"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_SRC_PAD:
|
|
|
|
* @obj: a #GstVideoEncoder
|
|
|
|
*
|
|
|
|
* Gives the pointer to the source #GstPad object of the element.
|
|
|
|
*/
|
|
|
|
#define GST_VIDEO_ENCODER_SRC_PAD(obj) (((GstVideoEncoder *) (obj))->srcpad)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_SINK_PAD:
|
|
|
|
* @obj: a #GstVideoEncoder
|
|
|
|
*
|
|
|
|
* Gives the pointer to the sink #GstPad object of the element.
|
|
|
|
*/
|
|
|
|
#define GST_VIDEO_ENCODER_SINK_PAD(obj) (((GstVideoEncoder *) (obj))->sinkpad)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_FLOW_NEED_DATA:
|
|
|
|
*
|
|
|
|
* Returned while parsing to indicate more data is needed.
|
|
|
|
**/
|
|
|
|
#define GST_VIDEO_ENCODER_FLOW_NEED_DATA GST_FLOW_CUSTOM_SUCCESS
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_FLOW_DROPPED:
|
|
|
|
*
|
|
|
|
* Returned when the event/buffer should be dropped.
|
2016-01-19 22:26:57 +00:00
|
|
|
*
|
|
|
|
* Deprecated: since 1.8. use gst_video_encoder_finish_frame with
|
|
|
|
* a %NULL frame->output_buffer to drop the frame instead.
|
2012-03-07 09:18:49 +00:00
|
|
|
*/
|
2016-01-19 22:26:57 +00:00
|
|
|
#ifndef GST_DISABLE_DEPRECATED
|
2012-03-07 09:18:49 +00:00
|
|
|
#define GST_VIDEO_ENCODER_FLOW_DROPPED GST_FLOW_CUSTOM_SUCCESS_1
|
2016-01-19 22:26:57 +00:00
|
|
|
#endif
|
2012-03-07 09:18:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_INPUT_SEGMENT:
|
|
|
|
* @obj: base parse instance
|
|
|
|
*
|
|
|
|
* Gives the segment of the element.
|
|
|
|
*/
|
|
|
|
#define GST_VIDEO_ENCODER_INPUT_SEGMENT(obj) (GST_VIDEO_ENCODER_CAST (obj)->input_segment)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_OUTPUT_SEGMENT:
|
|
|
|
* @obj: base parse instance
|
|
|
|
*
|
|
|
|
* Gives the segment of the element.
|
|
|
|
*/
|
|
|
|
#define GST_VIDEO_ENCODER_OUTPUT_SEGMENT(obj) (GST_VIDEO_ENCODER_CAST (obj)->output_segment)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_STREAM_LOCK:
|
|
|
|
* @encoder: video encoder instance
|
|
|
|
*
|
|
|
|
* Obtain a lock to protect the encoder function from concurrent access.
|
|
|
|
*/
|
2012-04-24 17:35:24 +00:00
|
|
|
#define GST_VIDEO_ENCODER_STREAM_LOCK(encoder) g_rec_mutex_lock (&GST_VIDEO_ENCODER (encoder)->stream_lock)
|
2012-03-07 09:18:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_VIDEO_ENCODER_STREAM_UNLOCK:
|
|
|
|
* @encoder: video encoder instance
|
|
|
|
*
|
|
|
|
* Release the lock that protects the encoder function from concurrent access.
|
|
|
|
*/
|
2012-04-24 17:35:24 +00:00
|
|
|
#define GST_VIDEO_ENCODER_STREAM_UNLOCK(encoder) g_rec_mutex_unlock (&GST_VIDEO_ENCODER (encoder)->stream_lock)
|
2012-03-07 09:18:49 +00:00
|
|
|
|
|
|
|
typedef struct _GstVideoEncoder GstVideoEncoder;
|
|
|
|
typedef struct _GstVideoEncoderPrivate GstVideoEncoderPrivate;
|
|
|
|
typedef struct _GstVideoEncoderClass GstVideoEncoderClass;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVideoEncoder:
|
|
|
|
*
|
|
|
|
* The opaque #GstVideoEncoder data structure.
|
|
|
|
*/
|
|
|
|
struct _GstVideoEncoder
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
GstElement element;
|
|
|
|
|
|
|
|
/*< protected >*/
|
|
|
|
GstPad *sinkpad;
|
|
|
|
GstPad *srcpad;
|
|
|
|
|
|
|
|
/* protects all data processing, i.e. is locked
|
|
|
|
* in the chain function, finish_frame and when
|
|
|
|
* processing serialized events */
|
2012-04-24 17:35:24 +00:00
|
|
|
GRecMutex stream_lock;
|
2012-03-07 09:18:49 +00:00
|
|
|
|
|
|
|
/* MT-protected (with STREAM_LOCK) */
|
|
|
|
GstSegment input_segment;
|
|
|
|
GstSegment output_segment;
|
|
|
|
|
2012-09-10 12:00:35 +00:00
|
|
|
/*< private >*/
|
2012-03-07 09:18:49 +00:00
|
|
|
GstVideoEncoderPrivate *priv;
|
2012-09-10 12:00:35 +00:00
|
|
|
|
2018-02-07 16:40:49 +00:00
|
|
|
gpointer padding[GST_PADDING_LARGE];
|
2012-03-07 09:18:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVideoEncoderClass:
|
|
|
|
* @open: Optional.
|
|
|
|
* Called when the element changes to GST_STATE_READY.
|
2012-07-13 10:11:06 +00:00
|
|
|
* Allows opening external resources.
|
2012-03-07 09:18:49 +00:00
|
|
|
* @close: Optional.
|
|
|
|
* Called when the element changes to GST_STATE_NULL.
|
2012-07-13 10:11:06 +00:00
|
|
|
* Allows closing external resources.
|
2012-03-07 09:18:49 +00:00
|
|
|
* @start: Optional.
|
|
|
|
* Called when the element starts processing.
|
|
|
|
* Allows opening external resources.
|
|
|
|
* @stop: Optional.
|
|
|
|
* Called when the element stops processing.
|
|
|
|
* Allows closing external resources.
|
|
|
|
* @set_format: Optional.
|
|
|
|
* Notifies subclass of incoming data format.
|
|
|
|
* GstVideoCodecState fields have already been
|
|
|
|
* set according to provided caps.
|
|
|
|
* @handle_frame: Provides input frame to subclass.
|
|
|
|
* @reset: Optional.
|
|
|
|
* Allows subclass (encoder) to perform post-seek semantics reset.
|
2013-08-14 14:55:55 +00:00
|
|
|
* Deprecated.
|
2012-03-07 09:18:49 +00:00
|
|
|
* @finish: Optional.
|
|
|
|
* Called to request subclass to dispatch any pending remaining
|
|
|
|
* data (e.g. at EOS).
|
|
|
|
* @pre_push: Optional.
|
|
|
|
* Allows subclass to push frame downstream in whatever
|
|
|
|
* shape or form it deems appropriate. If not provided,
|
|
|
|
* provided encoded frame data is simply pushed downstream.
|
|
|
|
* @getcaps: Optional.
|
|
|
|
* Allows for a custom sink getcaps implementation (e.g.
|
|
|
|
* for multichannel input specification). If not implemented,
|
|
|
|
* default returns gst_video_encoder_proxy_getcaps
|
|
|
|
* applied to sink template caps.
|
|
|
|
* @sink_event: Optional.
|
|
|
|
* Event handler on the sink pad. This function should return
|
|
|
|
* TRUE if the event was handled and should be discarded
|
|
|
|
* (i.e. not unref'ed).
|
2012-10-08 10:43:03 +00:00
|
|
|
* Subclasses should chain up to the parent implementation to
|
|
|
|
* invoke the default handler.
|
2012-03-07 09:18:49 +00:00
|
|
|
* @src_event: Optional.
|
|
|
|
* Event handler on the source pad. This function should return
|
|
|
|
* TRUE if the event was handled and should be discarded
|
|
|
|
* (i.e. not unref'ed).
|
2012-10-08 10:43:03 +00:00
|
|
|
* Subclasses should chain up to the parent implementation to
|
|
|
|
* invoke the default handler.
|
2012-08-09 12:39:18 +00:00
|
|
|
* @negotiate: Optional.
|
|
|
|
* Negotiate with downstream and configure buffer pools, etc.
|
2012-10-08 10:43:03 +00:00
|
|
|
* Subclasses should chain up to the parent implementation to
|
|
|
|
* invoke the default handler.
|
2012-07-23 07:07:02 +00:00
|
|
|
* @decide_allocation: Optional.
|
|
|
|
* Setup the allocation parameters for allocating output
|
|
|
|
* buffers. The passed in query contains the result of the
|
|
|
|
* downstream allocation query.
|
2012-10-08 10:43:03 +00:00
|
|
|
* Subclasses should chain up to the parent implementation to
|
|
|
|
* invoke the default handler.
|
2012-04-24 20:42:59 +00:00
|
|
|
* @propose_allocation: Optional.
|
|
|
|
* Propose buffer allocation parameters for upstream elements.
|
2012-10-08 10:43:03 +00:00
|
|
|
* Subclasses should chain up to the parent implementation to
|
|
|
|
* invoke the default handler.
|
2013-08-15 10:44:56 +00:00
|
|
|
* @flush: Optional.
|
|
|
|
* Flush all remaining data from the encoder without
|
|
|
|
* pushing it downstream. Since: 1.2
|
2013-12-09 15:33:40 +00:00
|
|
|
* @sink_query: Optional.
|
|
|
|
* Query handler on the sink pad. This function should
|
|
|
|
* return TRUE if the query could be performed. Subclasses
|
|
|
|
* should chain up to the parent implementation to invoke the
|
2019-04-23 12:05:43 +00:00
|
|
|
* default handler. Since: 1.4
|
2013-12-09 15:33:40 +00:00
|
|
|
* @src_query: Optional.
|
|
|
|
* Query handler on the source pad. This function should
|
|
|
|
* return TRUE if the query could be performed. Subclasses
|
|
|
|
* should chain up to the parent implementation to invoke the
|
2019-04-23 12:05:43 +00:00
|
|
|
* default handler. Since: 1.4
|
2015-06-29 11:59:25 +00:00
|
|
|
* @transform_meta: Optional. Transform the metadata on the input buffer to the
|
|
|
|
* output buffer. By default this method is copies all meta without
|
|
|
|
* tags and meta with only the "video" tag. subclasses can
|
|
|
|
* implement this method and return %TRUE if the metadata is to be
|
2019-04-23 12:05:43 +00:00
|
|
|
* copied. Since: 1.6
|
2015-06-29 11:59:25 +00:00
|
|
|
*
|
2012-03-07 09:18:49 +00:00
|
|
|
* Subclasses can override any of the available virtual methods or not, as
|
|
|
|
* needed. At minimum @handle_frame needs to be overridden, and @set_format
|
|
|
|
* and @get_caps are likely needed as well.
|
|
|
|
*/
|
|
|
|
struct _GstVideoEncoderClass
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
GstElementClass element_class;
|
|
|
|
|
|
|
|
/*< public >*/
|
|
|
|
/* virtual methods for subclasses */
|
|
|
|
gboolean (*open) (GstVideoEncoder *encoder);
|
|
|
|
|
|
|
|
gboolean (*close) (GstVideoEncoder *encoder);
|
|
|
|
|
|
|
|
gboolean (*start) (GstVideoEncoder *encoder);
|
|
|
|
|
|
|
|
gboolean (*stop) (GstVideoEncoder *encoder);
|
|
|
|
|
|
|
|
gboolean (*set_format) (GstVideoEncoder *encoder,
|
|
|
|
GstVideoCodecState *state);
|
|
|
|
|
|
|
|
GstFlowReturn (*handle_frame) (GstVideoEncoder *encoder,
|
|
|
|
GstVideoCodecFrame *frame);
|
|
|
|
|
|
|
|
gboolean (*reset) (GstVideoEncoder *encoder,
|
|
|
|
gboolean hard);
|
|
|
|
|
|
|
|
GstFlowReturn (*finish) (GstVideoEncoder *encoder);
|
|
|
|
|
|
|
|
GstFlowReturn (*pre_push) (GstVideoEncoder *encoder,
|
|
|
|
GstVideoCodecFrame *frame);
|
|
|
|
|
2012-04-24 17:35:24 +00:00
|
|
|
GstCaps * (*getcaps) (GstVideoEncoder *enc,
|
|
|
|
GstCaps *filter);
|
2012-03-07 09:18:49 +00:00
|
|
|
|
|
|
|
gboolean (*sink_event) (GstVideoEncoder *encoder,
|
|
|
|
GstEvent *event);
|
|
|
|
|
|
|
|
gboolean (*src_event) (GstVideoEncoder *encoder,
|
|
|
|
GstEvent *event);
|
|
|
|
|
2012-08-09 12:39:18 +00:00
|
|
|
gboolean (*negotiate) (GstVideoEncoder *encoder);
|
|
|
|
|
2012-07-23 07:07:02 +00:00
|
|
|
gboolean (*decide_allocation) (GstVideoEncoder *encoder, GstQuery *query);
|
|
|
|
|
2012-04-24 20:42:59 +00:00
|
|
|
gboolean (*propose_allocation) (GstVideoEncoder * encoder,
|
|
|
|
GstQuery * query);
|
2013-08-15 10:44:56 +00:00
|
|
|
gboolean (*flush) (GstVideoEncoder *encoder);
|
2012-04-24 20:42:59 +00:00
|
|
|
|
2013-12-09 15:33:40 +00:00
|
|
|
gboolean (*sink_query) (GstVideoEncoder *encoder,
|
|
|
|
GstQuery *query);
|
|
|
|
|
|
|
|
gboolean (*src_query) (GstVideoEncoder *encoder,
|
|
|
|
GstQuery *query);
|
|
|
|
|
2015-06-29 11:59:25 +00:00
|
|
|
gboolean (*transform_meta) (GstVideoEncoder *encoder,
|
|
|
|
GstVideoCodecFrame *frame,
|
|
|
|
GstMeta * meta);
|
|
|
|
|
2012-03-07 09:18:49 +00:00
|
|
|
/*< private >*/
|
2015-06-29 11:59:25 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING_LARGE-4];
|
2012-03-07 09:18:49 +00:00
|
|
|
};
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
GType gst_video_encoder_get_type (void);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
GstVideoCodecState* gst_video_encoder_get_output_state (GstVideoEncoder *encoder);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
GstVideoCodecState* gst_video_encoder_set_output_state (GstVideoEncoder * encoder,
|
|
|
|
GstCaps * caps,
|
|
|
|
GstVideoCodecState * reference);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-07-24 17:23:56 +00:00
|
|
|
gboolean gst_video_encoder_negotiate (GstVideoEncoder * encoder);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
GstVideoCodecFrame* gst_video_encoder_get_frame (GstVideoEncoder *encoder,
|
|
|
|
int frame_number);
|
2017-05-16 00:09:38 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
GstVideoCodecFrame* gst_video_encoder_get_oldest_frame (GstVideoEncoder *encoder);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-08-16 10:12:06 +00:00
|
|
|
GList * gst_video_encoder_get_frames (GstVideoEncoder *encoder);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-07-23 08:18:41 +00:00
|
|
|
GstBuffer * gst_video_encoder_allocate_output_buffer (GstVideoEncoder * encoder,
|
|
|
|
gsize size);
|
2012-07-23 07:07:02 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-07-23 08:18:41 +00:00
|
|
|
GstFlowReturn gst_video_encoder_allocate_output_frame (GstVideoEncoder *encoder,
|
|
|
|
GstVideoCodecFrame *frame,
|
|
|
|
gsize size);
|
2012-07-23 07:07:02 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
GstFlowReturn gst_video_encoder_finish_frame (GstVideoEncoder *encoder,
|
|
|
|
GstVideoCodecFrame *frame);
|
|
|
|
|
2018-08-31 10:09:57 +00:00
|
|
|
GST_VIDEO_API
|
|
|
|
GstFlowReturn gst_video_encoder_finish_subframe (GstVideoEncoder * encoder,
|
|
|
|
GstVideoCodecFrame * frame);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
GstCaps * gst_video_encoder_proxy_getcaps (GstVideoEncoder * enc,
|
2012-04-24 17:35:24 +00:00
|
|
|
GstCaps * caps,
|
|
|
|
GstCaps * filter);
|
2012-03-07 09:18:49 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
void gst_video_encoder_set_latency (GstVideoEncoder *encoder,
|
|
|
|
GstClockTime min_latency,
|
|
|
|
GstClockTime max_latency);
|
2017-05-16 00:09:38 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
void gst_video_encoder_get_latency (GstVideoEncoder *encoder,
|
|
|
|
GstClockTime *min_latency,
|
|
|
|
GstClockTime *max_latency);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-03-07 09:18:49 +00:00
|
|
|
void gst_video_encoder_set_headers (GstVideoEncoder *encoder,
|
|
|
|
GList *headers);
|
2012-08-09 14:02:15 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-08-09 14:02:15 +00:00
|
|
|
void gst_video_encoder_merge_tags (GstVideoEncoder *encoder,
|
|
|
|
const GstTagList *tags,
|
|
|
|
GstTagMergeMode mode);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2012-08-07 15:19:05 +00:00
|
|
|
void gst_video_encoder_get_allocator (GstVideoEncoder *encoder,
|
|
|
|
GstAllocator **allocator,
|
|
|
|
GstAllocationParams *params);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2014-11-26 20:06:57 +00:00
|
|
|
void gst_video_encoder_set_min_pts(GstVideoEncoder *encoder, GstClockTime min_pts);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2017-10-25 09:41:02 +00:00
|
|
|
void gst_video_encoder_set_qos_enabled (GstVideoEncoder * encoder, gboolean enabled);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2017-10-25 09:41:02 +00:00
|
|
|
gboolean gst_video_encoder_is_qos_enabled (GstVideoEncoder * encoder);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2017-09-21 13:18:10 +00:00
|
|
|
GstClockTimeDiff gst_video_encoder_get_max_encode_time (GstVideoEncoder *encoder, GstVideoCodecFrame * frame);
|
|
|
|
|
2020-06-03 18:46:38 +00:00
|
|
|
GST_VIDEO_API
|
|
|
|
void gst_video_encoder_set_min_force_key_unit_interval (GstVideoEncoder * encoder,
|
|
|
|
GstClockTime interval);
|
|
|
|
GST_VIDEO_API
|
|
|
|
GstClockTime gst_video_encoder_get_min_force_key_unit_interval (GstVideoEncoder * encoder);
|
|
|
|
|
2015-11-10 17:54:23 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoEncoder, gst_object_unref)
|
|
|
|
|
2012-03-07 09:18:49 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|