update for memory api changes

This commit is contained in:
Wim Taymans 2012-03-15 13:38:16 +01:00
parent 11c077bfd1
commit 7cd283ebc6
6 changed files with 10 additions and 6 deletions

View file

@ -844,7 +844,8 @@ nav_retry:
g_assert (cur_output_size < 1024);
/* create the buffer (TODO: use buffer pool?) */
buf = gst_buffer_new_allocate (NULL, cur_output_size * DVD_VIDEO_LB_LEN, 0);
buf =
gst_buffer_new_allocate (NULL, cur_output_size * DVD_VIDEO_LB_LEN, NULL);
GST_LOG_OBJECT (src, "Going to read %u sectors @ pack %d", cur_output_size,
src->cur_pack);

View file

@ -771,7 +771,7 @@ gst_lamemp3enc_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf)
/* allocate space for output */
mp3_buffer_size = 1.25 * num_samples + 7200;
mp3_buf = gst_buffer_new_allocate (NULL, mp3_buffer_size, 0);
mp3_buf = gst_buffer_new_allocate (NULL, mp3_buffer_size, NULL);
gst_buffer_map (mp3_buf, &mp3_map, GST_MAP_WRITE);
/* lame seems to be too stupid to get mono interleaved going */

View file

@ -1144,7 +1144,8 @@ gst_mpeg2dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
*/
#ifdef enable_user_data
if (info->user_data_len > 0) {
GstBuffer *udbuf = gst_buffer_new_allocate (NULL, info->user_data_len, 0);
GstBuffer *udbuf =
gst_buffer_new_allocate (NULL, info->user_data_len, NULL);
gst_buffer_fill (udbuf, 0, info->user_data, info->user_data_len);

View file

@ -2078,7 +2078,7 @@ gst_x264_enc_encode_frame (GstX264Enc * encoder, x264_picture_t * pic_in,
goto out;
}
out_buf = gst_buffer_new_allocate (NULL, i_size, 0);
out_buf = gst_buffer_new_allocate (NULL, i_size, NULL);
gst_buffer_fill (out_buf, 0, data, i_size);
GST_LOG_OBJECT (encoder,

View file

@ -648,7 +648,7 @@ gst_dvdlpcmdec_chain_raw (GstPad * pad, GstObject * parent, GstBuffer * buf)
if (samples < 1)
goto drop;
outbuf = gst_buffer_new_allocate (NULL, samples * 3, 0);
outbuf = gst_buffer_new_allocate (NULL, samples * 3, NULL);
gst_buffer_copy_into (outbuf, buf, GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
/* adjust samples so we can calc the new timestamp */

View file

@ -686,6 +686,7 @@ gst_send_subtitle_frame (GstDvdSubDec * dec, GstClockTime end_ts)
GstVideoFrame frame;
guint8 *data;
gint x, y;
static GstAllocationParams params = { 0, 0, 0, 3, };
g_assert (dec->have_title);
g_assert (dec->next_ts <= end_ts);
@ -697,7 +698,8 @@ gst_send_subtitle_frame (GstDvdSubDec * dec, GstClockTime end_ts)
}
out_buf =
gst_buffer_new_allocate (NULL, 4 * GST_VIDEO_INFO_SIZE (&dec->info), 3);
gst_buffer_new_allocate (NULL, 4 * GST_VIDEO_INFO_SIZE (&dec->info),
&params);
gst_video_frame_map (&frame, &dec->info, out_buf, GST_MAP_READWRITE);
data = GST_VIDEO_FRAME_PLANE_DATA (&frame, 0);