Panda3D

webcamVideo.I

00001 // Filename: webcamVideo.I
00002 // Created by: jyelon (01Nov2007)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: WebcamVideo::get_size_x
00018 //       Access: Published
00019 //  Description: Returns the camera's size_x.
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE int WebcamVideo::
00022 get_size_x() const {
00023   return _size_x;
00024 }
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: WebcamVideo::get_size_y
00028 //       Access: Published
00029 //  Description: Returns the camera's size_y.
00030 ////////////////////////////////////////////////////////////////////
00031 INLINE int WebcamVideo::
00032 get_size_y() const {
00033   return _size_y;
00034 }
00035 
00036 ////////////////////////////////////////////////////////////////////
00037 //     Function: WebcamVideo::get_fps
00038 //       Access: Published
00039 //  Description: Returns the camera's framerate.  This
00040 //               is a maximum theoretical: the actual performance
00041 //               will depend on the speed of the hardware.
00042 ////////////////////////////////////////////////////////////////////
00043 INLINE int WebcamVideo::
00044 get_fps() const {
00045   return _fps;
00046 }
00047 
00048 ////////////////////////////////////////////////////////////////////
00049 //     Function: WebcamVideo::output
00050 //       Access: Public
00051 //  Description: Outputs the WebcamVideo.  This function simply
00052 //               writes the name, size and FPS to the output stream.
00053 ////////////////////////////////////////////////////////////////////
00054 INLINE void WebcamVideo::
00055 output(ostream &out) const {
00056   out << get_name() << ": " << get_size_x() << "x" << get_size_y() << " @ " << get_fps() << "Hz";
00057 }
00058 
00059 INLINE ostream &operator << (ostream &out, const WebcamVideo &n) {
00060   n.output(out);
00061   return out;
00062 }
00063 
 All Classes Functions Variables Enumerations