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