GstBaseVideoCodec

## GstBaseVideoCodec GstBaseVideoCodec |

## Synopsis

    #define             GST_BASE_VIDEO_CODEC_SINK_NAME
    #define             GST_BASE_VIDEO_CODEC_SRC_NAME
    #define             GST_BASE_VIDEO_CODEC_SRC_PAD        (obj)
    #define             GST_BASE_VIDEO_CODEC_SINK_PAD       (obj)
    #define             GST_BASE_VIDEO_CODEC_FLOW_NEED_DATA
    #define             GST_BASE_VIDEO_CODEC_STREAM_LOCK    (codec)
    #define             GST_BASE_VIDEO_CODEC_STREAM_UNLOCK  (codec)
    struct              GstVideoState;
    struct              GstVideoFrame;
    struct              GstBaseVideoCodec;
    struct              GstBaseVideoCodecClass;
    GstVideoFrame *     gst_base_video_codec_new_frame      (GstBaseVideoCodec *base_video_codec);
    void                gst_base_video_codec_free_frame     (GstVideoFrame *frame);

## Description

## Details

### GST_BASE_VIDEO_CODEC_SINK_NAME

    #define GST_BASE_VIDEO_CODEC_SINK_NAME    "sink"

The name of the templates for the sink pad.

### GST_BASE_VIDEO_CODEC_SRC_NAME

    #define GST_BASE_VIDEO_CODEC_SRC_NAME     "src"

The name of the templates for the source pad.

### GST_BASE_VIDEO_CODEC_SRC_PAD()

    #define GST_BASE_VIDEO_CODEC_SRC_PAD(obj)         (((GstBaseVideoCodec *) (obj))->srcpad)

Gives the pointer to the source GstPad object of the element.

`obj` : | base video codec instance

### GST_BASE_VIDEO_CODEC_SINK_PAD()

    #define GST_BASE_VIDEO_CODEC_SINK_PAD(obj)        (((GstBaseVideoCodec *) (obj))->sinkpad)

Gives the pointer to the sink GstPad object of the element.

`obj` : | base video codec instance

### GST_BASE_VIDEO_CODEC_FLOW_NEED_DATA

    #define GST_BASE_VIDEO_CODEC_FLOW_NEED_DATA GST_FLOW_CUSTOM_SUCCESS

### GST_BASE_VIDEO_CODEC_STREAM_LOCK()

    #define GST_BASE_VIDEO_CODEC_STREAM_LOCK(codec) g_static_rec_mutex_lock (&GST_BASE_VIDEO_CODEC (codec)->stream_lock)

### GST_BASE_VIDEO_CODEC_STREAM_UNLOCK()

    #define GST_BASE_VIDEO_CODEC_STREAM_UNLOCK(codec) g_static_rec_mutex_unlock (&GST_BASE_VIDEO_CODEC (codec)->stream_lock)

### struct GstVideoState

    struct GstVideoState {
      GstCaps *caps;
      GstVideoFormat format;
      int width, height;
      int fps_n, fps_d;
      int par_n, par_d;

      gboolean have_interlaced;
      gboolean interlaced;
      gboolean top_field_first;

      int clean_width, clean_height;
      int clean_offset_left, clean_offset_top;

      int bytes_per_picture;

      GstBuffer *codec_data;
    };

### struct GstVideoFrame

    struct GstVideoFrame {
      GstClockTime decode_timestamp;
      GstClockTime presentation_timestamp;
      GstClockTime presentation_duration;

      gint system_frame_number;
      gint decode_frame_number;
      gint presentation_frame_number;

      int distance_from_sync;
      gboolean is_sync_point;
      gboolean is_eos;

      GstBuffer *sink_buffer;
      GstBuffer *src_buffer;

      int field_index;
      int n_fields;

      void *coder_hook;
      GDestroyNotify coder_hook_destroy_notify;

      GstClockTime deadline;

      gboolean force_keyframe;
      gboolean force_keyframe_headers;

      /* Events that should be pushed downstream *before*
       * the next src_buffer */
      GList *events;
    };

### struct GstBaseVideoCodec

    struct GstBaseVideoCodec {
      GstElement element;
    };

### struct GstBaseVideoCodecClass

    struct GstBaseVideoCodecClass {
      GstElementClass element_class;

      /* FIXME before moving to base */
      void *padding[GST_PADDING_LARGE];
    };

### gst_base_video_codec_new_frame ()

    GstVideoFrame *     gst_base_video_codec_new_frame      (GstBaseVideoCodec *base_video_codec);

### gst_base_video_codec_free_frame ()

    void                gst_base_video_codec_free_frame     (GstVideoFrame *frame);