Lines Matching full:decode_context
369 struct video_decoder_context *decode_context
375 if (decode_context == NULL)
380 if (buffer_dir == VDEC_BUFFER_TYPE_INPUT && decode_context->ptr_inputbuffer)
382 buffercount = decode_context->input_buffer.actualcount;
383 ptemp = decode_context->ptr_inputbuffer;
399 free (decode_context->ptr_inputbuffer);
400 decode_context->ptr_inputbuffer = NULL;
404 buffercount = decode_context->output_buffer.actualcount;
405 ptemp = decode_context->ptr_outputbuffer;
407 if (decode_context->ptr_respbuffer)
411 if (decode_context->ptr_respbuffer [i])
413 free (decode_context->ptr_respbuffer[i]);
414 decode_context->ptr_respbuffer [i] = NULL;
417 free (decode_context->ptr_respbuffer);
418 decode_context->ptr_respbuffer = NULL;
438 decode_context->ptr_outputbuffer = NULL;
446 struct video_decoder_context *decode_context
455 if ( decode_context == NULL)
464 if (decode_context->ptr_inputbuffer != NULL)
466 DEBUG_PRINT ("\nallocate_buffer: decode_context->ptr_inputbuffer is set");
470 buffercount = decode_context->input_buffer.actualcount;
471 alignedsize = decode_context->input_buffer.alignment;
472 buffersize = decode_context->input_buffer.buffer_size;
478 if (decode_context->ptr_outputbuffer != NULL)
484 buffercount = decode_context->output_buffer.actualcount;
485 alignedsize = decode_context->output_buffer.alignment;
486 buffersize = decode_context->output_buffer.buffer_size;
489 decode_context->ptr_respbuffer = (struct vdec_output_frameinfo **)\
492 if (decode_context->ptr_respbuffer == NULL)
500 decode_context->ptr_respbuffer [i] = (struct vdec_output_frameinfo *)\
502 if (decode_context->ptr_respbuffer [i] == NULL)
528 decode_context->ptr_outputbuffer = ptemp;
533 decode_context->ptr_inputbuffer = ptemp;
550 decode_context->ptr_respbuffer [i]->client_data = \
586 if (ioctl (decode_context->video_driver_fd,VDEC_IOCTL_SET_BUFFER,
600 int start_decoding (struct video_decoder_context *decode_context)
611 if (decode_context == NULL)
616 if (ioctl (decode_context->video_driver_fd,VDEC_IOCTL_CMD_START,
625 sem_wait (&decode_context->sem_synchronize);
629 while (i < decode_context->output_buffer.mincount)
632 decode_context->ptr_outputbuffer [i]->buffer_len;
634 decode_context->ptr_outputbuffer [i]->bufferaddr;
636 decode_context->ptr_outputbuffer [i]->offset;
638 decode_context->ptr_outputbuffer [i]->pmem_fd;
639 fillbuffer.client_data = (void *)decode_context->ptr_respbuffer [i];
644 if (ioctl (decode_context->video_driver_fd,
656 while (i < decode_context->input_buffer.mincount)
659 data_len = read_frame ( decode_context->ptr_inputbuffer [i]->bufferaddr,
660 decode_context->ptr_inputbuffer [i]->buffer_len,
661 decode_context->inputBufferFile);
669 decode_context->ptr_inputbuffer [i]->bufferaddr;
671 frameinfo.pmem_fd = decode_context->ptr_inputbuffer [i]->pmem_fd;
672 frameinfo.pmem_offset = decode_context->ptr_inputbuffer [i]->offset;
675 decode_context->ptr_inputbuffer [i];
680 if (ioctl (decode_context->video_driver_fd,VDEC_IOCTL_DECODE_FRAME,
691 sem_wait (&decode_context->sem_synchronize);
697 int stop_decoding (struct video_decoder_context *decode_context)
702 if (decode_context == NULL)
710 if (ioctl(decode_context->video_driver_fd,VDEC_IOCTL_CMD_FLUSH,
717 sem_wait (&decode_context->sem_synchronize);
724 if (ioctl(decode_context->video_driver_fd,VDEC_IOCTL_CMD_FLUSH,
731 sem_wait (&decode_context->sem_synchronize);
735 if (ioctl(decode_context->video_driver_fd,VDEC_IOCTL_CMD_STOP,
742 sem_wait (&decode_context->sem_synchronize);
783 struct video_decoder_context *decode_context = NULL;
798 decode_context = (struct video_decoder_context *) context;
805 queueitem = queue_get_cmd (&decode_context ->queue_context);
821 sem_post (&decode_context->sem_synchronize);
826 sem_post (&decode_context->sem_synchronize);
835 sem_post (&decode_context->sem_synchronize);
840 decode_context->inputBufferFile
846 sem_post (&decode_context->sem_synchronize);
861 if (ioctl(decode_context->video_driver_fd,VDEC_IOCTL_DECODE_FRAME,
865 sem_post (&decode_context->sem_synchronize);
889 sem_post (&decode_context->sem_synchronize);
897 sem_post (&decode_context->sem_synchronize);
901 if (decode_context->outputBufferFile != NULL)
904 decode_context->outputBufferFile);
924 if (ioctl (decode_context->video_driver_fd,
935 sem_post (&decode_context->sem_synchronize);
940 sem_post (&decode_context->sem_synchronize);
960 struct video_decoder_context *decode_context = NULL;
972 decode_context = (struct video_decoder_context *) context;
983 if (ioctl (decode_context->video_driver_fd,VDEC_IOCTL_GET_NEXT_MSG,\
1043 result = queue_post_cmdq (&decode_context->queue_context,&queueitem);
1046 result = queue_post_cmdq (&decode_context->queue_context,