Lines Matching refs:slot
84 static MPP_RET add_new_slot(FileReaderImpl* impl, FileBufSlot *slot) in add_new_slot() argument
88 slot->index = impl->slot_cnt; in add_new_slot()
89 impl->slots[impl->slot_cnt] = slot; in add_new_slot()
112 FileBufSlot *slot = NULL; in read_ivf_file() local
119 slot = mpp_calloc(FileBufSlot, 1); in read_ivf_file()
120 slot->eos = 1; in read_ivf_file()
122 return slot; in read_ivf_file()
127 slot = mpp_malloc_size(FileBufSlot, MPP_ALIGN(sizeof(FileBufSlot) + data_size, SZ_4K)); in read_ivf_file()
128 slot->data = (char *)(slot + 1); in read_ivf_file()
129 read_size = fread(slot->data, 1, data_size, fp); in read_ivf_file()
139 slot->buf = NULL; in read_ivf_file()
140 slot->size = read_size; in read_ivf_file()
141 slot->eos = eos; in read_ivf_file()
143 return slot; in read_ivf_file()
153 FileBufSlot *slot = mpp_calloc(FileBufSlot, 1); in read_jpeg_file() local
158 slot->data = mpp_buffer_get_ptr(hw_buf); in read_jpeg_file()
159 mpp_assert(slot->data); in read_jpeg_file()
160 read_size = fread(slot->data, 1, buf_size, fp); in read_jpeg_file()
167 slot->buf = hw_buf; in read_jpeg_file()
168 slot->size = read_size; in read_jpeg_file()
169 slot->eos = 1; in read_jpeg_file()
171 return slot; in read_jpeg_file()
181 FileBufSlot *slot = mpp_malloc_size(FileBufSlot, size); in read_normal_file() local
184 slot->data = (char *)(slot + 1); in read_normal_file()
185 read_size = fread(slot->data, 1, buf_size, fp); in read_normal_file()
193 slot->buf = NULL; in read_normal_file()
194 slot->size = read_size; in read_normal_file()
195 slot->eos = eos; in read_normal_file()
197 return slot; in read_normal_file()
257 FileBufSlot *slot = NULL; in reader_read() local
270 slot = impl->slots[impl->slot_rd_idx]; in reader_read()
271 if (slot == NULL || (impl->slot_rd_idx > impl->slot_cnt)) in reader_read()
273 } while (slot == NULL); in reader_read()
275 mpp_assert(slot); in reader_read()
277 *buf = slot; in reader_read()
286 FileBufSlot *slot = NULL; in reader_index_read() local
299 slot = impl->slots[index]; in reader_index_read()
300 if (slot == NULL) in reader_index_read()
302 } while (slot == NULL); in reader_index_read()
304 mpp_assert(slot); in reader_index_read()
306 *buf = slot; in reader_index_read()
360 FileBufSlot *slot = impl->slots[i]; in reader_deinit() local
361 if (!slot) in reader_deinit()
364 if (slot->buf) { in reader_deinit()
365 mpp_buffer_put(slot->buf); in reader_deinit()
366 slot->buf = NULL; in reader_deinit()
386 FileBufSlot *slot = impl->read_func(impl); in reader_worker() local
388 if (NULL == slot) in reader_worker()
391 add_new_slot(impl, slot); in reader_worker()
392 eos = slot->eos; in reader_worker()