[MOVED FROM GST-P-FARSIGHT] Fix overly long lines and tabs

20070827195610-3e2dc-396a3fa01e16f184e4109c71fe2deb6e516bdf0d.gz
This commit is contained in:
Olivier Crete 2007-08-27 19:56:10 +00:00 committed by Edward Hervey
parent cbf73c0d69
commit a8e4a3007e
2 changed files with 49 additions and 35 deletions

View file

@ -269,13 +269,13 @@ static void gst_dtmf_src_get_property (GObject * object, guint prop_id,
static gboolean gst_dtmf_src_handle_event (GstPad * pad, GstEvent * event);
static GstStateChangeReturn gst_dtmf_src_change_state (GstElement * element,
GstStateChange transition);
static void gst_dtmf_src_generate_tone(GstDTMFSrcEvent *event, DTMF_KEY key, float duration,
GstBuffer * buffer);
static void gst_dtmf_src_generate_tone(GstDTMFSrcEvent *event, DTMF_KEY key,
float duration, GstBuffer * buffer);
static void gst_dtmf_src_push_next_tone_packet (GstDTMFSrc *dtmfsrc);
static void gst_dtmf_src_start (GstDTMFSrc *dtmfsrc);
static void gst_dtmf_src_stop (GstDTMFSrc *dtmfsrc);
static void gst_dtmf_src_add_start_event (GstDTMFSrc *dtmfsrc, gint event_number,
gint event_volume);
static void gst_dtmf_src_add_start_event (GstDTMFSrc *dtmfsrc,
gint event_number, gint event_volume);
static void gst_dtmf_src_add_stop_event (GstDTMFSrc *dtmfsrc);
static void
@ -615,7 +615,8 @@ gst_dtmf_src_generate_silence(GstBuffer * buffer, float duration)
}
static void
gst_dtmf_src_generate_tone(GstDTMFSrcEvent *event, DTMF_KEY key, float duration, GstBuffer * buffer)
gst_dtmf_src_generate_tone(GstDTMFSrcEvent *event, DTMF_KEY key, float duration,
GstBuffer * buffer)
{
gint16 *p;
gint tone_size;
@ -686,12 +687,14 @@ gst_dtmf_src_wait_for_buffer_ts (GstDTMFSrc *dtmfsrc, GstBuffer * buf)
static GstBuffer *
gst_dtmf_src_create_next_tone_packet (GstDTMFSrc *dtmfsrc, GstDTMFSrcEvent *event)
gst_dtmf_src_create_next_tone_packet (GstDTMFSrc *dtmfsrc,
GstDTMFSrcEvent *event)
{
GstBuffer *buf = NULL;
gboolean send_silence = FALSE;
GST_DEBUG_OBJECT (dtmfsrc, "Creating buffer for tone %s", DTMF_KEYS[event->event_number].event_name);
GST_DEBUG_OBJECT (dtmfsrc, "Creating buffer for tone %s",
DTMF_KEYS[event->event_number].event_name);
/* create buffer to hold the tone */
buf = gst_buffer_new ();
@ -738,7 +741,8 @@ gst_dtmf_src_push_next_tone_packet (GstDTMFSrc *dtmfsrc)
event = g_async_queue_pop (dtmfsrc->event_queue);
if (event->event_type == DTMF_EVENT_TYPE_STOP) {
GST_WARNING_OBJECT (dtmfsrc, "Received a DTMF stop event when already stopped");
GST_WARNING_OBJECT (dtmfsrc,
"Received a DTMF stop event when already stopped");
} else if (event->event_type == DTMF_EVENT_TYPE_START) {
gst_dtmf_prepare_timestamps (dtmfsrc);
@ -748,12 +752,14 @@ gst_dtmf_src_push_next_tone_packet (GstDTMFSrc *dtmfsrc)
event->packet_count = 0;
dtmfsrc->last_event = event;
}
} else if (dtmfsrc->last_event->packet_count * dtmfsrc->interval >= MIN_DUTY_CYCLE) {
} else if (dtmfsrc->last_event->packet_count * dtmfsrc->interval >=
MIN_DUTY_CYCLE) {
event = g_async_queue_try_pop (dtmfsrc->event_queue);
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);
@ -795,7 +801,8 @@ gst_dtmf_src_change_state (GstElement * element, GstStateChange transition)
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.start, dtmfsrc->segment.stop,
dtmfsrc->segment.time));
/* Indicate that we don't do PRE_ROLL */
no_preroll = TRUE;
break;

