mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-13 11:34:10 +00:00
Fix indentation.
This commit is contained in:
parent
52e30c1b33
commit
96d35e0819
6 changed files with 24 additions and 19 deletions
|
@ -54,7 +54,7 @@ plugin_init (GstPlugin * plugin)
|
|||
return FALSE;
|
||||
}
|
||||
if (!gst_element_register (plugin, "rtpasfdepay", GST_RANK_MARGINAL,
|
||||
GST_TYPE_RTP_ASF_DEPAY)) {
|
||||
GST_TYPE_RTP_ASF_DEPAY)) {
|
||||
return FALSE;
|
||||
}
|
||||
/*
|
||||
|
|
|
@ -104,7 +104,7 @@ gst_rtp_asf_depay_class_init (GstRtpAsfDepayClass * klass)
|
|||
GST_DEBUG_FUNCPTR (gst_rtp_asf_depay_process);
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (rtpasfdepayload_debug, "rtpasfdepayload", 0,
|
||||
"RTP asf depayloader element");
|
||||
"RTP asf depayloader element");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -126,7 +126,8 @@ gst_rtp_asf_depay_finalize (GObject * object)
|
|||
}
|
||||
|
||||
static const guint8 asf_marker[16] = { 0x30, 0x26, 0xb2, 0x75, 0x8e, 0x66,
|
||||
0xcf, 0x11, 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c };
|
||||
0xcf, 0x11, 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c
|
||||
};
|
||||
|
||||
static gboolean
|
||||
gst_rtp_asf_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||
|
@ -163,7 +164,8 @@ gst_rtp_asf_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||
|
||||
headers = (guint8 *) g_base64_decode (config_str, &headers_len);
|
||||
|
||||
if (headers == NULL || headers_len < 16 || memcmp (headers, asf_marker, 16) != 0)
|
||||
if (headers == NULL || headers_len < 16
|
||||
|| memcmp (headers, asf_marker, 16) != 0)
|
||||
goto invalid_headers;
|
||||
|
||||
src_caps = gst_caps_new_simple ("video/x-ms-asf", NULL);
|
||||
|
@ -259,7 +261,7 @@ gst_rtp_asf_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
* R: duration present
|
||||
* I: locationid present
|
||||
*/
|
||||
|
||||
|
||||
S = ((payload[0] & 0x80) != 0);
|
||||
L = ((payload[0] & 0x40) != 0);
|
||||
R = ((payload[0] & 0x20) != 0);
|
||||
|
@ -290,8 +292,7 @@ gst_rtp_asf_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
if (L) {
|
||||
/* L bit set, len contains the length of the packet */
|
||||
packet_len = len_offs;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
packet_len = 0;
|
||||
/* else it contains an offset which we don't handle yet */
|
||||
g_assert_not_reached ();
|
||||
|
@ -300,7 +301,8 @@ gst_rtp_asf_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
if (packet_len > payload_len)
|
||||
packet_len = payload_len;
|
||||
|
||||
GST_LOG_OBJECT (depay, "packet len %u, payload len %u", packet_len, payload_len);
|
||||
GST_LOG_OBJECT (depay, "packet len %u, payload len %u", packet_len,
|
||||
payload_len);
|
||||
|
||||
if (packet_len >= depay->packet_size) {
|
||||
GST_LOG_OBJECT (depay, "creating subbuffer");
|
||||
|
@ -310,7 +312,8 @@ gst_rtp_asf_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
/* we need to pad with zeroes to packet_size if it's smaller */
|
||||
outbuf = gst_buffer_new_and_alloc (depay->packet_size);
|
||||
memcpy (GST_BUFFER_DATA (outbuf), payload, packet_len);
|
||||
memset (GST_BUFFER_DATA (outbuf) + packet_len, 0, depay->packet_size - packet_len);
|
||||
memset (GST_BUFFER_DATA (outbuf) + packet_len, 0,
|
||||
depay->packet_size - packet_len);
|
||||
}
|
||||
|
||||
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (depayload->srcpad));
|
||||
|
|
|
@ -969,5 +969,5 @@ gboolean
|
|||
gst_rademux_plugin_init (GstPlugin * plugin)
|
||||
{
|
||||
return gst_element_register (plugin, "rademux",
|
||||
GST_RANK_SECONDARY, GST_TYPE_REAL_AUDIO_DEMUX);
|
||||
GST_RANK_SECONDARY, GST_TYPE_REAL_AUDIO_DEMUX);
|
||||
}
|
||||
|
|
|
@ -387,7 +387,7 @@ gst_rdt_depay_handle_data (GstRDTDepay * rdtdepay, GstClockTime outtime,
|
|||
GST_WRITE_UINT16_BE (outdata + 2, size + 12); /* length */
|
||||
GST_WRITE_UINT16_BE (outdata + 4, stream_id); /* stream */
|
||||
GST_WRITE_UINT32_BE (outdata + 6, timestamp); /* timestamp */
|
||||
GST_WRITE_UINT16_BE (outdata + 10, outflags); /* flags */
|
||||
GST_WRITE_UINT16_BE (outdata + 10, outflags); /* flags */
|
||||
memcpy (outdata + 12, data, size);
|
||||
|
||||
GST_DEBUG_OBJECT (rdtdepay, "Pushing packet, outtime %" GST_TIME_FORMAT,
|
||||
|
|
|
@ -383,7 +383,9 @@ gst_synaesthesia_chain (GstPad * pad, GstBuffer * buffer)
|
|||
gst_adapter_push (synaesthesia->adapter, buffer);
|
||||
|
||||
/* this is what we want */
|
||||
bytesperread = MAX (FFT_BUFFER_SIZE, synaesthesia->spf) * synaesthesia->channels * sizeof (gint16);
|
||||
bytesperread =
|
||||
MAX (FFT_BUFFER_SIZE,
|
||||
synaesthesia->spf) * synaesthesia->channels * sizeof (gint16);
|
||||
|
||||
/* this is what we have */
|
||||
avail = gst_adapter_available (synaesthesia->adapter);
|
||||
|
|
|
@ -77,11 +77,11 @@ struct syn_instance
|
|||
double corr_l[FFT_BUFFER_SIZE];
|
||||
double corr_r[FFT_BUFFER_SIZE];
|
||||
int clarity[FFT_BUFFER_SIZE]; /* Surround sound */
|
||||
|
||||
|
||||
/* pre calculated values */
|
||||
int heightFactor;
|
||||
int heightAdd;
|
||||
double brightFactor2;
|
||||
double brightFactor2;
|
||||
};
|
||||
|
||||
/* Shared lookup tables for the FFT */
|
||||
|
@ -398,19 +398,19 @@ synaesthesia_resize (syn_instance * si, guint resx, guint resy)
|
|||
si->resy = resy;
|
||||
si->output = output;
|
||||
si->display = display;
|
||||
|
||||
|
||||
/* factors for height scaling
|
||||
* the bigger FFT_BUFFER_SIZE, the more finegrained steps we have
|
||||
* should we report the real hight, so that xvimagesink can scale?
|
||||
*/
|
||||
// 512 values , resy=256 -> highFc=2
|
||||
// 512 values , resy=256 -> highFc=2
|
||||
si->heightFactor = FFT_BUFFER_SIZE / 2 / si->resy + 1;
|
||||
actualHeight = FFT_BUFFER_SIZE / 2 / si->heightFactor;
|
||||
si->heightAdd = (si->resy + actualHeight) / 2;
|
||||
|
||||
|
||||
/*printf ("resy=%u, heightFactor=%d, heightAdd=%d, actualHeight=%d\n",
|
||||
si->resy, si->heightFactor, si->heightAdd, actualHeight);
|
||||
*/
|
||||
si->resy, si->heightFactor, si->heightAdd, actualHeight);
|
||||
*/
|
||||
|
||||
/* Correct for window size */
|
||||
si->brightFactor2 = (si->brightFactor / 65536.0 / FFT_BUFFER_SIZE) *
|
||||
|
|
Loading…
Reference in a new issue