video_sdl_sink_s Class Reference

#include <video_sdl_sink_s.h>

Inheritance diagram for video_sdl_sink_s:

gr_sync_block gr_block

List of all members.


Detailed Description

video sink using SDL

input signature is one, two or three streams of signed short. One stream: stream is grey (Y) two streems: first is grey (Y), second is alternating U and V Three streams: first is grey (Y), second is U, third is V Input samples must be in the range [0,255].

Public Member Functions

 ~video_sdl_sink_s ()
int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
 just like gr_block::general_work, only this arranges to call consume_each for you

Protected Member Functions

 video_sdl_sink_s (double framerate, int width, int height, unsigned int format, int dst_width, int dst_height)
void copy_line_pixel_interleaved (unsigned char *dst_pixels_u, unsigned char *dst_pixels_v, const short *src_pixels, int src_width)
void copy_line_line_interleaved (unsigned char *dst_pixels_u, unsigned char *dst_pixels_v, const short *src_pixels, int src_width)
void copy_line_single_plane (unsigned char *dst_pixels, const short *src_pixels, int src_width)
void copy_line_single_plane_dec2 (unsigned char *dst_pixels, const short *src_pixels, int src_width)
int copy_plane_to_surface (int plane, int noutput_items, const short *src_pixels)

Protected Attributes

float d_framerate
int d_wanted_frametime_ms
int d_width
int d_height
int d_dst_width
int d_dst_height
int d_format
int d_current_line
SDL_Surface * d_screen
SDL_Overlay * d_image
SDL_Rect d_dst_rect
float d_avg_delay
unsigned int d_wanted_ticks

Friends

video_sdl_sink_s_sptr video_sdl_make_sink_s (double framerate, int width, int height, unsigned int format, int dst_width, int dst_height)


Constructor & Destructor Documentation

video_sdl_sink_s::video_sdl_sink_s ( double  framerate,
int  width,
int  height,
unsigned int  format,
int  dst_width,
int  dst_height 
) [protected]

video_sdl_sink_s::~video_sdl_sink_s (  ) 


Member Function Documentation

void video_sdl_sink_s::copy_line_pixel_interleaved ( unsigned char *  dst_pixels_u,
unsigned char *  dst_pixels_v,
const short *  src_pixels,
int  src_width 
) [protected]

Referenced by copy_plane_to_surface().

void video_sdl_sink_s::copy_line_line_interleaved ( unsigned char *  dst_pixels_u,
unsigned char *  dst_pixels_v,
const short *  src_pixels,
int  src_width 
) [protected]

Referenced by copy_plane_to_surface().

void video_sdl_sink_s::copy_line_single_plane ( unsigned char *  dst_pixels,
const short *  src_pixels,
int  src_width 
) [protected]

Referenced by copy_plane_to_surface().

void video_sdl_sink_s::copy_line_single_plane_dec2 ( unsigned char *  dst_pixels,
const short *  src_pixels,
int  src_width 
) [protected]

Referenced by copy_plane_to_surface().

int video_sdl_sink_s::copy_plane_to_surface ( int  plane,
int  noutput_items,
const short *  src_pixels 
) [protected]

int video_sdl_sink_s::work ( int  noutput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items 
) [virtual]

just like gr_block::general_work, only this arranges to call consume_each for you

The user must override work to define the signal processing code

Implements gr_sync_block.

References copy_plane_to_surface(), d_avg_delay, d_image, and d_wanted_ticks.


Friends And Related Function Documentation

video_sdl_sink_s_sptr video_sdl_make_sink_s ( double  framerate,
int  width,
int  height,
unsigned int  format,
int  dst_width,
int  dst_height 
) [friend]


Member Data Documentation

float video_sdl_sink_s::d_framerate [protected]

int video_sdl_sink_s::d_width [protected]

int video_sdl_sink_s::d_height [protected]

Referenced by video_sdl_sink_s().

Referenced by video_sdl_sink_s().

int video_sdl_sink_s::d_format [protected]

Referenced by video_sdl_sink_s().

Referenced by copy_plane_to_surface().

SDL_Surface* video_sdl_sink_s::d_screen [protected]

Referenced by video_sdl_sink_s().

SDL_Overlay* video_sdl_sink_s::d_image [protected]

SDL_Rect video_sdl_sink_s::d_dst_rect [protected]

float video_sdl_sink_s::d_avg_delay [protected]

Referenced by copy_plane_to_surface(), and work().

unsigned int video_sdl_sink_s::d_wanted_ticks [protected]

Referenced by copy_plane_to_surface(), and work().


The documentation for this class was generated from the following files:

Generated on Wed Oct 8 09:09:09 2008 for GNU Radio 3.0.4 by  doxygen 1.5.6