mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
[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:
parent
cd86b39a94
commit
811ddb9cdc
3 changed files with 34 additions and 1 deletions
13
ext/x264/GstX264Enc.prs
Normal file
13
ext/x264/GstX264Enc.prs
Normal 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
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue