forked from rdkcmf/rdk-gst-plugins-rdk-aamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gstaamp.h
142 lines (123 loc) · 2.91 KB
/
gstaamp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/*
* Copyright 2018 RDK Management
*
* 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, version 2
* of the license.
*
* 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., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/**
* @file gstaamp.h
* @brief AAMP Gstreamer plugin declarations
*/
#ifndef _GST_AAMP_H_
#define _GST_AAMP_H_
#include <gst/gst.h>
G_BEGIN_DECLS
#define GST_TYPE_AAMP (gst_aamp_get_type())
#define GST_AAMP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AAMP,GstAamp))
#define GST_AAMP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AAMP,GstAampClass))
#define GST_IS_AAMP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AAMP))
#define GST_IS_AAMP_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AAMP))
/**
* @struct GstAamp
* @brief AAMP GstElement extension
*/
typedef struct _GstAamp GstAamp;
/**
* @struct GstAampClass
* @brief AAMP GstElementClass extension
*/
typedef struct _GstAampClass GstAampClass;
/**
* @struct GstAampStreamer;
* @brief forward declaration
*/
struct GstAampStreamer;
/**
* @enum _GstAampState {
* @brief State of element
*/
enum _GstAampState {
GST_AAMP_NONE,
GST_AAMP_TUNING,
GST_AAMP_CONFIGURED,
GST_AAMP_READY,
GST_AAMP_SHUTTING_DOWN,
GST_AAMP_STATE_ERROR
};
/**
* @enum GstAampState
* @brief State of element
*/
typedef enum _GstAampState GstAampState;
/**
* @struct media_stream
* @brief State of a media stream output
*/
struct media_stream
{
GstPad *srcpad;
gboolean isPaused;
gboolean flush;
gboolean resetPosition;
gboolean streamStart;
gboolean eventsPending;
GstCaps *caps;
GQueue *queue;
GMutex mutex;
GCond cond;
GstAamp* parent;
};
/**
* @struct _GstAamp
* @brief AAMP GstElement extension
*/
struct _GstAamp
{
GstElement parent_aamp;
GstPad *sinkpad;
media_stream stream[2];
gboolean audio_enabled;
gchar *location;
gint rate;
gboolean seekFlush;
double spts;
GMutex mutex;
GstAampStreamer* context;
GCond state_changed;
GstAampState state;
gchar* stream_id;
guint idle_id;
gboolean report_tune;
gboolean enable_src_tasks;
gboolean flushing;
guint decoder_idle_id;
gboolean report_decode_handle;
class PlayerInstanceAAMP* player_aamp;
};
/**
* @struct _GstAampClass
* @brief AAMP GstElementClass extension
*/
struct _GstAampClass
{
GstElementClass base_aamp_class;
};
/**
* @brief Get type of aamp gstreamer element
* @retval type of aamp element
*/
GType gst_aamp_get_type(void);
G_END_DECLS
#endif