/* Give the frame to the hardware transcoder... */
res = write(ztp->fd, f->data, f->datalen);
if (-1 == res) {
- ast_log(LOG_ERROR, "Failed to write to /dev/dahdi/transcode: %s\n", strerror(errno));
+ ast_log(LOG_ERROR, "Failed to write to transcoder: %s\n", strerror(errno));
}
if (f->datalen != res) {
ast_log(LOG_ERROR, "Requested write of %d bytes, but only wrote %d bytes.\n", f->datalen, res);
/* Nothing waiting... */
return NULL;
} else {
- ast_log(LOG_ERROR, "Failed to read from /dev/dahdi/transcode: %s\n", strerror(errno));
+ ast_log(LOG_ERROR, "Failed to read from transcoder: %s\n", strerror(errno));
return NULL;
}
} else {
struct pvt *ztp = pvt->pvt;
int flags;
+#ifdef HAVE_ZAPTEL
+ if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0) {
+ ast_log(LOG_ERROR, "Failed to open /dev/zap/transcode: %s\n", strerror(errno));
+ return -1;
+ }
+#else
if ((fd = open("/dev/dahdi/transcode", O_RDWR)) < 0) {
ast_log(LOG_ERROR, "Failed to open /dev/dahdi/transcode: %s\n", strerror(errno));
return -1;
}
+#endif
ztp->fmts.srcfmt = (1 << source);
ztp->fmts.dstfmt = (1 << dest);
int fd, res;
unsigned int x, y;
+#ifdef HAVE_ZAPTEL
+ if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0) {
+ ast_log(LOG_ERROR, "Failed to open /dev/zap/transcode: %s\n", strerror(errno));
+ return 0;
+ }
+#else
if ((fd = open("/dev/dahdi/transcode", O_RDWR)) < 0) {
ast_log(LOG_ERROR, "Failed to open /dev/dahdi/transcode: %s\n", strerror(errno));
return 0;
}
+#endif
for (info.tcnum = 0; !(res = ioctl(fd, DAHDI_TC_GETINFO, &info)); info.tcnum++) {
if (option_verbose > 1)