[longomatch] encoder: set limits to queues in time for audio and video



commit 95b2d13c698a698175e1b54bb565939b2a413560
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Dec 29 18:22:41 2013 +0100

    encoder: set limits to queues in time for audio and video

 libcesarplayer/gst-video-encoder.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libcesarplayer/gst-video-encoder.c b/libcesarplayer/gst-video-encoder.c
index 40fe931..6884861 100644
--- a/libcesarplayer/gst-video-encoder.c
+++ b/libcesarplayer/gst-video-encoder.c
@@ -247,7 +247,10 @@ gst_video_encoder_create_encoder_bin (GstVideoEncoder *gve)
 
   /* Increase audio queue size for h264 encoding as the encoder queues 2 seconds
    * of video */
-  g_object_set (aqueue, "max-size-time", 5 * GST_SECOND, NULL);
+  g_object_set (aqueue, "max-size-bytes", 0, "max-size-buffers", 0,
+      "max-size-time", 5 * GST_SECOND, NULL);
+  g_object_set (vqueue, "max-size-bytes", 0, "max-size-buffers", 0,
+      "max-size-time", 5 * GST_SECOND, NULL);
 
   /* Set caps for the encoding resolution */
   video_caps = gst_caps_new_simple ("video/x-raw-yuv", NULL);
@@ -284,7 +287,7 @@ gst_video_encoder_create_encoder_bin (GstVideoEncoder *gve)
 
   gst_bin_add_many(GST_BIN(gve->priv->encoder_bin), v_identity,  colorspace1,
       deinterlace, videoscale, framerate, colorspace2,
-      vqueue, gve->priv->video_enc, gve->priv->muxer, gve->priv->filesink,
+      gve->priv->video_enc, vqueue, gve->priv->muxer, gve->priv->filesink,
       a_identity, audioconvert, audioresample, gve->priv->audio_enc, aqueue, NULL);
 
   gst_element_link_many(v_identity, colorspace1, deinterlace, framerate,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]