On Wed, 15 Dec 2021, Marton Balint wrote:



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.

One more thing, don't we want to follow existing convention?

E.g. for channel name a abbriviated name with all capital letters, (that is why I suggested USER%d as a first), and for channel desription, a longer one, with lowercase, e.g. "user %d".

I noticed the same inconsistency for ambisonic, because as far as I see for that now both the short name is "ambisonic %d" and the description is also. It would be more consistent to have "AMBI%d" and "amibisonic %d" for name and description.

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".

Reply via email to