[Asterisk-code-review] Add the ability to read the media file type from HTTP header... (asterisk[15])

Gaurav Khurana asteriskteam at digium.com
Wed Feb 14 16:22:07 CST 2018


Gaurav Khurana has posted comments on this change. ( https://gerrit.asterisk.org/8209 )

Change subject: Add the ability to read the media file type from HTTP header for playback
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.asterisk.org/#/c/8209/4/include/asterisk/mod_format.h
File include/asterisk/mod_format.h:

https://gerrit.asterisk.org/#/c/8209/4/include/asterisk/mod_format.h@47
PS4, Line 47: 	char mime_types[80]; /*!< MIME Types related to the format (separated by | if more than one)*/
> Is 80 bytes enough? Do we maybe want to use a list here instead of the pipe
Some kinda delimiter will be needed to support cases like : https://gerrit.asterisk.org/#/c/8209/4/formats/format_wav.c. So, following "exts", a '|' delimited string seems right.

Length : Thinking again about it, I think 80 should practically be enough, but it leaves room for a crash. How about making it 256? 160 could work too but 256 should cover us pretty well.


https://gerrit.asterisk.org/#/c/8209/4/main/file.c
File main/file.c:

https://gerrit.asterisk.org/#/c/8209/4/main/file.c@1950
PS4, Line 1950: 			if (exts) {
> If 'exts' is NULL this function will do nothing and only ever return 0.
Not sure I get your suggestion here. 
If 'exts' came in as null then this function will return 1. Receiving a 1 in the invoker function - "bucket_file_update_path", it will use the extension via "ext = strrchr(ast_sorcery_object_get_id(bucket_file), '.')



-- 
To view, visit https://gerrit.asterisk.org/8209
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: comment
Gerrit-Change-Id: I1b14692a49b2c1ac67688f58757184122e92ba89
Gerrit-Change-Number: 8209
Gerrit-PatchSet: 4
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Gaurav Khurana <gkhurana at godaddy.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Wed, 14 Feb 2018 22:22:07 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180214/ea9a9efc/attachment.html>


More information about the asterisk-code-review mailing list