[Gstreamer-openmax] [PATCH] replace deprecated API

Rob Clark rob at ti.com
Fri Apr 23 10:30:20 PDT 2010


On 04/23/2010 12:05 PM, Felipe Contreras wrote:
> On Mon, Apr 19, 2010 at 10:32 AM, Rob Clark<rob at ti.com>  wrote:
>    
>> On 04/19/2010 02:23 AM, Felipe Contreras wrote:
>>      
>>> Yeah, but that's code-style patronizing. So what if I prefer a C99 style
>>> like:
>>>
>>> GstElementDetails details = {
>>>         .longname = "OpenMAX IL AAC audio decoder",
>>>         .klass = "Codec/Decoder/Audio",
>>>         .description = "Decodes audio in AAC format with OpenMAX IL",
>>>         .author = "Felipe Contreras",
>>> };
>>>
>>> gst_element_class_set_details(element_class,&details);
>>>
>>> At some point that won't work? Why?
>>>        
>> IIRC it was some brokenness of GstElementDetails which showed when
>> -Wwrite-strings (or similar) was enabled.. because the fields in that struct
>> were not const.  I think the only wait to fix that would be have some new
>> GstElementDetailsConst struct, which isn't any better..
>>
>> honestly, I don't have a preference either way.. the only reason I changed
>> this was I didn't want to have to remove GST_DISABLE_DEPRECATED
>>      
> Well, so far I don't agree with the change from GStreamer API, so I
> think removing GST_DISABLE_DEPRECATED is the sensible solution.
>
>    


well, internally this was what we did for a short term temporary 
solution.. but I'm not a huge fan of removing all deprecated API 
checking just for the benefit of one API.

Unfortunately, I don't see a good way to rescue the 
gst_element_class_set_details() API without changing the 
GstElementDetails struct to use const pointers.  (Although offhand I'm 
not sure why that approach wasn't taken.)

BR,
-R





More information about the Gstreamer-openmax mailing list