summaryrefslogtreecommitdiff
path: root/main/file.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-02-24 00:32:20 +0000
committerTerry Wilson <twilson@digium.com>2012-02-24 00:32:20 +0000
commitebaf59a656ef94e19332c08e0d0562b8cbe59f65 (patch)
tree6e75fd13924808bddacc18e14d5e02975a322481 /main/file.c
parent235f88d12270b328ad466889189400666b3e56c1 (diff)
Opaquification for ast_format structs in struct ast_channel
Review: https://reviewboard.asterisk.org/r/1770/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/file.c')
-rw-r--r--main/file.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/file.c b/main/file.c
index 5341e8f18..bf9f6831a 100644
--- a/main/file.c
+++ b/main/file.c
@@ -131,8 +131,8 @@ int ast_stopstream(struct ast_channel *tmp)
if (ast_channel_stream(tmp)) {
ast_closestream(ast_channel_stream(tmp));
ast_channel_stream_set(tmp, NULL);
- if (tmp->oldwriteformat.id && ast_set_write_format(tmp, &tmp->oldwriteformat))
- ast_log(LOG_WARNING, "Unable to restore format back to %s\n", ast_getformatname(&tmp->oldwriteformat));
+ if (ast_channel_oldwriteformat(tmp)->id && ast_set_write_format(tmp, ast_channel_oldwriteformat(tmp)))
+ ast_log(LOG_WARNING, "Unable to restore format back to %s\n", ast_getformatname(ast_channel_oldwriteformat(tmp)));
}
/* Stop the video stream too */
if (ast_channel_vstream(tmp) != NULL) {
@@ -467,7 +467,7 @@ static int filehelper(const char *filename, const void *arg2, const char *fmt, c
FILE *bfile;
struct ast_filestream *s;
- if ((ast_format_cmp(&chan->writeformat, &f->format) == AST_FORMAT_CMP_NOT_EQUAL) &&
+ if ((ast_format_cmp(ast_channel_writeformat(chan), &f->format) == AST_FORMAT_CMP_NOT_EQUAL) &&
!(((AST_FORMAT_GET_TYPE(f->format.id) == AST_FORMAT_TYPE_AUDIO) && fmt) ||
((AST_FORMAT_GET_TYPE(f->format.id) == AST_FORMAT_TYPE_VIDEO) && fmt))) {
ast_free(fn);
@@ -701,7 +701,7 @@ struct ast_filestream *ast_openstream_full(struct ast_channel *chan, const char
}
/* Set the channel to a format we can work with and save off the previous format. */
- ast_format_copy(&chan->oldwriteformat, &chan->writeformat);
+ ast_format_copy(ast_channel_oldwriteformat(chan), ast_channel_writeformat(chan));
/* Set the channel to the best format that exists for the file. */
res = ast_set_write_format_from_cap(chan, file_fmt_cap);
/* don't need this anymore now that the channel's write format is set. */
@@ -1049,7 +1049,7 @@ int ast_streamfile(struct ast_channel *chan, const char *filename, const char *p
res = ast_playstream(fs);
if (!res && vfs)
res = ast_playstream(vfs);
- ast_verb(3, "<%s> Playing '%s.%s' (language '%s')\n", ast_channel_name(chan), filename, ast_getformatname(&chan->writeformat), preflang ? preflang : "default");
+ ast_verb(3, "<%s> Playing '%s.%s' (language '%s')\n", ast_channel_name(chan), filename, ast_getformatname(ast_channel_writeformat(chan)), preflang ? preflang : "default");
return res;
}