summaryrefslogtreecommitdiff
path: root/modules/vpx/vpx.c
blob: 0c17caa88dc46f307ac8f136b94107f50bf3dc9e (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 vpx.c  VP8 video codec
 *
 * Copyright (C) 2010 Creytiv.com
 */
#include <string.h>
#include <re.h>
#include <rem.h>
#include <baresip.h>
#define VPX_CODEC_DISABLE_COMPAT 1
#define VPX_DISABLE_CTRL_TYPECHECKS 1
#include <vpx/vpx_encoder.h>
#include <vpx/vpx_decoder.h>
#include <vpx/vp8cx.h>
#include <vpx/vp8dx.h>
#include "vp8.h"


/**
 * @defgroup vpx vpx
 *
 * The VP8 video codec
 *
 * This module implements the VP8 video codec that is compatible
 * with the WebRTC standard.
 *
 * References:
 *
 *     http://www.webmproject.org/
 *
 *     https://tools.ietf.org/html/rfc7741
 */


static struct vp8_vidcodec vpx = {
	.vc = {
		.name      = "VP8",
		.encupdh   = vp8_encode_update,
		.ench      = vp8_encode,
		.decupdh   = vp8_decode_update,
		.dech      = vp8_decode,
		.fmtp_ench = vp8_fmtp_enc,
	},
	.max_fs = 3600
};


static int module_init(void)
{
	vidcodec_register((struct vidcodec *)&vpx);
	return 0;
}


static int module_close(void)
{
	vidcodec_unregister((struct vidcodec *)&vpx);
	return 0;
}


EXPORT_SYM const struct mod_export DECL_EXPORTS(vpx) = {
	"vpx",
	"codec",
	module_init,
	module_close
};