[Toxine-cvs] CVS: toxine/src commands.c,1.48,1.49 xine_commands.c,1.32,1.33
Brought to you by:
f1rmb
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-18 17:23:36
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv23203 Modified Files: commands.c xine_commands.c Log Message: @@more port Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- commands.c 18 Jan 2003 16:59:04 -0000 1.48 +++ commands.c 18 Jan 2003 17:23:28 -0000 1.49 @@ -959,7 +959,7 @@ if(tox->autoinit) { _xine_init(NULL, tox, NULL); - //stream new + _xine_stream_new(NULL, tox, NULL); } if(tox->script.in_use) { Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- xine_commands.c 18 Jan 2003 17:01:26 -0000 1.32 +++ xine_commands.c 18 Jan 2003 17:23:29 -0000 1.33 @@ -530,8 +530,8 @@ if(!toxine_audio_out_init(tox)) perr("unable to initialize audio driver, audio output disabled.\n"); - tox->audio.mixer.enable = 0; - tox->audio.mixer.caps = 0; + tox->audio.mixer.enable = 1; + tox->audio.mixer.caps = 1; /* if(xine_get_param(tox->xine, XINE_PARAM_AO_MIXER_VOL)) tox->audio.mixer.caps |= XINE_PARAM_AO_MIXER_VOL; @@ -564,7 +564,7 @@ void _xine_open(commands_t *command, toxine_t *tox, void *data) { const char *mrl; - return_if_no_init(tox); + return_if_no_stream(tox); mrl = toxine_get_arg(tox, 1); if(mrl) { @@ -592,7 +592,7 @@ int need_open = 1; // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); /* Don't take care about arguments */ if(data) @@ -725,6 +725,9 @@ if(!tox->current_mrl && mrl) tox->current_mrl = strdup(mrl); + if(time) + time *= 1000; + if(need_open) { pinfo("xine_open(%s) && xine_play(%d, %d)\n", mrl, start, time); if((!xine_open(tox->stream, mrl)) || (!xine_play(tox->stream, start, time))) @@ -749,7 +752,7 @@ void _xine_trick_mode(commands_t *command, toxine_t *tox, void *data) { int nargs; - return_if_no_init(tox); + return_if_no_stream(tox); if((nargs = toxine_is_args(tox)) == 2) { int i, trick_mode = -1; @@ -781,7 +784,7 @@ void _xine_get_stream_info(commands_t *command, toxine_t *tox, void *data) { int nargs; - return_if_no_init(tox); + return_if_no_stream(tox); nargs = toxine_is_args(tox); if(nargs) { @@ -826,7 +829,7 @@ */ void _xine_stop(commands_t *command, toxine_t *tox, void *data) { // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); pinfo("xine_stop()\n"); tox->ignore_finished = 1; xine_stop(tox->stream); @@ -840,7 +843,7 @@ int retval; // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); pinfo("xine_eject():\n"); retval = xine_eject(tox->stream); @@ -884,7 +887,8 @@ int xine_errno; char buffer[2048]; - return_if_no_init(tox); + return_if_no_stream(tox); + pinfo("xine_get_error():\n"); xine_errno = xine_get_error(tox->stream); @@ -918,7 +922,7 @@ int i, found = 0, status; // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); pinfo("xine_get_status():\n"); status = xine_get_status(tox->stream); @@ -940,7 +944,8 @@ */ void _xine_set_param(commands_t *command, toxine_t *tox, void *data) { - return_if_no_init(tox); + return_if_no_stream(tox); + if((toxine_is_args(tox)) >= 2) { const char *param; const char *svalue; @@ -1040,7 +1045,7 @@ const char *param; int i, found = -1; - return_if_no_init(tox); + return_if_no_stream(tox); param = toxine_get_arg(tox, 1); for(i = 0; xine_params[i].name != NULL; i++) { @@ -1165,7 +1170,7 @@ int channel; int ret; - return_if_no_init(tox); + return_if_no_stream(tox); #warning OPTIONAL channel if(toxine_is_args(tox)) @@ -1189,7 +1194,8 @@ int channel; int ret; - return_if_no_init(tox); + return_if_no_stream(tox); + #warning OPTIONAL channel if(toxine_is_args(tox)) channel = atoi(((char *)toxine_get_arg(tox, 1))); @@ -1212,8 +1218,7 @@ int result, stream, time, length; int stime, slength; - return_if_no_init(tox); - return_if_no_open(tox); + return_if_no_stream(tox); pinfo("xine_get_pos_length():\n"); result = xine_get_pos_length (tox->stream, &stream, &time, &length); @@ -1370,7 +1375,7 @@ const char *const *inpp; // toxine_unset_last_result(tox); - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_get_browsable_input_plugin_ids():\n"); inpp = xine_get_browsable_input_plugin_ids(tox->xine); @@ -1489,7 +1494,7 @@ // toxine_unset_last_result(tox); #warning CHECKME; - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_get_autoplay_input_plugin_ids():\n"); inpp = xine_get_autoplay_input_plugin_ids(tox->xine); @@ -1556,7 +1561,7 @@ void _xine_get_input_plugin_description(commands_t *command, toxine_t *tox, void *data) { // toxine_unset_last_result(tox); - return_if_no_new(tox); + return_if_no_init(tox); if(toxine_is_args(tox)) { const char *ipd; @@ -1585,7 +1590,7 @@ char buffer[4096]; // toxine_unset_last_result(tox); - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_list_audio_output_plugins():\n"); aop = xine_list_audio_output_plugins(tox->xine); @@ -1621,7 +1626,7 @@ char buffer[4096]; // toxine_unset_last_result(tox); - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_list_video_output_plugins():\n"); vop = xine_list_video_output_plugins(tox->xine); if(vop) { @@ -1655,7 +1660,7 @@ int alias_event = (int) data; // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); if((toxine_is_args(tox)) || (alias_event > 0)) { const char *event_name = NULL; @@ -1699,7 +1704,7 @@ void _xine_config_get_first_entry(commands_t *command, toxine_t *tox, void *data) { xine_cfg_entry_t cfg_entry; - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_config_get_first_entry():\n"); if((xine_config_get_first_entry(tox->xine, &cfg_entry))) @@ -1712,7 +1717,7 @@ void _xine_config_get_next_entry(commands_t *command, toxine_t *tox, void *data) { xine_cfg_entry_t cfg_entry; - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_config_get_next_entry():\n"); if((xine_config_get_next_entry(tox->xine, &cfg_entry))) @@ -1726,7 +1731,7 @@ const char *key; xine_cfg_entry_t cfg_entry; - return_if_no_new(tox); + return_if_no_init(tox); key = toxine_get_arg(tox, 1); pinfo("xine_config_lookup_entry(%s)\n", key); @@ -1742,7 +1747,7 @@ int value; xine_cfg_entry_t cfg_entry; - return_if_no_new(tox); + return_if_no_init(tox); if(toxine_is_args(tox) >= 2) { const char *svalue; @@ -1816,7 +1821,7 @@ void _xine_config_save(commands_t *command, toxine_t *tox, void *data) { const char *filename = NULL; - return_if_no_new(tox); + return_if_no_init(tox); if(toxine_is_args(tox)) filename = toxine_get_arg(tox, 1); @@ -1828,7 +1833,7 @@ pinfo("\n"); } void _xine_config_reset(commands_t *command, toxine_t *tox, void *data) { - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_config_reset():\n"); xine_config_reset(tox->xine); |