We are currently experiencing downtime impacting viewing & cloning the Mesa repo, and some GitLab pages returning 503. Please see #freedesktop on IRC for more updates.

Commit fbf165cc authored by Julien Moutte Moutte's avatar Julien Moutte Moutte

ext/ffmpeg/gstffmpegenc.c: Add rtp-payload-size property.

Original commit message from CVS:
2005-11-28  Julien MOUTTE  <julien@moutte.net>

* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_class_init),
(gst_ffmpegenc_init), (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_setcaps), (gst_ffmpegenc_set_property),
(gst_ffmpegenc_get_property): Add rtp-payload-size property.
parent 85a322a4
2005-11-28 Julien MOUTTE <julien@moutte.net>
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_class_init),
(gst_ffmpegenc_init), (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_setcaps), (gst_ffmpegenc_set_property),
(gst_ffmpegenc_get_property): Add rtp-payload-size property.
2005-11-28 Tim-Philipp Müller <tim at centricular dot net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_close),
......
common @ b0b08bcd
Subproject commit c04ad83a0c184fcd311de39371570b9e773a60d0
Subproject commit b0b08bcd66ca385364b6f90663585b09693aec67
......@@ -55,6 +55,7 @@ struct _GstFFMpegEnc
gint me_method;
gint gop_size;
gulong buffer_size;
gulong rtp_payload_size;
};
typedef struct _GstFFMpegEncClass GstFFMpegEncClass;
......@@ -99,8 +100,9 @@ enum
ARG_BIT_RATE,
ARG_GOP_SIZE,
ARG_ME_METHOD,
ARG_BUFSIZE
/* FILL ME */
ARG_BUFSIZE,
ARG_RTP_PAYLOAD_SIZE
/* FILL ME */
};
#define GST_TYPE_ME_METHOD (gst_ffmpegenc_me_method_get_type())
......@@ -224,6 +226,10 @@ gst_ffmpegenc_class_init (GstFFMpegEncClass * klass)
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));
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, G_PARAM_READWRITE));
} else if (klass->in_plugin->type == CODEC_TYPE_AUDIO) {
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BIT_RATE,
g_param_spec_ulong ("bitrate", "Bit Rate",
......@@ -259,6 +265,7 @@ gst_ffmpegenc_init (GstFFMpegEnc * ffmpegenc)
ffmpegenc->bitrate = 300000;
ffmpegenc->buffer_size = 512 * 1024;
ffmpegenc->gop_size = 15;
ffmpegenc->rtp_payload_size = 0;
} else if (oclass->in_plugin->type == CODEC_TYPE_AUDIO) {
gst_pad_set_chain_function (ffmpegenc->sinkpad, gst_ffmpegenc_chain_audio);
......@@ -314,7 +321,7 @@ gst_ffmpegenc_getcaps (GstPad * pad)
}
/* set some default properties */
ctx->width = 384;
ctx->width = 352;
ctx->height = 288;
ctx->time_base.num = DEFAULT_FRAME_RATE_BASE;
ctx->time_base.den = 25 * DEFAULT_FRAME_RATE_BASE;
......@@ -385,6 +392,15 @@ gst_ffmpegenc_setcaps (GstPad * pad, GstCaps * caps)
ffmpegenc->context->gop_size = ffmpegenc->gop_size;
ffmpegenc->context->me_method = ffmpegenc->me_method;
/* RTP payload used for GOB production (for Asterisk) */
if (ffmpegenc->rtp_payload_size) {
ffmpegenc->context->rtp_mode = 1;
ffmpegenc->context->rtp_payload_size = ffmpegenc->rtp_payload_size;
} else {
ffmpegenc->context->rtp_mode = 0;
ffmpegenc->context->rtp_payload_size = 512;
}
/* general properties */
ffmpegenc->context->qmin = 1;
ffmpegenc->context->qmax = 31;
......@@ -638,6 +654,9 @@ gst_ffmpegenc_set_property (GObject * object,
case ARG_BUFSIZE:
ffmpegenc->buffer_size = g_value_get_ulong (value);
break;
case ARG_RTP_PAYLOAD_SIZE:
ffmpegenc->rtp_payload_size = g_value_get_ulong (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -667,6 +686,9 @@ gst_ffmpegenc_get_property (GObject * object,
case ARG_BUFSIZE:
g_value_set_ulong (value, ffmpegenc->buffer_size);
break;
case ARG_RTP_PAYLOAD_SIZE:
g_value_set_ulong (value, ffmpegenc->rtp_payload_size);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment