liveMedia/include/DeviceSource.hh

Go to the documentation of this file.
00001 /**********
00002 This library is free software; you can redistribute it and/or modify it under
00003 the terms of the GNU Lesser General Public License as published by the
00004 Free Software Foundation; either version 2.1 of the License, or (at your
00005 option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
00006 
00007 This library is distributed in the hope that it will be useful, but WITHOUT
00008 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00009 FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
00010 more details.
00011 
00012 You should have received a copy of the GNU Lesser General Public License
00013 along with this library; if not, write to the Free Software Foundation, Inc.,
00014 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
00015 **********/
00016 // "liveMedia"
00017 // Copyright (c) 1996-2012 Live Networks, Inc.  All rights reserved.
00018 // A template for a MediaSource encapsulating an audio/video input device
00019 // 
00020 // NOTE: Sections of this code labeled "%%% TO BE WRITTEN %%%" are incomplete, and needto be written by the programmer
00021 // (depending on the features of the particulardevice).
00022 // C++ header
00023 
00024 #ifndef _DEVICE_SOURCE_HH
00025 #define _DEVICE_SOURCE_HH
00026 
00027 #ifndef _FRAMED_SOURCE_HH
00028 #include "FramedSource.hh"
00029 #endif
00030 
00031 // The following class can be used to define specific encoder parameters
00032 class DeviceParameters {
00033   //%%% TO BE WRITTEN %%%
00034 };
00035 
00036 class DeviceSource: public FramedSource {
00037 public:
00038   static DeviceSource* createNew(UsageEnvironment& env,
00039                                  DeviceParameters params);
00040 
00041 public:
00042   static EventTriggerId eventTriggerId;
00043 
00044 protected:
00045   DeviceSource(UsageEnvironment& env, DeviceParameters params);
00046   // called only by createNew(), or by subclass constructors
00047   virtual ~DeviceSource();
00048 
00049 private:
00050   // redefined virtual functions:
00051   virtual void doGetNextFrame();
00052 
00053 private:
00054   static void deliverFrame0(void* clientData);
00055   void deliverFrame();
00056 
00057 private:
00058   static unsigned referenceCount; // used to count how many instances of this class currently exist
00059   DeviceParameters fParams;
00060 };
00061 
00062 #endif

Generated on Thu May 17 07:11:45 2012 for live by  doxygen 1.5.2