Commit a48581b8 authored by Benjamin Berg's avatar Benjamin Berg
Browse files

wfd: Fix some parameters

This changes a few parameters. The only change in here that actually
fixes things in this case is forcing the slice count to be 1. There is
actually another underlying bug (will be fixed in following commits)
that caused a too high slice count to be set.

However, it doesn't hurt much to be on the safe side.
parent 925a0b03
......@@ -121,7 +121,7 @@ wfd_media_factory_create_element (GstRTSPMediaFactory *factory, const GstRTSPUrl
/*"adaptive-quantization", FALSE,*/
/*"max-slice-size", 5000,*/
/*"complexity", 0,*/
/*"deblock", 1,*/
/*"deblocking", 2,*/
NULL);
/* Maybe try:
......@@ -171,11 +171,12 @@ wfd_media_factory_create_element (GstRTSPMediaFactory *factory, const GstRTSPUrl
payloader = gst_element_factory_make ("rtpmp2tpay", "pay0");
success &= gst_bin_add (bin, payloader);
g_object_set (payloader,
/* Use a fixed ssrc as it must never change. */
"ssrc", 1,
/* Perfect is in relation to the input buffers, but we want the
* proper clock from when the packet was sent. */
"perfect-rtptime", FALSE,
"timestamp-offset", (guint) 0,
"seqnum-offset", (gint) 0,
NULL);
success &= gst_element_link_many (source,
......@@ -316,16 +317,14 @@ wfd_configure_media_element (GstBin *bin, WfdVideoCodec *codec, WfdResolution *r
switch (encoder_impl)
{
case ENCODER_OPENH264:
/* We could set multi-thread/num-slices to codec->max_slice_num; but not sure
* if that works realiably, and simply using one slice is on the safe side
*/
g_object_set (encoder,
"enable-frame-skip", codec->frame_skipping_allowed,
/* Take wifi throughput into consideration? */
"max-bitrate", wfd_video_codec_get_max_bitrate_kbit (codec) * 1024,
"bitrate", wfd_video_codec_get_max_bitrate_kbit (codec) * 1024,
"num-slices", codec->max_slice_num,
NULL);
/* Maybe try:
* - rate-control: 2, buffer*/
break;
case ENCODER_X264:
......
......@@ -37,6 +37,8 @@ wfd_media_setup_rtpbin (GstRTSPMedia *media, GstElement *rtpbin)
"max-misorder-time", 50,
"do-lost", TRUE,
"do-sync-event", TRUE,
"buffer-mode", 0,
"latency", 40,
NULL);
return TRUE;
......
Supports Markdown
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