2007-02-26 21:01:03 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2007 David Schleef <ds@schleef.org>
|
|
|
|
*
|
|
|
|
* 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_APP_SRC_H_
|
|
|
|
#define _GST_APP_SRC_H_
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <gst/base/gstpushsrc.h>
|
|
|
|
|
2007-03-03 09:06:06 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2007-02-26 21:01:03 +00:00
|
|
|
#define GST_TYPE_APP_SRC \
|
|
|
|
(gst_app_src_get_type())
|
|
|
|
#define GST_APP_SRC(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_APP_SRC,GstAppSrc))
|
|
|
|
#define GST_APP_SRC_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_APP_SRC,GstAppSrcClass))
|
|
|
|
#define GST_IS_APP_SRC(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_APP_SRC))
|
|
|
|
#define GST_IS_APP_SRC_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_APP_SRC))
|
|
|
|
|
|
|
|
typedef struct _GstAppSrc GstAppSrc;
|
|
|
|
typedef struct _GstAppSrcClass GstAppSrcClass;
|
|
|
|
|
|
|
|
struct _GstAppSrc
|
|
|
|
{
|
|
|
|
GstPushSrc pushsrc;
|
|
|
|
|
|
|
|
/*< private >*/
|
|
|
|
GCond *cond;
|
|
|
|
GMutex *mutex;
|
|
|
|
GQueue *queue;
|
gst-libs/gst/app/: Add marshal.list, make it compile and add to cvsignore.
Original commit message from CVS:
* gst-libs/gst/app/.cvsignore:
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/app/gstapp-marshal.list:
Add marshal.list, make it compile and add to cvsignore.
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_dispose),
(gst_app_sink_stop):
Small cleanups.
* gst-libs/gst/app/gstappsrc.c: (gst_app_src_class_init),
(gst_app_src_init), (gst_app_src_set_property),
(gst_app_src_get_property), (gst_app_src_unlock),
(gst_app_src_unlock_stop), (gst_app_src_start), (gst_app_src_stop),
(gst_app_src_create), (gst_app_src_set_caps),
(gst_app_src_get_caps), (gst_app_src_set_size),
(gst_app_src_get_size), (gst_app_src_set_seekable),
(gst_app_src_get_seekable), (gst_app_src_set_max_buffers),
(gst_app_src_get_max_buffers), (gst_app_src_push_buffer),
(gst_app_src_end_of_stream):
* gst-libs/gst/app/gstappsrc.h:
Beat appsrc in shape, add signals and actions.
Add some docs.
Add properties for caps, size, seekability and max-buffers.
Fix unlock/stop code.
2008-05-07 10:38:23 +00:00
|
|
|
|
2007-02-26 21:01:03 +00:00
|
|
|
GstCaps *caps;
|
gst-libs/gst/app/: Add marshal.list, make it compile and add to cvsignore.
Original commit message from CVS:
* gst-libs/gst/app/.cvsignore:
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/app/gstapp-marshal.list:
Add marshal.list, make it compile and add to cvsignore.
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_dispose),
(gst_app_sink_stop):
Small cleanups.
* gst-libs/gst/app/gstappsrc.c: (gst_app_src_class_init),
(gst_app_src_init), (gst_app_src_set_property),
(gst_app_src_get_property), (gst_app_src_unlock),
(gst_app_src_unlock_stop), (gst_app_src_start), (gst_app_src_stop),
(gst_app_src_create), (gst_app_src_set_caps),
(gst_app_src_get_caps), (gst_app_src_set_size),
(gst_app_src_get_size), (gst_app_src_set_seekable),
(gst_app_src_get_seekable), (gst_app_src_set_max_buffers),
(gst_app_src_get_max_buffers), (gst_app_src_push_buffer),
(gst_app_src_end_of_stream):
* gst-libs/gst/app/gstappsrc.h:
Beat appsrc in shape, add signals and actions.
Add some docs.
Add properties for caps, size, seekability and max-buffers.
Fix unlock/stop code.
2008-05-07 10:38:23 +00:00
|
|
|
gint64 size;
|
|
|
|
gboolean seekable;
|
|
|
|
guint max_buffers;
|
|
|
|
|
|
|
|
gboolean flushing;
|
|
|
|
gboolean started;
|
|
|
|
gboolean is_eos;
|
2007-02-26 21:01:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstAppSrcClass
|
|
|
|
{
|
|
|
|
GstPushSrcClass pushsrc_class;
|
gst-libs/gst/app/: Add marshal.list, make it compile and add to cvsignore.
Original commit message from CVS:
* gst-libs/gst/app/.cvsignore:
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/app/gstapp-marshal.list:
Add marshal.list, make it compile and add to cvsignore.
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_dispose),
(gst_app_sink_stop):
Small cleanups.
* gst-libs/gst/app/gstappsrc.c: (gst_app_src_class_init),
(gst_app_src_init), (gst_app_src_set_property),
(gst_app_src_get_property), (gst_app_src_unlock),
(gst_app_src_unlock_stop), (gst_app_src_start), (gst_app_src_stop),
(gst_app_src_create), (gst_app_src_set_caps),
(gst_app_src_get_caps), (gst_app_src_set_size),
(gst_app_src_get_size), (gst_app_src_set_seekable),
(gst_app_src_get_seekable), (gst_app_src_set_max_buffers),
(gst_app_src_get_max_buffers), (gst_app_src_push_buffer),
(gst_app_src_end_of_stream):
* gst-libs/gst/app/gstappsrc.h:
Beat appsrc in shape, add signals and actions.
Add some docs.
Add properties for caps, size, seekability and max-buffers.
Fix unlock/stop code.
2008-05-07 10:38:23 +00:00
|
|
|
|
|
|
|
/* signals */
|
|
|
|
void (*need_data) (GstAppSrc *src);
|
|
|
|
void (*enough_data) (GstAppSrc *src);
|
|
|
|
gboolean (*seek_data) (GstAppSrc *src, guint64 offset);
|
|
|
|
|
|
|
|
/* actions */
|
|
|
|
void (*push_buffer) (GstAppSrc *src, GstBuffer *buffer);
|
|
|
|
void (*end_of_stream) (GstAppSrc *src);
|
2007-02-26 21:01:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GType gst_app_src_get_type(void);
|
|
|
|
|
|
|
|
GST_DEBUG_CATEGORY_EXTERN (app_src_debug);
|
|
|
|
|
gst-libs/gst/app/: Add marshal.list, make it compile and add to cvsignore.
Original commit message from CVS:
* gst-libs/gst/app/.cvsignore:
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/app/gstapp-marshal.list:
Add marshal.list, make it compile and add to cvsignore.
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_dispose),
(gst_app_sink_stop):
Small cleanups.
* gst-libs/gst/app/gstappsrc.c: (gst_app_src_class_init),
(gst_app_src_init), (gst_app_src_set_property),
(gst_app_src_get_property), (gst_app_src_unlock),
(gst_app_src_unlock_stop), (gst_app_src_start), (gst_app_src_stop),
(gst_app_src_create), (gst_app_src_set_caps),
(gst_app_src_get_caps), (gst_app_src_set_size),
(gst_app_src_get_size), (gst_app_src_set_seekable),
(gst_app_src_get_seekable), (gst_app_src_set_max_buffers),
(gst_app_src_get_max_buffers), (gst_app_src_push_buffer),
(gst_app_src_end_of_stream):
* gst-libs/gst/app/gstappsrc.h:
Beat appsrc in shape, add signals and actions.
Add some docs.
Add properties for caps, size, seekability and max-buffers.
Fix unlock/stop code.
2008-05-07 10:38:23 +00:00
|
|
|
void gst_app_src_set_caps (GstAppSrc *appsrc, const GstCaps *caps);
|
|
|
|
GstCaps* gst_app_src_get_caps (GstAppSrc *appsrc);
|
|
|
|
|
|
|
|
void gst_app_src_set_size (GstAppSrc *appsrc, gint64 size);
|
|
|
|
gint64 gst_app_src_get_size (GstAppSrc *appsrc);
|
|
|
|
|
|
|
|
void gst_app_src_set_seekable (GstAppSrc *appsrc, gboolean seekable);
|
|
|
|
gboolean gst_app_src_get_seekable (GstAppSrc *appsrc);
|
|
|
|
|
|
|
|
void gst_app_src_set_max_buffers (GstAppSrc *appsrc, guint max);
|
|
|
|
guint gst_app_src_get_max_buffers (GstAppSrc *appsrc);
|
2007-02-26 21:01:03 +00:00
|
|
|
|
gst-libs/gst/app/: Add marshal.list, make it compile and add to cvsignore.
Original commit message from CVS:
* gst-libs/gst/app/.cvsignore:
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/app/gstapp-marshal.list:
Add marshal.list, make it compile and add to cvsignore.
* gst-libs/gst/app/gstappsink.c: (gst_app_sink_dispose),
(gst_app_sink_stop):
Small cleanups.
* gst-libs/gst/app/gstappsrc.c: (gst_app_src_class_init),
(gst_app_src_init), (gst_app_src_set_property),
(gst_app_src_get_property), (gst_app_src_unlock),
(gst_app_src_unlock_stop), (gst_app_src_start), (gst_app_src_stop),
(gst_app_src_create), (gst_app_src_set_caps),
(gst_app_src_get_caps), (gst_app_src_set_size),
(gst_app_src_get_size), (gst_app_src_set_seekable),
(gst_app_src_get_seekable), (gst_app_src_set_max_buffers),
(gst_app_src_get_max_buffers), (gst_app_src_push_buffer),
(gst_app_src_end_of_stream):
* gst-libs/gst/app/gstappsrc.h:
Beat appsrc in shape, add signals and actions.
Add some docs.
Add properties for caps, size, seekability and max-buffers.
Fix unlock/stop code.
2008-05-07 10:38:23 +00:00
|
|
|
void gst_app_src_push_buffer (GstAppSrc *appsrc, GstBuffer *buffer);
|
|
|
|
void gst_app_src_end_of_stream (GstAppSrc *appsrc);
|
2007-02-26 21:01:03 +00:00
|
|
|
|
2007-03-03 09:06:06 +00:00
|
|
|
G_END_DECLS
|
2007-02-26 21:01:03 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|