I need to get codec information when using libvlc to play remote media. Since the VLC player can achieve this(see the screenshot below), libvlc may well be able to do it too.
Also, I find that libvlc_media_tracks_get can return a related struct as follows:
typedef struct libvlc_media_track_t
{
/* Codec fourcc */
uint32_t i_codec;
uint32_t i_original_fourcc;
int i_id;
libvlc_track_type_t i_type;
/* Codec specific */
int i_profile;
int i_level;
union {
libvlc_audio_track_t *audio;
libvlc_video_track_t *video;
libvlc_subtitle_track_t *subtitle;
};
unsigned int i_bitrate;
char *psz_language;
char *psz_description;
} libvlc_media_track_t;
Maybe the member i_codec
stores such information, but it's not human-readable and I don't know the meaning of a specific value. Probably there is a map between them and I haven't found it yet.