[Gambas-user] gb.media : receiving GStreamer element messages

Adrien Prokopowicz adrien.prokopowicz at ...626...
Thu May 14 16:59:09 CEST 2015


Le Thu, 14 May 2015 14:45:25 +0200, Benoît Minisini  
<gambas at ...1...> a écrit:

> Le 14/05/2015 05:01, Adrien Prokopowicz a écrit :
>>
>> I like the idea, the only problem is that there already is a message  
>> event
>> that handles error/warning/info messages, so we'll have to find another
>> name, I guess.
>>
>> If I don't stumble upon any other incompatibility problem, I should be  
>> able
>> to commit that tomorrow.
>>
>> Regards,
>>
>
> Oops, my bad... Well, at the moment I suggest "Event" as event name, I
> didn't find ayhting better. I should have think before chosing "Message"
> for the name of the other event!
>

Done in revision #7082.

I used "Event" for the event name as you suggested, I hadn't found any
better name myself (I had "RawMessage" in mind, but meh).

I put all of the GStreamer constants in the MediaMessage class, except for
the ones that are only used internally by GStreamer, depreceated, or
implemented in an earlier version than 1.0 (according to the GStreamer  
docs).

I put the message's name in the MediaMessage object rather than in the  
event's
parameters, I think it is more fitting now that the object holds the  
message
itself rather than just the data.

I also added a few convenience methods for retrieving the data,
such as _next, Count, and Key.
Maybe I will also add a method to export the data directly to a  
collection, as
the MediaMessage object itself is short-lived.

-- 
Adrien Prokopowicz




More information about the User mailing list