[Asterisk-code-review] stream: Add media stream topology definition and API (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Mon Feb 13 05:32:18 CST 2017
Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/4922 )
Change subject: stream: Add media stream topology definition and API
......................................................................
Patch Set 4: Code-Review-1
(3 comments)
https://gerrit.asterisk.org/#/c/4922/4/main/stream.c
File main/stream.c:
PS4, Line 66: /*!
: * \brief A vector of all the streams in this topology
: */
: AST_VECTOR(, struct ast_stream *) streams;
Indentation seems off here.
Line 128: return stream ? stream->type : AST_MEDIA_TYPE_UNKNOWN;
I don't think using UNKNOWN as a return value for both get_type and get_state is inaccurate. If no stream is passed in, it's an error. The type or state isn't unknown.
PS4, Line 277: static char *type_names[] = {
: "AST_MEDIA_TYPE_UNKNOWN",
: "AST_MEDIA_TYPE_AUDIO",
: "AST_MEDIA_TYPE_VIDEO",
: "AST_MEDIA_TYPE_IMAGE",
: "AST_MEDIA_TYPE_TEXT"
: };
There is already a function for taking a media type and giving its name:
ast_codec_media_type2str
--
To view, visit https://gerrit.asterisk.org/4922
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic930232d24d5ad66dcabc14e9b359e0ff8e7f568
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list