blob: 8c7505a5f44faad4e90f445f37b34e56e2899e97 [file] [log] [blame]
Olivier Naudanb28313f2012-04-16 08:10:18 -04001/* ASF RTP Payloader plugin for GStreamer
2 * Copyright (C) 2009 Thiago Santos <thiagoss@embedded.ufcg.edu.br>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20
21#ifndef __GST_RTP_ASF_PAY_H__
22#define __GST_RTP_ASF_PAY_H__
23
24#include <gst/gst.h>
25#include <gst/rtp/gstbasertppayload.h>
26#include <gst/rtp/gstrtpbuffer.h>
27#include <gst/base/gstadapter.h>
28
29#include "gstasfobjects.h"
30
31G_BEGIN_DECLS
32#define GST_TYPE_RTP_ASF_PAY \
33 (gst_rtp_asf_pay_get_type())
34#define GST_RTP_ASF_PAY(obj) \
35 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_ASF_PAY,GstRtpAsfPay))
36#define GST_RTP_ASF_PAY_CLASS(klass) \
37 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_ASF_PAY,GstRtpAsfPayClass))
38#define GST_IS_RTP_ASF_PAY(obj) \
39 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_ASF_PAY))
40#define GST_IS_RTP_ASF_PAY_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_ASF_PAY))
42#define GST_RTP_ASF_PAY_CAST(obj) ((GstRtpAsfPay*)(obj))
43 enum GstRtpAsfPayState
44{
45 ASF_NOT_STARTED,
46 ASF_DATA_OBJECT,
47 ASF_PACKETS,
48 ASF_END
49};
50
51typedef struct _GstRtpAsfPay GstRtpAsfPay;
52typedef struct _GstRtpAsfPayClass GstRtpAsfPayClass;
53
54struct _GstRtpAsfPay
55{
56 GstBaseRTPPayload rtppay;
57
58 enum GstRtpAsfPayState state;
59
60 guint32 first_ts;
61 gchar *config;
62 guint64 packets_count;
63 GstAsfFileInfo asfinfo;
64
65 /* current output buffer */
66 GstBuffer *current;
67 guint32 cur_off;
68 guint32 ts;
69 gboolean has_ts;
70 gboolean marker;
71
72 /* keeping it here to avoid allocs/frees */
73 GstAsfPacketInfo packetinfo;
74
75 GstBuffer *headers;
76};
77
78struct _GstRtpAsfPayClass
79{
80 GstBaseRTPPayloadClass parent_class;
81};
82
83GType gst_rtp_asf_pay_get_type (void);
84gboolean gst_rtp_asf_pay_plugin_init (GstPlugin * plugin);
85
86G_END_DECLS
87#endif /* __GST_RTP_ASF_PAY_H__ */