Skip to content

Suggestion: use MTCopyLocalizedNameForMediaSubType for codec names #210

Description

@MaddTheSane

MTCopyLocalizedNameForMediaSubType is a function in the MediaToolbox framework that gets a localized value of a codec string.
Before I migrated to MTCopyLocalizedNameForMediaSubType, I created a "clever" way of getting a localized string from the "MediaAndSubtypes" strings.

A caveat if you do use MTCopyLocalizedNameForMediaSubType: If it doesn't map to a codec, it'll return the codec, converted from the fourchar into a CFString. Make sure you catch that.
A lot of video codec fourchars can be found in CoreMedia/CMFormatDescription.h, with audio codecs in CoreAudioTypes/CoreAudioBaseTypes.h (the audio codecs' header has been moved recently).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions