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 } DiracSchroVideoFormatInfo; 00037 00041 unsigned int ff_dirac_schro_get_video_format_idx(AVCodecContext *avccontext); 00042 00046 typedef struct DiracSchroEncodedFrame { 00048 uint8_t *p_encbuf; 00049 00051 uint32_t size; 00052 00054 uint32_t frame_num; 00055 00057 uint16_t key_frame; 00058 } DiracSchroEncodedFrame; 00059 00063 typedef struct DiracSchroQueueElement { 00065 void *data; 00067 struct DiracSchroQueueElement *next; 00068 } DiracSchroQueueElement; 00069 00070 00074 typedef struct DiracSchroQueue { 00076 DiracSchroQueueElement *p_head; 00078 DiracSchroQueueElement *p_tail; 00080 int size; 00081 } DiracSchroQueue; 00082 00086 void ff_dirac_schro_queue_init(DiracSchroQueue *queue); 00087 00091 int ff_dirac_schro_queue_push_back(DiracSchroQueue *queue, void *p_data); 00092 00096 void *ff_dirac_schro_queue_pop(DiracSchroQueue *queue); 00097 00103 void ff_dirac_schro_queue_free(DiracSchroQueue *queue, 00104 void (*free_func)(void *)); 00105 #endif /* AVCODEC_LIBDIRAC_LIBSCHRO_H */