diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-07-23 10:54:17 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-07-23 10:54:17 +0200 |
commit | 47546ab2df30d5090562fd6e313f0e98ef226e03 (patch) | |
tree | 1ce0abaebf7ed1eb33179bbf16cf23877928f037 /ext/schroedinger | |
parent | b60da6223e3cc5f10cac799228c85ec2a7562456 (diff) | |
download | gstreamer-plugins-bad-47546ab2df30d5090562fd6e313f0e98ef226e03.tar.gz |
schro: Map raw video buffers with the correct read/write flags
Diffstat (limited to 'ext/schroedinger')
-rw-r--r-- | ext/schroedinger/gstschrodec.c | 5 | ||||
-rw-r--r-- | ext/schroedinger/gstschroenc.c | 1 | ||||
-rw-r--r-- | ext/schroedinger/gstschroutils.c | 6 | ||||
-rw-r--r-- | ext/schroedinger/gstschroutils.h | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/ext/schroedinger/gstschrodec.c b/ext/schroedinger/gstschrodec.c index 939588dd3..ced46018d 100644 --- a/ext/schroedinger/gstschrodec.c +++ b/ext/schroedinger/gstschrodec.c @@ -458,8 +458,9 @@ gst_schro_dec_process (GstSchroDec * schro_dec, gboolean eos) gst_video_decoder_allocate_output_buffer (GST_VIDEO_DECODER (schro_dec)); schro_frame = - gst_schro_buffer_wrap (outbuf, GST_VIDEO_INFO_FORMAT (&state->info), - state->info.width, state->info.height); + gst_schro_buffer_wrap (outbuf, TRUE, + GST_VIDEO_INFO_FORMAT (&state->info), state->info.width, + state->info.height); schro_decoder_add_output_picture (schro_dec->decoder, schro_frame); gst_video_codec_state_unref (state); break; diff --git a/ext/schroedinger/gstschroenc.c b/ext/schroedinger/gstschroenc.c index 48907a488..0affaa29e 100644 --- a/ext/schroedinger/gstschroenc.c +++ b/ext/schroedinger/gstschroenc.c @@ -525,6 +525,7 @@ gst_schro_enc_handle_frame (GstVideoEncoder * base_video_encoder, /* FIXME : We could make that method just take GstVideoInfo ... */ schro_frame = gst_schro_buffer_wrap (gst_buffer_ref (frame->input_buffer), + FALSE, GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info), GST_VIDEO_INFO_HEIGHT (info)); diff --git a/ext/schroedinger/gstschroutils.c b/ext/schroedinger/gstschroutils.c index c08a8ff68..32792090b 100644 --- a/ext/schroedinger/gstschroutils.c +++ b/ext/schroedinger/gstschroutils.c @@ -64,14 +64,14 @@ gst_schro_frame_get_buffer (SchroFrame * frame) } SchroFrame * -gst_schro_buffer_wrap (GstBuffer * buf, GstVideoFormat format, int width, - int height) +gst_schro_buffer_wrap (GstBuffer * buf, gboolean write, GstVideoFormat format, + int width, int height) { SchroFrame *frame; GstMapInfo info; FrameData *data; - if (!gst_buffer_map (buf, &info, GST_MAP_READ)) + if (!gst_buffer_map (buf, &info, (write ? GST_MAP_READWRITE : GST_MAP_READ))) return NULL; switch (format) { diff --git a/ext/schroedinger/gstschroutils.h b/ext/schroedinger/gstschroutils.h index 149ab3e1a..705dd8ca4 100644 --- a/ext/schroedinger/gstschroutils.h +++ b/ext/schroedinger/gstschroutils.h @@ -35,7 +35,7 @@ #endif SchroFrame * -gst_schro_buffer_wrap (GstBuffer *buf, GstVideoFormat format, int width, +gst_schro_buffer_wrap (GstBuffer *buf, gboolean write, GstVideoFormat format, int width, int height); GstBuffer * gst_schro_frame_get_buffer (SchroFrame * frame); |