int RecVideoMJPGThread::stop_rendering() { //printf("RecVideoMJPGThread::stop_rendering 1 %p\n", mjpeg); if(mjpeg) mjpeg_delete(mjpeg); //printf("RecVideoMJPGThread::stop_rendering 2\n"); return 0; }
static void delete_codec(quicktime_video_map_t *vtrack) { quicktime_jpeg_codec_t *codec = ((quicktime_codec_t*)vtrack->codec)->priv; if(codec->mjpeg) mjpeg_delete(codec->mjpeg); if(codec->buffer) free(codec->buffer); if(codec->temp_video) free(codec->temp_video); free(codec); }
int FileJPEGList::write_frame(VFrame *frame, VFrame *data) { mjpeg_t *mjpeg = mjpeg_new(asset->width, asset->height, 1); mjpeg_compress(mjpeg, frame->get_rows(), frame->get_y(), frame->get_u(), frame->get_v(), frame->get_color_model(), file->cpus); data->allocate_compressed_data(mjpeg_output_size(mjpeg)); bcopy(mjpeg_output_buffer(mjpeg), frame->get_data(), mjpeg_output_size(mjpeg)); mjpeg_delete(mjpeg); return 0; }
int FileJPEGList::read_frame(VFrame *frame, VFrame *data) { mjpeg_t *mjpeg = mjpeg_new(asset->width, asset->height, 1); mjpeg_decompress(mjpeg, data->get_data(), data->get_compressed_size(), 0, frame->get_rows(), frame->get_y(), frame->get_u(), frame->get_v(), frame->get_color_model(), file->cpus); mjpeg_delete(mjpeg); return 0; }