mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
Original commit message from CVS: - The clock_wait now returns the difference between requested time and unlock time. - Misc defines like GST_SECOND in gstclock.h - remove pre/post in gstelement.c until fixed. - added release_locks to gstelement so that the element can unlock itself - added some more predefined events. - added folowing functions to gstpad: - convert function: get the relation between formats on this pad - query function: get stats about the pad (position/total/latency) - internal connect function: find out how this pad connects to other pad internally to the element. - generic pad_dispatcher. - removed the last bits of pullregion - use release_locks on the queue. - added some events to queue - make gstthread use the new release_locks function - make the scheduler use the new clock_wait functions - added events to fakesink - added query functions to filesrc - swap type and offset in the bytestream seek API to match fseek - added some event handling in bytestream.
66 lines
2.2 KiB
C
66 lines
2.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/gst.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
typedef struct _GstByteStream GstByteStream;
|
|
|
|
struct _GstByteStream {
|
|
GstPad *pad;
|
|
|
|
GstEvent * event;
|
|
|
|
GSList *buflist;
|
|
guint32 headbufavail;
|
|
guint32 listavail;
|
|
|
|
/* we keep state of assembled pieces */
|
|
guint8 *assembled;
|
|
guint32 assembled_len;
|
|
|
|
/* this is needed for gst_bytestream_tell */
|
|
guint64 offset;
|
|
|
|
/* if we are in the seek state (waiting for DISCONT) */
|
|
gboolean in_seek;
|
|
};
|
|
|
|
GstByteStream* gst_bytestream_new (GstPad *pad);
|
|
void gst_bytestream_destroy (GstByteStream *bs);
|
|
|
|
guint32 gst_bytestream_read (GstByteStream *bs, GstBuffer** buf, guint32 len);
|
|
guint64 gst_bytestream_tell (GstByteStream *bs);
|
|
gboolean gst_bytestream_seek (GstByteStream *bs, gint64 offset, GstSeekType type);
|
|
guint32 gst_bytestream_peek (GstByteStream *bs, GstBuffer** buf, guint32 len);
|
|
guint32 gst_bytestream_peek_bytes (GstByteStream *bs, guint8** data, guint32 len);
|
|
gboolean gst_bytestream_flush (GstByteStream *bs, guint32 len);
|
|
void gst_bytestream_flush_fast (GstByteStream *bs, guint32 len);
|
|
void gst_bytestream_get_status (GstByteStream *bs, guint32 *avail_out, GstEvent **event_out);
|
|
guint64 gst_bytestream_get_timestamp (GstByteStream *bs);
|
|
|
|
void gst_bytestream_print_status (GstByteStream *bs);
|
|
|
|
#endif /* __GST_BYTESTREAM_H__ */
|