Blame docs/plugins/html/gst-plugins-base-plugins-ximagesink.html

Packit 971217
Packit 971217
<html>
Packit 971217
<head>
Packit 971217
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit 971217
<title>ximagesink: GStreamer Base Plugins 1.0 Plugins Reference Manual</title>
Packit 971217
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
Packit 971217
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Plugins Reference Manual">
Packit 971217
<link rel="up" href="ch01.html" title="gst-plugins-base Elements">
Packit 971217
<link rel="prev" href="gst-plugins-base-plugins-vorbistag.html" title="vorbistag">
Packit 971217
<link rel="next" href="gst-plugins-base-plugins-xvimagesink.html" title="xvimagesink">
Packit 971217
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit 971217
<link rel="stylesheet" href="style.css" type="text/css">
Packit 971217
</head>
Packit 971217
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 971217
Packit 971217
Packit 971217
Top  | 
Packit 971217
                  Description  | 
Packit 971217
                  Object Hierarchy  | 
Packit 971217
                  Implemented Interfaces  | 
Packit 971217
                  Properties
Packit 971217
Packit 971217
Home
Packit 971217
Up
Packit 971217
Prev
Packit 971217
Next
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

ximagesink

Packit 971217

ximagesink

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Properties

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
gchar *
Packit 971217
display
Packit 971217
Read / Write
Packit 971217
Packit 971217
Packit 971217
gboolean
Packit 971217
force-aspect-ratio
Packit 971217
Read / Write
Packit 971217
Packit 971217
Packit 971217
gboolean
Packit 971217
handle-events
Packit 971217
Read / Write
Packit 971217
Packit 971217
Packit 971217
gboolean
Packit 971217
handle-expose
Packit 971217
Read / Write
Packit 971217
Packit 971217
Packit 971217
Packit 971217
gchar *
Packit 971217
pixel-aspect-ratio
Packit 971217
Read / Write
Packit 971217
Packit 971217
Packit 971217
gboolean
Packit 971217
synchronous
Packit 971217
Read / Write
Packit 971217
Packit 971217
Packit 971217
guint64
Packit 971217
window-height
Packit 971217
Read
Packit 971217
Packit 971217
Packit 971217
guint64
Packit 971217
window-width
Packit 971217
Read
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Types and Values

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
struct
Packit 971217
GstXImageSink
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Object Hierarchy

Packit 971217
    GObject
Packit 971217
    ╰── GInitiallyUnowned
Packit 971217
        ╰── GstObject
Packit 971217
            ╰── GstElement
Packit 971217
                ╰── GstBaseSink
Packit 971217
                    ╰── GstVideoSink
Packit 971217
                        ╰── GstXImageSink
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Implemented Interfaces

Packit 971217

Packit 971217
GstXImageSink implements
Packit 971217
 GstNavigation and  GstVideoOverlay.

Packit 971217
Packit 971217
Packit 971217

Description

Packit 971217

XImageSink renders video frames to a drawable (XWindow) on a local or remote

Packit 971217
display. This element can receive a Window ID from the application through
Packit 971217
the GstVideoOverlay interface and will then render video frames in this
Packit 971217
drawable. If no Window ID was provided by the application, the element will
Packit 971217
create its own internal window and render into it.

Packit 971217
Packit 971217

Scaling

Packit 971217

As standard XImage rendering to a drawable is not scaled, XImageSink will use

Packit 971217
reverse caps negotiation to try to get scaled video frames for the drawable.
Packit 971217
This is accomplished by asking the peer pad if it accepts some different caps
Packit 971217
which in most cases implies that there is a scaling element in the pipeline,
Packit 971217
or that an element generating the video frames can generate them with a
Packit 971217
different geometry. This mechanism is handled during buffer allocations, for
Packit 971217
each allocation request the video sink will check the drawable geometry, look
Packit 971217
at the “force-aspect-ratio” property, calculate the geometry of
Packit 971217
desired video frames and then check that the peer pad accept those new caps.
Packit 971217
If it does it will then allocate a buffer in video memory with this new
Packit 971217
geometry and return it with the new caps.

Packit 971217
Packit 971217
Packit 971217

Events

Packit 971217

XImageSink creates a thread to handle events coming from the drawable. There

Packit 971217
are several kind of events that can be grouped in 2 big categories: input
Packit 971217
events and window state related events. Input events will be translated to
Packit 971217
navigation events and pushed upstream for other elements to react on them.
Packit 971217
This includes events such as pointer moves, key press/release, clicks etc...
Packit 971217
Other events are used to handle the drawable appearance even when the data
Packit 971217
is not flowing (GST_STATE_PAUSED). That means that even when the element is
Packit 971217
paused, it will receive expose events from the drawable and draw the latest
Packit 971217
frame with correct borders/aspect-ratio.

Packit 971217
Packit 971217
Packit 971217

Pixel aspect ratio

Packit 971217

When changing state to GST_STATE_READY, XImageSink will open a connection to

Packit 971217
the display specified in the “display” property or the default
Packit 971217
display if nothing specified. Once this connection is open it will inspect
Packit 971217
the display configuration including the physical display geometry and
Packit 971217
then calculate the pixel aspect ratio. When caps negotiation will occur, the
Packit 971217
video sink will set the calculated pixel aspect ratio on the caps to make
Packit 971217
sure that incoming video frames will have the correct pixel aspect ratio for
Packit 971217
this display. Sometimes the calculated pixel aspect ratio can be wrong, it is
Packit 971217
then possible to enforce a specific pixel aspect ratio using the
Packit 971217
“pixel-aspect-ratio” property.

