iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VideoReaderBase.H File Reference

Author
Randolph Voorhies

License

// ////////////////////////////////////////////////////////////////////////
//              The iLab Neuromorphic Robotics Toolkit (NRT)             //
// Copyright 2010-2012 by the University of Southern California (USC)    //
//                          and the iLab at USC.                         //
//                                                                       //
//                iLab - University of Southern California               //
//                Hedco Neurociences Building, Room HNB-10               //
//                    Los Angeles, Ca 90089-2520 - USA                   //
//                                                                       //
//      See http://ilab.usc.edu for information about this project.      //
// ////////////////////////////////////////////////////////////////////////
// This file is part of The iLab Neuromorphic Robotics Toolkit.          //
//                                                                       //
// The iLab Neuromorphic Robotics Toolkit is free software: you can      //
// redistribute it and/or modify it under the terms of the GNU General   //
// Public License as published by the Free Software Foundation, either   //
// version 3 of the License, or (at your option) any later version.      //
//                                                                       //
// The iLab Neuromorphic Robotics Toolkit is distributed in the hope     //
// that it will be useful, but WITHOUT ANY WARRANTY; without even the    //
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR       //
// PURPOSE.  See the GNU General Public License for more details.        //
//                                                                       //
// You should have received a copy of the GNU General Public License     //
// along with The iLab Neuromorphic Robotics Toolkit.  If not, see       //
// <http://www.gnu.org/licenses/>.                                       //
// ////////////////////////////////////////////////////////////////////////

Definition in file VideoReaderBase.H.

Go to the source code of this file.

Classes

class  nrt::VideoReaderBase
 A base class for video readers. More...
 

Namespaces

 nrt
 Reserved namespace for NRT core classes and functions.
 

Macros

#define NRT_REGISTER_VIDEO_READER(CLASSNAME)
 

Typedefs

typedef Factory
< std::shared_ptr
< VideoReaderBase >
, std::string, std::function
< std::shared_ptr
< VideoReaderBase >
)>, std::map< std::string,
std::string > > 
nrt::VideoReaderFactory
 A Singleton Factory used to keep track of video writers used by VideoSink. More...
 

Macro Definition Documentation

#define NRT_REGISTER_VIDEO_READER (   CLASSNAME)
Value:
std::shared_ptr<nrt::VideoReaderBase> create##CLASSNAME() \
{ return std::shared_ptr<nrt::VideoReaderBase>(new CLASSNAME); } \
bool videoReaderRegister##CLASSNAME() \
{ \
std::map<std::string,std::string> metadata; \
metadata["id"] = CLASSNAME::id(); \
metadata["description"] = CLASSNAME::description(); \
nrt::VideoReaderFactory::instance().registerType( \
metadata["id"], \
create##CLASSNAME, \
metadata \
); \
return true; \
} \
const bool CLASSNAME##Registered __attribute__ ((unused)) = \
videoReaderRegister##CLASSNAME();

Register a video reader with a global Factory.

When creating a new video reader class that inherits from VideoReaderBase to parse a video file type, you should register that class with the VideoReaderFactory using this macro so that your new parser will be called whenever users try to open your associated video type with an ImageSource or a VideoSource.

See Also
VideoReaderBase
VideoSource
ImageSource

Definition at line 123 of file VideoReaderBase.H.