gstvideo.navigation
Module for [Navigation] interface
Types 2
The Navigation interface is used for creating and injecting navigation related events such as mouse button presses, cursor motion and key presses. The associated library also provides methods for parsing received events, and for sending and receiving navigation related bus events. One main usecase is DVD menu navigation.
The main parts of the API are:
- The GstNavigation interface, implemented by elements which provide an
application with the ability to create and inject navigation events into the pipeline.
- GstNavigation event handling API. GstNavigation events are created in
response to calls on a GstNavigation interface implementation, and sent in the pipeline. Upstream elements can use the navigation event API functions to parse the contents of received messages.
- GstNavigation message handling API. GstNavigation messages may be sent on
the message bus to inform applications of navigation related changes in the pipeline, such as the mouse moving over a clickable region, or the set of available angles changing.
The GstNavigation message functions provide functions for creating and parsing custom bus messages for signaling GstNavigation changes.
bool eventGetCoordinates(gst.event.Event event, out double x, out double y)Try to retrieve x and y coordinates of a #GstNavigation event.gstvideo.types.NavigationEventType eventGetType(gst.event.Event event)Inspect a #GstEvent and return the #GstNavigationEventType of the event, or #GSTNAVIGATIONEVENT_INVALID if the event is not a #GstNavigation event.gst.event.Event eventNewCommand(gstvideo.types.NavigationCommand command)Create a new navigation event given navigation command..gst.event.Event eventNewKeyPress(string key, gstvideo.types.NavigationModifierType state)Create a new navigation event for the given key press.gst.event.Event eventNewKeyRelease(string key, gstvideo.types.NavigationModifierType state)Create a new navigation event for the given key release.gst.event.Event eventNewMouseButtonPress(int button, double x, double y, gstvideo.types.NavigationModifierType state)Create a new navigation event for the given key mouse button press.gst.event.Event eventNewMouseButtonRelease(int button, double x, double y, gstvideo.types.NavigationModifierType state)Create a new navigation event for the given key mouse button release.gst.event.Event eventNewMouseMove(double x, double y, gstvideo.types.NavigationModifierType state)Create a new navigation event for the new mouse location.gst.event.Event eventNewMouseScroll(double x, double y, double deltaX, double deltaY, gstvideo.types.NavigationModifierType state)Create a new navigation event for the mouse scroll.gst.event.Event eventNewTouchCancel(gstvideo.types.NavigationModifierType state)Create a new navigation event signalling that all currently active touch points are cancelled and should be discarded. For example, under Wayland this event might be sent when a swipe passes the th...gst.event.Event eventNewTouchDown(uint identifier, double x, double y, double pressure, gstvideo.types.NavigationModifierType state)Create a new navigation event for an added touch point.gst.event.Event eventNewTouchFrame(gstvideo.types.NavigationModifierType state)Create a new navigation event signalling the end of a touch frame. Touch frames signal that all previous down, motion and up events not followed by another touch frame event already should be consi...gst.event.Event eventNewTouchMotion(uint identifier, double x, double y, double pressure, gstvideo.types.NavigationModifierType state)Create a new navigation event for a moved touch point.gst.event.Event eventNewTouchUp(uint identifier, double x, double y, gstvideo.types.NavigationModifierType state)Create a new navigation event for a removed touch point.bool eventParseCommand(gst.event.Event event, out gstvideo.types.NavigationCommand command)Inspect a #GstNavigation command event and retrieve the enum value of the associated command.bool eventParseKeyEvent(gst.event.Event event, out string key)Note: Modifier keys (as defined in #GstNavigationModifierType) [press](GSTNAVIGATIONEVENTKEYPRESS) and [release](GSTNAVIGATIONKEY_PRESS) events are generated even if those states are present on all...bool eventParseModifierState(gst.event.Event event, out gstvideo.types.NavigationModifierType state)bool eventParseMouseButtonEvent(gst.event.Event event, out int button, out double x, out double y)Retrieve the details of either a #GstNavigation mouse button press event or a mouse button release event. Determine which type the event is using [gstvideo.navigation.Navigation.eventGetType] to re...bool eventParseMouseMoveEvent(gst.event.Event event, out double x, out double y)Inspect a #GstNavigation mouse movement event and extract the coordinates of the event.bool eventParseMouseScrollEvent(gst.event.Event event, out double x, out double y, out double deltaX, out double deltaY)Inspect a #GstNavigation mouse scroll event and extract the coordinates of the event.bool eventParseTouchEvent(gst.event.Event event, out uint identifier, out double x, out double y, out double pressure)Retrieve the details of a #GstNavigation touch-down or touch-motion event. Determine which type the event is using [gstvideo.navigation.Navigation.eventGetType] to retrieve the #GstNavigationEventT...bool eventParseTouchUpEvent(gst.event.Event event, out uint identifier, out double x, out double y)Retrieve the details of a #GstNavigation touch-up event.bool eventSetCoordinates(gst.event.Event event, double x, double y)Try to set x and y coordinates on a #GstNavigation event. The event must be writable.gstvideo.types.NavigationMessageType messageGetType(gst.message.Message message)Check a bus message to see if it is a #GstNavigation event, and return the #GstNavigationMessageType identifying the type of the message if so.gst.message.Message messageNewAnglesChanged(gst.object.ObjectWrap src, uint curAngle, uint nAngles)Creates a new #GstNavigation message with type #GSTNAVIGATIONMESSAGEANGLESCHANGED for notifying an application that the current angle, or current number of angles available in a multiangle video ha...gst.message.Message messageNewCommandsChanged(gst.object.ObjectWrap src)Creates a new #GstNavigation message with type #GSTNAVIGATIONMESSAGECOMMANDSCHANGEDgst.message.Message messageNewEvent(gst.object.ObjectWrap src, gst.event.Event event)Creates a new #GstNavigation message with type #GSTNAVIGATIONMESSAGE_EVENT.gst.message.Message messageNewMouseOver(gst.object.ObjectWrap src, bool active)Creates a new #GstNavigation message with type #GSTNAVIGATIONMESSAGEMOUSEOVER.bool messageParseAnglesChanged(gst.message.Message message, out uint curAngle, out uint nAngles)Parse a #GstNavigation message of type GSTNAVIGATIONMESSAGEANGLESCHANGED and extract the curangle and nangles parameters.bool messageParseEvent(gst.message.Message message, out gst.event.Event event)Parse a #GstNavigation message of type #GSTNAVIGATIONMESSAGE_EVENT and extract contained #GstEvent. The caller must unref the event when done with it.bool messageParseMouseOver(gst.message.Message message, out bool active)Parse a #GstNavigation message of type #GSTNAVIGATIONMESSAGEMOUSEOVER and extract the active/inactive flag. If the mouse over event is marked active, it indicates that the mouse is over a clickable...gstvideo.types.NavigationQueryType queryGetType(gst.query.Query query)Inspect a #GstQuery and return the #GstNavigationQueryType associated with it if it is a #GstNavigation query.gst.query.Query queryNewAngles()Create a new #GstNavigation angles query. When executed, it will query the pipeline for the set of currently available angles, which may be greater than one in a multiangle video. Returns: The new ...gst.query.Query queryNewCommands()Create a new #GstNavigation commands query. When executed, it will query the pipeline for the set of currently available commands. Returns: The new query.bool queryParseAngles(gst.query.Query query, out uint curAngle, out uint nAngles)Parse the current angle number in the #GstNavigation angles query into the #guint pointed to by the curangle variable, and the number of available angles into the #guint pointed to by the nangles v...bool queryParseCommandsLength(gst.query.Query query, out uint nCmds)Parse the number of commands in the #GstNavigation commands query.bool queryParseCommandsNth(gst.query.Query query, uint nth, out gstvideo.types.NavigationCommand cmd)Parse the #GstNavigation command query and retrieve the nth command from it into cmd. If the list contains less elements than nth, cmd will be set to #GSTNAVIGATIONCOMMAND_INVALID.void querySetAngles(gst.query.Query query, uint curAngle, uint nAngles)Set the #GstNavigation angles query result field in query.void querySetCommandsv(gst.query.Query query, gstvideo.types.NavigationCommand[] cmds)Set the #GstNavigation command query result fields in query. The number of commands passed must be equal to n_commands.void sendCommand(gstvideo.types.NavigationCommand command)Sends the indicated command to the navigation interface.void sendEvent(gst.structure.Structure structure)void sendEventSimple(gst.event.Event event)Sends an event to the navigation interface.void sendKeyEvent(string event, string key)void sendMouseEvent(string event, int button, double x, double y)Sends a mouse event to the navigation interface. Mouse event coordinates are sent relative to the display space of the related output area. This is usually the size in pixels of the window associat...void sendMouseScrollEvent(double x, double y, double deltaX, double deltaY)Sends a mouse scroll event to the navigation interface. Mouse event coordinates are sent relative to the display space of the related output area. This is usually the size in pixels of the window a...