Fix indentation.
This commit is contained in:
parent
52e30c1b33
commit
96d35e0819
@ -126,7 +126,8 @@ gst_rtp_asf_depay_finalize (GObject * object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const guint8 asf_marker[16] = { 0x30, 0x26, 0xb2, 0x75, 0x8e, 0x66,
|
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
|
static gboolean
|
||||||
gst_rtp_asf_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
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);
|
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;
|
goto invalid_headers;
|
||||||
|
|
||||||
src_caps = gst_caps_new_simple ("video/x-ms-asf", NULL);
|
src_caps = gst_caps_new_simple ("video/x-ms-asf", NULL);
|
||||||
@ -290,8 +292,7 @@ gst_rtp_asf_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||||||
if (L) {
|
if (L) {
|
||||||
/* L bit set, len contains the length of the packet */
|
/* L bit set, len contains the length of the packet */
|
||||||
packet_len = len_offs;
|
packet_len = len_offs;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
packet_len = 0;
|
packet_len = 0;
|
||||||
/* else it contains an offset which we don't handle yet */
|
/* else it contains an offset which we don't handle yet */
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
@ -300,7 +301,8 @@ gst_rtp_asf_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||||||
if (packet_len > payload_len)
|
if (packet_len > payload_len)
|
||||||
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) {
|
if (packet_len >= depay->packet_size) {
|
||||||
GST_LOG_OBJECT (depay, "creating subbuffer");
|
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 */
|
/* we need to pad with zeroes to packet_size if it's smaller */
|
||||||
outbuf = gst_buffer_new_and_alloc (depay->packet_size);
|
outbuf = gst_buffer_new_and_alloc (depay->packet_size);
|
||||||
memcpy (GST_BUFFER_DATA (outbuf), payload, packet_len);
|
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));
|
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (depayload->srcpad));
|
||||||
|
@ -383,7 +383,9 @@ gst_synaesthesia_chain (GstPad * pad, GstBuffer * buffer)
|
|||||||
gst_adapter_push (synaesthesia->adapter, buffer);
|
gst_adapter_push (synaesthesia->adapter, buffer);
|
||||||
|
|
||||||
/* this is what we want */
|
/* 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 */
|
/* this is what we have */
|
||||||
avail = gst_adapter_available (synaesthesia->adapter);
|
avail = gst_adapter_available (synaesthesia->adapter);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user