[MOVED FROM BAD 24/28] x264enc: add preset support

Add preset iface and a (dummy) preset file as a starting point.
This commit is contained in:
Stefan Kost 2009-04-30 00:06:36 +03:00 committed by Jan Schmidt
parent cd86b39a94
commit 811ddb9cdc
3 changed files with 34 additions and 1 deletions

13
ext/x264/GstX264Enc.prs Normal file
View file

@ -0,0 +1,13 @@
[_presets_]
version=0.10
element-name=GstX264Enc
# see http://mewiki.project357.com/wiki/X264_Settings for x264 properties
# lower default bitrate
# turn of cabac for devices that do not support main-profile
[just-an-example]
_meta/comment=use for mobile pocket video player
_meta/device=pocketvideo
bitrate=1024
cabac=false

View file

@ -13,3 +13,9 @@ libgstx264_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstx264_la_LIBTOOLFLAGS = --tag=disable-static libgstx264_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = gstx264enc.h noinst_HEADERS = gstx264enc.h
presetdir = $(datadir)/gstreamer-$(GST_MAJORMINOR)/presets
preset_DATA = GstX264Enc.prs
EXTRA_DIST = $(preset_DATA)

View file

@ -238,7 +238,21 @@ static void gst_x264_enc_set_property (GObject * object, guint prop_id,
static void gst_x264_enc_get_property (GObject * object, guint prop_id, static void gst_x264_enc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
GST_BOILERPLATE (GstX264Enc, gst_x264_enc, GstElement, GST_TYPE_ELEMENT); static void
_do_init (GType object_type)
{
const GInterfaceInfo preset_interface_info = {
NULL, /* interface_init */
NULL, /* interface_finalize */
NULL /* interface_data */
};
g_type_add_interface_static (object_type, GST_TYPE_PRESET,
&preset_interface_info);
}
GST_BOILERPLATE_FULL (GstX264Enc, gst_x264_enc, GstElement, GST_TYPE_ELEMENT,
_do_init);
static void static void
gst_x264_enc_base_init (gpointer g_class) gst_x264_enc_base_init (gpointer g_class)