[Toxine-cvs] CVS: toxine/src xine_commands.c,1.36,1.37 xine_commands.h,1.22,1.23
Brought to you by:
f1rmb
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-19 11:40:50
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv27747 Modified Files: xine_commands.c xine_commands.h Log Message: @@cleanup continue Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- xine_commands.c 19 Jan 2003 11:25:18 -0000 1.36 +++ xine_commands.c 19 Jan 2003 11:40:47 -0000 1.37 @@ -416,9 +416,9 @@ pinfo("Exiting old xine instance\n"); if(tox->xine_state & XINE_STREAM) { xine_close(tox->stream); - tox->xine_state |= ~XINE_OPEN; + tox->xine_state &= ~XINE_OPEN; xine_dispose(tox->stream); - tox->xine_state |= ~XINE_STREAM; + tox->xine_state &= ~XINE_STREAM; } xine_exit(tox->xine); //_xine_exit(NULL, tox, NULL); @@ -443,7 +443,7 @@ perr("Choose and initialise a video driver first\n"); return; } - if(tox->stream != NULL) { + if(tox->xine_state & XINE_STREAM) { perr("Stream is already created, use xine_dispose() in order to create a new one\n"); return; } @@ -1871,6 +1871,25 @@ pinfo(".\n"); } } +} + +void _xine_close(commands_t *command, toxine_t *tox, void *data) { + return_if_no_stream(tox); + + pinfo("xine_close():"); + xine_close(tox->stream); + tox->xine_state &= ~XINE_OPEN; + pinfo("\n"); +} + +void _xine_dispose(commands_t *command, toxine_t *tox, void *data) { + return_if_no_stream(tox); + + pinfo("xine_dispose():"); + xine_dispose(tox->stream); + tox->stream = NULL; + tox->xine_state &= ~(XINE_OPEN | XINE_STREAM); + pinfo("\n"); } /* Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- xine_commands.h 19 Jan 2003 11:25:18 -0000 1.22 +++ xine_commands.h 19 Jan 2003 11:40:47 -0000 1.23 @@ -63,12 +63,12 @@ void _xine_get_version(commands_t *, toxine_t *, void *); void _xine_get_version_string(commands_t *, toxine_t *, void *); void _xine_check_version(commands_t *, toxine_t *, void *); +void _xine_close(commands_t *, toxine_t *, void *); +void _xine_dispose(commands_t *, toxine_t *, void *); /* void _xine_stream_master_slave(...) - void xine_close(...) - void xine_dispose(...) void xine_get_current_frame(...) void xine_get_file_extensions(...) void xine_get_mime_types(...) @@ -241,7 +241,7 @@ }, \ { "xine_exit", NO_ARGS, _xine_exit, \ "Deinitialize xine engine.xine_exit", \ - NULL \ + "xine_exit" \ }, \ { "xine_get_error", NO_ARGS, _xine_get_error, \ "get error", \ @@ -413,6 +413,14 @@ { "xine_check_version", REQUIRE_ARGS, _xine_check_version, \ "Compare version numbers with xine installed version.", \ "xine_check_version <major>.<minor>.<sub>" \ + }, \ + { "xine_close", NO_ARGS, _xine_close, \ + "Close current stream.", \ + "xine_close" \ + }, \ + { "xine_dispose", NO_ARGS, _xine_dispose, \ + "Dispose all stream related resources.", \ + "xine_dispose" \ }, \ { "xine_usec_sleep", REQUIRE_ARGS, _xine_usec_sleep, \ "Sleep some µ seconds", \ |