[FFmpeg-devel] [PATCH 1/2] lavc: add av_get_profile_name() to get profile names

Michael Niedermayer michaelni
Fri Jan 7 19:25:54 CET 2011

On Fri, Jan 07, 2011 at 07:31:28PM +0200, Anssi Hannula wrote:
> Michael wrote:
> > Maybe we should add such tables to a new AVCodec.profiles ?
> Seems reasonable. Like this?
> I'm a bit unsure of the contents of the structure, though. What if an
> application wants an "id" style name (i.e. underscores instead of
> spaces, all lowercase, like our decoder names) for the profile?
> Should we add something like that instead?
> (the colorspace and codec as outputted by e.g. avcodec_string() are
> already "id"-style instead of being more human-readable)

whichever way you prefer

> Adding both would seem a bit overkill, I think.


> If we go with the "id" style names ("baseline", "dts_hd_ma" instead of
> "Baseline", "DTS-HD MA"), we can add a longer human-readable name later
> if the need arises ("Low Complexity" for AAC-LC, "DTS-HD Master Audio",
> etc.).

> Also, should we already provide AVProfile *av_get_profile() instead of
> av_get_profile_name(), or only at a later time if other members are
> actually added there?

as you prefer ...

> @@ -3394,6 +3403,15 @@ AVCodec *avcodec_find_decoder_by_name(const char *name);
>  void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
>  /**
> + * Return a name for the specified profile, if available.
> + *
> + * @param codec the codec that is searched for the given profile
> + * @param profile the profile value for which a name is requested
> + * @return A name for the profile if found, NULL otherwise.
> + */
> +const char *av_get_profile_name(AVCodec *codec, int profile);

otherwise lgtm
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110107/612cf675/attachment.pgp>

More information about the ffmpeg-devel mailing list