NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 13 14 15 16 17 … 93 Next »
ISO Mounting

 
  • 0 Vote(s) - 0 Average
ISO Mounting
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#1
2011-07-19, 05:30 PM
Hi sub,

Could you list what the behind-the-scenes procedure you use for mounting ISOs is?

I point at Daemon.exe from VirtualCloneDrive rather than DaemonTools, and it doesn't seem to matter what drive letter I tell NPVR; I can give it the wrong one and the mount still succeeds and the DVD plays.

I'm trying to add ISO support to Videos+, and I'd prefer to use your existing config.xml settings to save duplication, but I wasn't sure if the drive letter (or unit number?) is required for DaemonTools.

Oh, and two quick follow up questions:

- I can't test it just now, but does NPVR support blu-ray ISOs (in conjunction with the LAV splitter)?
- The "Please wait...mounting" message looks like a blocking message box. Is it, or does it just appear that way because NPVR's process is waiting on the result of running DaemonTools?

Cheers

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2011-07-19, 05:38 PM
imilne Wrote:Hi sub,

Could you list what the behind-the-scenes procedure you use for mounting ISOs is?

I point at Daemon.exe from VirtualCloneDrive rather than DaemonTools, and it doesn't seem to matter what drive letter I tell NPVR; I can give it the wrong one and the mount still succeeds and the DVD plays.

I'm trying to add ISO support to Videos+, and I'd prefer to use your existing config.xml settings to save duplication, but I wasn't sure if the drive letter (or unit number?) is required for DaemonTools.
In the video library when you click an ISO file, it runs the executable from <DaemonToolsExe> with -mount 0,"c:\path\to\some.iso". Then tells the DVD player to plugin helper to play the <DaemonToolsDrive> drive.

Quote:Oh, and two quick follow up questions:

- I can't test it just now, but does NPVR support blu-ray ISOs (in conjunction with the LAV splitter)?
Not currently. Hopefully in near future though.

Quote:- The "Please wait...mounting" message looks like a blocking message box. Is it, or does it just appear that way because NPVR's process is waiting on the result of running DaemonTools?
Its just wailing for the DaemonTools process to complete.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#3
2011-07-19, 05:45 PM
Excellent, thanks!

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#4
2011-08-12, 08:21 AM
To follow up on this, I have no problems getting ISOs to mount, but I can't come up with a solution that works within the confines of the UI.

If I try to pop up a "Mounting ISO - please wait" message, and then do the mount, the popup never appears because it doesn't get a chance to before the mount operation hogs the thread.

If I try to thread it off, then I'm running into all sorts of crapout and crash problems that I can't suss out.

My current ideal call trace would be something like: Play video... see if it needs mounting... mount it... play it
But with threads, and non-blocking popups etc, I can see it being a horrible: Play video... see if it needs mounting... mount it... callback to play video... realise it doesn't need mounted now... play it

There must be a better/easier way?

I was also hoping to monitor the drive during the mount, so I could see when it was actually ready, because with Blu-rays and AnyDVD HD it can take a while for some discs to be ready. I figured that'd be better than a user-specified "wait" period.

Also, does it make sense to unmount whatever was there previously before doing a new mount, or shouldn't it matter?

Playback from ISOs isn't something I tend to bother with personally, but I know if I don't do it it'll just get asked for anyway Smile

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#5
2011-08-12, 05:20 PM
imilne Wrote:My current ideal call trace would be something like: Play video... see if it needs mounting... mount it... play it
But with threads, and non-blocking popups etc, I can see it being a horrible: Play video... see if it needs mounting... mount it... callback to play video... realise it doesn't need mounted now... play it

There must be a better/easier way?
If you didnt want to some blocking calling, then that is pretty much what you'd need to do, ie start the thread does the mounting, and in the main thread display some 'mounting' message, and use the regular NeedsRendering() call to monitor the status of mounting thread. When it completes, start the playback.

Quote:Also, does it make sense to unmount whatever was there previously before doing a new mount, or shouldn't it matter?
I guess it depends on the ISO software used, but it'd probably auto unmount when you tell it to mount a new ISO.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#6
2011-08-12, 05:44 PM
Ah, maybe I didn't explain that very well. I'd be happy enough with a blocking call for now, but I can't seem to manage that *and* get a popup to display before everything gets blocked. I'll keep working on it and get back to you...

Why would you use NeedsRendering() to monitor the thread? Would that help block the main thread somehow?

My current code (and it's been through endless iterations) actually opens a popup, then that popup starts two threads: one to do the mount, and another to monitor it, the idea being that the second thread would then close the popup and make a callback to the playback code to say the iso was ready. But it seems to be dropping itself into an infinite loop.

In Java, there's all sorts of gotchas related to calling the event-dispatch thread (the main GUI one) from other threads (mainly when updating text boxes, progress bars, etc). Does C# have similar problems, or would it not matter anyway because NPVR is all custom DirectX rendering?

Complicated but fun Big Grin

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#7
2011-08-12, 05:52 PM
imilne Wrote:Ah, maybe I didn't explain that very well. I'd be happy enough with a blocking call for now, but I can't seem to manage that *and* get a popup to display before everything gets blocked. I'll keep working on it and get back to you...
A simple fix maybe calling PluginHelperFactory.GetPluginHelper().ForceRender() before you do your blocking event.

Quote:Why would you use NeedsRendering() to monitor the thread? Would that help block the main thread somehow?
NeedsRendering() is called continually on a screen plugin, so it's the ideal place to do any regular status checks etc for things that background threads might be doing. You can use this status info to update things in the GUI if you need to.

Quote:In Java, there's all sorts of gotchas related to calling the event-dispatch thread (the main GUI one) from other threads (mainly when updating text boxes, progress bars, etc). Does C# have similar problems, or would it not matter anyway because NPVR is all custom DirectX rendering?
The same gotchas apply here. Make sure you only do GUI stuff on the main thread. There is where the NeedsRendering() suggestion comes into play.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#8
2011-08-13, 11:57 AM
ForceRender() looks like it'll do the trick, thanks.

Things are still not quite right, but iso playback success seems "variable" (shall we say), even with your Videos library. I've had it work fine, or only show a black screen, or appear to work, but not respond to keyboard (right-click options stopped it), and so on. But none of those problems are happening with any regularity. I also use SlySoft's Virtual Clone Mount rather than Daemon Tools, so that might mix things up a bit too.

Rip to folder gets my vote Big Grin

Iain
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#9
2011-08-30, 11:54 AM
I see ISO mounting is to be built-in to Windows 8:

http://blogs.msdn.com/b/b8/archive/2011/...files.aspx

Iain
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,783
Threads: 954
Joined: May 2006
#10
2011-08-30, 09:40 PM
About time, this is a standard in linux forever, even lightweight machines like the Popcorn Hour have it.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode