[Asterisk-code-review] translate.c: Prefer better codecs upon translate ties. (asterisk[master])

N A asteriskteam at digium.com
Sat Oct 1 18:14:00 CDT 2022


Attention is currently required from: Joshua Colp, Kevin Harwell.

N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15953 )

Change subject: translate.c: Prefer better codecs upon translate ties.
......................................................................


Patch Set 4:

(2 comments)

File include/asterisk/translate.h:

https://gerrit.asterisk.org/c/asterisk/+/15953/comment/1a773522_2a34ce3b 
PS1, Line 285: /*! \brief Determine which protocol is higher quality
             :  *
             :  * Given two codec identifiers, is the first codec strictly superior to the second?
             :  *
             :  * \param codec identifier A
             :  * \param codec identifier B
             :  * \return Returns 1 if codec A is positively superior to B, 0 otherwise.
             :  */
             : int ast_translator_better_quality(int c1, int c2);
> Since this function deals with choosing the best codec supplied by given formats I'd move this funct […]
Ack


File main/translate.c:

https://gerrit.asterisk.org/c/asterisk/+/15953/comment/17e34330_b9203f30 
PS2, Line 1385: int ast_translator_better_quality(struct ast_format *src, struct ast_format *best) {
> I don't think this should be accepted as implemented. […]
Done:

[Oct  1 19:02:53]     -- Executing [s at c2:2] Playback("Local/s at c1-0000000b;1", "digits/4") in new stack
[Oct  1 19:02:53] DEBUG[898359][C-00000006]: translate.c:1491 ast_translator_best_choice: Tiebreaker: preferring format ulaw (100) to gsm (60)
[Oct  1 19:02:53] DEBUG[898359][C-00000006]: channel.c:5824 set_format: Channel Local/s at c1-0000000b;1 setting write format path: ulaw -> slin192
[Oct  1 19:02:53] DEBUG[898359][C-00000006]: channel.c:3207 ast_settimeout_full: Scheduling timer at (50 requested / 50 actual) timer ticks per second
[Oct  1 19:02:53]     -- <Local/s at c1-0000000b;1> Playing 'digits/4.ulaw' (language 'en')



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15953
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I4b7297e1baca7aac14fe4a3c7538e18e2dbe9fd6
Gerrit-Change-Number: 15953
Gerrit-PatchSet: 4
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <default.enum at gmail.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Kevin Harwell <default.enum at gmail.com>
Gerrit-Comment-Date: Sat, 01 Oct 2022 23:14:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Comment-In-Reply-To: Kevin Harwell <default.enum at gmail.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20221001/d36c59a7/attachment-0001.html>


More information about the asterisk-code-review mailing list