opusenc: increase max payload size to 4000 bytes

1275 is the maximum size of a frame, but the encoder may return
up to 3 frames, and we need a few extra bytes for TOC, etc. We
use 4000, which is a bit more, and suggested in the libopus docs.
This commit is contained in:
Vincent Penquerc'h 2013-12-27 14:29:46 +00:00
parent ec3c4cb1c7
commit 585a6c4add

View file

@ -141,7 +141,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
#define DEFAULT_INBAND_FEC FALSE
#define DEFAULT_DTX FALSE
#define DEFAULT_PACKET_LOSS_PERCENT 0
#define DEFAULT_MAX_PAYLOAD_SIZE 1024
#define DEFAULT_MAX_PAYLOAD_SIZE 4000
enum
{
@ -270,7 +270,7 @@ gst_opus_enc_class_init (GstOpusEncClass * klass)
GST_PARAM_MUTABLE_PLAYING));
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_MAX_PAYLOAD_SIZE, g_param_spec_uint ("max-payload-size",
"Max payload size", "Maximum payload size in bytes", 2, 1275,
"Max payload size", "Maximum payload size in bytes", 2, 4000,
DEFAULT_MAX_PAYLOAD_SIZE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
GST_PARAM_MUTABLE_PLAYING));