[calls] media-codecs: Add codec availability check to public API
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] media-codecs: Add codec availability check to public API
- Date: Tue, 21 Dec 2021 14:33:07 +0000 (UTC)
commit 27463212d9a56f3551cbdee361656b563f14d896
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Thu Nov 25 03:31:44 2021 +0100
media-codecs: Add codec availability check to public API
This will be useful for building a list of preferred audio codecs.
plugins/sip/gst-rfc3551.c | 8 +++++++-
plugins/sip/gst-rfc3551.h | 1 +
2 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/plugins/sip/gst-rfc3551.c b/plugins/sip/gst-rfc3551.c
index 634c0340..cd022b47 100644
--- a/plugins/sip/gst-rfc3551.c
+++ b/plugins/sip/gst-rfc3551.c
@@ -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 ();
diff --git a/plugins/sip/gst-rfc3551.h b/plugins/sip/gst-rfc3551.h
index 7b77ab60..8c53f15f 100644
--- a/plugins/sip/gst-rfc3551.h
+++ b/plugins/sip/gst-rfc3551.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]