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

Mailing List Archive: MythTV: Dev

Shoutcast patch ; updated for svn 16380.

 

 

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


myth at eskil

Mar 7, 2008, 10:54 AM

Post #1 of 11 (1613 views)
Permalink
Shoutcast patch ; updated for svn 16380.

Updated for svn 16380, to be found at http://eskil.org/mythtv. Only
changes since last version is that I removed a bunch of leftover
debuglog prints.

eskil
---

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


adeffs.mythtv at gmail

Mar 8, 2008, 7:18 AM

Post #2 of 11 (1517 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

On Fri, Mar 7, 2008 at 1:54 PM, Eskil Heyn Olsen <myth [at] eskil> wrote:
> Updated for svn 16380, to be found at http://eskil.org/mythtv. Only
> changes since last version is that I removed a bunch of leftover
> debuglog prints.

Just tried to apply the patch to 16458 and it looks pretty good except for:
$ patch -Np0 <shoutcast-16380.patch
patching file mythtv/themes/default-wide/music-ui.xml
patching file mythtv/libs/libmyth/output.cpp
patching file mythtv/libs/libmyth/mythobservable.cpp
Hunk #1 FAILED at 12.
1 out of 1 hunk FAILED -- saving rejects to file
mythtv/libs/libmyth/mythobservable.cpp.rej
patching file mythtv/libs/libmyth/mythobservable.h

--
Steve
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


otto at kolsi

Mar 10, 2008, 9:15 AM

Post #3 of 11 (1493 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

Steven Adeff wrote:
> On Fri, Mar 7, 2008 at 1:54 PM, Eskil Heyn Olsen <myth [at] eskil> wrote:
>> Updated for svn 16380, to be found at http://eskil.org/mythtv. Only
>> changes since last version is that I removed a bunch of leftover
>> debuglog prints.
>
> Just tried to apply the patch to 16458 and it looks pretty good except for:
> $ patch -Np0 <shoutcast-16380.patch
> patching file mythtv/themes/default-wide/music-ui.xml
> patching file mythtv/libs/libmyth/output.cpp
> patching file mythtv/libs/libmyth/mythobservable.cpp
> Hunk #1 FAILED at 12.
> 1 out of 1 hunk FAILED -- saving rejects to file
> mythtv/libs/libmyth/mythobservable.cpp.rej
> patching file mythtv/libs/libmyth/mythobservable.h

Going back to 16380 is now a no-go with a production system, I think
there is a schema update in between and also QString thread instability.

I tried the patch 2-3 weeks ago but back then I got several segfaults.
I'd like to give it now another go. Updated patch would be greatly
appreciated :)
--
Otto
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


zdzisekg at comcast

Mar 10, 2008, 10:51 PM

Post #4 of 11 (1489 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

Otto Kolsi wrote:
> Steven Adeff wrote:
>
>> On Fri, Mar 7, 2008 at 1:54 PM, Eskil Heyn Olsen <myth [at] eskil> wrote:
>>
>>> Updated for svn 16380, to be found at http://eskil.org/mythtv. Only
>>> changes since last version is that I removed a bunch of leftover
>>> debuglog prints.
>>>
>> Just tried to apply the patch to 16458 and it looks pretty good except for:
>> $ patch -Np0 <shoutcast-16380.patch
>> patching file mythtv/themes/default-wide/music-ui.xml
>> patching file mythtv/libs/libmyth/output.cpp
>> patching file mythtv/libs/libmyth/mythobservable.cpp
>> Hunk #1 FAILED at 12.
>> 1 out of 1 hunk FAILED -- saving rejects to file
>> mythtv/libs/libmyth/mythobservable.cpp.rej
>> patching file mythtv/libs/libmyth/mythobservable.h
>>
>
> Going back to 16380 is now a no-go with a production system, I think
> there is a schema update in between and also QString thread instability.
>
> I tried the patch 2-3 weeks ago but back then I got several segfaults.
> I'd like to give it now another go. Updated patch would be greatly
> appreciated :)
>
I tried to send a manually corrected patch, but I guess it was too big
for the mailing list. To resolve the failed hunk make the
mythobservable.cpp portion of the patch look like this:

