#endif
VOUT_CONTROL_SUBPICTURE, /* subpicture */
VOUT_CONTROL_FLUSH_SUBPICTURE, /* integer */
+ VOUT_CONTROL_REGISTER_SUBPICTURE, /* integer_ptr */
VOUT_CONTROL_OSD_TITLE, /* string */
VOUT_CONTROL_CHANGE_FILTERS, /* string */
VOUT_CONTROL_CHANGE_SUB_FILTERS, /* string */
mtime_t *time_ptr;
char *string;
int integer;
+ int *integer_ptr;
struct {
int a;
int b;
}
int vout_RegisterSubpictureChannel( vout_thread_t *vout )
{
- return spu_RegisterChannel(vout->p->p_spu);
+ int channel = SPU_DEFAULT_CHANNEL;
+
+ vout_control_cmd_t cmd;
+ vout_control_cmd_Init(&cmd, VOUT_CONTROL_REGISTER_SUBPICTURE);
+ cmd.u.integer_ptr = &channel;
+
+ vout_control_Push(&vout->p->control, &cmd);
+ vout_control_WaitEmpty(&vout->p->control);
+
+ return channel;
}
void vout_FlushSubpictureChannel( vout_thread_t *vout, int channel )
{
spu_DisplaySubpicture(vout->p->p_spu, subpicture);
}
+static void ThreadRegisterSubpicture(vout_thread_t *vout, int *channel)
+{
+ *channel = spu_RegisterChannel(vout->p->p_spu);
+}
+
static void ThreadFlushSubpicture(vout_thread_t *vout, int channel)
{
spu_ClearChannel(vout->p->p_spu, channel);
case VOUT_CONTROL_FLUSH_SUBPICTURE:
ThreadFlushSubpicture(vout, cmd.u.integer);
break;
+ case VOUT_CONTROL_REGISTER_SUBPICTURE:
+ ThreadRegisterSubpicture(vout, cmd.u.integer_ptr);
+ break;
case VOUT_CONTROL_OSD_TITLE:
ThreadDisplayOsdTitle(vout, cmd.u.string);
break;