[mythtv-commits] Ticket #4718: DVD playback: don't assume that device name starts with /
MythTV
mythtv at cvs.mythtv.org
Thu Jun 19 04:18:26 UTC 2008
#4718: DVD playback: don't assume that device name starts with /
-----------------------------+----------------------------------------------
Reporter: andrei at tanas.ca | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: medium | Resolution:
Mlocked: 0 |
-----------------------------+----------------------------------------------
Comment(by nigel):
The default in mythvideo/mythvideo/globalsettings.cpp is OK, but removing
the extra slash in mythvideo/mythvideo/main.cpp is not needed. At the
moment, Linux/Mac pass in dvd://dev/blah, which although there is no
approved URI scheme that refers to a DVD, it looks more like a proper URI
than dvd:/dev/blah.
[BR]
Of course, dvd:/D: is just ugly, but MinGW also does /d, so dvd://d is a
tidier option?
[BR]
I think the RingBuffer.cpp code could be simplified thus:
{{{
Index: libs/libmythtv/RingBuffer.cpp
===================================================================
--- libs/libmythtv/RingBuffer.cpp (revision 17486)
+++ libs/libmythtv/RingBuffer.cpp (working copy)
@@ -181,16 +181,13 @@
is_dvd = true;
dvdPriv = new DVDRingBufferPriv();
startreadahead = false;
- int pathLen = filename.find("/", 4);
- if (pathLen != -1)
- {
- QString tempFilename = filename.right(filename.length() -
pathLen);
- QFile checkFile(tempFilename);
+ filename.remove(0,5); // MythVideo calls with "dvd:/" + device
+ if (filename.length())
+ {
+ QFile checkFile(filename);
if (!checkFile.exists())
filename = "/dev/dvd";
- else
- filename = tempFilename;
}
else
{
}}}
Am testing now.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/4718#comment:1>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list