about MediaSource::Empty

Luc Menut Luc.Menut at supagro.inra.fr
Thu Nov 12 01:39:26 CET 2009


Hi,

Matthias Kretz a écrit :
> Hi,
> 
> On Wednesday 11 November 2009 23:55:50 Luc Menut wrote:
>> Yes, for Mandriva 2010.0, we use these 2 patches:
>> https://bzattachment.mandriva.com/attachment.cgi?id=15401
>> https://bzattachment.mandriva.com/attachment.cgi?id=15402
>>
>> as we were near the final release and I didn't know precisely what
>> should be done by the backend with MediaSource::Empty, I tried to fix
>> the bug without too much changes, to avoid the regressions.
> 
> Understandable. But, did you make sure that the second patch does not break 
> other backends? Before, backends could safely assume that stop would not get 
> called if the MediaSource is Empty. Now they get a call to stop.
> 
> At least you have to test with the xine backend, which frees the xine_stream_t 
> on Empty... I hope I safeguarded it correctly. But it was never tested.

Yes, before proposing the patch, I tested with the xine backend too. It 
works.
As the mediaobject is already in StoppedState, the StopCommand event do 
nothing (in xinestream.cpp)

1395 case Event::StopCommand:
1396 	ev->accept();
1397 	if (m_state == Phonon::ErrorState || m_state == 
Phonon::LoadingState || m_state == Phonon::StoppedState) {
1398 	return true;
1399 	}
...

of course, it's a temporary workaround, and we will have to fix properly 
the gstreamer backend to handle correctly MediaSource::Empty.

> 
> Regards,
> 	Matthias

Regards,
      Luc

-- 
Luc Menut


More information about the Phonon-backends mailing list