Index: mythtv/libs/libmyth/mythobservable.cpp
===================================================================
--- mythtv/libs/libmyth/mythobservable.cpp (revision 16380)
+++ mythtv/libs/libmyth/mythobservable.cpp (working copy)
@@ -12,48 +12,55 @@

void MythObservable::addListener(QObject *listener)
{
+ QMutexLocker locked(&m_mutex);
if (m_listeners.find(listener) == -1)
m_listeners.append(listener);
}

void MythObservable::removeListener(QObject *listener)
{
+ QMutexLocker locked(&m_mutex);
if (m_listeners.find(listener) != -1)
m_listeners.remove(listener);
}

-QObject* MythObservable::firstListener()
-{
- return m_listeners.first();
-}
-
-QObject* MythObservable::nextListener()
-{
- return m_listeners.next();
-}
-
QPtrList<QObject> MythObservable::getListeners()
{
+ QMutexLocker locked(&m_mutex);
return m_listeners;
}

void MythObservable::dispatch(MythEvent &event)
{
- QObject *listener = firstListener();
- while (listener)
+ // Copy the list and iterate on the copy, in case another thread
+ // modifies the list.
+
+ m_mutex.lock ();
+ QPtrList<QObject> listeners(m_listeners);
+ m_mutex.unlock ();
+
+ QPtrListIterator<QObject> it (listeners);
+ while (class QObject *listener = it.current ())
{
QApplication::postEvent(listener, event.clone());
- listener = nextListener();
+ ++it;
}
}

void MythObservable::dispatchNow(MythEvent &event)
{
- QObject *listener = firstListener();
- while (listener)
+ // Copy the list and iterate on the copy, in case another thread
+ // modifies the list.
+
+ m_mutex.lock ();
+ QPtrList<QObject> listeners(m_listeners);
+ m_mutex.unlock ();
+
+ QPtrListIterator<QObject> it (listeners);
+ while (class QObject *listener = it.current ())
{
QApplication::sendEvent(listener, event.clone());
- listener = nextListener();
+ ++it;
}
}

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


adeffs.mythtv at gmail

Mar 11, 2008, 9:55 AM

Post #5 of 11 (1482 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

On Tue, Mar 11, 2008 at 1:51 AM, Zdzislaw Gorlicki <zdzisekg [at] comcast> wrote:
<snip>
> I tried to send a manually corrected patch, but I guess it was too big
> for the mailing list. To resolve the failed hunk make the
> mythobservable.cpp portion of the patch look like this:
>
> Index: mythtv/libs/libmyth/mythobservable.cpp
> ===================================================================
> --- mythtv/libs/libmyth/mythobservable.cpp (revision 16380)
> +++ mythtv/libs/libmyth/mythobservable.cpp (working copy)
> @@ -12,48 +12,55 @@
<snip>

I'll have to give this a try later, hopefully it works on the latest
fixes-0.21 branch.

Eskil, considering 0.21 has been officially released will you be
working on a patch for 0.21?

Devs, there was some discussion pre- 0.21 release of perhaps including
this patch in trunk after the 0.21 release for future inclusion in
0.22 with the idea being there would be enough time to work out any
bugs, etc. that might be introduced. Is this still a possibility?

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


otto at kolsi

Mar 12, 2008, 1:39 AM

Post #6 of 11 (1470 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

Zdzislaw Gorlicki wrote:
>>>> Updated for svn 16380, to be found at http://eskil.org/mythtv. Only
>>>> changes since last version is that I removed a bunch of leftover
>>>> debuglog prints.
>>
>> I tried the patch 2-3 weeks ago but back then I got several segfaults.
>> I'd like to give it now another go. Updated patch would be greatly
>> appreciated :)
>>
> I tried to send a manually corrected patch, but I guess it was too big
> for the mailing list. To resolve the failed hunk make the
> mythobservable.cpp portion of the patch look like this:

