Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


stuart at tase

Jun 25, 2007, 10:20 AM

Post #1 of 9 (836 views)
Permalink
Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring

On Monday 25 June 2007 17:09:59 MythTV wrote:
> #3666: DVD speed setting only works when using media monitoring
> -----------------------+---------------------------------------------------
>- Reporter: anonymous | Owner: ijr
> Type: defect | Status: new
> Priority: minor | Milestone: unknown
> Component: mythtv | Version: head
> Severity: medium | Mlocked: 0
> -----------------------+---------------------------------------------------
>- The changes in #3379 appear to have broken DVD speed setting when "Monitor
> CD / DVD" is not checked. I assume this is because
> `MediaMonitor::SetCDSpeed` uses `MediaMonitor` to set the speed.

This actually relates to something that I was thinking about when refactoring
the CD monitoring code in mythmusic. In mythmusic we start a thread which
just polls for changes in the CD which could largely be replaced by hooking
it into the media-monitor instead.

Right now, disabling automatic handling of media means disabling the media
monitor entirely. IMHO it would be better if media monitoring was permanently
on and that instead we just allow users to turn off automatic
playback/handling of media types.
--
Stuart Morgan
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


nigel at ind

Jun 25, 2007, 4:28 PM

Post #2 of 9 (817 views)
Permalink
Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring [In reply to]

>> broken DVD speed setting when "Monitor
>> CD / DVD" is not checked. I assume this is because
>> `MediaMonitor::SetCDSpeed` uses `MediaMonitor` to set the speed.
>
> This actually relates to something that I was thinking about when
> refactoring
> the CD monitoring code in mythmusic. In mythmusic we start a thread
> which
> just polls for changes in the CD which could largely be replaced by
> hooking
> it into the media-monitor instead.

Hell yes.

Eskil's patches in '#2598 Use MythMediaMonitor in plugins'
have most of the required changes
(e.g. post _all_ media event types).



Of course, the moment one of us makes this change,
lots'o tickets will arrive saying "it doesn't work"
because of some unknown bugs in MediaMonitor :-)


> Right now, disabling automatic handling of media means disabling
> the media
> monitor entirely. IMHO it would be better if media monitoring was
> permanently
> on

Agreed.


I also noted the other day that, if AutoLookupCD is set,
databasebox.cpp does new and delete of a CdDecoder
(with its CDDB lookup and MetaData creation), every 1000ms.
Luckily, libcdaudio's CDDB lookup has caching.
The problema is that my Qt-based Darwin lookup doesn't.


Was considering having just one CdDecoder in Music,
(main.c - close to handleMedia()), which does
a CDDB lookup when it gets a MEDIASTAT_USEABLE
with type MEDIATYPE_AUDIO.


But then I thought, we could even have the
CDDB lookup in the MediaMonitor itself.
And, then I decided my plans were bigger
than my available free time, and stopped.


Stuart, do you have some time to work
with me on these ideas/patches?

--
Nigel Pearson, nigel [at] ind|"Things you own-
Telstra Net. Eng., Sydney, Australia | end up owning you"
Office: 9202 3900 Fax: 9261 3912 | Tyler,
Mobile: 0408 664435 Home: 9792 6998 | Fight Club
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


dburr at veritel

Jun 25, 2007, 6:40 PM

Post #3 of 9 (812 views)
Permalink
Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring [In reply to]

On Mon, 2007-06-25 at 18:20 +0100, Stuart Morgan wrote:
> This actually relates to something that I was thinking about when refactoring
> the CD monitoring code in mythmusic. In mythmusic we start a thread which
> just polls for changes in the CD which could largely be replaced by hooking
> it into the media-monitor instead.

Would that then mean that it would be possible for media-monitor to
detect when a DVD has been inserted when watching LiveTV? We could show
a prompt (similiar to the prompt that appears when Myth wants to change
channels to record) that says something like "You have inserted a DVD?
Do you wish to: (1) Go to CD/DVD menu or (2) Ignore".

DB

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


nigel at ind

Jun 25, 2007, 9:45 PM

Post #4 of 9 (813 views)
Permalink
Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring [In reply to]

> Would that then mean that it would be possible for media-monitor to
> detect when a DVD has been inserted when watching LiveTV?

Not that I think this is a good idea,
from a user interface point of view, but
that is possible now if someone writes
some extra glue in the TV playback code.


It doesn't need any changes to MythDVD,
MythVideo or MythGallery, because they
already detect media insertion if
"Monitor CD/DVD drive" is turned on.

I guess something could be added into the
events loop of tv_play.cpp to look for a
MediaEvent, and pause TV then display a popup

--
Nigel Pearson, nigel [at] ind|"Gentlemen,
Telstra Net. Eng., Sydney, Australia | you can't fight in here-
Office: 9202 3900 Fax: 9261 3912 | this is the war room!"
Mobile: 0408 664435 Home: 9792 6998 | Dr Strangelove
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


stuart at tase

Jun 25, 2007, 11:31 PM

Post #5 of 9 (806 views)
Permalink
Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring [In reply to]

On Tuesday 26 June 2007 00:28:07 Nigel Pearson wrote:
> Hell yes.
>
> Eskil's patches in '#2598 Use MythMediaMonitor in plugins'
> have most of the required changes
> (e.g. post _all_ media event types).

Great. I'd missed that.

