1 /**
2 * @file h265.c H.265 Video Codec
3 *
4 * Copyright (C) 2010 Creytiv.com
5 */
6
7 #include <re.h>
8 #include <baresip.h>
9 #include <libavcodec/avcodec.h>
10 #include <x265.h>
11 #include "h265.h"
12
13
14 /**
15 * @defgroup h265 h265
16 *
17 * The H.265 video codec (aka HEVC)
18 *
19 * This is an experimental module adding support for H.265 video codec.
20 * The encoder is using x265 and the decoder is using libavcodec.
21 *
22 *
23 * References:
24 *
25 * https://tools.ietf.org/html/rfc7798
26 * http://x265.org/
27 * https://www.ffmpeg.org/
28 */
29
30
31 static struct vidcodec h265 = {
32 .name = "H265",
33 .fmtp = "profile-id=1",
34 .encupdh = h265_encode_update,
35 .ench = h265_encode,
36 .decupdh = h265_decode_update,
37 .dech = h265_decode,
38 };
39
40
module_init(void)41 static int module_init(void)
42 {
43 info("h265: using x265 %s %s\n",
44 x265_version_str, x265_build_info_str);
45
46 avcodec_register_all();
47
48 vidcodec_register(baresip_vidcodecl(), &h265);
49
50 return 0;
51 }
52
53
module_close(void)54 static int module_close(void)
55 {
56 vidcodec_unregister(&h265);
57
58 return 0;
59 }
60
61
62 EXPORT_SYM const struct mod_export DECL_EXPORTS(h265) = {
63 "h265",
64 "vidcodec",
65 module_init,
66 module_close,
67 };
68