Thanks for the patch. I ended up manually patching files to get
everythink working. Here are my findings so far (with Metallurgy theme):

- In general it seems to work fairly well
- I got one or two segfaults, but much much less than 2-3 weeks ago
- Patch requires "Show entire music tree" option to be on, this is
problem IMHO
- Arrow in MythMusic entire music tree indicating currently selected
item is not moving in up-down direction. This might be general Myth
and/or Metallurgy issue
- With shoutcast streams, visualizations are not always working
- Sometimes "playlist cannot be received" or similar error is shown,
this could be a network error

I still think this would be great new feature to MythMusic and about now
would be very good time to get this in..
--
Otto
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


adeffs.mythtv at gmail

Mar 12, 2008, 7:22 AM

Post #7 of 11 (1463 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

On Tue, Mar 11, 2008 at 1:51 AM, Zdzislaw Gorlicki <zdzisekg [at] comcast> wrote:
<snip>
> I tried to send a manually corrected patch, but I guess it was too big
> for the mailing list. To resolve the failed hunk make the
> mythobservable.cpp portion of the patch look like this:
<snip>

Tried to apply your adjustment to 16517 and still got:
patching file mythtv/libs/libmyth/mythobservable.cpp
Hunk #1 FAILED at 12.
1 out of 1 hunk FAILED -- saving rejects to file
mythtv/libs/libmyth/mythobservable.cpp.rej

here's what the rej file shows:
$ more mythtv/libs/libmyth/mythobservable.cpp.rej
***************
*** 12,59 ****

void MythObservable::addListener(QObject *listener)
{
if (m_listeners.find(listener) == -1)
m_listeners.append(listener);
}

void MythObservable::removeListener(QObject *listener)
{
if (m_listeners.find(listener) != -1)
m_listeners.remove(listener);
}

- QObject* MythObservable::firstListener()
- {
- return m_listeners.first();
- }
-
- QObject* MythObservable::nextListener()
- {
- return m_listeners.next();
- }
-
QPtrList<QObject> MythObservable::getListeners()
{
return m_listeners;
}

void MythObservable::dispatch(MythEvent &event)
{
- QObject *listener = firstListener();
- while (listener)
{
QApplication::postEvent(listener, event.clone());
- listener = nextListener();
}
}

void MythObservable::dispatchNow(MythEvent &event)
{
- QObject *listener = firstListener();
- while (listener)
{
QApplication::sendEvent(listener, event.clone());
- listener = nextListener();
}
}

--- 12,66 ----

void MythObservable::addListener(QObject *listener)
{
+ QMutexLocker locked(&m_mutex);
if (m_listeners.find(listener) == -1)
m_listeners.append(listener);
}

void MythObservable::removeListener(QObject *listener)
{
+ QMutexLocker locked(&m_mutex);
if (m_listeners.find(listener) != -1)
m_listeners.remove(listener);
}

QPtrList<QObject> MythObservable::getListeners()
{
+ QMutexLocker locked(&m_mutex);
return m_listeners;
}

void MythObservable::dispatch(MythEvent &event)
{
+ // Copy the list and iterate on the copy, in case another thread
+ // modifies the list.
+
+ m_mutex.lock ();
+ QPtrList<QObject> listeners(m_listeners);
+ m_mutex.unlock ();
+
+ QPtrListIterator<QObject> it (listeners);
+ while (class QObject *listener = it.current ())
{
QApplication::postEvent(listener, event.clone());
+ ++it;
}
}

