ptr = data;
left = size;
- GST_LOG_OBJECT (ogg, "configuring codec_data of size %u", left);
+ GST_LOG_OBJECT (ogg, "configuring codec_data of size %" G_GSIZE_FORMAT, left);
/* skip headers */
ptr += 22;
}
write_failed:
{
- GST_ELEMENT_ERROR (ogg, STREAM, DECODE,
- (NULL), ("failed to write %d bytes to the sync buffer", size));
+ GST_ELEMENT_ERROR (ogg, STREAM, DECODE, (NULL),
+ ("failed to write %" G_GSIZE_FORMAT " bytes to the sync buffer", size));
ret = GST_FLOW_ERROR;
goto done;
}
walk = walk->next;
/* mark buffer */
- GST_LOG ("Setting IN_CAPS on buffer of length %d",
+ GST_LOG ("Setting IN_CAPS on buffer of length %" G_GSIZE_FORMAT,
gst_buffer_get_size (buf));
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
memcpy (oggbuffer, data, size);
if (G_UNLIKELY (ogg_sync_wrote (&ogg->sync, size) < 0)) {
- GST_ELEMENT_ERROR (ogg, STREAM, DECODE,
- (NULL), ("failed to write %d bytes to the sync buffer", size));
+ GST_ELEMENT_ERROR (ogg, STREAM, DECODE, (NULL),
+ ("failed to write %" G_GSIZE_FORMAT " bytes to the sync buffer", size));
ret = GST_FLOW_ERROR;
}
xsize = (xsize << 8) | data[n];
}
- GST_LOG_OBJECT (ogm, "[0x%02x] samples: %d, hdrbytes: %d, datasize: %d",
- data[0], xsize, len, size - len - 1);
+ GST_LOG_OBJECT (ogm, "[0x%02x] samples: %d, hdrbytes: %d, datasize: %"
+ G_GSIZE_FORMAT, data[0], xsize, len, size - len - 1);
sbuf =
gst_buffer_copy_region (buf, GST_BUFFER_COPY_ALL, len + 1,
buffer_too_small:
{
GST_ELEMENT_ERROR (ogm, STREAM, DECODE, (NULL),
- ("buffer too small, len+1=%u, size=%u", len + 1, size));
+ ("buffer too small, len+1=%u, size=%" G_GSIZE_FORMAT, len + 1, size));
return GST_FLOW_ERROR;
}
}
}
/* render text */
- GST_DEBUG ("rendering '%*s'", size, data);
+ GST_DEBUG ("rendering '%*s'", (gint) size, data);
pango_layout_set_markup (render->layout, (gchar *) data, size);
gst_text_render_render_pangocairo (render);
gst_buffer_unmap (inbuf, data, size);
}
/* add buffer to gather queue */
- GST_DEBUG_OBJECT (dec, "gathering buffer %p, size %u", buf,
+ GST_DEBUG_OBJECT (dec, "gathering buffer %p, size %" G_GSIZE_FORMAT, buf,
gst_buffer_get_size (buf));
dec->gather = g_list_prepend (dec->gather, buf);
goto done;
size = sample_count * vd->vi.channels * vd->width;
- GST_LOG_OBJECT (vd, "%d samples ready for reading, size %d", sample_count,
- size);
+ GST_LOG_OBJECT (vd, "%d samples ready for reading, size %" G_GSIZE_FORMAT,
+ sample_count, size);
/* alloc buffer for it */
out = gst_buffer_new_and_alloc (size);
sample_count, vd->vi.channels, vd->width);
#endif
- GST_LOG_OBJECT (vd, "setting output size to %d", size);
+ GST_LOG_OBJECT (vd, "setting output size to %" G_GSIZE_FORMAT, size);
gst_buffer_unmap (out, data, size);
/* this should not overflow */
if (G_LIKELY (buf)) {
GST_DEBUG_OBJECT (vd,
- "gathering buffer %p of size %u, time %" GST_TIME_FORMAT
- ", dur %" GST_TIME_FORMAT, buf, gst_buffer_get_size (buf),
+ "gathering buffer %p of size %" G_GSIZE_FORMAT
+ ", time %" GST_TIME_FORMAT ", dur %" GST_TIME_FORMAT,
+ buf, gst_buffer_get_size (buf),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
vorbisenc->next_discont = FALSE;
}
- GST_LOG_OBJECT (vorbisenc, "encoded buffer of %d bytes",
+ GST_LOG_OBJECT (vorbisenc, "encoded buffer of %" G_GSIZE_FORMAT " bytes",
gst_buffer_get_size (outbuf));
return outbuf;
}
GST_BUFFER_TIMESTAMP (outbuf) = GST_CLOCK_TIME_NONE;
GST_BUFFER_DURATION (outbuf) = GST_CLOCK_TIME_NONE;
- GST_DEBUG ("created header packet buffer, %d bytes",
+ GST_DEBUG ("created header packet buffer, %" G_GSIZE_FORMAT " bytes",
gst_buffer_get_size (outbuf));
return outbuf;
}
if (!GST_CLOCK_TIME_IS_VALID (time)) {
render_start = gst_base_audio_sink_get_offset (sink);
render_stop = render_start + samples;
- GST_DEBUG_OBJECT (sink,
- "Buffer of size %u has no time. Using render_start=%" G_GUINT64_FORMAT,
- size, render_start);
+ GST_DEBUG_OBJECT (sink, "Buffer of size %" G_GSIZE_FORMAT " has no time."
+ " Using render_start=%" G_GUINT64_FORMAT, size, render_start);
/* we don't have a start so we don't know stop either */
stop = -1;
goto no_sync;
/* would be nice to arrange for pad_alloc_buffer to return data -- as it is we
will copy twice, once into data, once into DMA */
- GST_LOG_OBJECT (basesink, "pulling %d bytes offset %" G_GUINT64_FORMAT
+ GST_LOG_OBJECT (basesink, "pulling %u bytes offset %" G_GUINT64_FORMAT
" to fill audio buffer", len, basesink->offset);
ret =
gst_pad_pull_range (basesink->sinkpad, basesink->segment.position, len,
if (len != size) {
GST_INFO_OBJECT (basesink,
- "got different size than requested from sink pad: %u != %u", len, size);
+ "got different size than requested from sink pad: %u"
+ " != %" G_GSIZE_FORMAT, len, size);
len = MIN (size, len);
}
size = gst_buffer_get_size (strf_data);
if (strf_data == NULL || size < 22) {
- GST_WARNING ("WAVE_FORMAT_EXTENSIBLE data size is %d (expected: 22)",
- (strf_data) ? size : -1);
+ GST_WARNING ("WAVE_FORMAT_EXTENSIBLE data size is %" G_GSIZE_FORMAT
+ " (expected: 22)", (strf_data) ? size : -1);
return NULL;
}
too_small:
{
/* short read, we return UNEXPECTED to mark the EOS case */
- GST_DEBUG_OBJECT (element, "not enough data (available=%u, needed=%u)",
- gst_buffer_get_size (buf), size);
+ GST_DEBUG_OBJECT (element, "not enough data (available=%" G_GSIZE_FORMAT
+ ", needed=%u)", gst_buffer_get_size (buf), size);
gst_buffer_unref (buf);
return GST_FLOW_UNEXPECTED;
}
too_small:
{
GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, (NULL),
- ("Not enough data to parse RIFF header (%d available, %d needed)",
- size, 12));
+ ("Not enough data to parse RIFF header (%" G_GSIZE_FORMAT " available,"
+ " %d needed)", size, 12));
gst_buffer_unmap (buf, data, size);
gst_buffer_unref (buf);
return FALSE;
too_small:
{
GST_ERROR_OBJECT (element,
- "Too small strh (%d available, %d needed)",
+ "Too small strh (%" G_GSIZE_FORMAT " available, %d needed)",
size, (int) sizeof (gst_riff_strh));
gst_buffer_unmap (buf, data, size);
gst_buffer_unref (buf);
*data = NULL;
if (strf->size > size) {
GST_WARNING_OBJECT (element,
- "strf_vids header gave %d bytes data, only %d available",
- strf->size, size);
+ "strf_vids header gave %d bytes data, only %" G_GSIZE_FORMAT
+ " available", strf->size, size);
strf->size = size;
}
if (sizeof (gst_riff_strf_vids) < size) {
GST_INFO_OBJECT (element, " num_colors %d", strf->num_colors);
GST_INFO_OBJECT (element, " imp_colors %d", strf->imp_colors);
if (*data)
- GST_INFO_OBJECT (element, " %d bytes extradata",
+ GST_INFO_OBJECT (element, " %" G_GSIZE_FORMAT " bytes extradata",
gst_buffer_get_size (*data));
*_strf = strf;
too_small:
{
GST_ERROR_OBJECT (element,
- "Too small strf_vids (%d available, %d needed)",
+ "Too small strf_vids (%" G_GSIZE_FORMAT " available, %d needed)",
size, (int) sizeof (gst_riff_strf_vids));
gst_buffer_unmap (buf, data, size);
gst_buffer_unref (buf);
GST_INFO_OBJECT (element, " blockalign %d", strf->blockalign);
GST_INFO_OBJECT (element, " size %d", strf->size);
if (*data)
- GST_INFO_OBJECT (element, " %d bytes extradata",
+ GST_INFO_OBJECT (element, " %" G_GSIZE_FORMAT " bytes extradata",
gst_buffer_get_size (*data));
gst_buffer_unmap (buf, bdata, bsize);
too_small:
{
GST_ERROR_OBJECT (element,
- "Too small strf_auds (%d available, %" G_GSSIZE_FORMAT " needed)",
- bsize, sizeof (gst_riff_strf_auds));
+ "Too small strf_auds (%" G_GSIZE_FORMAT " available"
+ ", %" G_GSSIZE_FORMAT " needed)", bsize, sizeof (gst_riff_strf_auds));
gst_buffer_unmap (buf, bdata, bsize);
gst_buffer_unref (buf);
return FALSE;
too_small:
{
GST_ERROR_OBJECT (element,
- "Too small strf_iavs (%d available, %" G_GSSIZE_FORMAT " needed)",
- bsize, sizeof (gst_riff_strf_iavs));
+ "Too small strf_iavs (%" G_GSIZE_FORMAT "available"
+ ", %" G_GSSIZE_FORMAT " needed)", bsize, sizeof (gst_riff_strf_iavs));
gst_buffer_unmap (buf, bdata, bsize);
gst_buffer_unref (buf);
return FALSE;
if (tsize > left) {
GST_WARNING_OBJECT (element,
- "Tagsize %d is larger than available data %d", tsize, left);
+ "Tagsize %d is larger than available data %" G_GSIZE_FORMAT,
+ tsize, left);
tsize = left;
}
priv->next_seqnum = data.seqnum;
payload->timestamp = data.rtptime;
- GST_LOG_OBJECT (payload,
- "Preparing to push packet with size %d, seq=%d, rtptime=%u, timestamp %"
- GST_TIME_FORMAT, (is_list) ? -1 :
- gst_buffer_get_size (GST_BUFFER (obj)), payload->seqnum, data.rtptime,
- GST_TIME_ARGS (data.timestamp));
+ GST_LOG_OBJECT (payload, "Preparing to push packet with size %"
+ G_GSIZE_FORMAT ", seq=%d, rtptime=%u, timestamp %" GST_TIME_FORMAT,
+ (is_list) ? -1 : gst_buffer_get_size (GST_BUFFER (obj)),
+ payload->seqnum, data.rtptime, GST_TIME_ARGS (data.timestamp));
if (g_atomic_int_compare_and_exchange (&payload->priv->
notified_first_timestamp, 1, 0)) {
data = gst_buffer_map (reader->buffer, &size, NULL, GST_MAP_READ);
if (real_offset >= size) {
- GST_WARNING ("Invalid offset %u for buffer of size %u, not adding tag %s",
- real_offset, size, tag->gst_tag);
+ GST_WARNING ("Invalid offset %u for buffer of size %" G_GSIZE_FORMAT
+ ", not adding tag %s", real_offset, size, tag->gst_tag);
gst_buffer_unmap (reader->buffer, data, size);
return;
}
bdata = gst_buffer_map (reader->buffer, &bsize, NULL, GST_MAP_READ);
if (real_offset >= bsize) {
- GST_WARNING ("Invalid offset %u for buffer of size %u, not adding tag %s",
- real_offset, bsize, tag->gst_tag);
+ GST_WARNING ("Invalid offset %u for buffer of size %" G_GSIZE_FORMAT
+ ", not adding tag %s", real_offset, bsize, tag->gst_tag);
gst_buffer_unmap (reader->buffer, bdata, bsize);
return;
}
data = gst_buffer_map (exif_reader->buffer, &size, NULL, GST_MAP_READ);
if (real_offset >= size) {
- GST_WARNING ("Invalid offset %u for buffer of size %u", real_offset, size);
+ GST_WARNING ("Invalid offset %u for buffer of size %" G_GSIZE_FORMAT,
+ real_offset, size);
goto reader_fail;
}
data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ);
- GST_LOG ("Parsing exif tags with tiff header of size %u", size);
+ GST_LOG ("Parsing exif tags with tiff header of size %" G_GSIZE_FORMAT, size);
gst_byte_reader_init (&reader, data, size);
TYPE_FIND_MIN_SIZE + demux->priv->strip_start)
break; /* Go get more data first */
- GST_DEBUG_OBJECT (demux, "Typefinding with size %d",
+ GST_DEBUG_OBJECT (demux, "Typefinding with size %" G_GSIZE_FORMAT,
demux->priv->collect_size);
/* Trim the buffer and adjust offset for typefinding */
bsize = gst_buffer_get_size (buffer);
if (bsize < klass->min_end_size) {
- GST_DEBUG_OBJECT (demux, "Only managed to read %u bytes from file "
- "(required: %u bytes)", bsize, klass->min_end_size);
+ GST_DEBUG_OBJECT (demux, "Only managed to read %" G_GSIZE_FORMAT " bytes"
+ "from file (required: %u bytes)", bsize, klass->min_end_size);
goto done;
}
bsize = gst_buffer_get_size (buffer);
if (bsize < tagsize) {
- GST_DEBUG_OBJECT (demux, "Only managed to read %u bytes from file",
- bsize);
+ GST_DEBUG_OBJECT (demux, "Only managed to read %" G_GSIZE_FORMAT
+ " bytes from file", bsize);
goto done;
}
}
bsize = gst_buffer_get_size (buffer);
if (bsize < klass->min_start_size) {
- GST_DEBUG_OBJECT (demux, "Only managed to read %u bytes from file - "
- "no tag in this file", bsize);
+ GST_DEBUG_OBJECT (demux, "Only managed to read %" G_GSIZE_FORMAT
+ " bytes from file - no tag in this file", bsize);
goto done;
}
bsize = gst_buffer_get_size (buffer);
if (bsize < tagsize) {
- GST_DEBUG_OBJECT (demux, "Only managed to read %u bytes from file",
- bsize);
+ GST_DEBUG_OBJECT (demux, "Only managed to read %" G_GSIZE_FORMAT
+ " bytes from file", bsize);
GST_ELEMENT_ERROR (demux, STREAM, DECODE,
(_("Failed to read tag: not enough data")), (NULL));
goto done;
gst_element_set_state (pipeline, GST_STATE_PAUSED);
/* feed buffer in appsrc */
- GST_DEBUG ("feeding buffer %p, size %u, caps %" GST_PTR_FORMAT,
- buf, gst_buffer_get_size (buf), from_caps);
+ GST_DEBUG ("feeding buffer %p, size %" G_GSIZE_FORMAT ", caps %"
+ GST_PTR_FORMAT, buf, gst_buffer_get_size (buf), from_caps);
g_signal_emit_by_name (src, "push-buffer", buf, &ret);
/* now see what happens. We either got an error somewhere or the pipeline
*size = info.size;
- GST_DEBUG_OBJECT (btrans, "Returning size %u bytes for caps %"
- GST_PTR_FORMAT, *size, caps);
+ GST_DEBUG_OBJECT (btrans, "Returning size %" G_GSIZE_FORMAT " bytes"
+ "for caps %" GST_PTR_FORMAT, *size, caps);
return TRUE;
}
GstVideoFlags flags;
gint width;
gint height;
- guint size;
+ gsize size;
const gchar *color_matrix;
const gchar *chroma_site;
* asked for the max size above */
g_assert (insize == outsize);
- GST_LOG_OBJECT (adder, "channel %p: mixing %d bytes from data %p",
- collect_data, insize, indata);
+ GST_LOG_OBJECT (adder, "channel %p: mixing %" G_GSIZE_FORMAT " bytes"
+ " from data %p", collect_data, insize, indata);
/* further buffers, need to add them */
adder->func ((gpointer) outdata, (gpointer) indata,
{
GST_ELEMENT_ERROR (this, STREAM, FORMAT,
(NULL),
- ("input/output buffers are of wrong size in: %d < %d or out: %d < %d",
+ ("input/output buffers are of wrong size in: %" G_GSIZE_FORMAT " < %d"
+ " or out: %" G_GSIZE_FORMAT " < %d",
srcsize, insize, dstsize, outsize));
ret = GST_FLOW_ERROR;
goto done;
gint inrate, outrate, gcd;
gint bytes_per_samp, channels;
- GST_LOG_OBJECT (base, "asked to transform size %d in direction %s",
- size, direction == GST_PAD_SINK ? "SINK" : "SRC");
+ GST_LOG_OBJECT (base, "asked to transform size %" G_GSIZE_FORMAT
+ " in direction %s", size, direction == GST_PAD_SINK ? "SINK" : "SRC");
/* Get sample width -> bytes_per_samp, channels, inrate, outrate */
ret =
*othersize *= bytes_per_samp;
}
- GST_LOG_OBJECT (base, "transformed size %d to %d", size * bytes_per_samp,
- *othersize);
+ GST_LOG_OBJECT (base,
+ "transformed size %" G_GSIZE_FORMAT " to %" G_GSIZE_FORMAT,
+ size * bytes_per_samp, *othersize);
return ret;
}
GST_LOG_OBJECT (resample,
"Converted to buffer of %" G_GUINT32_FORMAT
- " samples (%u bytes) with timestamp %" GST_TIME_FORMAT ", duration %"
- GST_TIME_FORMAT ", offset %" G_GUINT64_FORMAT ", offset_end %"
- G_GUINT64_FORMAT, out_processed, out_size,
+ " samples (%" G_GSIZE_FORMAT " bytes) with timestamp %" GST_TIME_FORMAT
+ ", duration %" GST_TIME_FORMAT ", offset %" G_GUINT64_FORMAT
+ ", offset_end %" G_GUINT64_FORMAT, out_processed, out_size,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (outbuf)),
GST_BUFFER_OFFSET (outbuf), GST_BUFFER_OFFSET_END (outbuf));
goto done;
}
- GST_LOG_OBJECT (pad, "Handling buffer %p: size=%u, timestamp=%"
- GST_TIME_FORMAT " duration=%" GST_TIME_FORMAT
+ GST_LOG_OBJECT (pad, "Handling buffer %p: size=%" G_GSIZE_FORMAT
+ ", timestamp=%" GST_TIME_FORMAT " duration=%" GST_TIME_FORMAT
" offset=%" G_GUINT64_FORMAT " offset_end=%" G_GUINT64_FORMAT,
buffer, gst_buffer_get_size (buffer),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
g_assert (G_VALUE_TYPE (bufval) == GST_TYPE_BUFFER);
buffer = g_value_peek_pointer (bufval);
GST_DEBUG_OBJECT (sink,
- "[fd %5d] queueing streamheader buffer of length %d",
+ "[fd %5d] queueing streamheader buffer of length %" G_GSIZE_FORMAT,
client->fd.fd, gst_buffer_get_size (buffer));
gst_buffer_ref (buffer);
gst_caps_unref (caps);
caps = NULL;
- GST_LOG_OBJECT (sink, "[fd %5d] queueing buffer of length %d",
+ GST_LOG_OBJECT (sink, "[fd %5d] queueing buffer of length %" G_GSIZE_FORMAT,
client->fd.fd, gst_buffer_get_size (buffer));
gst_buffer_ref (buffer);
* We don't send the buffer to the client, since streamheaders are sent
* separately when necessary. */
if (in_caps) {
- GST_DEBUG_OBJECT (sink,
- "appending IN_CAPS buffer with length %d to streamheader",
- gst_buffer_get_size (buf));
+ GST_DEBUG_OBJECT (sink, "appending IN_CAPS buffer with length %"
+ G_GSIZE_FORMAT " to streamheader", gst_buffer_get_size (buf));
sink->streamheader = g_slist_append (sink->streamheader, buf);
} else {
/* queue the buffer, this is a regular data buffer. */
GstBuffer ** buf)
{
int ret;
- ssize_t bytes_read;
+ gssize bytes_read;
int readsize;
guint8 *data;
/* but mom, you promised to give me readsize bytes! */
goto short_read;
- GST_LOG_OBJECT (this, "returning buffer of size %d", bytes_read);
+ GST_LOG_OBJECT (this,
+ "returning buffer of size %" G_GSSIZE_FORMAT, bytes_read);
return GST_FLOW_OK;
/* ERRORS */
if (ret == GST_FLOW_OK) {
GST_LOG_OBJECT (src,
- "Returning buffer from _get of size %d, ts %"
+ "Returning buffer from _get of size %" G_GSIZE_FORMAT ", ts %"
GST_TIME_FORMAT ", dur %" GST_TIME_FORMAT
", offset %" G_GINT64_FORMAT ", offset_end %" G_GINT64_FORMAT,
gst_buffer_get_size (*outbuf),
if (ret == GST_FLOW_OK) {
GST_LOG_OBJECT (src,
- "Returning buffer from _get of size %d, ts %"
+ "Returning buffer from _get of size %" G_GSIZE_FORMAT ", ts %"
GST_TIME_FORMAT ", dur %" GST_TIME_FORMAT
", offset %" G_GINT64_FORMAT ", offset_end %" G_GINT64_FORMAT,
gst_buffer_get_size (*outbuf),
gst_base_transform_set_passthrough (trans,
(in_info.width == out_info.width && in_info.height == out_info.height));
- GST_DEBUG_OBJECT (videoscale, "from=%dx%d (par=%d/%d dar=%d/%d), size %d "
- "-> to=%dx%d (par=%d/%d dar=%d/%d borders=%d:%d), size %d",
+ GST_DEBUG_OBJECT (videoscale, "from=%dx%d (par=%d/%d dar=%d/%d), size %"
+ G_GSIZE_FORMAT " -> to=%dx%d (par=%d/%d dar=%d/%d borders=%d:%d), "
+ "size %" G_GSIZE_FORMAT,
in_info.width, in_info.height, out_info.par_n, out_info.par_d,
from_dar_n, from_dar_d, in_info.size, out_info.width,
out_info.height, out_info.par_n, out_info.par_d, to_dar_n, to_dar_d,
goto unsupported;
}
- GST_LOG_OBJECT (videoscale, "pushing buffer of %d bytes",
+ GST_LOG_OBJECT (videoscale, "pushing buffer of %" G_GSIZE_FORMAT " bytes",
gst_buffer_get_size (out));
done:
static GstBusSyncReply
create_window (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
{
- const GstStructure *s;
GstVideoOverlay *ov = NULL;
if (!gst_is_video_overlay_prepare_window_handle_message (message))