kateenc

kateenc — Encodes Kate streams from text or subpictures

Synopsis

                    GstKateEnc;

Properties

  "category"                 gchar*                : Read / Write
  "default-spu-duration"     gfloat                : Read / Write
  "granule-rate-denominator" gint                  : Read / Write
  "granule-rate-numerator"   gint                  : Read / Write
  "granule-shift"            gint                  : Read / Write
  "keepalive-min-time"       gfloat                : Read / Write
  "language"                 gchar*                : Read / Write
  "original-canvas-height"   gint                  : Read / Write
  "original-canvas-width"    gint                  : Read / Write

Description

Example pipeline

This element encodes Kate streams Kate is a free codec for text based data, such as subtitles. Any number of kate streams can be embedded in an Ogg stream.

libkate (see above url) is needed to build this plugin.

This encodes a DVD SPU track to a Kate stream:

gst-launch dvdreadsrc ! dvddemux ! dvdsubparse ! kateenc category=spu-subtitles ! oggmux ! filesink location=test.ogg

Synopsis

Element Information

plugin

kate

author

Vincent Penquerc'h <ogg.k.ogg.k@googlemail.com>

class

Codec/Encoder/Subtitle

Element Pads

name

sink

direction

sink

presence

always

details

text/plain

text/x-pango-markup

video/x-dvd-subpicture

name

src

direction

source

presence

always

details

subtitle/x-kate

application/x-kate

Details

GstKateEnc

typedef struct {
  GstElement element;

  GstPad *sinkpad, *srcpad;

  kate_info ki;
  kate_comment kc;
  kate_state k;

  GstTagList *tags;

  GstClockTime last_timestamp;
  GstClockTime latest_end_time;

  gboolean headers_sent;
  gboolean initialized;
  gboolean delayed_spu;
  GstClockTime delayed_start;
  kate_bitmap *delayed_bitmap;
  kate_palette *delayed_palette;
  kate_region *delayed_region;
  gchar *language;
  gchar *category;

  int granule_rate_numerator;
  int granule_rate_denominator;
  int granule_shift;

  float keepalive_min_time;
  float default_spu_duration;

  size_t original_canvas_width;
  size_t original_canvas_height;

  /* SPU decoding */
  guint8 spu_colormap[4];
  guint32 spu_clut[16];
  guint8 spu_alpha[4];
  guint16 spu_top;
  guint16 spu_left;
  guint16 spu_right;
  guint16 spu_bottom;
  guint16 spu_pix_data[2];
  guint16 show_time;
  guint16 hide_time;
} GstKateEnc;

Property Details

The "category" property

  "category"                 gchar*                : Read / Write

The category of the stream.

Default value: ""


The "default-spu-duration" property

  "default-spu-duration"     gfloat                : Read / Write

The assumed max duration (in seconds) of SPUs with no duration specified.

Allowed values: >= 0

Default value: 1.5


The "granule-rate-denominator" property

  "granule-rate-denominator" gint                  : Read / Write

The denominator of the granule rate.

Allowed values: >= 1

Default value: 1000


The "granule-rate-numerator" property

  "granule-rate-numerator"   gint                  : Read / Write

The numerator of the granule rate.

Allowed values: >= 1

Default value: 1


The "granule-shift" property

  "granule-shift"            gint                  : Read / Write

The granule shift.

Allowed values: [0,64]

Default value: 32


The "keepalive-min-time" property

  "keepalive-min-time"       gfloat                : Read / Write

Minimum time to emit keepalive packets (0 disables keepalive packets).

Allowed values: >= 0

Default value: 2.5


The "language" property

  "language"                 gchar*                : Read / Write

The language of the stream (e.g. "fr" or "fr_FR" for French).

Default value: ""


The "original-canvas-height" property

  "original-canvas-height"   gint                  : Read / Write

The height of the canvas this stream was authored for (0 is unspecified).

Allowed values: >= 0

Default value: 0


The "original-canvas-width" property

  "original-canvas-width"    gint                  : Read / Write

The width of the canvas this stream was authored for (0 is unspecified).

Allowed values: >= 0

Default value: 0

See Also

oggmux