summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2007-01-10 20:13:14 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2007-01-10 20:13:14 +0000
commitdac1c574d51ce8f6e37f0100cc05e49a39ab860d (patch)
treea2574057ffe0254ebdd43ff8f50a6bb969cf1794 /src
parentd02264be75ec5931d4092bc73609c3399cc3ad63 (diff)
downloadxine-lib-dac1c574d51ce8f6e37f0100cc05e49a39ab860d.tar.gz
xine-lib-dac1c574d51ce8f6e37f0100cc05e49a39ab860d.tar.bz2
make number of frames configurable
(nothing to see here, i'm just testing xine latency in some realtime experiments...) CVS patchset: 8496 CVS date: 2007/01/10 20:13:14
Diffstat (limited to 'src')
-rw-r--r--src/xine-engine/video_out.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 19d635d76..446ba0a45 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out.c,v 1.225 2006/03/25 01:26:34 dsalt Exp $
+ * $Id: video_out.c,v 1.226 2007/01/10 20:13:14 miguelfreitas Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -1783,11 +1783,23 @@ xine_video_port_t *_x_vo_new_port (xine_t *xine, vo_driver_t *driver, int grabon
this->frame_drop_limit = 3;
this->frame_drop_cpt = 0;
- num_frame_buffers = driver->get_property (driver, VO_PROP_MAX_NUM_FRAMES);
-
- if (!num_frame_buffers)
- num_frame_buffers = NUM_FRAME_BUFFERS; /* default */
- else if (num_frame_buffers<5)
+ /* default number of video frames from config */
+ num_frame_buffers = xine->config->register_num (xine->config,
+ "engine.buffers.video_num_frames",
+ NUM_FRAME_BUFFERS, /* default */
+ _("default number of video frames"),
+ _("The default number of video frames to request "
+ "from xine video out driver. Some drivers will "
+ "override this setting with their own values."),
+ 20, NULL, NULL);
+
+ /* check driver's limit and use the smaller value */
+ i = driver->get_property (driver, VO_PROP_MAX_NUM_FRAMES);
+ if (i && i < num_frame_buffers)
+ num_frame_buffers = i;
+
+ /* we need at least 5 frames */
+ if (num_frame_buffers<5)
num_frame_buffers = 5;
this->extra_info_base = calloc (num_frame_buffers,