Beispiel #1
0
static int
control(struct vf_instance *vf, int request, void *data)
{
    const int *const tmp = data;
    switch(request){
    case VFCTRL_CHANGE_RECTANGLE:
        switch (tmp[0]){
        case 0:
            vf->priv->w += tmp[1];
            return 1;
            break;
        case 1:
            vf->priv->h += tmp[1];
            return 1;
            break;
        case 2:
            vf->priv->x += tmp[1];
            return 1;
            break;
        case 3:
            vf->priv->y += tmp[1];
            return 1;
            break;
        default:
            mp_msg(MSGT_VFILTER,MSGL_FATAL,"Unknown param %d \n", tmp[0]);
            return 0;
        }
    }
    return vf_next_control(vf, request, data);
    return 0;
}
static int control(struct vf_instance_s* vf, int request, void* data)
{
	switch (request) {
	case VFCTRL_SKIP_NEXT_FRAME:
		vf->priv->skipflag = 1;
		return CONTROL_TRUE;
	}
	return vf_next_control(vf, request, data);
}
Beispiel #3
0
static int control (vf_instance_t *vf, int request, void *data)
{
    if (request == VFCTRL_SCREENSHOT && vf->priv->current) {
        struct voctrl_screenshot_args *args = data;
        args->out_image = mp_image_new_ref(vf->priv->current);
        return CONTROL_TRUE;
    }
    return vf_next_control (vf, request, data);
}
Beispiel #4
0
static int control(struct vf_instance_s* vf, int request, void* data){
    switch(request){
    case VFCTRL_QUERY_MAX_PP_LEVEL:
	return PP_QUALITY_MAX;
    case VFCTRL_SET_PP_LEVEL:
	vf->priv->pp= *((unsigned int*)data);
	return CONTROL_TRUE;
    }
    return vf_next_control(vf,request,data);
}
Beispiel #5
0
static int control(struct vf_instance_s* vf, int request, void* data){
    switch(request){
    case VFCTRL_QUERY_MAX_PP_LEVEL:
	return 8;
    case VFCTRL_SET_PP_LEVEL:
	vf->priv->log2_count= *((unsigned int*)data);
        //FIXME we have to realloc a few things here
	return CONTROL_TRUE;
    }
    return vf_next_control(vf,request,data);
}
Beispiel #6
0
static int control(struct vf_instance *vf, int request, void* data)
{
	switch (request) {
	case VFCTRL_DUPLICATE_FRAME:
		if (!vf->priv->last_mpi) break;
		// This is a huge hack. We assume nothing
		// has been called earlier in the filter chain
		// since the last put_image. This is reasonable
		// because we're handling a duplicate frame!
		if (put_image(vf, vf->priv->last_mpi, MP_NOPTS_VALUE))
			return CONTROL_TRUE;
		break;
	}
	return vf_next_control(vf, request, data);
}
Beispiel #7
0
static int control(struct vf_instance *vf, int request, void *data)
{
    struct mp_sws_context *sws = vf->priv->sws;

    switch (request) {
    case VFCTRL_GET_EQUALIZER:
        if (mp_sws_get_vf_equalizer(sws, data) < 1)
            break;
        return CONTROL_TRUE;
    case VFCTRL_SET_EQUALIZER:
        if (mp_sws_set_vf_equalizer(sws, data) < 1)
            break;
        return CONTROL_TRUE;
    default:
        break;
    }

    return vf_next_control(vf, request, data);
}
Beispiel #8
0
static int control (vf_instance_t *vf, int request, void *data)
{
    /** data contains an integer argument
     * 0: take screenshot with the next frame
     * 1: take screenshots with each frame until the same command is given once again
     **/
    if(request==VFCTRL_SCREENSHOT) {
        if (data && *(int*)data) { // repeated screenshot mode
            if (vf->priv->shot==2)
                vf->priv->shot=0;
            else
                vf->priv->shot=2;
        } else { // single screenshot
            if (!vf->priv->shot)
                vf->priv->shot=1;
        }
        return CONTROL_TRUE;
    }
    return vf_next_control (vf, request, data);
}
static int control(struct vf_instance_s* vf, int request, void* data){
    return vf_next_control(vf,request,data);
}