diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-03-30 15:19:45 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-03-30 15:19:45 +0000 |
commit | c26901e3c59aa88bc0071633a667430316b1ded4 (patch) | |
tree | 5589f8fa0be58cae5631577328f5c327b4cb018d /src/xine-engine/buffer.h | |
parent | 939c40b7ab92c779734e5aa15a7714b1ae54b26b (diff) | |
download | xine-lib-c26901e3c59aa88bc0071633a667430316b1ded4.tar.gz xine-lib-c26901e3c59aa88bc0071633a667430316b1ded4.tar.bz2 |
New net_buf_ctrl.
See xine-devel for details.
Basicaly it adds callbacks to fifo, and everything is done at fifo level now.
It fixes deadlocks with ogg/ogm streams, pauses the engine at the right time, and evaluates better the length of the data in fifos (using pts when the bitrate is not constant).
Enjoy.
CVS patchset: 4513
CVS date: 2003/03/30 15:19:45
Diffstat (limited to 'src/xine-engine/buffer.h')
-rw-r--r-- | src/xine-engine/buffer.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index a1d9073df..98d8bb67a 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -12,12 +12,12 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.h,v 1.105 2003/03/23 17:12:30 holstsn Exp $ + * $Id: buffer.h,v 1.106 2003/03/30 15:19:46 tmattern Exp $ * * * contents: @@ -158,7 +158,7 @@ extern "C" { #define BUF_AUDIO_DTS 0x03050000 #define BUF_AUDIO_MSADPCM 0x03060000 #define BUF_AUDIO_MSIMAADPCM 0x03070000 -#define BUF_AUDIO_MSGSM 0x03080000 +#define BUF_AUDIO_MSGSM 0x03080000 #define BUF_AUDIO_VORBIS 0x03090000 #define BUF_AUDIO_IMC 0x030a0000 #define BUF_AUDIO_LH 0x030b0000 @@ -199,7 +199,7 @@ extern "C" { #define BUF_AUDIO_WMAV 0x032E0000 /* spu buffer types: */ - + #define BUF_SPU_BASE 0x04000000 #define BUF_SPU_DVD 0x04000000 #define BUF_SPU_TEXT 0x04010000 @@ -226,7 +226,7 @@ struct buf_element_s { unsigned char *content; /* start of raw content in mem (without header etc) */ int32_t size ; /* size of _content_ */ - int32_t max_size; /* size of pre-allocated memory pointed to by "mem" */ + int32_t max_size; /* size of pre-allocated memory pointed to by "mem" */ uint32_t type; int64_t pts; /* presentation time stamp, used for a/v sync */ int64_t disc_off; /* discontinuity offset */ @@ -443,10 +443,12 @@ struct fifo_buffer_s /* the same as put but insert at the head of the fifo */ void (*insert) (fifo_buffer_t *fifo, buf_element_t *buf); + void (*register_put_cb) (fifo_buffer_t *fifo, void (*cb)(fifo_buffer_t *fifo, buf_element_t *buf, void *), void *cb_data); + void (*register_get_cb) (fifo_buffer_t *fifo, void (*cb)(fifo_buffer_t *fifo, buf_element_t *buf, void *), void *cb_data); + /* * private variables for buffer pool management */ - buf_element_t *buffer_pool_top; /* a stack actually */ pthread_mutex_t buffer_pool_mutex; pthread_cond_t buffer_pool_cond_not_empty; @@ -454,6 +456,10 @@ struct fifo_buffer_s int buffer_pool_capacity; int buffer_pool_buf_size; void *buffer_pool_base; /*used to free mem chunk */ + void (*put_cb)(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb); + void (*get_cb)(fifo_buffer_t *fifo, buf_element_t *buf, void *data_cb); + void *put_cb_data; + void *get_cb_data; } ; /* |