summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-02-09 12:14:04 +1100
committerMatthew Waters <matthew@centricular.com>2016-02-09 12:30:25 +1100
commitcd4a93da3b433de215903184f18944668053e04c (patch)
treeef4ffadd7e9d45efff5332288479ac717d411e01 /sys
parent44c0d75cffcc82a797b6b9db9988fcbbc59a40b6 (diff)
glsyncmeta: separate out gpu/cpu waits.
CPU waits are more expensive and are only required if the CPU is ever going to access the data. GPU waits perform inter-context synchronisation and are cheaper as they don't require CPU intervention.
Diffstat (limited to 'sys')
-rw-r--r--sys/androidmedia/gstamcvideodec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/androidmedia/gstamcvideodec.c b/sys/androidmedia/gstamcvideodec.c
index 9d6c6f70a..f024b4cf1 100644
--- a/sys/androidmedia/gstamcvideodec.c
+++ b/sys/androidmedia/gstamcvideodec.c
@@ -490,7 +490,7 @@ gst_amc_video_dec_close (GstVideoDecoder * decoder)
GError *err = NULL;
if (!gst_amc_jni_call_void_method (env, &err, self->listener,
- self->set_context_id, GST_AMC_VIDEO_DEC_TO_JLONG (NULL))) {
+ self->set_context_id, GST_AMC_VIDEO_DEC_TO_JLONG (NULL))) {
GST_ERROR_OBJECT (self, "Failed to unset back pointer on the listener. "
"crashes/hangs may ensue: %s", err ? err->message : "Unknown");
GST_ELEMENT_ERROR_FROM_ERROR (self, err);
@@ -1010,8 +1010,8 @@ _gl_sync_render_unlocked (struct gl_sync *sync)
if (!af_meta) {
GST_WARNING ("Failed to retreive the transformation meta from the "
"gl_sync %p buffer %p", sync, sync->buffer);
- } else if (gst_amc_surface_texture_get_transform_matrix (sync->surface->
- texture, matrix, &error)) {
+ } else if (gst_amc_surface_texture_get_transform_matrix (sync->
+ surface->texture, matrix, &error)) {
gst_video_affine_transformation_meta_apply_matrix (af_meta, matrix);
gst_video_affine_transformation_meta_apply_matrix (af_meta, yflip_matrix);
@@ -1370,6 +1370,7 @@ retry:
sync);
sync_meta->set_sync = _amc_gl_set_sync;
sync_meta->wait = _amc_gl_wait;
+ sync_meta->wait_cpu = _amc_gl_wait;
sync_meta->copy = _amc_gl_copy;
sync_meta->free = _amc_gl_free;
@@ -1974,7 +1975,7 @@ gst_amc_video_dec_set_format (GstVideoDecoder * decoder,
if (self->listener) {
if (!gst_amc_jni_call_void_method (env, &err, self->listener,
- self->set_context_id, GST_AMC_VIDEO_DEC_TO_JLONG (NULL))) {
+ self->set_context_id, GST_AMC_VIDEO_DEC_TO_JLONG (NULL))) {
ret = FALSE;
goto done;
}