void MythObservable::dispatchNow(MythEvent &event)
{
+ // Copy the list and iterate on the copy, in case another thread
+ // modifies the list.
+
+ m_mutex.lock ();
+ QPtrList<QObject> listeners(m_listeners);
+ m_mutex.unlock ();
+
+ QPtrListIterator<QObject> it (listeners);
+ while (class QObject *listener = it.current ())
{
QApplication::sendEvent(listener, event.clone());
+ ++it;
}
}

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


zdzisekg at comcast

Mar 12, 2008, 9:48 PM

Post #8 of 11 (1459 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

Steven Adeff wrote:
> On Tue, Mar 11, 2008 at 1:51 AM, Zdzislaw Gorlicki <zdzisekg [at] comcast> wrote:
> <snip>
>
>> I tried to send a manually corrected patch, but I guess it was too big
>> for the mailing list. To resolve the failed hunk make the
>> mythobservable.cpp portion of the patch look like this:
>>
> <snip>
>
> Tried to apply your adjustment to 16517 and still got:
> patching file mythtv/libs/libmyth/mythobservable.cpp
> Hunk #1 FAILED at 12.
> 1 out of 1 hunk FAILED -- saving rejects to file
> mythtv/libs/libmyth/mythobservable.cpp.rej
>
> here's what the rej file shows:
> $ more mythtv/libs/libmyth/mythobservable.cpp.rej
> ***************
> *** 12,59 ****
>
> void MythObservable::addListener(QObject *listener)
> {
> if (m_listeners.find(listener) == -1)
> m_listeners.append(listener);
> }
>
> void MythObservable::removeListener(QObject *listener)
> {
> if (m_listeners.find(listener) != -1)
> m_listeners.remove(listener);
> }
>
> - QObject* MythObservable::firstListener()
> - {
> - return m_listeners.first();
> - }
> -
> - QObject* MythObservable::nextListener()
> - {
> - return m_listeners.next();
> - }
> -
> QPtrList<QObject> MythObservable::getListeners()
> {
> return m_listeners;
> }
>
> void MythObservable::dispatch(MythEvent &event)
> {
> - QObject *listener = firstListener();
> - while (listener)
> {
> QApplication::postEvent(listener, event.clone());
> - listener = nextListener();
> }
> }
>
> void MythObservable::dispatchNow(MythEvent &event)
> {
> - QObject *listener = firstListener();
> - while (listener)
> {
> QApplication::sendEvent(listener, event.clone());
> - listener = nextListener();
> }
> }
>
> --- 12,66 ----
>
> void MythObservable::addListener(QObject *listener)
> {
> + QMutexLocker locked(&m_mutex);
> if (m_listeners.find(listener) == -1)
> m_listeners.append(listener);
> }
>
> void MythObservable::removeListener(QObject *listener)
> {
> + QMutexLocker locked(&m_mutex);
> if (m_listeners.find(listener) != -1)
> m_listeners.remove(listener);
> }
>
> QPtrList<QObject> MythObservable::getListeners()
> {
> + QMutexLocker locked(&m_mutex);
> return m_listeners;
> }
>
> void MythObservable::dispatch(MythEvent &event)
> {
> + // Copy the list and iterate on the copy, in case another thread
> + // modifies the list.
> +
> + m_mutex.lock ();
> + QPtrList<QObject> listeners(m_listeners);
> + m_mutex.unlock ();
> +
> + QPtrListIterator<QObject> it (listeners);
> + while (class QObject *listener = it.current ())
> {
> QApplication::postEvent(listener, event.clone());
> + ++it;
> }
> }
>
> void MythObservable::dispatchNow(MythEvent &event)
> {
> + // Copy the list and iterate on the copy, in case another thread
> + // modifies the list.
> +
> + m_mutex.lock ();
> + QPtrList<QObject> listeners(m_listeners);
> + m_mutex.unlock ();
> +
> + QPtrListIterator<QObject> it (listeners);
> + while (class QObject *listener = it.current ())
> {
> QApplication::sendEvent(listener, event.clone());
> + ++it;
> }
> }
>
>
try this

http://home.comcast.net/~zdzisekg/download/shoutcast-16380.patch

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


