libopenraw
|
00001 /* 00002 * libopenraw - arwfile.cpp 00003 * 00004 * Copyright (C) 2006,2008 Hubert Figuiere 00005 * 00006 * This library is free software: you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public License 00008 * as published by the Free Software Foundation, either version 3 of 00009 * the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library. If not, see 00018 * <http://www.gnu.org/licenses/>. 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 // in ARW the CFA IFD is the main IFD 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 & /*data*/, uint32_t /*options*/) 00080 { 00081 return OR_ERROR_NOT_FOUND; 00082 } 00083 00084 } 00085 }