Packit 971217
Packit 971217
Packit 971217

Examples

Packit 971217
Packit 971217
  
Packit 971217
    
Packit 971217
      
Packit 971217
        
1
Packit 971217
        
gst-launch-1.0 -v videotestsrc ! queue ! ximagesink
Packit 971217
      
Packit 971217
    
Packit 971217
  
Packit 971217
Packit 971217
Packit 971217

Packit 971217
 A pipeline to test reverse negotiation. When the test video signal appears
Packit 971217
you can resize the window and see that scaled buffers of the desired size are
Packit 971217
going to arrive with a short delay. This illustrates how buffers of desired
Packit 971217
size are allocated along the way. If you take away the queue, scaling will
Packit 971217
happen almost immediately.

Packit 971217
Packit 971217
  
Packit 971217
    
Packit 971217
      
Packit 971217
        
1
Packit 971217
        
gst-launch-1.0 -v videotestsrc ! navigationtest ! videoconvert ! ximagesink
Packit 971217
      
Packit 971217
    
Packit 971217
  
Packit 971217
Packit 971217
Packit 971217

Packit 971217
 A pipeline to test navigation events.
Packit 971217
While moving the mouse pointer over the test signal you will see a black box
Packit 971217
following the mouse pointer. If you press the mouse button somewhere on the
Packit 971217
video and release it somewhere else a green box will appear where you pressed
Packit 971217
the button and a red one where you released it. (The navigationtest element
Packit 971217
is part of gst-plugins-good.)

Packit 971217
Packit 971217
  
Packit 971217
    
Packit 971217
      
Packit 971217
        
1
Packit 971217
        
gst-launch-1.0 -v videotestsrc ! video/x-raw, pixel-aspect-ratio=(fraction)4/3 ! videoscale ! ximagesink
Packit 971217
      
Packit 971217
    
Packit 971217
  
Packit 971217
Packit 971217
Packit 971217

Packit 971217
 This is faking a 4/3 pixel aspect ratio caps on video frames produced by
Packit 971217
videotestsrc, in most cases the pixel aspect ratio of the display will be
Packit 971217
1/1. This means that videoscale will have to do the scaling to convert
Packit 971217
incoming frames to a size that will match the display pixel aspect ratio
Packit 971217
(from 320x240 to 320x180 in this case). Note that you might have to escape
Packit 971217
some characters for your shell like '(fraction)'.

Packit 971217
Packit 971217
Packit 971217

Synopsis

Packit 971217
Packit 971217

Element Information

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

plugin

Packit 971217
Packit 971217
            ximagesink
Packit 971217
          
Packit 971217
Packit 971217
Packit 971217

author

Packit 971217
Julien Moutte <julien@moutte.net>
Packit 971217
Packit 971217
Packit 971217

class

Packit 971217
Sink/Video
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Packit 971217
Packit 971217

Element Pads

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

name

Packit 971217
sink
Packit 971217
Packit 971217
Packit 971217

direction

Packit 971217
sink
Packit 971217
Packit 971217
Packit 971217

presence

Packit 971217
always
Packit 971217
Packit 971217
Packit 971217

details

Packit 971217
video/x-raw, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Functions

Packit 971217

Packit 971217
Packit 971217
Packit 971217

Types and Values

Packit 971217
Packit 971217

struct GstXImageSink

Packit 971217
struct GstXImageSink;
Packit 971217

The GstXImageSink data structure.

Packit 971217
Packit 971217

Members

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Property Details

Packit 971217
Packit 971217

The “display” property

Packit 971217
  “display”                  gchar *
Packit 971217

X Display name.

Packit 971217

Flags: Read / Write

Packit 971217

Default value: NULL

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “force-aspect-ratio” property

Packit 971217
  “force-aspect-ratio”       gboolean
Packit 971217

When enabled, reverse caps negotiation (scaling) will respect original aspect ratio.

Packit 971217

Flags: Read / Write

Packit 971217

Default value: TRUE

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “handle-events” property

Packit 971217
  “handle-events”            gboolean
Packit 971217

When enabled, XEvents will be selected and handled.

Packit 971217

Flags: Read / Write

Packit 971217

Default value: TRUE

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “handle-expose” property

Packit 971217
  “handle-expose”            gboolean
Packit 971217

When enabled, the current frame will always be drawn in response to X Expose events.

Packit 971217

Flags: Read / Write

Packit 971217

Default value: TRUE

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “pixel-aspect-ratio” property

Packit 971217
  “pixel-aspect-ratio”       gchar *
Packit 971217

The pixel aspect ratio of the device.

Packit 971217

Flags: Read / Write

Packit 971217

Default value: "1/1"

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “synchronous” property

Packit 971217
  “synchronous”              gboolean
Packit 971217

When enabled, runs the X display in synchronous mode. (unrelated to A/V sync, used only for debugging).

Packit 971217

Flags: Read / Write

Packit 971217

Default value: FALSE

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “window-height” property

Packit 971217
  “window-height”            guint64
Packit 971217

Actual height of the video window.

Packit 971217

Flags: Read

Packit 971217

Default value: 0

Packit 971217
Packit 971217

Packit 971217
Packit 971217

The “window-width” property

Packit 971217
  “window-width”             guint64
Packit 971217

Actual width of the video window.

Packit 971217

Flags: Read

Packit 971217

Default value: 0

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Generated by GTK-Doc V1.27
Packit 971217
</body>
Packit 971217
</html>