3 * Copyright (c) 2008,2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
4 * Copyright (c) 2008-2017 Collabora Ltd
5 * @author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
6 * @author: Vincent Penquerc'h <vincent.penquerch@collabora.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GST_FLV_MUX_H__
25 #define __GST_FLV_MUX_H__
28 #include <gst/base/gstaggregator.h>
32 #define GST_TYPE_FLV_MUX_PAD (gst_flv_mux_pad_get_type())
33 #define GST_FLV_MUX_PAD(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FLV_MUX_PAD, GstFlvMuxPad))
34 #define GST_FLV_MUX_PAD_CAST(obj) ((GstFlvMuxPad *)(obj))
35 #define GST_FLV_MUX_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FLV_MUX_PAD, GstFlvMuxPad))
36 #define GST_IS_FLV_MUX_PAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLV_MUX_PAD))
37 #define GST_IS_FLV_MUX_PAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLV_MUX_PAD))
39 typedef struct _GstFlvMuxPad GstFlvMuxPad;
40 typedef struct _GstFlvMuxPadClass GstFlvMuxPadClass;
41 typedef struct _GstFlvMux GstFlvMux;
42 typedef struct _GstFlvMuxClass GstFlvMuxClass;
44 #define GST_TYPE_FLV_MUX \
45 (gst_flv_mux_get_type ())
46 #define GST_FLV_MUX(obj) \
47 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_FLV_MUX, GstFlvMux))
48 #define GST_FLV_MUX_CAST(obj) ((GstFlvMux *)obj)
49 #define GST_FLV_MUX_CLASS(klass) \
50 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_FLV_MUX, GstFlvMuxClass))
51 #define GST_IS_FLV_MUX(obj) \
52 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_FLV_MUX))
53 #define GST_IS_FLV_MUX_CLASS(klass) \
54 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_FLV_MUX))
58 GstAggregatorPad aggregator_pad;
64 GstBuffer *codec_data;
68 GstClockTime last_timestamp;
72 gboolean info_changed;
75 struct _GstFlvMuxPadClass {
76 GstAggregatorPadClass parent;
81 GST_FLV_MUX_STATE_HEADER,
82 GST_FLV_MUX_STATE_DATA
86 GstAggregator aggregator;
92 GstFlvMuxPad *audio_pad;
93 GstFlvMuxPad *video_pad;
95 gchar *metadatacreator;
103 gint64 first_timestamp;
104 GstClockTime last_dts;
106 gboolean sent_header;
109 struct _GstFlvMuxClass {
110 GstAggregatorClass parent;
113 GType gst_flv_mux_pad_get_type(void);
114 GType gst_flv_mux_get_type (void);
118 #endif /* __GST_FLV_MUX_H__ */