diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-06 22:11:43 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-06 22:11:43 +0000 |
commit | 8b1f06abb435a2aa00d7b5d1e8dd1588bf895483 (patch) | |
tree | 8220ad163713cb38240eb18c24be25aa88b28865 /formats/format_g723.c | |
parent | 12b57158d66873fd353d3ae66662e205bd96debb (diff) |
Version 0.3.0 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@608 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats/format_g723.c')
-rwxr-xr-x | formats/format_g723.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/formats/format_g723.c b/formats/format_g723.c index 195815a46..520aeb7ef 100755 --- a/formats/format_g723.c +++ b/formats/format_g723.c @@ -150,6 +150,7 @@ static void g723_close(struct ast_filestream *s) ast_log(LOG_WARNING, "Freeing a filestream we don't seem to own\n"); close(s->fd); free(s); + s = NULL; } static int ast_read_callback(void *data) @@ -199,7 +200,7 @@ static int ast_read_callback(void *data) else s->fr->timelen = delay; #else - s->fr->timelen = 30; + s->fr->samples = 240; #endif /* Unless there is no delay, we're going to exit out as soon as we have processed the current frame. */ @@ -229,9 +230,14 @@ static int ast_read_callback(void *data) static int g723_apply(struct ast_channel *c, struct ast_filestream *s) { - u_int32_t delay; /* Select our owner for this stream, and get the ball rolling. */ s->owner = c; + return 0; +} + +static int g723_play(struct ast_filestream *s) +{ + u_int32_t delay; /* Read and ignore the first delay */ if (read(s->fd, &delay, 4) != 4) { /* Empty file */ @@ -296,6 +302,21 @@ static int g723_write(struct ast_filestream *fs, struct ast_frame *f) return 0; } +static int g723_seek(struct ast_filestream *fs, long sample_offset, int whence) +{ + return -1; +} + +static int g723_trunc(struct ast_filestream *fs) +{ + return -1; +} + +static long g723_tell(struct ast_filestream *fs) +{ + return -1; +} + static char *g723_getcomment(struct ast_filestream *s) { return NULL; @@ -307,7 +328,11 @@ int load_module() g723_open, g723_rewrite, g723_apply, + g723_play, g723_write, + g723_seek, + g723_trunc, + g723_tell, g723_read, g723_close, g723_getcomment); |