On 4/10/2017 10:56 AM, Vittorio Giovara wrote:
> On Fri, Apr 7, 2017 at 10:22 AM, Luca Barbato <[email protected]> wrote:
>> On 07/04/2017 16:09, James Almer wrote:
>>> +int av_spherical_from_name(const char *name);
>>
>> It can directly output the enum now, it is fine both ways to me.
> 
> Wait a minute, I don't think PROJECTION_UNKNOWN makes much sense to
> me, given the API and the spec it's based on, and -1 seems not really
> informative anyway.

The doxy in the original patch states -1 means not found. It's also
what the same function in stereo3d returns.

> In my opinion it would be enough to return int and
> just AVERROR(EINVAL) in case it's not found. James would you be ok
> with that, or do you have any preference?

IMO, PROJECTION_UNKNOWN is an interesting addition.

Assume for example a projection we don't currently support shows up in
a file in the future, both the mov and matroska demuxers would ignore
it and report the file as having no spherical metadata whatsoever.
With PROJECTION_UNKNOWN the demuxers could report the presence of said
metadata (and the generic values yaw/pitch/roll) while clearly stating
it's unknown.
Muxers would of course keep behaving the same and just not mux unknown
spherical metadata.

But in any case, either -1 or EINVAL are ok with me if you don't like
the above.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to