2002-04-28 17:08:59 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
|
|
|
*
|
2005-07-14 09:35:12 +00:00
|
|
|
* gstfilesink.h:
|
2002-04-28 17:08:59 +00:00
|
|
|
*
|
|
|
|
* 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
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2002-04-28 17:08:59 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2005-07-14 09:35:12 +00:00
|
|
|
#ifndef __GST_FILE_SINK_H__
|
|
|
|
#define __GST_FILE_SINK_H__
|
2002-04-28 17:08:59 +00:00
|
|
|
|
2009-10-07 07:00:05 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2002-04-28 17:08:59 +00:00
|
|
|
#include <gst/gst.h>
|
gst/: Added object to help in making collect pad based elements.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_basesrc_init),
(gst_basesrc_set_dataflow_funcs), (gst_basesrc_query):
* gst/base/gstcollectpads.c: (gst_collectpads_get_type),
(gst_collectpads_class_init), (gst_collectpads_init),
(gst_collectpads_finalize), (gst_collectpads_new),
(gst_collectpads_set_function), (gst_collectpads_add_pad),
(find_pad), (gst_collectpads_remove_pad),
(gst_collectpads_is_active), (gst_collectpads_collect),
(gst_collectpads_collect_range), (gst_collectpads_start),
(gst_collectpads_stop), (gst_collectpads_peek),
(gst_collectpads_pop), (gst_collectpads_available),
(gst_collectpads_read), (gst_collectpads_flush),
(gst_collectpads_chain):
* gst/base/gstcollectpads.h:
* gst/elements/Makefile.am:
* gst/elements/gstelements.c:
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_get_times), (gst_fakesink_event),
(gst_fakesink_preroll), (gst_fakesink_render):
* gst/elements/gstfilesink.c: (gst_filesink_class_init),
(gst_filesink_init), (gst_filesink_set_location),
(gst_filesink_open_file), (gst_filesink_close_file),
(gst_filesink_pad_query), (gst_filesink_event),
(gst_filesink_render), (gst_filesink_change_state):
* gst/elements/gstfilesink.h:
Added object to help in making collect pad based elements.
Ported filesink.
Make event function in sink baseclass return gboolean.
2005-05-05 09:31:59 +00:00
|
|
|
#include <gst/base/gstbasesink.h>
|
2002-04-28 17:08:59 +00:00
|
|
|
|
2002-10-30 09:17:34 +00:00
|
|
|
G_BEGIN_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2005-07-14 09:35:12 +00:00
|
|
|
#define GST_TYPE_FILE_SINK \
|
|
|
|
(gst_file_sink_get_type())
|
|
|
|
#define GST_FILE_SINK(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FILE_SINK,GstFileSink))
|
|
|
|
#define GST_FILE_SINK_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FILE_SINK,GstFileSinkClass))
|
|
|
|
#define GST_IS_FILE_SINK(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FILE_SINK))
|
2006-06-01 18:22:14 +00:00
|
|
|
#define GST_IS_FILE_SINK_CLASS(klass) \
|
2005-07-14 09:35:12 +00:00
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FILE_SINK))
|
2014-11-28 15:04:27 +00:00
|
|
|
#define GST_FILE_SINK_CAST(obj) ((GstFileSink *)(obj))
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2002-04-28 17:08:59 +00:00
|
|
|
typedef struct _GstFileSink GstFileSink;
|
|
|
|
typedef struct _GstFileSinkClass GstFileSinkClass;
|
|
|
|
|
2015-07-28 20:50:55 +00:00
|
|
|
/**
|
|
|
|
* GstFileSinkBufferMode:
|
|
|
|
* @GST_FILE_SINK_BUFFER_MODE_DEFAULT: Default buffering
|
|
|
|
* @GST_FILE_SINK_BUFFER_MODE_FULL: Fully buffered
|
|
|
|
* @GST_FILE_SINK_BUFFER_MODE_LINE: Line buffered
|
|
|
|
* @GST_FILE_SINK_BUFFER_MODE_UNBUFFERED: Unbuffered
|
|
|
|
*
|
|
|
|
* File read buffering mode.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_FILE_SINK_BUFFER_MODE_DEFAULT = -1,
|
|
|
|
GST_FILE_SINK_BUFFER_MODE_FULL = _IOFBF,
|
|
|
|
GST_FILE_SINK_BUFFER_MODE_LINE = _IOLBF,
|
|
|
|
GST_FILE_SINK_BUFFER_MODE_UNBUFFERED = _IONBF
|
|
|
|
} GstFileSinkBufferMode;
|
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/**
|
|
|
|
* GstFileSink:
|
|
|
|
*
|
|
|
|
* Opaque #GstFileSink structure.
|
|
|
|
*/
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstFileSink {
|
gst/: Added object to help in making collect pad based elements.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_basesrc_init),
(gst_basesrc_set_dataflow_funcs), (gst_basesrc_query):
* gst/base/gstcollectpads.c: (gst_collectpads_get_type),
(gst_collectpads_class_init), (gst_collectpads_init),
(gst_collectpads_finalize), (gst_collectpads_new),
(gst_collectpads_set_function), (gst_collectpads_add_pad),
(find_pad), (gst_collectpads_remove_pad),
(gst_collectpads_is_active), (gst_collectpads_collect),
(gst_collectpads_collect_range), (gst_collectpads_start),
(gst_collectpads_stop), (gst_collectpads_peek),
(gst_collectpads_pop), (gst_collectpads_available),
(gst_collectpads_read), (gst_collectpads_flush),
(gst_collectpads_chain):
* gst/base/gstcollectpads.h:
* gst/elements/Makefile.am:
* gst/elements/gstelements.c:
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_get_times), (gst_fakesink_event),
(gst_fakesink_preroll), (gst_fakesink_render):
* gst/elements/gstfilesink.c: (gst_filesink_class_init),
(gst_filesink_init), (gst_filesink_set_location),
(gst_filesink_open_file), (gst_filesink_close_file),
(gst_filesink_pad_query), (gst_filesink_event),
(gst_filesink_render), (gst_filesink_change_state):
* gst/elements/gstfilesink.h:
Added object to help in making collect pad based elements.
Ported filesink.
Make event function in sink baseclass return gboolean.
2005-05-05 09:31:59 +00:00
|
|
|
GstBaseSink parent;
|
2002-04-28 17:08:59 +00:00
|
|
|
|
2005-11-24 09:44:07 +00:00
|
|
|
/*< private >*/
|
2002-04-28 17:08:59 +00:00
|
|
|
gchar *filename;
|
2003-11-24 03:21:54 +00:00
|
|
|
gchar *uri;
|
2002-04-28 17:08:59 +00:00
|
|
|
FILE *file;
|
|
|
|
|
2006-06-16 16:28:37 +00:00
|
|
|
gboolean seekable;
|
2007-05-22 11:43:07 +00:00
|
|
|
guint64 current_pos;
|
2007-12-24 19:11:29 +00:00
|
|
|
|
|
|
|
gint buffer_mode;
|
|
|
|
guint buffer_size;
|
|
|
|
gchar *buffer;
|
2009-08-18 06:45:08 +00:00
|
|
|
|
|
|
|
gboolean append;
|
2002-04-28 17:08:59 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstFileSinkClass {
|
gst/: Added object to help in making collect pad based elements.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_basesrc_init),
(gst_basesrc_set_dataflow_funcs), (gst_basesrc_query):
* gst/base/gstcollectpads.c: (gst_collectpads_get_type),
(gst_collectpads_class_init), (gst_collectpads_init),
(gst_collectpads_finalize), (gst_collectpads_new),
(gst_collectpads_set_function), (gst_collectpads_add_pad),
(find_pad), (gst_collectpads_remove_pad),
(gst_collectpads_is_active), (gst_collectpads_collect),
(gst_collectpads_collect_range), (gst_collectpads_start),
(gst_collectpads_stop), (gst_collectpads_peek),
(gst_collectpads_pop), (gst_collectpads_available),
(gst_collectpads_read), (gst_collectpads_flush),
(gst_collectpads_chain):
* gst/base/gstcollectpads.h:
* gst/elements/Makefile.am:
* gst/elements/gstelements.c:
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_get_times), (gst_fakesink_event),
(gst_fakesink_preroll), (gst_fakesink_render):
* gst/elements/gstfilesink.c: (gst_filesink_class_init),
(gst_filesink_init), (gst_filesink_set_location),
(gst_filesink_open_file), (gst_filesink_close_file),
(gst_filesink_pad_query), (gst_filesink_event),
(gst_filesink_render), (gst_filesink_change_state):
* gst/elements/gstfilesink.h:
Added object to help in making collect pad based elements.
Ported filesink.
Make event function in sink baseclass return gboolean.
2005-05-05 09:31:59 +00:00
|
|
|
GstBaseSinkClass parent_class;
|
2002-04-28 17:08:59 +00:00
|
|
|
};
|
|
|
|
|
2012-07-14 19:00:30 +00:00
|
|
|
G_GNUC_INTERNAL GType gst_file_sink_get_type (void);
|
2002-04-28 17:08:59 +00:00
|
|
|
|
2002-10-30 09:17:34 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2005-07-14 09:35:12 +00:00
|
|
|
#endif /* __GST_FILE_SINK_H__ */
|