On Tue, 14 Dec 2021, James Almer wrote:
return channel_names[channel_id].name;
}
-static const struct {
+static inline void get_channel_str(AVBPrint *bp, const char *str,
+ enum AVChannel channel_id)
+{
+ if (str)
+ av_bprintf(bp, "%s", str);
+ else
+ av_bprintf(bp, "?");
If this is not allowed, then you should propagate back AVERROR(EINVAL)
if
it does. If it is allowed, because the user can use some custom
channel_id-s, then something like "USER%d" should be returned IMHO.
How about Ch%d? It would also further improve the usefulness of
av_channel_layout_from_string() by looking for such strings.
I find "Ch%d" a bit confusing, beacuse "Ch%d" would normally mean the n-th
channel in a layout, not a channel with the n-th ID.
What do you suggest? USER%d is IMO ugly. Maybe ChID%d? Although both are a
bit long.
Can be Usr%d, Dsg%d if you like these better. If not then, I don't mind
too much Ch%d, I just find it a bit confusing.
Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".