Hi,

Can the "BufferSize" setting for livetv be changed to specify size in MB instead of GB? On my MythTV box I have a EPIA M10k 512MB box running both front and backends; livetv buffer is on a tmpfs partition to eliminate the hard drive ticking, and buffersize set to 384MB. I have been running this way since v0.17 with no problems, aside from the obvious limitation on how long I can pause.

Attached is a patch against 0.18 that achieves the above, with two TODOs. Firstly i'm not sure my default and max sizes will suit everyone (128MB default, 128MB increments on the slider, 4096MB max), secondly how to handle upgrades. Clearly simply changing the meaning (from GB to MB) of this setting where existing users have something like "1" wont be very helpful. I'm aware there must be code somewhere that detects a version upgrade and sorts out the database accordingly, if someone could point me in the right direction i'll get to work on adding something.

I would appreciate any feedback or suggestions.
thanks,
David.
diff -ur mythtv-0.18/libs/libmythtv/tv_rec.cpp 
mythtv-0.18-patched/libs/libmythtv/tv_rec.cpp
--- mythtv-0.18/libs/libmythtv/tv_rec.cpp       2005-04-03 17:42:10.000000000 
+0100
+++ mythtv-0.18-patched/libs/libmythtv/tv_rec.cpp       2005-05-01 
11:35:00.000000000 +0100
@@ -1754,7 +1754,7 @@
                             long long &fillamount, bool pip)
 {
     ispip = pip;
-    filesize = gContext->GetNumSetting("BufferSize", 5);
+    filesize = gContext->GetNumSetting("BufferSize", 128);
     fillamount = gContext->GetNumSetting("MaxBufferFill", 50);
 
     path = gContext->GetSetting("LiveBufferDir") + QString("/ringbuf%1.nuv")
@@ -1762,7 +1762,7 @@
 
     outputFilename = path;
 
-    filesize = filesize * 1024 * 1024 * 1024;
+    filesize = filesize * 1024 * 1024;
     fillamount = fillamount * 1024 * 1024;
 
     rbuffer = new RingBuffer(path, filesize, fillamount);
diff -ur mythtv-0.18/setup/backendsettings.cpp 
mythtv-0.18-patched/setup/backendsettings.cpp
--- mythtv-0.18/setup/backendsettings.cpp       2005-03-28 00:53:22.000000000 
+0100
+++ mythtv-0.18-patched/setup/backendsettings.cpp       2005-05-01 
11:35:00.000000000 +0100
@@ -138,8 +138,8 @@
 
 static HostSlider *BufferSize()
 {
-    HostSlider* gc = new HostSlider("BufferSize", 1, 100, 1);
-    gc->setLabel(QObject::tr("Live TV buffer (GB)"));
+    HostSlider* gc = new HostSlider("BufferSize", 128, 4096, 128);
+    gc->setLabel(QObject::tr("Live TV buffer (MB)"));
     gc->setValue(5);
     gc->setHelpText(QObject::tr("How large the live TV buffer is allowed to "
                     "grow."));
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to