Re: [gst-cvs] gst-ffmpeg: ffenc: Make the buffer-size property read-only

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [gst-cvs] gst-ffmpeg: ffenc: Make the buffer-size property read-only

Jan Schmidt-6
On Thu, 2009-10-08 at 03:29 -0700, Sebastian Dröge wrote:

> Module: gst-ffmpeg
> Branch: master
> Commit: 98439aacc752432022b6fc3e5bc487d60b12dc48
> URL:    http://cgit.freedesktop.org/gstreamer/gst-ffmpeg/commit/?id=98439aacc752432022b6fc3e5bc487d60b12dc48
>
> Author: Sebastian Dröge <[hidden email]>
> Date:   Thu Oct  8 12:27:59 2009 +0200
>
> ffenc: Make the buffer-size property read-only
>
> ...instead of just doing nothing when setting it. This makes sure
> that people notice that they shouldn't set the property because
> it creates a warning now.
>

Our normal approach properties that become redundant is to do what the
previous behaviour was - ignore setting the property. I suggest putting
that behaviour back and just adding a property description that makes it
clear it is useless.

That ensures that applications which rely on the (supposedly API/ABI
stable) ffmpeg encoders can continue functioning identically regardless
of which version of the encoder they end up running against.

- Jan.

> ---
>
>  ext/ffmpeg/gstffmpegenc.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/ext/ffmpeg/gstffmpegenc.c b/ext/ffmpeg/gstffmpegenc.c
> index aa26b40..fe897b8 100644
> --- a/ext/ffmpeg/gstffmpegenc.c
> +++ b/ext/ffmpeg/gstffmpegenc.c
> @@ -189,7 +189,7 @@ gst_ffmpegenc_class_init (GstFFMpegEncClass * klass)
>              GST_TYPE_ME_METHOD, ME_EPZS, G_PARAM_READWRITE));
>      g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BUFSIZE,
>          g_param_spec_ulong ("buffer-size", "Buffer Size",
> -            "Size of the video buffers", 0, G_MAXULONG, 0, G_PARAM_READWRITE));
> +            "Size of the video buffers", 0, G_MAXULONG, 0, G_PARAM_READABLE));
>      g_object_class_install_property (G_OBJECT_CLASS (klass),
>          ARG_RTP_PAYLOAD_SIZE, g_param_spec_ulong ("rtp-payload-size",
>              "RTP Payload Size", "Target GOB length", 0, G_MAXULONG, 0,
> @@ -1050,8 +1050,6 @@ gst_ffmpegenc_set_property (GObject * object,
>      case ARG_ME_METHOD:
>        ffmpegenc->me_method = g_value_get_enum (value);
>        break;
> -    case ARG_BUFSIZE:
> -      break;
>      case ARG_RTP_PAYLOAD_SIZE:
>        ffmpegenc->rtp_payload_size = g_value_get_ulong (value);
>        break;
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________ gstreamer-cvs mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs
--
Jan Schmidt <[hidden email]>


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel