Skip to content
Snippets Groups Projects
Commit dd9e78b7 authored by Jordi Burguet-Castell's avatar Jordi Burguet-Castell
Browse files

Add framesink element. It compiles, but does not work yet

parent 9f712954
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ plugin_LTLIBRARIES = libgstlal.la
libgstlal_la_SOURCES = \
gstlal_plugins.h gstlal.c \
gstlal_framesrc.h gstlal_framesrc.c \
gstlal_framesink.h gstlal_framesink.c \
low_latency_inspiral_functions.h low_latency_inspiral_functions.c \
gstlal_matrixmixer.h gstlal_matrixmixer.c \
gstlal_simulation.h gstlal_simulation.c \
......
......@@ -53,6 +53,7 @@
#include <gstlal.h>
#include <gstlal_plugins.h>
#include <gstlal_framesrc.h>
#include <gstlal_framesink.h>
#include <gstlal_matrixmixer.h>
#include <gstlal_simulation.h>
#include <gstlal_whiten.h>
......@@ -103,6 +104,7 @@ static gboolean plugin_init(GstPlugin *plugin)
GType type;
} *element, elements[] = {
{"lal_framesrc", GSTLAL_FRAMESRC_TYPE},
{"lal_framesink", GST_TYPE_LALFRAME_SINK},
{"lal_matrixmixer", GSTLAL_MATRIXMIXER_TYPE},
{"lal_simulation", GSTLAL_SIMULATION_TYPE},
{"lal_whiten", GSTLAL_WHITEN_TYPE},
......
This diff is collapsed.
/*
* Copyright (C) 2010 Jordi Burguet-Castell <jordi.burguet-castell@ligo.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.
*/
/*
* Copied from gstreamer's gstfilesink:
cp ../gstreamer/plugins/elements/gstfilesink.h src/plugins/gstlalframesink.h
cp ../gstreamer/plugins/elements/gstfilesink.c src/plugins/gstlalframesink.c
* And then used:
(defun file2frame ()
(interactive)
(save-excursion
(replace-string "GstFileSink" "GstLalframeSink" nil (point-min) (point-max))
(replace-string "file_" "lalframe_" nil (point-min) (point-max))
(replace-string "filesink" "lalframesink" nil (point-min) (point-max))))
* and (beautify)
*/
/*
* Note on naming: Instead of calling things like gstlal_framesink, I
* call things like gst_lalframe_sink (or gst_lalframesink), which
* seems to be more consistent with the other gstreamer elements.
*
* Instead of writing things like GSTLALFrameSink we write GstLalframeSink
*/
#ifndef __GST_LALFRAME_SINK_H__
#define __GST_LALFRAME_SINK_H__
#include <stdio.h>
#include <gst/gst.h>
#include <gst/base/gstbasesink.h>
#include <lal/LALFrameIO.h>
G_BEGIN_DECLS
#define GST_TYPE_LALFRAME_SINK \
(gst_lalframe_sink_get_type())
#define GST_LALFRAME_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_LALFRAME_SINK, GstLalframeSink))
#define GST_LALFRAME_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_LALFRAME_SINK, GstLalframeSinkClass))
#define GST_IS_LALFRAME_SINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_LALFRAME_SINK))
#define GST_IS_LALFRAME_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_LALFRAME_SINK))
typedef struct _GstLalframeSink GstLalframeSink;
typedef struct _GstLalframeSinkClass GstLalframeSinkClass;
/**
* GstLalframeSink:
*
* Opaque #GstLalframeSink structure.
*/
struct _GstLalframeSink {
GstBaseSink parent;
GstPad *srcpad;
/*< private >*/
gchar *filename;
gchar *uri;
FrameH *frame;
gchar *instrument;
gchar *channel_name;
gchar *units;
gboolean seekable;
guint64 current_pos;
gint buffer_mode;
guint buffer_size;
gchar *buffer;
};
struct _GstLalframeSinkClass {
GstBaseSinkClass parent_class;
};
GType gst_lalframe_sink_get_type(void);
G_END_DECLS
#endif /* __GST_LALFRAME_SINK_H__ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment