Re: Caps and Options update



On 05/04/2011 09:51, Iago Toral wrote:
>>  - for the options and caps that are defined, I think we should have
>> default values. I'm still hesitating on whether to put that in
>> initialisation or in getters.
> 
> I don't get to see the reason, in which situation do you think default
> values for options/caps would be interesting? From what I see, when a
> cap is not set it can only mean that the source does not support it (so
> no need for a default value), and when a option is not set it can only
> mean the client is not interested in that option at all (so again, no
> need for a default value).

The reason is that I need to return a value for functions like
grl_operation_options_get_flags()/grl_caps_get_flags() (getters of
values that are not pointers, where we cannot return NULL). Otherwise,
we would need to modify the prototype, with something like:

  gboolean grl_caps_get_flags (GrlCaps *caps,
                               GrlMetadataResolutionFlags *flags);

or

  GrlMetadataResolutionFlags grl_caps_get_flags (GrlCaps *caps,
                                                 GError **error);

Guij


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]