Lines Matching defs:extradata_info
931 OMX_ERRORTYPE venc_dev::allocate_extradata(struct extradata_buffer_info *extradata_info, int flags)
933 if (extradata_info->allocated) {
934 DEBUG_PRINT_HIGH("2nd allocation return for port = %d",extradata_info->port_index);
940 if (extradata_info->buffer_size) {
941 if (extradata_info->ion.ion_alloc_data.handle) {
942 munmap((void *)extradata_info->uaddr, extradata_info->size);
943 close(extradata_info->ion.fd_ion_data.fd);
944 venc_handle->free_ion_memory(&extradata_info->ion);
947 extradata_info->size = (extradata_info->size + 4095) & (~4095);
949 extradata_info->ion.ion_device_fd = venc_handle->alloc_map_ion_memory(
950 extradata_info->size,
951 &extradata_info->ion.ion_alloc_data,
952 &extradata_info->ion.fd_ion_data, flags);
955 if (extradata_info->ion.ion_device_fd < 0) {
960 extradata_info->uaddr = (char *)mmap(NULL,
961 extradata_info->size,
963 extradata_info->ion.fd_ion_data.fd , 0);
965 if (extradata_info->uaddr == MAP_FAILED) {
967 close(extradata_info->ion.fd_ion_data.fd);
968 venc_handle->free_ion_memory(&extradata_info->ion);
971 extradata_info->m_ion_dev = open("/dev/ion", O_RDONLY);
975 extradata_info->allocated = OMX_TRUE;
979 void venc_dev::free_extradata(struct extradata_buffer_info *extradata_info)
983 if (extradata_info == NULL) {
987 if (extradata_info->uaddr) {
988 munmap((void *)extradata_info->uaddr, extradata_info->size);
989 extradata_info->uaddr = NULL;
990 close(extradata_info->ion.fd_ion_data.fd);
991 venc_handle->free_ion_memory(&extradata_info->ion);
994 if (extradata_info->m_ion_dev)
995 close(extradata_info->m_ion_dev);
997 memset(extradata_info, 0, sizeof(*extradata_info));
998 extradata_info->ion.fd_ion_data.fd = -1;
999 extradata_info->allocated = OMX_FALSE;
3335 struct extradata_buffer_info *extradata_info;
3340 .extradata_info = &input_extradata_info,
3345 .extradata_info = &output_extradata_info,
3357 rc = allocate_extradata(port_info[port].extradata_info,