Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

v4l.cc File Reference

#include <deque>
#include <unistd.h>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <pthread.h>
#include "v4l.h"
#include "kino_av_pipe.h"
#include "kino_common.h"
#include "filehandler.h"
#include "support.h"
#include <sys/types.h>
#include <sys/soundcard.h>
#include <sys/time.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mman.h>

Include dependency graph for v4l.cc:

Go to the source code of this file.

Functions

static void * gdkv4l_thread (void *ptr)
 Rudimentary V4l Display and Capture class.

Variables

pthread_t v4lthread
static int ENCODE_YUV = 0


Function Documentation

static void* gdkv4l_thread void *  ptr  )  [static]
 

Rudimentary V4l Display and Capture class.

Definition at line 904 of file v4l.cc.

References GDKV4L::active, V4L::audio, DvEncoder::audio, GDKV4L::capture(), GDKV4L::capturing, GDKV4L::draw(), V4L::getHeight(), V4L::getWidth(), lookup_widget(), and GDKV4L::widget.

Referenced by GDKV4L::startVideo().

00905     {
00906         GDKV4L * v4l = ( GDKV4L * ) ptr;
00907         v4l->active = true;
00908         if ( !v4l->capturing )
00909         {
00910             while ( v4l->active )
00911             {
00912                 v4l->draw();
00913                 struct timespec t =
00914                     {
00915                         0, 0
00916                     };
00917                 nanosleep( &t, NULL );
00918             }
00919         }
00920         else
00921         {
00922             char filename[ 1024 ];
00923             GtkEntry *fileEntry = GTK_ENTRY( lookup_widget( v4l->widget, "entry_v4l_file" ) );
00924             strcpy( filename, gtk_entry_get_text( fileEntry ) );
00925 
00926             DvEncoder *encoder = new DvEncoder( filename, v4l->getWidth(), v4l->getHeight() );
00927             encoder->audio = v4l->audio;
00928             while ( v4l->active )
00929             {
00930                 v4l->capture( encoder );
00931                 struct timespec t =
00932                     {
00933                         0, 0
00934                     };
00935                 nanosleep( &t, NULL );
00936             }
00937             delete encoder;
00938         }
00939         return NULL;
00940     }


Variable Documentation

int ENCODE_YUV = 0 [static]
 

Definition at line 57 of file v4l.cc.

Referenced by GDKV4L::capture(), V4LDevice::request(), EncoderFrame::setVideo(), and DvEncoder::writeThread().

pthread_t v4lthread
 

Definition at line 54 of file v4l.cc.

Referenced by GDKV4L::startVideo(), and GDKV4L::stopVideo().


Generated on Sun Mar 11 22:12:42 2007 for Kino by  doxygen 1.4.2