> I also noted the other day that, if AutoLookupCD is set,
> databasebox.cpp does new and delete of a CdDecoder
> (with its CDDB lookup and MetaData creation), every 1000ms.
> Luckily, libcdaudio's CDDB lookup has caching.
> The problema is that my Qt-based Darwin lookup doesn't.

I've already re-written this into a single background thread with a single
instance of cddecoder, using signals to inform playbackbox/databasebox of
changes. It works well but I stopped work on it when I decided that the media
monitor should probably be involved.

>
> But then I thought, we could even have the
> CDDB lookup in the MediaMonitor itself.
> And, then I decided my plans were bigger
> than my available free time, and stopped.

I can't see the purpose in having CDDB look up in the mediamonitor myself, but
it can always been done at some point down the road if there is good reason
for it.

> Stuart, do you have some time to work
> with me on these ideas/patches?

I don't have a great amount of free time because I've already dedicated most
of it to re-writing the mythmusic playlist editor, but I can probably spare a
little to see this idea through to completion.

--
Stuart Morgan
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


nigel at ind

Jun 25, 2007, 11:45 PM

Post #6 of 9 (795 views)
Permalink
Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring [In reply to]

> I've already re-written this into a single background thread with a
> single
> instance of cddecoder, using signals to inform playbackbox/
> databasebox of
> changes. It works well

Cool. If its not too messy, any chance of a copy?



> but I stopped work on it when I decided that the media
> monitor should probably be involved.

Which would just replace the thread
with the MythMusic window event loop?


> I can't see the purpose in having CDDB look up in the mediamonitor
> myself

It is a minor thing, but it means ejecting CDs
could have the artist name instead of just
being /dev/cdrom or "Audio CD"



> I don't have a great amount of free time because I've already
> dedicated most
> of it to re-writing the mythmusic playlist editor, but I can
> probably spare a
> little to see this idea through to completion.

Or I can spare some to review what you have done so far?

--
Nigel Pearson, nigel [at] ind|"Reality is that which,
Telstra Net. Eng., Sydney, Australia | when you stop believing-
Office: 9202 3900 Fax: 9261 3912 | in it, doesn't go away."
Mobile: 0408 664435 Home: 9792 6998 | Philip K. Dick - 'Valis'
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


nigel at ind

Jul 2, 2007, 5:34 AM

Post #7 of 9 (727 views)
Permalink
Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring [In reply to]

> Right now, disabling automatic handling of media means disabling
> the media
> monitor entirely. IMHO it would be better if media monitoring was
> permanently
> on and that instead we just allow users to turn off automatic
> playback/handling of media types.

I couldn't think of a tidy way to turn this on/off
for different media types, but I have hacked up a
simple "monitor, but don't send MediaEvent" patch:

http://svn.mythtv.org/trac/ticket/3666#comment:1

--
Nigel Pearson, nigel [at] ind|"Gentlemen,
Telstra Net. Eng., Sydney, Australia | you can't fight in here-
Office: 9202 3900 Fax: 9261 3912 | this is the war room!"
Mobile: 0408 664435 Home: 9792 6998 | Dr Strangelove
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


stuart at tase

Jul 10, 2007, 11:49 AM

Post #8 of 9 (670 views)
Permalink
Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring [In reply to]

On Tuesday 26 June 2007 07:45:10 Nigel Pearson wrote:
> > I've already re-written this into a single background thread with a
> > single
> > instance of cddecoder, using signals to inform playbackbox/
> > databasebox of
> > changes. It works well
>
> Cool. If its not too messy, any chance of a copy?

It's a little messy and doesn't currently cover databasebox, only playbackbox,
despite what I said before (it wasn't finished). If we move to using the
media monitor then it's not really relevant anymore. If you are still
interested I can send you a copy - it's a tiny patch.

> > but I stopped work on it when I decided that the media
> > monitor should probably be involved.
>
> Which would just replace the thread
> with the MythMusic window event loop?

Aye. When a disk is inserted or removed the events would be picked up in the
mythmusic event handler. Nice and simple.

> > I can't see the purpose in having CDDB look up in the mediamonitor
> > myself
>
> It is a minor thing, but it means ejecting CDs
> could have the artist name instead of just
> being /dev/cdrom or "Audio CD"

Ok, well that's a good reason I guess :)

--
Stuart Morgan
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


nigel at ind

Jul 10, 2007, 5:15 PM

Post #9 of 9 (670 views)
Permalink
Re: [mythtv-commits] Ticket #3666: DVD speed setting only works when using media monitoring [In reply to]

On 11/07/2007, at 4:49 AM, Stuart Morgan wrote:

> On Tuesday 26 June 2007 07:45:10 Nigel Pearson wrote:
>>> I've already re-written this into a single background thread with a
>>> single
>>> instance of cddecoder, using signals to inform playbackbox/
>>> databasebox of
>>> changes. It works well
>>
>> Cool. If its not too messy, any chance of a copy?
>
> It's a little messy and doesn't currently cover databasebox, only
> playbackbox,
> despite what I said before (it wasn't finished). If we move to
> using the
> media monitor then it's not really relevant anymore. If you are still
> interested I can send you a copy - it's a tiny patch.

Yes please.

I am just about to add "device removal" events to the media monitor
(and MythVideo/Music), so a threading change would be the next step.

--
Nigel Pearson, nigel [at] ind|"I thought I said no shivs."
Telstra Net. Eng., Sydney, Australia | "This? This is just a
Office: 9202 3900 Fax: 9261 3912 | personal grooming appliance"
Mobile: 0408 664435 Home: 9792 6998 | Riddick - Pitch Black
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.