summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libspudec/spu.c31
-rw-r--r--src/libspudec/xine_decoder.c65
-rw-r--r--src/xine-engine/load_plugins.c4
3 files changed, 49 insertions, 51 deletions
diff --git a/src/libspudec/spu.c b/src/libspudec/spu.c
index 1ab34e62c..658880f46 100644
--- a/src/libspudec/spu.c
+++ b/src/libspudec/spu.c
@@ -35,7 +35,7 @@
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: spu.c,v 1.18 2001/10/23 00:50:47 miguelfreitas Exp $
+ * $Id: spu.c,v 1.19 2001/10/23 21:51:11 jcdutton Exp $
*
*/
@@ -51,6 +51,7 @@
#include "spu.h"
#include "video_out/alphablend.h"
+#include "monitor.h"
#define LOG_DEBUG 1
@@ -76,8 +77,8 @@
/* Return value: reassembly complete = 1 */
int spu_reassembly (spu_seq_t *seq, int start, uint8_t *pkt_data, u_int pkt_len)
{
- LOG (LOG_DEBUG, "pkt_len: %d\n", pkt_len);
- LOG (LOG_DEBUG, "Reassembly: start=%d seq=%p\n", start,seq);
+ xprintf (VERBOSE|SPU, "pkt_len: %d\n", pkt_len);
+ xprintf (VERBOSE|SPU, "Reassembly: start=%d seq=%p\n", start,seq);
if (start) {
seq->seq_len = (((u_int)pkt_data[0])<<8) | pkt_data[1];
@@ -92,8 +93,8 @@ int spu_reassembly (spu_seq_t *seq, int start, uint8_t *pkt_data, u_int pkt_len)
}
seq->ra_offs = 0;
- LOG (LOG_DEBUG, "buf_len: %d\n", seq->buf_len);
- LOG (LOG_DEBUG, "cmd_off: %d\n", seq->cmd_offs);
+ xprintf (VERBOSE|SPU, "buf_len: %d\n", seq->buf_len);
+ xprintf (VERBOSE|SPU, "cmd_off: %d\n", seq->cmd_offs);
}
if (seq->ra_offs < seq->buf_len) {
@@ -140,10 +141,10 @@ void spu_do_commands(spu_state_t *state, spu_seq_t* seq, vo_overlay_t *ovl)
uint8_t *buf = state->cmd_ptr;
uint8_t *next_seq;
- LOG (LOG_DEBUG, "SPU EVENT\n");
+ xprintf (VERBOSE|SPU, "SPU EVENT\n");
state->delay = (buf[0] << 8) + buf[1];
- LOG (LOG_DEBUG, "\tdelay=%d\n",state->delay);
+ xprintf (VERBOSE|SPU, "\tdelay=%d\n",state->delay);
next_seq = seq->buf + (buf[2] << 8) + buf[3];
buf += 4;
@@ -157,13 +158,13 @@ void spu_do_commands(spu_state_t *state, spu_seq_t* seq, vo_overlay_t *ovl)
while (buf < next_seq && *buf != CMD_SPU_EOF) {
switch (*buf) {
case CMD_SPU_SHOW: /* show subpicture */
- LOG (LOG_DEBUG, "\tshow subpicture\n");
+ xprintf (VERBOSE|SPU, "\tshow subpicture\n");
state->visible = 1;
buf++;
break;
case CMD_SPU_HIDE: /* hide subpicture */
- LOG (LOG_DEBUG, "\thide subpicture\n");
+ xprintf (VERBOSE|SPU, "\thide subpicture\n");
state->visible = 2;
buf++;
break;
@@ -181,7 +182,7 @@ void spu_do_commands(spu_state_t *state, spu_seq_t* seq, vo_overlay_t *ovl)
ovl->color[2] = state->clut[clut->entry1];
ovl->color[1] = state->clut[clut->entry2];
ovl->color[0] = state->clut[clut->entry3];
- LOG (LOG_DEBUG, "\tclut [%x %x %x %x]\n",
+ xprintf (VERBOSE|SPU, "\tclut [%x %x %x %x]\n",
ovl->color[0], ovl->color[1], ovl->color[2], ovl->color[3]);
state->modified = 1;
buf += 3;
@@ -195,7 +196,7 @@ void spu_do_commands(spu_state_t *state, spu_seq_t* seq, vo_overlay_t *ovl)
ovl->trans[2] = trans->entry1;
ovl->trans[1] = trans->entry2;
ovl->trans[0] = trans->entry3;
- LOG (LOG_DEBUG, "\ttrans [%d %d %d %d]\n",
+ xprintf (VERBOSE|SPU, "\ttrans [%d %d %d %d]\n",
ovl->trans[0], ovl->trans[1], ovl->trans[2], ovl->trans[3]);
state->modified = 1;
buf += 3;
@@ -218,7 +219,7 @@ void spu_do_commands(spu_state_t *state, spu_seq_t* seq, vo_overlay_t *ovl)
ovl->clip_left = 0;
ovl->clip_right = ovl->width - 1;
- LOG (LOG_DEBUG, "\tx = %d y = %d width = %d height = %d\n",
+ xprintf (VERBOSE|SPU, "\tx = %d y = %d width = %d height = %d\n",
ovl->x, ovl->y, ovl->width, ovl->height );
state->modified = 1;
buf += 7;
@@ -227,14 +228,14 @@ void spu_do_commands(spu_state_t *state, spu_seq_t* seq, vo_overlay_t *ovl)
case CMD_SPU_SET_PXD_OFFSET: /* image top[0] field / image bottom[1] field*/
state->field_offs[0] = (((u_int)buf[1]) << 8) | buf[2];
state->field_offs[1] = (((u_int)buf[3]) << 8) | buf[4];
- LOG (LOG_DEBUG, "\toffset[0] = %d offset[1] = %d\n",
+ xprintf (VERBOSE|SPU, "\toffset[0] = %d offset[1] = %d\n",
state->field_offs[0], state->field_offs[1]);
state->modified = 1;
buf += 5;
break;
case CMD_SPU_MENU:
- LOG (LOG_DEBUG, "\tForce Display/Menu\n");
+ xprintf (VERBOSE|SPU, "\tForce Display/Menu\n");
state->menu = 1;
buf++;
break;
@@ -297,7 +298,7 @@ static int spu_next_line (vo_overlay_t *spu)
field ^= 1; // Toggle fields
if (put_y >= spu->height) {
- LOG (LOG_DEBUG, "put_y >= spu->height\n");
+ xprintf (VERBOSE|SPU, "put_y >= spu->height\n");
return -1;
}
return 0;
diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_decoder.c
index 0fb84da38..4f5f05e22 100644
--- a/src/libspudec/xine_decoder.c
+++ b/src/libspudec/xine_decoder.c
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.23 2001/10/23 10:49:22 jcdutton Exp $
+ * $Id: xine_decoder.c,v 1.24 2001/10/23 21:51:11 jcdutton Exp $
*
* stuff needed to turn libspu into a xine decoder plugin
*/
@@ -37,7 +37,7 @@
#include "xine_internal.h"
#include "video_out/alphablend.h"
#include "xine-engine/bswap.h"
-
+#include "monitor.h"
void print_overlay( vo_overlay_t *ovl );
@@ -285,7 +285,7 @@ int32_t spu_add_event(spudec_decoder_t *this, spu_overlay_event_t *event) {
found=1;
break;
}
- LOG (LOG_DEBUG, "this_event=%d vpts %d\n",this_event, this->spu_events[this_event].event->vpts);
+ xprintf (VERBOSE|SPU, "this_event=%d vpts %d\n",this_event, this->spu_events[this_event].event->vpts);
if (this->spu_events[this_event].event->vpts > event->vpts ) {
found=2;
break;
@@ -334,7 +334,7 @@ void spu_process (spudec_decoder_t *this, uint32_t stream_id) {
/* FIXME:Get Handle after we have found if "Forced display" is set or not.
*/
- LOG (LOG_DEBUG, "Found SPU from stream %d pts=%d vpts=%d\n",stream_id,
+ xprintf (VERBOSE|SPU, "Found SPU from stream %d pts=%d vpts=%d\n",stream_id,
this->spu_stream_state[stream_id].pts,
this->spu_stream_state[stream_id].vpts);
this->state.cmd_ptr = this->cur_seq->buf + this->cur_seq->cmd_offs;
@@ -361,7 +361,7 @@ void spu_process (spudec_decoder_t *this, uint32_t stream_id) {
*/
if ((this->xine->spu_channel != stream_id) &&
(this->state.menu == 0) ) {
- LOG (LOG_DEBUG, "Dropping SPU channel %d\n", stream_id);
+ xprintf (VERBOSE|SPU, "Dropping SPU channel %d\n", stream_id);
spu_free_handle(this, handle);
return;
}
@@ -485,14 +485,14 @@ static void spudec_nextseq(spudec_decoder_t* this) {
}
void print_overlay( vo_overlay_t *ovl ) {
- LOG (LOG_DEBUG, "OVERLAY to show\n");
- LOG (LOG_DEBUG, "\tx = %d y = %d width = %d height = %d\n",
+ xprintf (VERBOSE|SPU, "OVERLAY to show\n");
+ xprintf (VERBOSE|SPU, "\tx = %d y = %d width = %d height = %d\n",
ovl->x, ovl->y, ovl->width, ovl->height );
- LOG (LOG_DEBUG, "\tclut [%x %x %x %x]\n",
+ xprintf (VERBOSE|SPU, "\tclut [%x %x %x %x]\n",
ovl->color[0], ovl->color[1], ovl->color[2], ovl->color[3]);
- LOG (LOG_DEBUG, "\ttrans [%d %d %d %d]\n",
+ xprintf (VERBOSE|SPU, "\ttrans [%d %d %d %d]\n",
ovl->trans[0], ovl->trans[1], ovl->trans[2], ovl->trans[3]);
- LOG (LOG_DEBUG, "\tclip top=%d bottom=%d left=%d right=%d\n",
+ xprintf (VERBOSE|SPU, "\tclip top=%d bottom=%d left=%d right=%d\n",
ovl->clip_top, ovl->clip_bottom, ovl->clip_left, ovl->clip_right);
return;
}
@@ -512,13 +512,10 @@ void spu_process_event( spudec_decoder_t *this, int vpts ) {
return;
}
- printf("show event: event_vpts=%d actual_vpts=%d\n", this->spu_events[this_event].event->vpts,vpts );
- printf("Process_event called\n");
-
handle=this->spu_events[this_event].event->object.handle;
switch( this->spu_events[this_event].event->event_type ) {
case EVENT_SHOW_SPU:
- LOG (LOG_DEBUG, "SHOW SPU NOW\n");
+ xprintf (VERBOSE|SPU, "SHOW SPU NOW\n");
if (this->spu_events[this_event].event->object.overlay != NULL) {
this->spu_objects[handle].handle = handle;
this->spu_objects[handle].overlay = this->spu_events[this_event].event->object.overlay;
@@ -527,7 +524,7 @@ void spu_process_event( spudec_decoder_t *this, int vpts ) {
break;
case EVENT_HIDE_SPU:
- LOG (LOG_DEBUG, "HIDE SPU NOW\n");
+ xprintf (VERBOSE|SPU, "HIDE SPU NOW\n");
this->spu_showing[1].handle = -1;
if(this->spu_objects[handle].overlay->rle) {
free(this->spu_objects[handle].overlay->rle);
@@ -539,19 +536,19 @@ void spu_process_event( spudec_decoder_t *this, int vpts ) {
break;
case EVENT_HIDE_MENU:
- LOG (LOG_DEBUG, "HIDE MENU NOW\n");
+ xprintf (VERBOSE|SPU, "HIDE MENU NOW\n");
this->spu_showing[1].handle = -1;
/* spu_free_handle( this, handle ); */
break;
case EVENT_MENU_SPU:
- LOG (LOG_DEBUG, "MENU SPU NOW\n");
+ xprintf (VERBOSE|SPU, "MENU SPU NOW\n");
if (this->spu_events[this_event].event->object.overlay != NULL) {
vo_overlay_t *overlay = this->spu_objects[handle].overlay;
vo_overlay_t *event_overlay = this->spu_events[this_event].event->object.overlay;
- LOG (LOG_DEBUG, "event_overlay\n");
+ xprintf (VERBOSE|SPU, "event_overlay\n");
print_overlay(event_overlay);
- LOG (LOG_DEBUG, "overlay\n");
+ xprintf (VERBOSE|SPU, "overlay\n");
print_overlay(overlay);
this->spu_objects[handle].handle = handle; /* This should not change for menus */
@@ -569,7 +566,7 @@ void spu_process_event( spudec_decoder_t *this, int vpts ) {
event_overlay->color[1] +
event_overlay->color[2] +
event_overlay->color[3]) > 0 ) {
- LOG (LOG_DEBUG, "mixing clut\n");
+ xprintf (VERBOSE|SPU, "mixing clut\n");
overlay->color[0] = event_overlay->color[0];
overlay->color[1] = event_overlay->color[1];
overlay->color[2] = event_overlay->color[2];
@@ -579,7 +576,7 @@ void spu_process_event( spudec_decoder_t *this, int vpts ) {
event_overlay->trans[1] +
event_overlay->trans[2] +
event_overlay->trans[3]) > 0 ) {
- LOG (LOG_DEBUG, "mixing trans\n");
+ xprintf (VERBOSE|SPU, "mixing trans\n");
overlay->trans[0] = event_overlay->trans[0];
overlay->trans[1] = event_overlay->trans[1];
overlay->trans[2] = event_overlay->trans[2];
@@ -588,19 +585,19 @@ void spu_process_event( spudec_decoder_t *this, int vpts ) {
this->spu_showing[1].handle = handle;
if (event_overlay) free(event_overlay);
/* Free should set pointer to NULL, but we should check this */
- LOG (LOG_DEBUG, "overlay after\n");
+ xprintf (VERBOSE|SPU, "overlay after\n");
print_overlay(overlay);
}
break;
case EVENT_MENU_BUTTON:
- LOG (LOG_DEBUG, "MENU BUTTON NOW\n");
+ xprintf (VERBOSE|SPU, "MENU BUTTON NOW\n");
if (this->spu_events[this_event].event->object.overlay != NULL) {
vo_overlay_t *overlay = this->spu_objects[handle].overlay;
vo_overlay_t *event_overlay = this->spu_events[this_event].event->object.overlay;
- LOG (LOG_DEBUG, "event_overlay\n");
+ xprintf (VERBOSE|SPU, "event_overlay\n");
print_overlay(event_overlay);
- LOG (LOG_DEBUG, "overlay\n");
+ xprintf (VERBOSE|SPU, "overlay\n");
print_overlay(overlay);
this->spu_objects[handle].handle = handle; /* This should not change for menus */
overlay->clip_top = event_overlay->clip_top;
@@ -612,7 +609,7 @@ void spu_process_event( spudec_decoder_t *this, int vpts ) {
event_overlay->color[1] +
event_overlay->color[2] +
event_overlay->color[3]) > 0 ) {
- LOG (LOG_DEBUG, "mixing clut\n");
+ xprintf (VERBOSE|SPU, "mixing clut\n");
overlay->color[0] = event_overlay->color[0];
overlay->color[1] = event_overlay->color[1];
overlay->color[2] = event_overlay->color[2];
@@ -622,20 +619,20 @@ void spu_process_event( spudec_decoder_t *this, int vpts ) {
event_overlay->trans[1] +
event_overlay->trans[2] +
event_overlay->trans[3]) > 0 ) {
- LOG (LOG_DEBUG, "mixing trans\n");
+ xprintf (VERBOSE|SPU, "mixing trans\n");
overlay->trans[0] = event_overlay->trans[0];
overlay->trans[1] = event_overlay->trans[1];
overlay->trans[2] = event_overlay->trans[2];
overlay->trans[3] = event_overlay->trans[3];
}
this->spu_showing[1].handle = handle;
- LOG (LOG_DEBUG, "overlay after\n");
+ xprintf (VERBOSE|SPU, "overlay after\n");
print_overlay(overlay);
}
break;
default:
- LOG (LOG_DEBUG, "Unhandled event type\n");
+ xprintf (VERBOSE|SPU, "Unhandled event type\n");
break;
}
@@ -694,13 +691,13 @@ static void spudec_event_listener(void *this_gen, xine_event_t *event_gen) {
overlay = malloc (sizeof(vo_overlay_t));
overlay_event->object.overlay=overlay;
- LOG (LOG_DEBUG, "BUTTON\n");
- LOG (LOG_DEBUG, "\tshow=%d\n",but->show);
- LOG (LOG_DEBUG, "\tclut [%x %x %x %x]\n",
+ xprintf (VERBOSE|SPU, "BUTTON\n");
+ xprintf (VERBOSE|SPU, "\tshow=%d\n",but->show);
+ xprintf (VERBOSE|SPU, "\tclut [%x %x %x %x]\n",
but->color[0], but->color[1], but->color[2], but->color[3]);
- LOG (LOG_DEBUG, "\ttrans [%d %d %d %d]\n",
+ xprintf (VERBOSE|SPU, "\ttrans [%d %d %d %d]\n",
but->trans[0], but->trans[1], but->trans[2], but->trans[3]);
- LOG (LOG_DEBUG, "\tleft = %d right = %d top = %d bottom = %d\n",
+ xprintf (VERBOSE|SPU, "\tleft = %d right = %d top = %d bottom = %d\n",
but->left, but->right, but->top, but->bottom );
if (!this->state.menu) return;
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index ddd21268c..a49d0d6e8 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: load_plugins.c,v 1.48 2001/10/23 21:33:41 f1rmb Exp $
+ * $Id: load_plugins.c,v 1.49 2001/10/23 21:51:11 jcdutton Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -753,7 +753,7 @@ ao_driver_t *xine_load_audio_output_plugin(config_values_t *config,
&& (pEntry->d_name[nLen-1]=='o'))) {
sprintf (str, "%s/%s", XINE_PLUGINDIR, pEntry->d_name);
-
+ /* RTLD_GLOBAL is needed when using ALSA09 */
if(!(plugin = dlopen (str, RTLD_LAZY | RTLD_GLOBAL))) {
printf("load_plugins: audio output plugin %s failed to link: %s\n",
str, dlerror());