On 30/04/15 10:52, Martin Storsjö wrote:
> On Wed, 29 Apr 2015, Luca Barbato wrote:
> 
>> ---
>> avprobe.c | 39 +++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 39 insertions(+)
>>
>> diff --git a/avprobe.c b/avprobe.c
>> index d969257..a22cb8f 100644
>> --- a/avprobe.c
>> +++ b/avprobe.c
>> @@ -104,6 +104,10 @@ typedef struct PrintContext {
>>
>>     void (*print_integer) (const char *key, int64_t value);
>>     void (*print_string)  (const char *key, const char *value);
>> +
>> +    void (*print_array_int) (const char *key,
>> +                             const int *array,
>> +                             const int size);
>> } PrintContext;
> 
> For the use case with the display matrix, the array actually is int32_t.
> In practice that isn't any issue though on any of the platforms we support.

I wanted to get something simple first

> Dunno if it'd be unnecessarily complex to have a
> start-printvalue-end-interface to it as well? That would at least allow
> printing any integers, not only the ones that match the exact pointer
> type used here.

It would work like

_inline_array_header()

_print_{integer, string}
for () {
   _print_{integer, string,...}
   _print_array_separator
}
_inline_array_footer()

I'll get it to you tonight.

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to