Merge remote-tracking branch 'origin/asterisk-13.3' into asterisk-13.7
Alexander Traud
7 years ago
4 | 4 |
* [Asterisk 11](https://github.com/seanbright/asterisk-opus/tree/asterisk-11)
|
5 | 5 |
* [Asterisk 12](https://github.com/seanbright/asterisk-opus/tree/asterisk-12)
|
6 | 6 |
|
7 | |
Since Opus and VP8 cannot, as of now, be integrated into the main Asterisk repositories (learn why [in this thread](http://lists.digium.com/pipermail/asterisk-dev/2013-May/060356.html)), we prepared a patch that adds support for both codecs (Opus transcoding, VP8 passthrough) to [Asterisk 13 SVN](http://svn.digium.com/view/asterisk/branches/13/):
|
|
7 |
Since Opus and VP8 cannot, as of now, be integrated into the main Asterisk repositories (learn why [in this thread](http://lists.digium.com/pipermail/asterisk-dev/2013-May/060356.html)), we prepared a patch that adds support for both codecs (Opus transcoding, VP8 passthrough) to [Asterisk 13 from Git](https://github.com/asterisk/asterisk):
|
8 | 8 |
|
9 | |
svn checkout http://svn.digium.com/svn/asterisk/branches/13/ asterisk-13-svn
|
|
9 |
git clone -b 13 https://github.com/asterisk/asterisk.git asterisk-13-git
|
10 | 10 |
|
11 | 11 |
## Installing the patch
|
12 | 12 |
To support Opus, you'll need to install [libopus](http://www.opus-codec.org/downloads/) first. No library is needed for VP8, as its support is passthrough only.
|
13 | 13 |
|
14 | |
The patch was built on top of Asterisk 13 SVN r431089: applying it on different versions may or may not work out of the box, but solving conflicts shouldn't be too hard anyway:
|
|
14 |
The patch was built on top of Asterisk 13 from Git: applying it on different versions may or may not work out of the box, but solving conflicts shouldn't be too hard anyway:
|
15 | 15 |
|
16 | |
cd asterisk-13-svn
|
|
16 |
cd asterisk-13-git
|
17 | 17 |
cp /path/to/asterisk-opus/codecs/* codecs/
|
18 | 18 |
cp /path/to/asterisk-opus/formats/* formats/
|
19 | 19 |
patch -p1 < /path/to/asterisk-opus/asterisk.patch
|
525 | 525 |
|
526 | 526 |
/* Translators */
|
527 | 527 |
static struct ast_translator opustolin = {
|
|
528 |
.table_cost = AST_TRANS_COST_LY_LL_ORIGSAMP,
|
528 | 529 |
.name = "opustolin",
|
529 | 530 |
.src_codec = {
|
530 | 531 |
.name = "opus",
|
|
548 | 549 |
};
|
549 | 550 |
|
550 | 551 |
static struct ast_translator lintoopus = {
|
|
552 |
.table_cost = AST_TRANS_COST_LL_LY_ORIGSAMP,
|
551 | 553 |
.name = "lintoopus",
|
552 | 554 |
.src_codec = {
|
553 | 555 |
.name = "slin",
|
|
571 | 573 |
};
|
572 | 574 |
|
573 | 575 |
static struct ast_translator opustolin12 = {
|
|
576 |
.table_cost = AST_TRANS_COST_LY_LL_ORIGSAMP - 1,
|
574 | 577 |
.name = "opustolin12",
|
575 | 578 |
.src_codec = {
|
576 | 579 |
.name = "opus",
|
|
594 | 597 |
};
|
595 | 598 |
|
596 | 599 |
static struct ast_translator lin12toopus = {
|
|
600 |
.table_cost = AST_TRANS_COST_LL_LY_ORIGSAMP - 1,
|
597 | 601 |
.name = "lin12toopus",
|
598 | 602 |
.src_codec = {
|
599 | 603 |
.name = "slin",
|
|
616 | 620 |
};
|
617 | 621 |
|
618 | 622 |
static struct ast_translator opustolin16 = {
|
|
623 |
.table_cost = AST_TRANS_COST_LY_LL_ORIGSAMP - 2,
|
619 | 624 |
.name = "opustolin16",
|
620 | 625 |
.src_codec = {
|
621 | 626 |
.name = "opus",
|
|
639 | 644 |
};
|
640 | 645 |
|
641 | 646 |
static struct ast_translator lin16toopus = {
|
|
647 |
.table_cost = AST_TRANS_COST_LL_LY_ORIGSAMP - 2,
|
642 | 648 |
.name = "lin16toopus",
|
643 | 649 |
.src_codec = {
|
644 | 650 |
.name = "slin",
|
|
662 | 668 |
};
|
663 | 669 |
|
664 | 670 |
static struct ast_translator opustolin24 = {
|
|
671 |
.table_cost = AST_TRANS_COST_LY_LL_ORIGSAMP - 4,
|
665 | 672 |
.name = "opustolin24",
|
666 | 673 |
.src_codec = {
|
667 | 674 |
.name = "opus",
|
|
685 | 692 |
};
|
686 | 693 |
|
687 | 694 |
static struct ast_translator lin24toopus = {
|
|
695 |
.table_cost = AST_TRANS_COST_LL_LY_ORIGSAMP - 4,
|
688 | 696 |
.name = "lin24toopus",
|
689 | 697 |
.src_codec = {
|
690 | 698 |
.name = "slin",
|
|
707 | 715 |
};
|
708 | 716 |
|
709 | 717 |
static struct ast_translator opustolin48 = {
|
|
718 |
.table_cost = AST_TRANS_COST_LY_LL_ORIGSAMP - 8,
|
710 | 719 |
.name = "opustolin48",
|
711 | 720 |
.src_codec = {
|
712 | 721 |
.name = "opus",
|
|
730 | 739 |
};
|
731 | 740 |
|
732 | 741 |
static struct ast_translator lin48toopus = {
|
|
742 |
.table_cost = AST_TRANS_COST_LL_LY_ORIGSAMP - 8,
|
733 | 743 |
.name = "lin48toopus",
|
734 | 744 |
.src_codec = {
|
735 | 745 |
.name = "slin",
|