Beispiel #1
0
static vframe_t *d2d3_vf_get(void* arg)
{
        vframe_t* vframe_ret = NULL;
        int i;
        vframe_ret = vf_get(d2d3_devp->vfm_name);
        if(vframe_ret){
                for(i=0; i<D2D3_IDX_MAX; i++){
                        if(d2d3_devnox[i].vf == NULL){
                                break;
                        }
                }
                if(i==D2D3_IDX_MAX){
                        printk("[d2d3]%s:D2D3 Error, idx is not enough.\n",__func__);
                }
                else{
                        d2d3_devnox[i].vf = vframe_ret;
                        /* backup early_process_fun/process_fun/private_data */
                        d2d3_devnox[i].pre_early_process_fun = vframe_ret->early_process_fun;
                        d2d3_devnox[i].pre_process_fun = vframe_ret->process_fun;
                        d2d3_devnox[i].pre_private_data = vframe_ret->private_data;

                        vframe_ret->early_process_fun = d2d3_early_process_fun;
                        vframe_ret->process_fun = d2d3_post_process_fun;
                        vframe_ret->private_data = (void*)i;

                        /* d2d3 process code start*/

                        /*d2d3 process code*/
                        if(d2d3_dbg_en)
                               printk("[d2d3]%s: %d 0x%x.\n", __func__, i, (unsigned int)vframe_ret);
                }
        }
        return vframe_ret;
}
static inline vframe_t *mipi_vf_get(void)
{
    return vf_get(RECEIVER_NAME);
}