video_transformation.flip = kFlipHV;
}
+ if (video_transformation.rotation == last_rotation_) {
+ // Flip is applied correctly only when whole geometry changes, so in case
+ // rotation remains the same, flip also won't be really updated.
+ // As an workaround apply different valid transform, commit it and then
+ // apply proper attributes again.
+ TIZEN_MEDIA_LOG(WARNING) << "Transform has not changed, but flip should!";
+ tizen_viewport_set_transform(video_viewport_.get(),
+ WL_OUTPUT_TRANSFORM_NORMAL);
+
+ RegisterCallbackAfterCommit(base::DoNothing());
+ wl_surface_attach(video_surface_.get(), buffer_.get(), 0, 0);
+ wl_surface_damage(video_surface_.get(), 0, 0, kDefaultGraphicsWidth,
+ kDefaultGraphicsHeight);
+ wl_surface_commit(video_surface_.get());
+ wl_display_flush(display_);
+
+ // Wait synchronously for all the changes being applied at the
+ // compositor level.
+ WaitForCallbacksToFinish();
+ }
+
tizen_viewport_set_transform(video_viewport_.get(),
video_transformation.rotation);
tizen_video_object_set_attribute(video_object_.get(), "flip",
video_transformation.flip);
+ last_rotation_ = video_transformation.rotation;
}
wl_subsurface_set_desync(video_subsurface_.get());