Commit 7e12b58e authored by Wim Taymans's avatar Wim Taymans

update for adapter api changes

parent fbaf216d
......@@ -249,7 +249,7 @@ gst_flac_tag_chain (GstPad * pad, GstBuffer * buffer)
size = (block_header[1] << 16)
| (block_header[2] << 8)
| block_header[3];
gst_adapter_unmap (tag->adapter, 0);
gst_adapter_unmap (tag->adapter);
/* The 4 bytes long header isn't included in the metadata size */
tag->metadata_block_size = size + 4;
......
......@@ -351,7 +351,8 @@ gst_au_parse_parse_header (GstAuParse * auparse)
gst_au_parse_negotiate_srcpad (auparse, tempcaps);
GST_DEBUG_OBJECT (auparse, "offset=%" G_GINT64_FORMAT, auparse->offset);
gst_adapter_unmap (auparse->adapter, auparse->offset);
gst_adapter_unmap (auparse->adapter);
gst_adapter_flush (auparse->adapter, auparse->offset);
gst_caps_unref (tempcaps);
return GST_FLOW_OK;
......@@ -359,27 +360,27 @@ gst_au_parse_parse_header (GstAuParse * auparse)
/* ERRORS */
unknown_header:
{
gst_adapter_unmap (auparse->adapter, 0);
gst_adapter_unmap (auparse->adapter);
GST_ELEMENT_ERROR (auparse, STREAM, WRONG_TYPE, (NULL), (NULL));
return GST_FLOW_ERROR;
}
unsupported_sample_rate:
{
gst_adapter_unmap (auparse->adapter, 0);
gst_adapter_unmap (auparse->adapter);
GST_ELEMENT_ERROR (auparse, STREAM, FORMAT, (NULL),
("Unsupported samplerate: %u", auparse->samplerate));
return GST_FLOW_ERROR;
}
unsupported_number_of_channels:
{
gst_adapter_unmap (auparse->adapter, 0);
gst_adapter_unmap (auparse->adapter);
GST_ELEMENT_ERROR (auparse, STREAM, FORMAT, (NULL),
("Unsupported number of channels: %u", auparse->channels));
return GST_FLOW_ERROR;
}
unknown_format:
{
gst_adapter_unmap (auparse->adapter, 0);
gst_adapter_unmap (auparse->adapter);
GST_ELEMENT_ERROR (auparse, STREAM, FORMAT, (NULL),
("Unsupported encoding: %u", auparse->encoding));
return GST_FLOW_ERROR;
......
......@@ -914,7 +914,7 @@ gst_avi_demux_peek_chunk_info (GstAviDemux * avi, guint32 * tag, guint32 * size)
data = gst_adapter_map (avi->adapter, 8);
*tag = GST_READ_UINT32_LE (data);
*size = GST_READ_UINT32_LE (data + 4);
gst_adapter_unmap (avi->adapter, 0);
gst_adapter_unmap (avi->adapter);
return TRUE;
}
......@@ -3248,7 +3248,7 @@ gst_avi_demux_stream_header_push (GstAviDemux * avi)
tag = GST_READ_UINT32_LE (data);
size = GST_READ_UINT32_LE (data + 4);
ltag = GST_READ_UINT32_LE (data + 8);
gst_adapter_unmap (avi->adapter, 0);
gst_adapter_unmap (avi->adapter);
if (tag == GST_RIFF_TAG_LIST) {
switch (ltag) {
......
......@@ -612,7 +612,7 @@ gst_goom_chain (GstPad * pad, GstBuffer * buffer)
GST_DEBUG_OBJECT (goom, "allocating output buffer");
ret = gst_buffer_pool_acquire_buffer (goom->pool, &outbuf, NULL);
if (ret != GST_FLOW_OK) {
gst_adapter_unmap (goom->adapter, 0);
gst_adapter_unmap (goom->adapter);
goto beach;
}
}
......@@ -623,7 +623,7 @@ gst_goom_chain (GstPad * pad, GstBuffer * buffer)
out_frame = (guchar *) goom_update (goom->plugin, goom->datain, 0, 0);
gst_buffer_fill (outbuf, 0, out_frame, goom->outsize);
gst_adapter_unmap (goom->adapter, 0);
gst_adapter_unmap (goom->adapter);
GST_DEBUG ("Pushing frame with time=%" GST_TIME_FORMAT ", duration=%"
GST_TIME_FORMAT, GST_TIME_ARGS (timestamp),
......
......@@ -331,7 +331,8 @@ gst_icydemux_parse_and_send_tags (GstICYDemux * icydemux)
g_strfreev (strings);
g_free (buffer);
gst_adapter_unmap (icydemux->meta_adapter, length);
gst_adapter_unmap (icydemux->meta_adapter);
gst_adapter_flush (icydemux->meta_adapter, length);
if (!gst_tag_list_is_empty (tags))
gst_icydemux_tag_found (icydemux, tags);
......
......@@ -4050,7 +4050,7 @@ gst_qtdemux_chain (GstPad * sinkpad, GstBuffer * inbuf)
/* get fourcc/length, set neededbytes */
extract_initial_length_and_fourcc ((guint8 *) data, demux->neededbytes,
&size, &fourcc);
gst_adapter_unmap (demux->adapter, 0);
gst_adapter_unmap (demux->adapter);
data = NULL;
GST_DEBUG_OBJECT (demux, "Peeking found [%" GST_FOURCC_FORMAT "] "
"size: %" G_GUINT64_FORMAT, GST_FOURCC_ARGS (fourcc), size);
......@@ -4174,7 +4174,7 @@ gst_qtdemux_chain (GstPad * sinkpad, GstBuffer * inbuf)
GST_DEBUG_OBJECT (demux, "Parsing [moof]");
if (!qtdemux_parse_moof (demux, data, demux->neededbytes,
demux->offset, NULL)) {
gst_adapter_unmap (demux->adapter, 0);
gst_adapter_unmap (demux->adapter);
ret = GST_FLOW_ERROR;
goto done;
}
......@@ -4193,7 +4193,7 @@ gst_qtdemux_chain (GstPad * sinkpad, GstBuffer * inbuf)
GST_FOURCC_ARGS (fourcc));
/* Let's jump that one and go back to initial state */
}
gst_adapter_unmap (demux->adapter, 0);
gst_adapter_unmap (demux->adapter);
data = NULL;
if (demux->mdatbuffer && demux->n_streams) {
......
......@@ -443,7 +443,7 @@ multipart_parse_header (GstMultipartDemux * multipart)
GST_DEBUG_OBJECT (multipart,
"Parsed the header - boundary: %s, mime-type: %s, content-length: %d",
multipart->boundary, multipart->mime_type, multipart->content_length);
gst_adapter_unmap (multipart->adapter, 0);
gst_adapter_unmap (multipart->adapter);
return next - data;
}
......@@ -466,7 +466,7 @@ multipart_parse_header (GstMultipartDemux * multipart)
need_more_data:
GST_DEBUG_OBJECT (multipart, "Need more data for the header");
gst_adapter_unmap (multipart->adapter, 0);
gst_adapter_unmap (multipart->adapter);
return MULTIPART_NEED_MORE_DATA;
......@@ -474,13 +474,13 @@ wrong_header:
{
GST_ELEMENT_ERROR (multipart, STREAM, DEMUX, (NULL),
("Boundary not found in the multipart header"));
gst_adapter_unmap (multipart->adapter, 0);
gst_adapter_unmap (multipart->adapter);
return MULTIPART_DATA_ERROR;
}
eos:
{
GST_DEBUG_OBJECT (multipart, "we are EOS");
gst_adapter_unmap (multipart->adapter, 0);
gst_adapter_unmap (multipart->adapter);
return MULTIPART_DATA_EOS;
}
}
......@@ -506,7 +506,7 @@ multipart_find_boundary (GstMultipartDemux * multipart, gint * datalen)
else if (data[len] == '\n')
len += 1;
gst_adapter_unmap (multipart->adapter, 0);
gst_adapter_unmap (multipart->adapter);
/* Don't check if boundary is actually there, but let the header parsing
* bail out if it isn't */
return len;
......@@ -535,12 +535,12 @@ multipart_find_boundary (GstMultipartDemux * multipart, gint * datalen)
len -= 1;
*datalen = len;
gst_adapter_unmap (multipart->adapter, 0);
gst_adapter_unmap (multipart->adapter);
multipart->scanpos = 0;
return pos - data;
}
}
gst_adapter_unmap (multipart->adapter, 0);
gst_adapter_unmap (multipart->adapter);
multipart->scanpos = pos - data;
return MULTIPART_NEED_MORE_DATA;
}
......
......@@ -1769,7 +1769,8 @@ gst_rtp_h263_pay_flush (GstRtpH263Pay * rtph263pay)
end:
gst_rtp_h263_pay_context_destroy (context,
context->piclayer->ptype_srcformat);
gst_adapter_unmap (rtph263pay->adapter, rtph263pay->available_data);
gst_adapter_unmap (rtph263pay->adapter);
gst_adapter_flush (rtph263pay->adapter, rtph263pay->available_data);
return ret;
}
......
......@@ -678,7 +678,7 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay)
}
parsed_len++;
}
gst_adapter_unmap (rtph263ppay->adapter, 0);
gst_adapter_unmap (rtph263ppay->adapter);
}
/* for picture start frames (non-fragmented), we need to remove the first
......
......@@ -1303,7 +1303,8 @@ gst_rtp_h264_pay_handle_buffer (GstBaseRTPPayload * basepayload,
done:
if (bytestream) {
gst_adapter_unmap (rtph264pay->adapter, pushed);
gst_adapter_unmap (rtph264pay->adapter);
gst_adapter_flush (rtph264pay->adapter, pushed);
} else {
gst_buffer_unmap (buffer, bdata, bsize);
gst_buffer_unref (buffer);
......
......@@ -1014,7 +1014,7 @@ gst_wavparse_peek_chunk_info (GstWavParse * wav, guint32 * tag, guint32 * size)
data = gst_adapter_map (wav->adapter, 8);
*tag = GST_READ_UINT32_LE (data);
*size = GST_READ_UINT32_LE (data + 4);
gst_adapter_unmap (wav->adapter, 0);
gst_adapter_unmap (wav->adapter);
GST_DEBUG ("Next chunk size is %d bytes, type %" GST_FOURCC_FORMAT, *size,
GST_FOURCC_ARGS (*tag));
......@@ -1357,7 +1357,8 @@ gst_wavparse_stream_headers (GstWavParse * wav)
gst_adapter_flush (wav->adapter, 8);
data = gst_adapter_map (wav->adapter, data_size);
wav->fact = GST_READ_UINT32_LE (data);
gst_adapter_unmap (wav->adapter, GST_ROUND_UP_2 (size));
gst_adapter_unmap (wav->adapter);
gst_adapter_flush (wav->adapter, GST_ROUND_UP_2 (size));
} else {
gst_buffer_unref (buf);
if ((res =
......@@ -1402,7 +1403,7 @@ gst_wavparse_stream_headers (GstWavParse * wav)
acid = (const gst_riff_acid *) gst_adapter_map (wav->adapter,
data_size);
tempo = acid->tempo;
gst_adapter_unmap (wav->adapter, 0);
gst_adapter_unmap (wav->adapter);
} else {
gst_buffer_unref (buf);
if ((res =
......@@ -1441,7 +1442,7 @@ gst_wavparse_stream_headers (GstWavParse * wav)
}
data = gst_adapter_map (wav->adapter, 12);
ltag = GST_READ_UINT32_LE (data + 8);
gst_adapter_unmap (wav->adapter, 0);
gst_adapter_unmap (wav->adapter);
} else {
gst_buffer_unref (buf);
if ((res =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment