media-codecs: Add codec availability check to public API
This will be useful for building a list of preferred audio codecs.
This commit is contained in:
@@ -39,7 +39,13 @@ static MediaCodecInfo gst_codecs[] = {
|
||||
};
|
||||
|
||||
|
||||
static gboolean
|
||||
/**
|
||||
* media_codec_available_in_gst:
|
||||
* @codec: A #MediaCodecInfo
|
||||
*
|
||||
* Returns: %TRUE if codec is available on your system, %FALSE otherwise
|
||||
*/
|
||||
gboolean
|
||||
media_codec_available_in_gst (MediaCodecInfo *codec) {
|
||||
gboolean available = FALSE;
|
||||
GstRegistry *registry = gst_registry_get ();
|
||||
|
@@ -44,6 +44,7 @@ typedef struct {
|
||||
} MediaCodecInfo;
|
||||
|
||||
|
||||
gboolean media_codec_available_in_gst (MediaCodecInfo *codec);
|
||||
MediaCodecInfo* media_codec_by_name (const char *name);
|
||||
MediaCodecInfo* media_codec_by_payload_id (uint payload_id);
|
||||
gchar* media_codec_get_gst_capabilities (MediaCodecInfo *codec);
|
||||
|
Reference in New Issue
Block a user