Problem:
When I select Play the first time with the DVDPlayer's menu, I want to automatically play title 1, chapter 1. This is similar behavior to what happens when you insert a DVD into a DVD player the first time. However, I can't get this to work as desired.
Prior Research:
I've been using the DirectShow.Net library for a number of months.
I have read the DirectShow documentation.
I searched these forums for related threads but can't find anything.
Stuff I've done and other facts you might need to help:
Hacked the code so I can select Play even while the video is playing (I control execution via VizStud)
Added calls to GetCurrentDomain and GetCurrentUOPS prior to PlayChapterInTitle just to confirm things.
Here's two situations that hopefully explain things:
Situation 1 (FAILURE):
select Play from the DVDPlayer menu to get the DVD going (and the title menu is showing).
based on these 2 bits of information, I should be able to execute PlayChapterInTitle (with title 1, chapter 1)
When I do, I get a VFW_E_DVD_OPERATION_INHIBITED error. Failure.
Situation 2 (SUCCESS):
From the DVD's title menu, I select a chapter, eg 14, to play and let it play for a few seconds
Select Play from the DVDPlayer menu
the CurrentDomain is - Title
the UOPS are - PlayTitle | ReturnFromSubMenu | ShowMenuAngle | SelectAngle | SelectKaraokeAudioPresentationMode | SelectVideoModePreference
I execute PlayChapterInTitle (with title 1, chapter 1)
and it works - jumps to chapter 1, title 1
So....any ideas as how I can get the player to jump right into title 1, chapter 1 when I select Play from the application's menu? (not play from the DVD itself). As mentioned at the top, I want to emulate what happens when you insert a DVD into a DVD player, just jump right to title 1, chapter 1.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK - so I'm an idiot. I'll document this in case somebody else needs this clarification sometime in the future.
I swapped the meaning of the UOPS. I thought the UOPS showed the legit actions vs showing those that aren't legit for a certain domain. D'oh. So...what I did:
First time through after Play is executed, in the Domain Event Change case, if the UOPS flag indicates I can PlayTitle (by the absence of that flag), then I execute the PlayTitle method. I don't care what the domain is.
This seems to work in most cases. I've checked a number of DVDs and there are still some that play the title straightaway when played in a DVD player, but the UOPS restrict me from doing the same - either there's some other magic, or my DVD player (Zenith) is ignoring the UOPS.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Not sure if this helps but i have done the same thing some time ago and found that some DVD's themselves don't allow for playchapterintitle and others do.
I believe this has something to do with the way the dvd was created. Obviously by playing a chapter for a few seconds, it is considered that you are in the dvd chapter structure so the command will work. I think from memory it has something to do with the production companies and such not wanting people to miss the warnings and such at the start.
For my DirectShow DVD Player app I have accepted that some will and some wont. This doesn't mean that you may find a way around (i hope you do)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the note. You're right about the authoring of the DVDs and different operations being allowed, or not. However, the UOPS flags are used to indicate what actions are acceptable in different domains, so it seems, given the facts above, I should be able to do what I want to do.
And, on top of that, a DVD player can automagically start playing title 1, chapter 1, so it sure seems I ought to be able to do the same thing.
ATM, I'm living with just getting to the title and letting the user click the play from the DVD's menu - but that is definitely not optimal.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Problem:
When I select Play the first time with the DVDPlayer's menu, I want to automatically play title 1, chapter 1. This is similar behavior to what happens when you insert a DVD into a DVD player the first time. However, I can't get this to work as desired.
Prior Research:
I've been using the DirectShow.Net library for a number of months.
I have read the DirectShow documentation.
I searched these forums for related threads but can't find anything.
Stuff I've done and other facts you might need to help:
Here's two situations that hopefully explain things:
Situation 1 (FAILURE):
Situation 2 (SUCCESS):
So....any ideas as how I can get the player to jump right into title 1, chapter 1 when I select Play from the application's menu? (not play from the DVD itself). As mentioned at the top, I want to emulate what happens when you insert a DVD into a DVD player, just jump right to title 1, chapter 1.
Thanks.
OK - so I'm an idiot. I'll document this in case somebody else needs this clarification sometime in the future.
I swapped the meaning of the UOPS. I thought the UOPS showed the legit actions vs showing those that aren't legit for a certain domain. D'oh. So...what I did:
This seems to work in most cases. I've checked a number of DVDs and there are still some that play the title straightaway when played in a DVD player, but the UOPS restrict me from doing the same - either there's some other magic, or my DVD player (Zenith) is ignoring the UOPS.
Not sure if this helps but i have done the same thing some time ago and found that some DVD's themselves don't allow for playchapterintitle and others do.
I believe this has something to do with the way the dvd was created. Obviously by playing a chapter for a few seconds, it is considered that you are in the dvd chapter structure so the command will work. I think from memory it has something to do with the production companies and such not wanting people to miss the warnings and such at the start.
For my DirectShow DVD Player app I have accepted that some will and some wont. This doesn't mean that you may find a way around (i hope you do)
Dave,
Thanks for the note. You're right about the authoring of the DVDs and different operations being allowed, or not. However, the UOPS flags are used to indicate what actions are acceptable in different domains, so it seems, given the facts above, I should be able to do what I want to do.
And, on top of that, a DVD player can automagically start playing title 1, chapter 1, so it sure seems I ought to be able to do the same thing.
ATM, I'm living with just getting to the title and letting the user click the play from the DVD's menu - but that is definitely not optimal.