The attached patch allows individual users to decide what the optimal size of the HD ringbuffer should be, for their system.
John
Index: libs/libmythtv/hdtvrecorder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/hdtvrecorder.cpp,v
retrieving revision 1.33
diff -d -u -r1.33 hdtvrecorder.cpp
--- libs/libmythtv/hdtvrecorder.cpp 8 Jan 2005 16:48:12 -0000 1.33
+++ libs/libmythtv/hdtvrecorder.cpp 12 Jan 2005 01:57:20 -0000
@@ -481,7 +481,10 @@
// Setup device ringbuffer
delete[] ringbuf.buffer;
- ringbuf.size = 60 * 1024 * TSPacket::SIZE;
+// ringbuf.size = 60 * 1024 * TSPacket::SIZE;
+ ringbuf.size = gContext->GetNumSetting("HDRingbufferSize", 50*188);
+ ringbuf.size *= 1024;
+
if ((ringbuf.buffer =
new unsigned char[ringbuf.size + TSPacket::SIZE]) == NULL)
{
Index: programs/mythfrontend/globalsettings.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/globalsettings.cpp,v
retrieving revision 1.206
diff -d -u -r1.206 globalsettings.cpp
--- programs/mythfrontend/globalsettings.cpp 19 Dec 2004 18:26:28 -0000 1.206
+++ programs/mythfrontend/globalsettings.cpp 12 Jan 2005 01:57:21 -0000
@@ -1595,6 +1595,21 @@
return bs;
}
+static BackendSpinBox *HDRingbufferSize()
+{
+ BackendSpinBox *bs = new BackendSpinBox("HDRingbufferSize",
+ 25*188, 512*188, 25*188);
+ bs->setLabel(QObject::tr("HD Ringbuffer size (KB)"));
+ bs->setHelpText(QObject::tr("The HD device ringbuffer allows the "
+ "backend to weather moments of stress. "
+ "The larger the ringbuffer, the longer "
+ "the moments of stress can be. However, "
+ "setting the size too large can cause "
+ "swapping, which is detrimental."));
+ bs->setValue(50*188);
+ return bs;
+}
+
static GenericCheckBox *SmartChannelChange()
{
GenericCheckBox *gc = new GenericCheckBox("SmartChannelChange");
@@ -2797,6 +2812,7 @@
gen2->addChild(LongChannelFormat());
gen2->addChild(ATSCCheckSignalWait());
gen2->addChild(ATSCCheckSignalThreshold());
+ gen2->addChild(HDRingbufferSize());
addChild(gen2);
VerticalConfigurationGroup* autoexp = new VerticalConfigurationGroup(false);
_______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
