From: Vlad S. <ser...@us...> - 2006-01-16 19:30:57
|
Update of /cvsroot/naviserver/modules/nsffmpeg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17984 Modified Files: nsffmpeg.c Log Message: connection streaming fixes Index: nsffmpeg.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsffmpeg/nsffmpeg.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nsffmpeg.c 16 Jan 2006 16:13:40 -0000 1.2 --- nsffmpeg.c 16 Jan 2006 19:30:49 -0000 1.3 *************** *** 425,430 **** }; - static int conn_timeout = 5; - NS_EXPORT int Ns_ModuleVersion = 1; --- 425,428 ---- *************** *** 554,560 **** #ifndef TCL_STANDALONE static int conn_open(URLContext *h, const char *filename, int flags) { ! h->priv_data = (void *)Ns_ConnSock(Ns_GetConn()); return 0; } --- 552,559 ---- #ifndef TCL_STANDALONE + static int conn_open(URLContext *h, const char *filename, int flags) { ! h->priv_data = (void*)Ns_GetConn(); return 0; } *************** *** 562,579 **** static int conn_read(URLContext *h, unsigned char *buf, int size) { ! int fd = (size_t)h->priv_data; ! return Ns_SockRecv(fd, buf, size, conn_timeout); } static int conn_write(URLContext *h, unsigned char *buf, int size) { ! int fd = (size_t)h->priv_data; ! return Ns_SockSend(fd, buf, size, conn_timeout); } ! static int conn_close(URLContext *h) { - int fd = (size_t)h->priv_data; - close(fd); return 0; } --- 561,575 ---- static int conn_read(URLContext *h, unsigned char *buf, int size) { ! return -1; } static int conn_write(URLContext *h, unsigned char *buf, int size) { ! Ns_Conn *conn = (Ns_Conn*)h->priv_data; ! return Ns_ConnWrite(conn, buf, size); } ! static int conn_close(URLContext *h) { return 0; } |