#include <framedisplayer.h>
Collaboration diagram for FrameDisplayer:

Public Member Functions | |
| FrameDisplayer () | |
| ~FrameDisplayer () | |
| void | CloseSound () |
| void | Put (Frame &frame, GtkWidget *drawingarea, gboolean no_audio) |
| void | PutSound (Frame &frame) |
| void | PutGDKRGB32 (Frame &frame, GtkWidget *drawingarea) |
Public Attributes | |
| Displayer * | displayer |
| AudioResample< int16_ne_t, int16_ne_t > * | resampler |
| unsigned char | pixels [FRAME_MAX_WIDTH *FRAME_MAX_HEIGHT *4] |
| kino_sound_t * | audio_device |
| gint16 * | audio_buffers [4] |
| gboolean | audio_device_avail |
| gint | audio_sampling_rate |
Private Attributes | |
| bool | prevIsWide |
|
|
Definition at line 35 of file framedisplayer.cc. References audio_buffers, and DV_AUDIO_MAX_SAMPLES. 00035 : 00036 displayer( NULL ), 00037 resampler( NULL ), 00038 audio_device( NULL ), 00039 audio_device_avail( FALSE ), 00040 prevIsWide( false ) 00041 { 00042 for ( gint i = 0; i < 4; i++ ) 00043 audio_buffers[ i ] = ( gint16 * ) malloc( 2 * DV_AUDIO_MAX_SAMPLES * sizeof( gint16 ) ); 00044 }
|
|
|
Definition at line 47 of file framedisplayer.cc. References audio_buffers, CloseSound(), and displayer. 00048 {
00049 delete displayer;
00050 for ( gint i = 0; i < 4; i++ )
00051 free( audio_buffers[ i ] );
00052 CloseSound();
00053 }
|
|
|
Definition at line 56 of file framedisplayer.cc. References audio_device, audio_device_avail, kino_sound_close(), and resampler. Referenced by ~FrameDisplayer(). 00057 {
00058 if ( audio_device_avail )
00059 {
00060 kino_sound_close( audio_device );
00061 audio_device_avail = FALSE;
00062 audio_device = NULL;
00063 delete resampler;
00064 resampler = NULL;
00065 }
00066 }
|
|
||||||||||||||||
|
Definition at line 96 of file framedisplayer.cc. References DISPLAY_NONE, DISPLAY_RGB, DISPLAY_YUV, displayer, Displayer::format(), FindDisplayer::getDisplayer(), pixels, prevIsWide, Displayer::put(), and PutSound(). Referenced by videoThread(), and PageCapture::windowMoved(). 00097 {
00098 if ( frame.GetWidth() > 0 && frame.GetHeight() > 0 )
00099 {
00100 if ( displayer == NULL )
00101 displayer = FindDisplayer::getDisplayer( drawingarea, frame );
00102 if ( displayer != NULL )
00103 {
00104 DisplayerInput input = DISPLAY_NONE;
00105 switch ( displayer->format() )
00106 {
00107 case DISPLAY_YUV:
00108 frame.ExtractPreviewYUV( pixels );
00109 input = DISPLAY_YUV;
00110 break;
00111 case DISPLAY_RGB:
00112 default:
00113 frame.ExtractPreviewRGB( pixels );
00114 input = DISPLAY_RGB;
00115 break;
00116 }
00117 if ( !no_audio )
00118 PutSound( frame );
00119 if ( prevIsWide != frame.IsWide() )
00120 {
00121 prevIsWide = frame.IsWide();
00122 // The numbers here do not affect the actual display size, only its aspect
00123 gtk_widget_set_size_request( drawingarea, 320, frame.IsWide() ? 180 : 240 );
00124 }
00125 displayer->put( input, pixels, frame.GetWidth(), frame.GetHeight() );
00126 }
00127 }
00128 }
|
|
||||||||||||
|
|
|
|
|
Definition at line 45 of file framedisplayer.h. Referenced by FrameDisplayer(), and ~FrameDisplayer(). |
|
|
Definition at line 44 of file framedisplayer.h. Referenced by CloseSound(), and PutSound(). |
|
|
Definition at line 46 of file framedisplayer.h. Referenced by CloseSound(), and PutSound(). |
|
|
Definition at line 47 of file framedisplayer.h. Referenced by PutSound(). |
|
|
Definition at line 38 of file framedisplayer.h. Referenced by Put(), and ~FrameDisplayer(). |
|
|
Definition at line 41 of file framedisplayer.h. Referenced by Put(). |
|
|
Definition at line 56 of file framedisplayer.h. Referenced by Put(). |
|
|
Definition at line 39 of file framedisplayer.h. Referenced by CloseSound(), and PutSound(). |
1.4.2