View file

@ -90,8 +90,8 @@
* <entry>method</entry>
* <entry>G_TYPE_INT</entry>
* <entry>1</entry>
* <entry>The method used for sending event, this element will react if this field
* is absent or 1.
* <entry>The method used for sending event, this element will react if this
* field is absent or 1.
* </entry>
* </row>
* </tbody>
@ -685,7 +685,8 @@ gst_rtp_dtmf_src_wait_for_buffer_ts (GstRTPDTMFSrc *dtmfsrc, GstBuffer * buf)
}
static void
gst_rtp_dtmf_prepare_rtp_headers (GstRTPDTMFSrc *dtmfsrc, GstRTPDTMFSrcEvent *event, GstBuffer *buf)
gst_rtp_dtmf_prepare_rtp_headers (GstRTPDTMFSrc *dtmfsrc,
GstRTPDTMFSrcEvent *event, GstBuffer *buf)
{
gst_rtp_buffer_set_ssrc (buf, dtmfsrc->current_ssrc);
gst_rtp_buffer_set_payload_type (buf, dtmfsrc->pt);
@ -705,7 +706,8 @@ gst_rtp_dtmf_prepare_rtp_headers (GstRTPDTMFSrc *dtmfsrc, GstRTPDTMFSrcEvent *ev
}
static void
gst_rtp_dtmf_prepare_buffer_data (GstRTPDTMFSrc *dtmfsrc, GstRTPDTMFSrcEvent *event,GstBuffer *buf)
gst_rtp_dtmf_prepare_buffer_data (GstRTPDTMFSrc *dtmfsrc,
GstRTPDTMFSrcEvent *event,GstBuffer *buf)
{
GstRTPDTMFPayload *payload;
@ -735,7 +737,8 @@ gst_rtp_dtmf_prepare_buffer_data (GstRTPDTMFSrc *dtmfsrc, GstRTPDTMFSrcEvent *ev
}
static GstBuffer *
gst_rtp_dtmf_src_create_next_rtp_packet (GstRTPDTMFSrc *dtmfsrc, GstRTPDTMFSrcEvent *event)
gst_rtp_dtmf_src_create_next_rtp_packet (GstRTPDTMFSrc *dtmfsrc,
GstRTPDTMFSrcEvent *event)
{
GstBuffer *buf = NULL;
@ -769,7 +772,8 @@ gst_rtp_dtmf_src_push_next_rtp_packet (GstRTPDTMFSrc *dtmfsrc)
event = g_async_queue_pop (dtmfsrc->event_queue);
if (event->event_type == RTP_DTMF_EVENT_TYPE_STOP) {
GST_WARNING_OBJECT (dtmfsrc, "Received a DTMF stop event when already stopped");
GST_WARNING_OBJECT (dtmfsrc,
"Received a DTMF stop event when already stopped");
} else if (event->event_type == RTP_DTMF_EVENT_TYPE_START) {
dtmfsrc->first_packet = TRUE;
@ -783,12 +787,14 @@ gst_rtp_dtmf_src_push_next_rtp_packet (GstRTPDTMFSrc *dtmfsrc)
dtmfsrc->last_event = event;
}
} else if (dtmfsrc->last_event->sent_packets * dtmfsrc->interval >= MIN_PULSE_DURATION){
} else if (dtmfsrc->last_event->sent_packets * dtmfsrc->interval >=
MIN_PULSE_DURATION){
event = g_async_queue_try_pop (dtmfsrc->event_queue);
if (event != NULL) {
if (event->event_type == RTP_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 == RTP_DTMF_EVENT_TYPE_STOP) {
dtmfsrc->first_packet = FALSE;
dtmfsrc->last_packet = TRUE;
@ -815,7 +821,8 @@ gst_rtp_dtmf_src_push_next_rtp_packet (GstRTPDTMFSrc *dtmfsrc)
}
/* create buffer to hold the payload */
buf = gst_rtp_dtmf_src_create_next_rtp_packet (dtmfsrc, dtmfsrc->last_event);
buf = gst_rtp_dtmf_src_create_next_rtp_packet (dtmfsrc,
dtmfsrc->last_event);
while ( redundancy_count-- ) {
gst_buffer_ref(buf);