gstreamer/libs/bytestream/gstbytestream.h
Joshua N. Pritikin 2cbb2ffd35 1 Add GST_BUFFER_WHERE support to bytestream.
Original commit message from CVS:
1 Add GST_BUFFER_WHERE support to bytestream.

2 Sort live buffers by timestamp.  <g>

3 Rename GST_WHERE macro to GST_WHERE_ARGS.
2001-09-23 06:03:20 +00:00

65 lines
2 KiB
C

/* GStreamer
* Copyright (C) 2001 Erik Walthinsen <omega@temple-baptist.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_BYTESTREAM_H__
#define __GST_BYTESTREAM_H__
#include <gst/gstpad.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _GstByteStream GstByteStream;
struct _GstByteStream {
GstPad *pad;
GSList *buflist;
guint32 headbufavail;
guint32 listavail;
};
GstByteStream* gst_bytestream_new (GstPad *pad);
void gst_bytestream_destroy (GstByteStream *bs);
GstBuffer* gst_bytestream_read_loc (GST_WHERE_ARGS_ GstByteStream *bs, guint32 len);
GstBuffer* gst_bytestream_peek_loc (GST_WHERE_ARGS_ GstByteStream *bs, guint32 len);
guint8* gst_bytestream_peek_bytes (GstByteStream *bs, guint32 len);
gboolean gst_bytestream_flush (GstByteStream *bs, guint32 len);
void gst_bytestream_print_status (GstByteStream *bs);
#ifdef GST_BUFFER_WHERE
# define gst_bytestream_read(bs, len) \
gst_bytestream_read_loc(__FILE__, __LINE__, bs, len)
# define gst_bytestream_peek(bs, len) \
gst_bytestream_peek_loc(__FILE__, __LINE__, bs, len)
#else /* GST_BUFFER_WHERE */
# define gst_bytestream_read(bs, len) \
gst_bytestream_read_loc(bs, len)
# define gst_bytestream_peek(bs, len) \
gst_bytestream_peek_loc(bs, len)
#endif
#endif /* __GST_BYTESTREAM_H__ */