Class WpPresentationResource
- All Implemented Interfaces:
WaylandObject
The main feature of this interface is accurate presentation timing feedback to ensure smooth video playback while maintaining audio/video synchronization. Some features use the concept of a presentation clock, which is defined in the presentation.clock_id event.
A content update for a wl_surface is submitted by a wl_surface.commit request. Request 'feedback' associates with the wl_surface.commit and provides feedback on the content update, particularly the final realized presentation time.
When the final realized presentation time is available, e.g. after a framebuffer flip completes, the requested presentation_feedback.presented events are sent. The final presentation time can differ from the compositor's predicted display update time and the update's target time, especially when the compositor misses its target vertical blanking period.
-
Field Summary
FieldsFields inherited from class org.freedesktop.wayland.server.Resource
wlResourcePtr
-
Constructor Summary
ConstructorsConstructorDescriptionWpPresentationResource
(MemorySegment pointer) WpPresentationResource
(Client client, int version, int id, WpPresentationRequests implementation) -
Method Summary
Methods inherited from class org.freedesktop.wayland.server.Resource
addDestroyListener, destroy, equals, getClient, getId, getImplementation, getPointer, getVersion, hashCode, postError, postEvent, postEvent, register, unregister
-
Field Details
-
INTERFACE_NAME
- See Also:
-
-
Constructor Details
-
WpPresentationResource
public WpPresentationResource(Client client, int version, int id, WpPresentationRequests implementation) -
WpPresentationResource
-
-
Method Details
-
clockId
public void clockId(int clkId) clock ID for timestampsThis event tells the client in which clock domain the compositor interprets the timestamps used by the presentation extension. This clock is called the presentation clock.
The compositor sends this event when the client binds to the presentation interface. The presentation clock does not change during the lifetime of the client connection.
The clock identifier is platform dependent. On POSIX platforms, the identifier value is one of the clockid_t values accepted by clock_gettime(). clock_gettime() is defined by POSIX.1-2001.
Timestamps in this clock domain are expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, each component being an unsigned 32-bit value. Whole seconds are in tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, and the additional fractional part in tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must be in [0, 999999999].
Note that clock_id applies only to the presentation clock, and implies nothing about e.g. the timestamps used in the Wayland core protocol input events.
Compositors should prefer a clock which does not jump and is not slewed e.g. by NTP. The absolute value of the clock is irrelevant. Precision of one millisecond or better is recommended. Clients must be able to query the current clock value directly, not by asking the compositor.
- Parameters:
clkId
- platform clock identifier
-