arwfile.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <libopenraw/libopenraw.h>
00023 #include <libopenraw++/thumbnail.h>
00024
00025 #include "debug.h"
00026 #include "io/file.h"
00027 #include "ifdfilecontainer.h"
00028 #include "ifd.h"
00029 #include "arwfile.h"
00030
00031 using namespace Debug;
00032
00033 namespace OpenRaw {
00034
00035
00036 namespace Internals {
00037
00038 const IFDFile::camera_ids_t ARWFile::s_def[] = {
00039 { "DSLR-A100", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_SONY,
00040 OR_TYPEID_SONY_A100) },
00041 { "DSLR-A200", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_SONY,
00042 OR_TYPEID_SONY_A200) },
00043 { "DSLR-A700", OR_MAKE_FILE_TYPEID(OR_TYPEID_VENDOR_SONY,
00044 OR_TYPEID_SONY_A700) },
00045 { 0, 0 }
00046 };
00047
00048
00049 RawFile *ARWFile::factory(IO::Stream * s)
00050 {
00051 return new ARWFile(s);
00052 }
00053
00054 ARWFile::ARWFile(IO::Stream *s)
00055 : IFDFile(s, OR_RAWFILE_TYPE_ARW)
00056 {
00057 _setIdMap(s_def);
00058 }
00059
00060 ARWFile::~ARWFile()
00061 {
00062 }
00063
00064 IFDDir::Ref ARWFile::_locateCfaIfd()
00065 {
00066
00067 if(!m_mainIfd) {
00068 m_mainIfd = _locateMainIfd();
00069 }
00070 return m_mainIfd;
00071 }
00072
00073
00074 IFDDir::Ref ARWFile::_locateMainIfd()
00075 {
00076 return m_container->setDirectory(0);
00077 }
00078
00079 ::or_error ARWFile::_getRawData(RawData & , uint32_t )
00080 {
00081 return OR_ERROR_NOT_FOUND;
00082 }
00083
00084 }
00085 }