core: Add H.265/HEVC passthrough support

This change adds H.265/HEVC as a known codec and creates a cached
"h265" media format for use.

Note that RFC 7798 section 7.2 also describes additional SDP
parameters. Handling of these is not yet supported.

ASTERISK-28512

Change-Id: I26d262cc4110b4f7e99348a3ddc53bad0d2cd1f2
This commit is contained in:
Florian Floimair
2019-08-22 14:44:07 +02:00
parent 23882ddb3e
commit f85631cf82
6 changed files with 30 additions and 0 deletions

View File

@@ -180,6 +180,11 @@ struct ast_format *ast_format_h263p;
*/
struct ast_format *ast_format_h264;
/*!
* \brief Built-in cached h265 format.
*/
struct ast_format *ast_format_h265;
/*!
* \brief Built-in cached mp4 format.
*/
@@ -348,6 +353,7 @@ static void format_cache_shutdown(void)
ao2_replace(ast_format_h263, NULL);
ao2_replace(ast_format_h263p, NULL);
ao2_replace(ast_format_h264, NULL);
ao2_replace(ast_format_h265, NULL);
ao2_replace(ast_format_mp4, NULL);
ao2_replace(ast_format_vp8, NULL);
ao2_replace(ast_format_vp9, NULL);
@@ -446,6 +452,8 @@ static void set_cached_format(const char *name, struct ast_format *format)
ao2_replace(ast_format_h263p, format);
} else if (!strcmp(name, "h264")) {
ao2_replace(ast_format_h264, format);
} else if (!strcmp(name, "h265")) {
ao2_replace(ast_format_h265, format);
} else if (!strcmp(name, "mpeg4")) {
ao2_replace(ast_format_mp4, format);
} else if (!strcmp(name, "vp8")) {