summaryrefslogtreecommitdiffstats
path: root/spudec.c
diff options
context:
space:
mode:
Diffstat (limited to 'spudec.c')
-rw-r--r--spudec.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/spudec.c b/spudec.c
index a79d708e38..e896aeef16 100644
--- a/spudec.c
+++ b/spudec.c
@@ -41,7 +41,7 @@
#include "spudec.h"
#include "vobsub.h"
#include "libavutil/avutil.h"
-#include "libavutil/intreadwrite.h"
+#include "ffmpeg_files/intreadwrite.h"
#include "libswscale/swscale.h"
/* Valid values for spu_aamode:
@@ -104,7 +104,7 @@ typedef struct {
unsigned char *scaled_aimage;
int auto_palette; /* 1 if we lack a palette and must use an heuristic. */
int font_start_level; /* Darkest value used for the computed font */
- const vo_functions_t *hw_spu;
+ struct vo *hw_spu;
int spu_changed;
unsigned int forced_subs_only; /* flag: 0=display all subtitle, !0 display only forced subtitles */
unsigned int is_forced_sub; /* true if current subtitle is a forced subtitle */
@@ -515,7 +515,7 @@ static void spudec_decode(spudec_handle_t *this, int pts100)
packet.data = this->packet;
packet.size = this->packet_size;
packet.timestamp = pts100;
- this->hw_spu->draw_frame((uint8_t**)&pkg);
+ vo_draw_frame(this->hw_spu, (uint8_t**)&pkg);
}
}
@@ -794,7 +794,7 @@ static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh,
sws_freeContext(ctx);
}
-void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride))
+void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*draw_alpha)(void *ctx, int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride), void *ctx)
{
spudec_handle_t *spu = (spudec_handle_t *)me;
scale_pixel *table_x;
@@ -811,7 +811,7 @@ void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*dra
|| (spu->orig_frame_width == dxs && spu->orig_frame_height == dys))) {
if (spu->image)
{
- draw_alpha(spu->start_col, spu->start_row, spu->width, spu->height,
+ draw_alpha(ctx, spu->start_col, spu->start_row, spu->width, spu->height,
spu->image, spu->aimage, spu->stride);
spu->spu_changed = 0;
}
@@ -1112,7 +1112,7 @@ nothing_to_do:
spu->scaled_start_row = dys*sub_pos/100 - spu->scaled_height;
break;
}
- draw_alpha(spu->scaled_start_col, spu->scaled_start_row, spu->scaled_width, spu->scaled_height,
+ draw_alpha(ctx, spu->scaled_start_col, spu->scaled_start_row, spu->scaled_width, spu->scaled_height,
spu->scaled_image, spu->scaled_aimage, spu->scaled_stride);
spu->spu_changed = 0;
}
@@ -1131,7 +1131,7 @@ void spudec_update_palette(void * this, unsigned int *palette)
if (spu && palette) {
memcpy(spu->global_palette, palette, sizeof(spu->global_palette));
if(spu->hw_spu)
- spu->hw_spu->control(VOCTRL_SET_SPU_PALETTE,spu->global_palette);
+ vo_control(spu->hw_spu, VOCTRL_SET_SPU_PALETTE, spu->global_palette);
}
}
@@ -1240,11 +1240,11 @@ void spudec_free(void *this)
}
}
-void spudec_set_hw_spu(void *this, const vo_functions_t *hw_spu)
+void spudec_set_hw_spu(void *this, struct vo *hw_spu)
{
spudec_handle_t *spu = (spudec_handle_t*)this;
if (!spu)
return;
spu->hw_spu = hw_spu;
- hw_spu->control(VOCTRL_SET_SPU_PALETTE,spu->global_palette);
+ vo_control(hw_spu, VOCTRL_SET_SPU_PALETTE, spu->global_palette);
}