00001 /* 00002 * This file is part of libbluray 00003 * Copyright (C) 2010 hpi1 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library. If not, see 00017 * <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 #if !defined(_PES_BUFFER_H_) 00021 #define _PES_BUFFER_H_ 00022 00023 #include <util/attributes.h> 00024 00025 #include <stdint.h> 00026 00027 #ifdef __cplusplus 00028 extern "C" { 00029 #endif 00030 00031 typedef struct pes_buffer_s PES_BUFFER; 00032 struct pes_buffer_s { 00033 uint8_t *buf; 00034 uint32_t len; // payload length 00035 unsigned size; // allocated size 00036 00037 int64_t pts; 00038 int64_t dts; 00039 00040 struct pes_buffer_s *next; 00041 }; 00042 00043 00044 BD_PRIVATE PES_BUFFER *pes_buffer_alloc(int size) BD_ATTR_MALLOC; 00045 BD_PRIVATE void pes_buffer_free(PES_BUFFER **); // free list of buffers 00046 00047 BD_PRIVATE void pes_buffer_append(PES_BUFFER **head, PES_BUFFER *buf); // append buf to list 00048 BD_PRIVATE void pes_buffer_remove(PES_BUFFER **head, PES_BUFFER *buf); // remove buf from list and free it 00049 00050 #ifdef __cplusplus 00051 }; 00052 #endif 00053 00054 #endif // _PES_BUFFER_H_
1.6.3