mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
update for memory api changes
This commit is contained in:
parent
11c077bfd1
commit
7cd283ebc6
6 changed files with 10 additions and 6 deletions
|
@ -844,7 +844,8 @@ nav_retry:
|
||||||
g_assert (cur_output_size < 1024);
|
g_assert (cur_output_size < 1024);
|
||||||
|
|
||||||
/* create the buffer (TODO: use buffer pool?) */
|
/* 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,
|
GST_LOG_OBJECT (src, "Going to read %u sectors @ pack %d", cur_output_size,
|
||||||
src->cur_pack);
|
src->cur_pack);
|
||||||
|
|
|
@ -771,7 +771,7 @@ gst_lamemp3enc_handle_frame (GstAudioEncoder * enc, GstBuffer * in_buf)
|
||||||
|
|
||||||
/* allocate space for output */
|
/* allocate space for output */
|
||||||
mp3_buffer_size = 1.25 * num_samples + 7200;
|
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);
|
gst_buffer_map (mp3_buf, &mp3_map, GST_MAP_WRITE);
|
||||||
|
|
||||||
/* lame seems to be too stupid to get mono interleaved going */
|
/* lame seems to be too stupid to get mono interleaved going */
|
||||||
|
|
|
@ -1144,7 +1144,8 @@ gst_mpeg2dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||||
*/
|
*/
|
||||||
#ifdef enable_user_data
|
#ifdef enable_user_data
|
||||||
if (info->user_data_len > 0) {
|
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);
|
gst_buffer_fill (udbuf, 0, info->user_data, info->user_data_len);
|
||||||
|
|
||||||
|
|
|
@ -2078,7 +2078,7 @@ gst_x264_enc_encode_frame (GstX264Enc * encoder, x264_picture_t * pic_in,
|
||||||
goto out;
|
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_buffer_fill (out_buf, 0, data, i_size);
|
||||||
|
|
||||||
GST_LOG_OBJECT (encoder,
|
GST_LOG_OBJECT (encoder,
|
||||||
|
|
|
@ -648,7 +648,7 @@ gst_dvdlpcmdec_chain_raw (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||||
if (samples < 1)
|
if (samples < 1)
|
||||||
goto drop;
|
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);
|
gst_buffer_copy_into (outbuf, buf, GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
|
||||||
|
|
||||||
/* adjust samples so we can calc the new timestamp */
|
/* adjust samples so we can calc the new timestamp */
|
||||||
|
|
|
@ -686,6 +686,7 @@ gst_send_subtitle_frame (GstDvdSubDec * dec, GstClockTime end_ts)
|
||||||
GstVideoFrame frame;
|
GstVideoFrame frame;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
gint x, y;
|
gint x, y;
|
||||||
|
static GstAllocationParams params = { 0, 0, 0, 3, };
|
||||||
|
|
||||||
g_assert (dec->have_title);
|
g_assert (dec->have_title);
|
||||||
g_assert (dec->next_ts <= end_ts);
|
g_assert (dec->next_ts <= end_ts);
|
||||||
|
@ -697,7 +698,8 @@ gst_send_subtitle_frame (GstDvdSubDec * dec, GstClockTime end_ts)
|
||||||
}
|
}
|
||||||
|
|
||||||
out_buf =
|
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),
|
||||||
|
¶ms);
|
||||||
gst_video_frame_map (&frame, &dec->info, out_buf, GST_MAP_READWRITE);
|
gst_video_frame_map (&frame, &dec->info, out_buf, GST_MAP_READWRITE);
|
||||||
|
|
||||||
data = GST_VIDEO_FRAME_PLANE_DATA (&frame, 0);
|
data = GST_VIDEO_FRAME_PLANE_DATA (&frame, 0);
|
||||||
|
|
Loading…
Reference in a new issue