GST_STATIC_CAPS ("audio/x-raw-int, "
"width = (int) 16, "
"depth = (int) 16, "
- "endianness = (int) 1234, "
- "signed = (bool) true, "
+ "endianness = (int) 1234, "
+ "signed = (bool) true, "
"rate = (int) 8000, "
- "channels = (int) 1")
+ "channels = (int) 1")
);
static GstElementClass *parent_class = NULL;
} else {
GST_DEBUG_OBJECT (dtmfsrc, "Generating tone");
gst_dtmf_src_generate_tone(event, DTMF_KEYS[event->event_number],
- dtmfsrc->interval, buf);
+ dtmfsrc->interval, buf);
}
event->packet_count++;
if (event != NULL) {
if (event->event_type == DTMF_EVENT_TYPE_START) {
- GST_WARNING_OBJECT (dtmfsrc, "Received two consecutive DTMF start events");
+ GST_WARNING_OBJECT (dtmfsrc, "Received two consecutive DTMF start events");
} else if (event->event_type == DTMF_EVENT_TYPE_STOP) {
- gst_dtmf_src_set_stream_lock (dtmfsrc, FALSE);
- g_free (dtmfsrc->last_event);
- dtmfsrc->last_event = NULL;
+ gst_dtmf_src_set_stream_lock (dtmfsrc, FALSE);
+ g_free (dtmfsrc->last_event);
+ dtmfsrc->last_event = NULL;
}
}
}
gst_buffer_ref(buf);
GST_DEBUG_OBJECT (dtmfsrc,
- "pushing buffer on src pad of size %d", GST_BUFFER_SIZE (buf));
+ "pushing buffer on src pad of size %d", GST_BUFFER_SIZE (buf));
ret = gst_pad_push (dtmfsrc->srcpad, buf);
if (ret != GST_FLOW_OK) {
GST_ERROR_OBJECT (dtmfsrc, "Failed to push buffer on src pad");
case GST_STATE_CHANGE_READY_TO_PAUSED:
gst_segment_init (&dtmfsrc->segment, GST_FORMAT_TIME);
gst_pad_push_event (dtmfsrc->srcpad, gst_event_new_new_segment (FALSE,
- dtmfsrc->segment.rate, dtmfsrc->segment.format,
- dtmfsrc->segment.start, dtmfsrc->segment.stop, dtmfsrc->segment.time));
+ dtmfsrc->segment.rate, dtmfsrc->segment.format,
+ dtmfsrc->segment.start, dtmfsrc->segment.stop, dtmfsrc->segment.time));
/* Indicate that we don't do PRE_ROLL */
no_preroll = TRUE;
break;
G_BEGIN_DECLS
-#define GST_TYPE_DTMF_SRC (gst_dtmf_src_get_type())
-#define GST_DTMF_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DTMF_SRC,GstDTMFSrc))
-#define GST_DTMF_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DTMF_SRC,GstDTMFSrcClass))
+#define GST_TYPE_DTMF_SRC (gst_dtmf_src_get_type())
+#define GST_DTMF_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DTMF_SRC,GstDTMFSrc))
+#define GST_DTMF_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DTMF_SRC,GstDTMFSrcClass))
#define GST_DTMF_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_DTMF_SRC, GstDTMFSrcClass))
-#define GST_IS_DTMF_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DTMF_SRC))
-#define GST_IS_DTMF_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DTMF_SRC))
-#define GST_DTMF_SRC_CAST(obj) ((GstDTMFSrc *)(obj))
+#define GST_IS_DTMF_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DTMF_SRC))
+#define GST_IS_DTMF_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DTMF_SRC))
+#define GST_DTMF_SRC_CAST(obj) ((GstDTMFSrc *)(obj))
typedef struct _GstDTMFSrc GstDTMFSrc;
typedef struct _GstDTMFSrcClass GstDTMFSrcClass;
struct _GstDTMFSrcEvent {
GstDTMFEventType event_type;
double sample;
- guint16 event_number;
- guint16 volume;
+ guint16 event_number;
+ guint16 volume;
guint32 packet_count;
};
struct _GstDTMFSrc {
GstElement element;
- GstPad *srcpad;
+ GstPad *srcpad;
GstSegment segment;
- GAsyncQueue* event_queue;
+ GAsyncQueue* event_queue;
GstDTMFSrcEvent* last_event;
- guint16 interval;
+ guint16 interval;
GstClockTime timestamp;
};