[Toxine-cvs] CVS: toxine/src commands.c,1.49,1.50 xine_commands.c,1.33,1.34
Brought to you by:
f1rmb
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-19 00:26:15
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv10931 Modified Files: commands.c xine_commands.c Log Message: @@more api sync Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- commands.c 18 Jan 2003 17:23:28 -0000 1.49 +++ commands.c 19 Jan 2003 00:26:12 -0000 1.50 @@ -749,6 +749,9 @@ */ int toxine_audio_out_init(toxine_t *tox) { + tox->audio.mixer.enable = 0; + tox->audio.mixer.caps = 0; + if(!tox->audio.name) { perr("no audio driver sets, no audio output.\n"); return 0; @@ -760,6 +763,8 @@ perr("xine_load_audio_output_plugin() failed to load '%s' driver.\n", tox->audio.name); return 0; } + tox->audio.mixer.enable = 1; + tox->audio.mixer.caps = 1; } return 1; Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- xine_commands.c 18 Jan 2003 17:23:29 -0000 1.33 +++ xine_commands.c 19 Jan 2003 00:26:13 -0000 1.34 @@ -52,62 +52,6 @@ { NULL , 0 } }; -/* -static struct audio_caps_s { - char *name; - uint32_t cap; -} audio_caps[] = { - { "AO_CAP_NOCAP", AO_CAP_NOCAP }, - { "AO_CAP_MODE_A52", AO_CAP_MODE_A52 }, - { "AO_CAP_MODE_AC5", AO_CAP_MODE_AC5 }, - { "AO_CAP_MODE_MONO", AO_CAP_MODE_MONO }, - { "AO_CAP_MODE_STEREO", AO_CAP_MODE_STEREO }, - { "AO_CAP_MODE_4CHANNEL", AO_CAP_MODE_4CHANNEL }, - { "AO_CAP_MODE_5CHANNEL", AO_CAP_MODE_5CHANNEL }, - { "AO_CAP_MODE_5_1CHANNEL", AO_CAP_MODE_5_1CHANNEL }, - { "AO_CAP_MIXER_VOL", AO_CAP_MIXER_VOL }, - { "AO_CAP_PCM_VOL", AO_CAP_PCM_VOL }, - { "AO_CAP_MUTE_VOL", AO_CAP_MUTE_VOL }, - { NULL, 0 } -}; - -static struct video_caps_s { - char *name; - uint32_t cap; -} video_caps[] = { - { "VO_CAP_COPIES_IMAGE", VO_CAP_COPIES_IMAGE }, - { "VO_CAP_YV12", VO_CAP_YV12 }, - { "VO_CAP_YUY2", VO_CAP_YUY2 }, - { "VO_CAP_HUE", VO_CAP_HUE }, - { "VO_CAP_SATURATION", VO_CAP_SATURATION }, - { "VO_CAP_BRIGHTNESS", VO_CAP_BRIGHTNESS }, - { "VO_CAP_CONTRAST", VO_CAP_CONTRAST }, - { "VO_CAP_COLORKEY", VO_CAP_COLORKEY }, - { "VO_CAP_AUTOPAINT_COLORKEY", VO_CAP_AUTOPAINT_COLORKEY }, - { NULL, 0 } -}; - - -static struct input_caps_s { - char *name; - uint32_t cap; -} input_caps[] = { - { "INPUT_CAP_NOCAP", INPUT_CAP_NOCAP }, - { "INPUT_CAP_SEEKABLE", INPUT_CAP_SEEKABLE }, - { "INPUT_CAP_BLOCK", INPUT_CAP_BLOCK }, - { "INPUT_CAP_AUTOPLAY", INPUT_CAP_AUTOPLAY }, - { "INPUT_CAP_GET_DIR", INPUT_CAP_GET_DIR }, - { "INPUT_CAP_BROWSABLE", INPUT_CAP_BROWSABLE }, - { "INPUT_CAP_CLUT", INPUT_CAP_CLUT }, - { "INPUT_CAP_AUDIOLANG", INPUT_CAP_AUDIOLANG }, - { "INPUT_CAP_SPULANG", INPUT_CAP_SPULANG }, - { "INPUT_CAP_VARIABLE_BITRATE", INPUT_CAP_VARIABLE_BITRATE }, - { "INPUT_CAP_PREVIEW", INPUT_CAP_PREVIEW }, - { "INPUT_CAP_CHAPTERS", INPUT_CAP_CHAPTERS }, - { NULL, 0 } -}; -*/ -#if 0 static struct video_props_s { char *name; int prop; @@ -130,7 +74,6 @@ XINE_VO_ZOOM_MIN */ }; -#endif static struct visual_types_s { char *name; @@ -287,7 +230,6 @@ { NULL , 0 } }; -#if 0 static struct xine_vo_params_s { char *name; int param; @@ -305,7 +247,6 @@ { "XINE_PARAM_VO_TVMODE" , XINE_PARAM_VO_TVMODE }, { NULL , 0 } }; -#endif static struct xine_vo_zooms_s { char *name; @@ -337,7 +278,7 @@ static void toxine_handle_xine_errors(toxine_t *tox) { int err; - return_if_no_init(tox); + return_if_no_stream(tox); err = xine_get_error(tox->stream); @@ -465,14 +406,21 @@ if(tox->xine) { pinfo("Exiting old xine instance\n"); - _xine_exit(NULL, tox, NULL); + if(tox->xine_state & XINE_STREAM) { + xine_close(tox->stream); + tox->xine_state |= ~XINE_OPEN; + xine_dispose(tox->stream); + tox->xine_state |= ~XINE_STREAM; + } + xine_exit(tox->xine); + //_xine_exit(NULL, tox, NULL); } - pinfo("xine_new():\n"); - tox->xine = xine_new(); - if(tox->xine) - tox->xine_state |= XINE_NEW; + pinfo("xine_new()"); + tox->xine = xine_new(); + pinfo("\n"); + tox->xine_state |= XINE_NEW; // toxine_set_last_int_result(tox, (int)tox->xine); pinfo("0x%x\n", (int)tox->xine); pinfo("xine_config_load()\n"); @@ -510,7 +458,6 @@ if(tox->xine_state & XINE_INIT) { perr("xine engine already initialized.\n"); -#warning FIXME return; } @@ -530,8 +477,6 @@ if(!toxine_audio_out_init(tox)) perr("unable to initialize audio driver, audio output disabled.\n"); - 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; @@ -1681,8 +1626,9 @@ xine_event_t xine_event; xine_event.type = event_type; -#warning TIME + gettimeofday(&xine_event.tv, NULL); xine_event.stream = tox->stream; + pinfo("xine_event_send(%d)\n", event_type); xine_event_send(tox->stream, &xine_event); pinfo(".\n"); |