myth at eskil

Mar 21, 2008, 8:37 PM

Post #9 of 11 (1410 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

On Wed, 2008-03-12 at 10:39 +0200, Otto Kolsi wrote:

> - I got one or two segfaults, but much much less than 2-3 weeks ago
> - Patch requires "Show entire music tree" option to be on, this is
> problem IMHO

Guess that's an artifact of me always using that view. I'll look into
fixing that.

> - Arrow in MythMusic entire music tree indicating currently selected
> item is not moving in up-down direction. This might be general Myth
> and/or Metallurgy issue

You could try another theme for a short moment just to verify :)

> - With shoutcast streams, visualizations are not always working

This I'd like to hear more about. Which visualisations ? Any pattern to
it ? Anything that's reproducible ?

> - Sometimes "playlist cannot be received" or similar error is shown,
> this could be a network error

Or my timeouts being a tad too short. Especially since often hitting
select again will succeed.

The other benefit of this being in svn is that you could file tickets
instead of relying on my memory.

eskil
---

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


myth at eskil

Mar 21, 2008, 8:41 PM

Post #10 of 11 (1416 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

On Wed, 2008-03-12 at 10:22 -0400, Steven Adeff wrote:

> Tried to apply your adjustment to 16517 and still got:
> patching file mythtv/libs/libmyth/mythobservable.cpp
> Hunk #1 FAILED at 12.
> 1 out of 1 hunk FAILED -- saving rejects to file
> mythtv/libs/libmyth/mythobservable.cpp.rej


If you're still using the 0.21 branch, could you try out
http://eskil.org/mythtv/patches/shoutcast-0.21-16678.patch ?

eskil
---

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


otto at kolsi

Mar 22, 2008, 1:00 PM

Post #11 of 11 (1409 views)
Permalink
Re: Shoutcast patch ; updated for svn 16380. [In reply to]

Eskil Heyn Olsen wrote:
>> - Patch requires "Show entire music tree" option to be on, this is
>> problem IMHO
>
> Guess that's an artifact of me always using that view. I'll look into
> fixing that.

That sounds really good :)

>> - Arrow in MythMusic entire music tree indicating currently selected
>> item is not moving in up-down direction. This might be general Myth
>> and/or Metallurgy issue
>
> You could try another theme for a short moment just to verify :)

Yeah.. I moved from trunk back to 0.21-fixes just to be able to do some
more testing with this patch. This 'item not moving' issue does not
occur e.g. with MythCenter so I think it isn't shoutcast patch issue. I
didn't notice it earlier with Metallurgy since I don't use the "entire
music tree" option normally and it probably is somehow related to that.

>> - With shoutcast streams, visualizations are not always working
>
> This I'd like to hear more about. Which visualisations ? Any pattern to
> it ? Anything that's reproducible ?

I think normally every visualizer that I use work also with shoutcast
streams. But then if there is a 'decoder error' dialog (don't remember
the exact text), after that some of the visualizers stop working.

It feels like because of that decoder error, something gets to a state
that breaks some of the visualizers. For example, one time when this
happened "Goom" and "Synaesthesia" stopped working while all the others
worked fine. And cycling the visualizers doesn't help, when they break
they just don't work anymore. I'm not saying this affects only these two
visualizers, just that I had one occation with these two. I think if you
re-start MythMusic, everything works again as expected.

> The other benefit of this being in svn is that you could file tickets
> instead of relying on my memory.

Yes, it would be much easier that way..

Now with more extensive testing, I've manage to get some segfaults. I
started to collect backtraces and I think first 4 that I got, are the
same issue related to AlbumArt and Decoder::getFilename(). The fifth was
SIGABRT elsewhere. I've attach two of those backtraces to this mail.
--
Otto
Attachments: shoutcast-gdb1.txt.gz (3.16 KB)
  shoutcast-gdb5.txt.gz (2.97 KB)

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.