diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-04-30 00:06:36 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-04-30 00:07:37 +0300 |
commit | d3ac465ec1cbc439bf455da7e91c18cd759970af (patch) | |
tree | 8b6df143489fd559ff64f595dd1a10ca0c22fd06 /ext/x264 | |
parent | e62dc2c1ab50963521737197ed17f7d66971ec1d (diff) | |
download | gst-plugins-bad-d3ac465ec1cbc439bf455da7e91c18cd759970af.tar.gz gst-plugins-bad-d3ac465ec1cbc439bf455da7e91c18cd759970af.tar.bz2 gst-plugins-bad-d3ac465ec1cbc439bf455da7e91c18cd759970af.zip |
x264enc: add preset support
Add preset iface and a (dummy) preset file as a starting point.
Diffstat (limited to 'ext/x264')
-rw-r--r-- | ext/x264/GstX264Enc.prs | 13 | ||||
-rw-r--r-- | ext/x264/Makefile.am | 6 | ||||
-rw-r--r-- | ext/x264/gstx264enc.c | 16 |
3 files changed, 34 insertions, 1 deletions
diff --git a/ext/x264/GstX264Enc.prs b/ext/x264/GstX264Enc.prs new file mode 100644 index 00000000..daf60a77 --- /dev/null +++ b/ext/x264/GstX264Enc.prs @@ -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 diff --git a/ext/x264/Makefile.am b/ext/x264/Makefile.am index 891e3fca..6c4d4cf6 100644 --- a/ext/x264/Makefile.am +++ b/ext/x264/Makefile.am @@ -13,3 +13,9 @@ libgstx264_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstx264_la_LIBTOOLFLAGS = --tag=disable-static noinst_HEADERS = gstx264enc.h + +presetdir = $(datadir)/gstreamer-$(GST_MAJORMINOR)/presets +preset_DATA = GstX264Enc.prs + +EXTRA_DIST = $(preset_DATA) + diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c index 207ceb6e..37f53cce 100644 --- a/ext/x264/gstx264enc.c +++ b/ext/x264/gstx264enc.c @@ -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, 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 gst_x264_enc_base_init (gpointer g_class) |