[Gambas-user] Bug on MediaTagList with some files

Adrien Prokopowicz adrien.prokopowicz at ...626...
Sun Dec 16 22:20:10 CET 2012


Le Sun, 16 Dec 2012 19:58:56 -0000, Benoît Minisini  
<gambas at ...1...> a écrit:

> Le 16/12/2012 04:27, Adrien Prokopowicz a écrit :
>> Le Sat, 15 Dec 2012 22:42:29 -0000, Benoît Minisini
>> <gambas at ...1...> a écrit:
>>
>>> Le 16/12/2012 00:34, Adrien Prokopowicz a écrit :
>>>> Le Sat, 15 Dec 2012 22:09:31 -0000, Benoît Minisini
>>>> <gambas at ...1...> a écrit:
>>>>
>>>>> Le 15/12/2012 15:46, Adrien Prokopowicz a écrit :
>>>>>> Le Sat, 15 Dec 2012 02:28:13 -0000, Benoît Minisini
>>>>>> <gambas at ...1...> a écrit:
>>>>>>
>>>>>>> Le 15/12/2012 03:28, Adrien Prokopowicz a écrit :
>>>>>>>> Hi Benoît,
>>>>>>>>
>>>>>>>> I'm trying to get the tags on each audio file on my music library,
>>>>>>>> but
>>>>>>>> some files make the MediaTagList._get() function crash with the
>>>>>>>> error
>>>>>>>> "No
>>>>>>>> return value".
>>>>>>>>
>>>>>>>> As an example, you can try to open and play the following file  
>>>>>>>> with
>>>>>>>> the
>>>>>>>> MediaPlayer example :
>>>>>>>>
>>>>>>>> http://dl.free.fr/isvWMm7mq
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>
>>>>>>> It should be fixed in revision #5436.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>
>>>>>> It works for that file, but with another one I have a new error
>>>>>> message
>>>>>> now : "Unsupported property datatype".
>>>>>>
>>>>>> Here is the file : http://dl.free.fr/niWYCQNM3
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>
>>>>> Is it better with revision #5439?
>>>>>
>>>>
>>>> Much better, thanks. :-)
>>>>
>>>> Just a last little question on gb.media (I'm discovering GStreamer) :
>>>> I'd
>>>> like to get the tags of all the files in my music folder, and to store
>>>> them into a compressed XML file, so that I won't have to fully rescan
>>>> the
>>>> folder each time I start my app.
>>>>
>>>> The only way I found to retreive the tags is to have a second
>>>> MediaPlayer
>>>> in background, to set its URL property and to call its Pause() method.
>>>> When I see that the player has reached the Pause state (with the State
>>>> event), I stop the player and then repeat the process for the next  
>>>> file.
>>>>
>>>> Do you know if there is a "cleaner" method (that doesn't open and  
>>>> close
>>>> an
>>>> audio stream for each file and make PulseAudio overloaded) ?
>>>>
>>>> Thanks in advance (and for your work). :-)
>>>>
>>>> Regards,
>>>>
>>>
>>> The tags are emitted while the media is playing in GStreamer, so try to
>>> replace the audio output of the MediaPlayer by some GStreamer element
>>> that does nothing (look in the documentation, it must exist). That way,
>>> you won't send any sound anywhere.
>>>
>>> Otherwise I don't know if there is another way with GStreamer.
>>>
>>> Regards,
>>>
>>
>> Yes, that works much faster (with the "fakesink" element), thank you !
>> Just a note : I can't create a MediaControl without a parent (it gives  
>> me
>> a Null Object error) but the parent parameter is marked as optional. So  
>> as
>> a workaround I have to create a "dummy" mediaplayer that will actually
>> contain my fake output element.
>
> Why don't you create the fakesink element directly into the MediaPlayer
> instead of using another one?
>

I forgot to mention that when I do that, this make the mediaplayer unable  
to give the tags (the Tag event is not raised anymore).

>>
>> And in the IDE (I don't know either if this is a bug), when the Null
>> object occurs into the declaration part of the class (or outside of any
>> function/procedure), the balloon pops out somewhere inside the stack
>> backtrace panel. (I first thought that the IDE itself was crashing ...)
>>
>> Regards,
>>
>
> Do you have a screenshot ? Or send me a mail in french with more  
> details...
>

In a new project, put this into your MMain :

Private $array As Integer[] = Null
Private $copy As Integer[] = $array.Copy()

Public Sub Main()

End

Instead of popping into the editor, the error message pops inside the  
stack backtrace panel. See attached screenshot.

-- 
Adrien Prokopowicz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: capture d'?cran6.png
Type: image/png
Size: 58734 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20121216/f44298d1/attachment.png>


More information about the User mailing list