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

Mailing List Archive: MythTV: Dev

Jumpy dvd playback - thread contention

 

 

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


john.p.harvey at btinternet

Nov 17, 2009, 11:57 PM

Post #1 of 4 (1114 views)
Permalink
Jumpy dvd playback - thread contention

I have a problem playing back dvd's on a low powered system. Dual Core Atom
using vdpau graphics.
If the DVD's are imported and played from disk (local or network) it is
fine.
The playback is very jumpy and after digging around the problem is caused by
locking in dvdnav between avformatdecoder & dvdringbuffer.

Both call IsInMenu which calls into dvdnav_is_domain which does a lock.
For some reason avformatdecoder fails to get the lock for up to about a
second which causes the jumpy behaviour.

Just before calling that it avformatdecoder cals DVD()->CellChanged() &
DVD->InStillFrame() which are stored in DVDRingBuffer & don't do any
locking.

As a test i modified IsInMenu to cache the state and only call dvdnav to
update the cached value from methods in DVDRingBuffer that fetch new data.

Since avformatdecoder doesn't try to get a lock this seems to fix the
problem but could someone confirm whether or not this change seems
reasonable? If so i will submit a patch.

This doesn't really explain why avformatdecoder was being starved of the
lock in dvdnav but i nothing seems to change that,(enable/disable real time
threads, different sync methods, enable/disable hyperthreading).
I am running on ubuntu 9.10.

Thanks
JOhn

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


mark.kendall at gmail

Nov 18, 2009, 12:52 AM

Post #2 of 4 (1039 views)
Permalink
Re: Jumpy dvd playback - thread contention [In reply to]

2009/11/18 John Harvey <john.p.harvey [at] btinternet>:
> I have a problem playing back dvd's on a low powered system. Dual Core Atom
> using vdpau graphics.
> If the DVD's are imported and played from disk (local or network) it is
> fine.
> The playback is very jumpy and after digging around the problem is caused by
> locking in dvdnav between avformatdecoder & dvdringbuffer.

John

can you post a patch, please - that would make it easier to both test
and understand.

thanks and regards

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


john.p.harvey at btinternet

Nov 18, 2009, 1:29 AM

Post #3 of 4 (1027 views)
Permalink
Re: Jumpy dvd playback - thread contention [In reply to]

--- On Wed, 18/11/09, Mark Kendall <mark.kendall [at] gmail> wrote:

> From: Mark Kendall <mark.kendall [at] gmail>
> Subject: Re: [mythtv] Jumpy dvd playback - thread contention
> To: "Development of mythtv" <mythtv-dev [at] mythtv>
> Date: Wednesday, 18 November, 2009, 8:52
> 2009/11/18 John Harvey <john.p.harvey [at] btinternet>:
> > I have a problem playing back dvd's on a low powered
> system. Dual Core Atom
> > using vdpau graphics.
> > If the DVD's are imported and played from disk (local
> or network) it is
> > fine.
> > The playback is very jumpy and after digging around
> the problem is caused by
> > locking in dvdnav between avformatdecoder &
> dvdringbuffer.
>
> John
>
> can you post a patch, please - that would make it easier to
> both test
> and understand.
>
> thanks and regards
>
> Mark
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
Of course. I'll open a ticket tonight when i get home & attach a patch to it.

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


john.p.harvey at btinternet

Nov 18, 2009, 12:48 PM

Post #4 of 4 (1002 views)
Permalink
Re: Jumpy dvd playback - thread contention [In reply to]

> -----Original Message-----
> From: mythtv-dev-bounces [at] mythtv [mailto:mythtv-dev-
> bounces [at] mythtv] On Behalf Of John Harvey
> Sent: 18 November 2009 09:29
> To: Development of mythtv
> Subject: Re: [mythtv] Jumpy dvd playback - thread contention
>
>
>
> --- On Wed, 18/11/09, Mark Kendall <mark.kendall [at] gmail> wrote:
>
> > From: Mark Kendall <mark.kendall [at] gmail>
> > Subject: Re: [mythtv] Jumpy dvd playback - thread contention
> > To: "Development of mythtv" <mythtv-dev [at] mythtv>
> > Date: Wednesday, 18 November, 2009, 8:52
> > 2009/11/18 John Harvey <john.p.harvey [at] btinternet>:
> > > I have a problem playing back dvd's on a low powered
> > system. Dual Core Atom
> > > using vdpau graphics.
> > > If the DVD's are imported and played from disk (local
> > or network) it is
> > > fine.
> > > The playback is very jumpy and after digging around
> > the problem is caused by
> > > locking in dvdnav between avformatdecoder &
> > dvdringbuffer.
> >
> > John
> >
> > can you post a patch, please - that would make it easier to
> > both test
> > and understand.
> >
> > thanks and regards
> >
> > Mark
> >

> Of course. I'll open a ticket tonight when i get home & attach a patch
> to it.
>
> John
> _______________________________________________
I have created a ticket for this
http://svn.mythtv.org/trac/ticket/7605
and attached the patch i am using to the ticket.

Thanks

John

_______________________________________________
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.