00001 /* 00002 * Copyright (c) 2008 BBC, Anuradha Suraparaju <asuraparaju at gmail dot com > 00003 * 00004 * This file is part of FFmpeg. 00005 * 00006 * FFmpeg is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * FFmpeg is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with FFmpeg; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00026 #ifndef AVCODEC_LIBDIRAC_LIBSCHRO_H 00027 #define AVCODEC_LIBDIRAC_LIBSCHRO_H 00028 00029 #include "avcodec.h" 00030 00031 typedef struct { 00032 uint16_t width; 00033 uint16_t height; 00034 uint16_t frame_rate_num; 00035 uint16_t frame_rate_denom; 00036 } FfmpegDiracSchroVideoFormatInfo; 00037 00041 unsigned int ff_dirac_schro_get_video_format_idx(AVCodecContext *avccontext); 00042 00046 typedef struct FfmpegDiracSchroEncodedFrame { 00048 uint8_t *p_encbuf; 00049 00051 uint32_t size; 00052 00054 uint32_t frame_num; 00055 00057 uint16_t key_frame; 00058 } FfmpegDiracSchroEncodedFrame; 00059 00063 typedef struct FfmpegDiracSchroQueueElement { 00065 void *data; 00067 struct FfmpegDiracSchroQueueElement *next; 00068 } FfmpegDiracSchroQueueElement; 00069 00070 00074 typedef struct FfmpegDiracSchroQueue { 00076 FfmpegDiracSchroQueueElement *p_head; 00078 FfmpegDiracSchroQueueElement *p_tail; 00080 int size; 00081 } FfmpegDiracSchroQueue; 00082 00086 void ff_dirac_schro_queue_init(FfmpegDiracSchroQueue *queue); 00087 00091 int ff_dirac_schro_queue_push_back(FfmpegDiracSchroQueue *queue, void *p_data); 00092 00096 void *ff_dirac_schro_queue_pop(FfmpegDiracSchroQueue *queue); 00097 00103 void ff_dirac_schro_queue_free(FfmpegDiracSchroQueue *queue, 00104 void (*free_func)(void *)); 00105 #endif /* AVCODEC_LIBDIRAC_LIBSCHRO_H */