directdrawsink

directdrawsink — Direct Draw video sink

Synopsis




                    GstDirectDrawSink;

Properties


  "force-aspect-ratio"       gboolean              : Read / Write

Description

DirectdrawSink renders video RGB frames to any win32 window. This element can receive a window ID from the application through the XOverlay interface and will then render video frames in this window. If no Window ID was provided by the application, the element will create its own internal window and render into it.

Examples

Here is a simple pipeline to test the sink :

gst-launch-0.10 -v videotestsrc ! directdrawsink

Element Information

plugin directdraw
author Sebastien Moutte <sebastien@moutte.net>
class Sink/Video

Details

GstDirectDrawSink

typedef struct {
  GstVideoSink videosink;

  /* directdraw offscreen surfaces pool */
  GSList *buffer_pool;
  GMutex *pool_lock;

  /* directdraw objects */
  LPDIRECTDRAW ddraw_object;
  LPDIRECTDRAWSURFACE primary_surface;
  LPDIRECTDRAWSURFACE offscreen_surface;
  LPDIRECTDRAWCLIPPER clipper; 

  /* last buffer displayed (used for XOverlay interface expose method) */
  GstBuffer * last_buffer;

  /* directdraw caps */
  GstCaps *caps;

  /* video window management */
  HWND video_window;
  gboolean our_video_window;
  HANDLE window_created_signal;
  
  /* video properties */
  gint video_width, video_height;
  gint out_width, out_height;
  gint fps_n;
  gint fps_d;

  /* properties */
  gboolean keep_aspect_ratio;

  /*pixel format */
  DDPIXELFORMAT dd_pixel_format;

  /* thread processing our default window messages */
  GThread *window_thread;

  /* TRUE when directdraw objects are setup */
  gboolean setup;

  /* TRUE if the hardware support blitting from one colorspace to another */
  gboolean can_blit_between_colorspace;

  /* this flag is used to force re-creation of our offscreen surface 
   * it's need when hardware doesn't support fourcc blit and the bit deph
   * of the current display mode changes.
   */
  gboolean must_recreate_offscreen;
} GstDirectDrawSink;

Property Details

The "force-aspect-ratio" property

  "force-aspect-ratio"       gboolean              : Read / Write

When enabled, scaling will respect original aspect ratio.

Default value: FALSE