shun-iwasawa 31accf
#include "canon.h"
shun-iwasawa 31accf
#include "stopmotion.h"
shun-iwasawa 31accf
shun-iwasawa 31accf
#include "tapp.h"
shun-iwasawa 31accf
#include "tenv.h"
shun-iwasawa 31accf
#include "toonz/stage.h"
shun-iwasawa 31accf
#include "toonz/tscenehandle.h"
shun-iwasawa 31accf
#include "toonz/tcamera.h"
shun-iwasawa 31accf
#include "toonz/toonzscene.h"
shun-iwasawa 31accf
shun-iwasawa 31accf
#include <qcoreapplication></qcoreapplication>
shun-iwasawa 31accf
#include <qfile></qfile>
shun-iwasawa 31accf
shun-iwasawa 31accf
TEnv::IntVar StopMotionUseScaledImages("StopMotionUseScaledImages", 1);
shun-iwasawa 31accf
shun-iwasawa 31accf
namespace {
shun-iwasawa 31accf
bool l_quitLoop = false;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
Canon::Canon() {
shun-iwasawa 31accf
  m_useScaledImages = StopMotionUseScaledImages;
shun-iwasawa 31accf
#ifdef WITH_CANON
shun-iwasawa 31accf
  buildAvMap();
shun-iwasawa 31accf
  buildIsoMap();
shun-iwasawa 31accf
  buildTvMap();
shun-iwasawa 31accf
  buildModeMap();
shun-iwasawa 31accf
  buildExposureMap();
shun-iwasawa 31accf
  buildWhiteBalanceMap();
shun-iwasawa 31accf
  buildColorTemperatures();
shun-iwasawa 31accf
  buildImageQualityMap();
shun-iwasawa 31accf
  buildPictureStyleMap();
shun-iwasawa 31accf
#endif
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
Canon::~Canon() {}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::onImageReady(const bool& status) { m_converterSucceeded = status; }
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::onFinished() { l_quitLoop = true; }
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
#ifdef WITH_CANON
shun-iwasawa 31accf
EdsError Canon::initializeCanonSDK() {
shun-iwasawa 31accf
  m_error = EdsInitializeSDK();
shun-iwasawa 31accf
  if (m_error == EDS_ERR_OK) {
shun-iwasawa 31accf
    m_isSDKLoaded = true;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (!m_error)
shun-iwasawa 31accf
    m_error =
shun-iwasawa 31accf
        EdsSetCameraAddedHandler(Canon::handleCameraAddedEvent, (EdsVoid*)this);
shun-iwasawa 31accf
  return m_error;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsCameraListRef Canon::getCameraList() {
shun-iwasawa 31accf
  if (!m_isSDKLoaded) initializeCanonSDK();
shun-iwasawa 31accf
  if (m_isSDKLoaded) {
shun-iwasawa 31accf
    m_error = EdsGetCameraList(&m_cameraList);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  return m_cameraList;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::releaseCameraList() {
shun-iwasawa 31accf
  if (m_cameraList != NULL) m_error = EdsRelease(m_cameraList);
shun-iwasawa 31accf
  return m_error;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
int Canon::getCameraCount() {
shun-iwasawa 31accf
  if (m_cameraList == NULL) {
shun-iwasawa 31accf
    getCameraList();
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (m_cameraList != NULL) {
shun-iwasawa 31accf
    m_error = EdsGetChildCount(m_cameraList, &m_count);
shun-iwasawa 31accf
    if (m_count == 0) {
shun-iwasawa 31accf
      m_error = EDS_ERR_DEVICE_NOT_FOUND;
shun-iwasawa 31accf
      if (m_sessionOpen) {
shun-iwasawa 31accf
        StopMotion::instance()->m_liveViewStatus = 0;
shun-iwasawa 31accf
        m_sessionOpen                            = false;
shun-iwasawa 31accf
      }
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    return m_count;
shun-iwasawa 31accf
  } else
shun-iwasawa 31accf
    return -1;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::getCamera(int index) {
shun-iwasawa 31accf
  if (m_count == 0) {
shun-iwasawa 31accf
    m_error = EDS_ERR_DEVICE_NOT_FOUND;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (m_count > 0) {
shun-iwasawa 31accf
    m_error = EdsGetChildAtIndex(m_cameraList, index, &m_camera);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  return m_error;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::releaseCamera() {
shun-iwasawa 31accf
  if (m_camera != NULL) {
shun-iwasawa 31accf
    m_error = EdsRelease(m_camera);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  return m_error;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::cameraAdded() { StopMotion::instance()->refreshCameraList(); }
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::closeCanonSDK() {
shun-iwasawa 31accf
  if (m_isSDKLoaded) {
shun-iwasawa 31accf
    EdsTerminateSDK();
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::closeAll() {
shun-iwasawa 31accf
#ifdef WITH_CANON
shun-iwasawa 31accf
  if (m_camera) releaseCamera();
shun-iwasawa 31accf
  if (m_cameraList != NULL) releaseCameraList();
shun-iwasawa 31accf
  if (m_isSDKLoaded) closeCanonSDK();
shun-iwasawa 31accf
#endif
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::resetCanon(bool liveViewOpen) {
shun-iwasawa 31accf
#ifdef WITH_CANON
shun-iwasawa 31accf
  m_proxyDpi             = TPointD(0.0, 0.0);
shun-iwasawa 31accf
  m_proxyImageDimensions = TDimension(0, 0);
shun-iwasawa 31accf
shun-iwasawa 31accf
  if (m_sessionOpen && getCameraCount() > 0) {
shun-iwasawa 31accf
    if (liveViewOpen) {
shun-iwasawa 31accf
      endCanonLiveView();
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    closeCameraSession();
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
#endif
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::openCameraSession() {
shun-iwasawa 31accf
  if (m_camera != NULL) {
shun-iwasawa 6bac0f
    m_error = EdsOpenSession(m_camera);
shun-iwasawa 31accf
    if (m_error == EDS_ERR_OK) m_sessionOpen = true;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  m_error = EdsSetObjectEventHandler(m_camera, kEdsObjectEvent_All,
shun-iwasawa 31accf
                                     Canon::handleObjectEvent, (EdsVoid*)this);
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_error =
shun-iwasawa 31accf
      EdsSetPropertyEventHandler(m_camera, kEdsPropertyEvent_All,
shun-iwasawa 31accf
                                 Canon::handlePropertyEvent, (EdsVoid*)this);
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_error = EdsSetCameraStateEventHandler(
shun-iwasawa 31accf
      m_camera, kEdsStateEvent_All, Canon::handleStateEvent, (EdsVoid*)this);
shun-iwasawa 31accf
shun-iwasawa 31accf
  // We can't handle raw images yet, so make sure we are getting jpgs
shun-iwasawa 31accf
  if (getCurrentImageQuality().contains("RAW"))
shun-iwasawa 31accf
    setImageQuality("Large Fine Jpeg");
shun-iwasawa 31accf
shun-iwasawa 6bac0f
  EdsUInt32 saveto        = kEdsSaveTo_Host;
shun-iwasawa 6bac0f
  m_error                 = EdsSetPropertyData(m_camera, kEdsPropID_SaveTo, 0,
shun-iwasawa 31accf
                               sizeof(EdsUInt32), &saveto);
shun-iwasawa 31accf
  EdsCapacity newCapacity = {0x7FFFFFFF, 0x1000, 1};
shun-iwasawa 31accf
  m_error                 = EdsSetCapacity(m_camera, newCapacity);
shun-iwasawa 31accf
  return m_error;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::closeCameraSession() {
shun-iwasawa 31accf
  if (m_camera != NULL) {
shun-iwasawa 31accf
    m_error       = EdsCloseSession(m_camera);
shun-iwasawa 31accf
    m_sessionOpen = false;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  return m_error;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::refreshOptions() {
shun-iwasawa 31accf
  getAvailableShutterSpeeds();
shun-iwasawa 31accf
  getAvailableIso();
shun-iwasawa 31accf
  getAvailableApertures();
shun-iwasawa 31accf
  getAvailableExposureCompensations();
shun-iwasawa 31accf
  getAvailableWhiteBalances();
shun-iwasawa 31accf
  buildColorTemperatures();
shun-iwasawa 31accf
  getAvailableImageQualities();
shun-iwasawa 31accf
  getAvailablePictureStyles();
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
std::string Canon::getCameraName() {
shun-iwasawa 31accf
  EdsChar name[EDS_MAX_NAME];
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType dataType;
shun-iwasawa 31accf
  EdsUInt32 dataSize;
shun-iwasawa 31accf
  m_error = EdsGetPropertySize(m_camera, kEdsPropID_ProductName, 0, &dataType,
shun-iwasawa 31accf
                               &dataSize);
shun-iwasawa 31accf
shun-iwasawa 31accf
  if (m_error == EDS_ERR_OK) {
shun-iwasawa 31accf
    m_error =
shun-iwasawa 31accf
        EdsGetPropertyData(m_camera, kEdsPropID_ProductName, 0, dataSize, name);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  m_cameraName = name;
shun-iwasawa 31accf
  return m_cameraName;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getMode() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType modeType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_AEMode, 0, &modeType, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_AEMode, 0, sizeof(size), &data);
shun-iwasawa 31accf
shun-iwasawa 31accf
  return QString::fromStdString(m_modeMap[data]);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::getAvailableIso() {
shun-iwasawa 31accf
  EdsPropertyDesc* IsoDesc = new EdsPropertyDesc;
shun-iwasawa 31accf
  EdsError err             = EDS_ERR_OK;
shun-iwasawa 31accf
  m_isoOptions.clear();
shun-iwasawa 31accf
shun-iwasawa 31accf
  err       = EdsGetPropertyDesc(m_camera, kEdsPropID_ISOSpeed, IsoDesc);
shun-iwasawa 31accf
  int count = IsoDesc->numElements;
shun-iwasawa 31accf
  if (count > 0) {
shun-iwasawa 31accf
    int i = 0;
shun-iwasawa 31accf
    while (i < count) {
shun-iwasawa 31accf
      m_isoOptions.push_back(
shun-iwasawa 31accf
          QString::fromStdString(m_isoMap[IsoDesc->propDesc[i]]));
shun-iwasawa 31accf
      i++;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  delete IsoDesc;
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::getAvailableShutterSpeeds() {
shun-iwasawa 31accf
  EdsPropertyDesc* TvDesc = new EdsPropertyDesc;
shun-iwasawa 31accf
  EdsError err            = EDS_ERR_OK;
shun-iwasawa 31accf
  m_shutterSpeedOptions.clear();
shun-iwasawa 31accf
shun-iwasawa 31accf
  err       = EdsGetPropertyDesc(m_camera, kEdsPropID_Tv, TvDesc);
shun-iwasawa 31accf
  int count = TvDesc->numElements;
shun-iwasawa 31accf
  if (count > 0) {
shun-iwasawa 31accf
    int i = 0;
shun-iwasawa 31accf
    while (i < count) {
shun-iwasawa 31accf
      m_shutterSpeedOptions.push_back(
shun-iwasawa 31accf
          QString::fromStdString(m_tvMap[TvDesc->propDesc[i]]));
shun-iwasawa 31accf
      i++;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  delete TvDesc;
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::getAvailableApertures() {
shun-iwasawa 31accf
  EdsPropertyDesc* AvDesc = new EdsPropertyDesc;
shun-iwasawa 31accf
  EdsError err            = EDS_ERR_OK;
shun-iwasawa 31accf
  m_apertureOptions.clear();
shun-iwasawa 31accf
shun-iwasawa 31accf
  err       = EdsGetPropertyDesc(m_camera, kEdsPropID_Av, AvDesc);
shun-iwasawa 31accf
  int count = AvDesc->numElements;
shun-iwasawa 31accf
  if (count > 0) {
shun-iwasawa 31accf
    int i = 0;
shun-iwasawa 31accf
    while (i < count) {
shun-iwasawa 31accf
      m_apertureOptions.push_back(
shun-iwasawa 31accf
          QString::fromStdString(m_avMap[AvDesc->propDesc[i]]));
shun-iwasawa 31accf
      i++;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  delete AvDesc;
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::getAvailableExposureCompensations() {
shun-iwasawa 31accf
  EdsPropertyDesc* exposureDesc = new EdsPropertyDesc;
shun-iwasawa 31accf
  EdsError err                  = EDS_ERR_OK;
shun-iwasawa 31accf
  m_exposureOptions.clear();
shun-iwasawa 31accf
shun-iwasawa 6bac0f
  err       = EdsGetPropertyDesc(m_camera, kEdsPropID_ExposureCompensation,
shun-iwasawa 31accf
                           exposureDesc);
shun-iwasawa 31accf
  int count = exposureDesc->numElements;
shun-iwasawa 31accf
  if (count > 0) {
shun-iwasawa 31accf
    int i = 0;
shun-iwasawa 31accf
    while (i < count) {
shun-iwasawa 31accf
      m_exposureOptions.push_back(
shun-iwasawa 31accf
          QString::fromStdString(m_exposureMap[exposureDesc->propDesc[i]]));
shun-iwasawa 31accf
      i++;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  delete exposureDesc;
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::getAvailableWhiteBalances() {
shun-iwasawa 31accf
  EdsPropertyDesc* whiteBalanceDesc = new EdsPropertyDesc;
shun-iwasawa 31accf
  EdsError err                      = EDS_ERR_OK;
shun-iwasawa 31accf
  m_whiteBalanceOptions.clear();
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertyDesc(m_camera, kEdsPropID_WhiteBalance, whiteBalanceDesc);
shun-iwasawa 31accf
  int count = whiteBalanceDesc->numElements;
shun-iwasawa 31accf
  if (count > 0) {
shun-iwasawa 31accf
    int i = 0;
shun-iwasawa 31accf
    while (i < count) {
shun-iwasawa 31accf
      m_whiteBalanceOptions.push_back(QString::fromStdString(
shun-iwasawa 31accf
          m_whiteBalanceMap[whiteBalanceDesc->propDesc[i]]));
shun-iwasawa 31accf
      i++;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  delete whiteBalanceDesc;
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::getAvailableImageQualities() {
shun-iwasawa 31accf
  EdsPropertyDesc* imageQualityDesc = new EdsPropertyDesc;
shun-iwasawa 31accf
  EdsError err                      = EDS_ERR_OK;
shun-iwasawa 31accf
  m_imageQualityOptions.clear();
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertyDesc(m_camera, kEdsPropID_ImageQuality, imageQualityDesc);
shun-iwasawa 31accf
  int count = imageQualityDesc->numElements;
shun-iwasawa 31accf
  if (count > 0) {
shun-iwasawa 31accf
    int i = 0;
shun-iwasawa 31accf
    while (i < count) {
shun-iwasawa 31accf
      QString quality = QString::fromStdString(
shun-iwasawa 31accf
          m_imageQualityMap[imageQualityDesc->propDesc[i]]);
shun-iwasawa 31accf
      if (!quality.contains("RAW")) {
shun-iwasawa 31accf
        m_imageQualityOptions.push_back(quality);
shun-iwasawa 31accf
      }
shun-iwasawa 31accf
      i++;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  delete imageQualityDesc;
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::getAvailablePictureStyles() {
shun-iwasawa 31accf
  EdsPropertyDesc* pictureStyleDesc = new EdsPropertyDesc;
shun-iwasawa 31accf
  EdsError err                      = EDS_ERR_OK;
shun-iwasawa 31accf
  m_pictureStyleOptions.clear();
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertyDesc(m_camera, kEdsPropID_PictureStyle, pictureStyleDesc);
shun-iwasawa 31accf
  int count = pictureStyleDesc->numElements;
shun-iwasawa 31accf
  if (count > 0) {
shun-iwasawa 31accf
    int i = 0;
shun-iwasawa 31accf
    while (i < count) {
shun-iwasawa 31accf
      m_pictureStyleOptions.push_back(QString::fromStdString(
shun-iwasawa 31accf
          m_pictureStyleMap[pictureStyleDesc->propDesc[i]]));
shun-iwasawa 31accf
      i++;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  delete pictureStyleDesc;
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::buildColorTemperatures() {
shun-iwasawa 31accf
  m_colorTempOptions.clear();
shun-iwasawa 31accf
  int i = 2800;
shun-iwasawa 31accf
  while (i <= 10000) {
shun-iwasawa 31accf
    m_colorTempOptions.push_back(QString::number(i));
shun-iwasawa 31accf
    i += 100;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getCurrentShutterSpeed() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType tvType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_Tv, 0, &tvType, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_Tv, 0, sizeof(size), &data);
shun-iwasawa 31accf
shun-iwasawa 31accf
  return QString::fromStdString(m_tvMap[data]);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getCurrentIso() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType isoType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_ISOSpeed, 0, &isoType, &size);
shun-iwasawa 31accf
  err =
shun-iwasawa 31accf
      EdsGetPropertyData(m_camera, kEdsPropID_ISOSpeed, 0, sizeof(size), &data);
shun-iwasawa 31accf
shun-iwasawa 31accf
  return QString::fromStdString(m_isoMap[data]);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getCurrentAperture() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType avType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_Av, 0, &avType, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_Av, 0, sizeof(size), &data);
shun-iwasawa 31accf
shun-iwasawa 31accf
  return QString::fromStdString(m_avMap[data]);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getCurrentExposureCompensation() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType exposureType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_ExposureCompensation, 0,
shun-iwasawa 31accf
                           &exposureType, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_ExposureCompensation, 0,
shun-iwasawa 31accf
                           sizeof(size), &data);
shun-iwasawa 31accf
shun-iwasawa 31accf
  return QString::fromStdString(m_exposureMap[data]);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getCurrentWhiteBalance() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType whiteBalanceType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_WhiteBalance, 0,
shun-iwasawa 31accf
                           &whiteBalanceType, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_WhiteBalance, 0, sizeof(size),
shun-iwasawa 31accf
                           &data);
shun-iwasawa 31accf
  std::string wbString = m_whiteBalanceMap[data];
shun-iwasawa 31accf
  return QString::fromStdString(m_whiteBalanceMap[data]);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getCurrentImageQuality() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType imageQualityType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_ImageQuality, 0,
shun-iwasawa 31accf
                           &imageQualityType, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_ImageQuality, 0, sizeof(size),
shun-iwasawa 31accf
                           &data);
shun-iwasawa 31accf
  std::string wbString = m_imageQualityMap[data];
shun-iwasawa 31accf
  return QString::fromStdString(m_imageQualityMap[data]);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getCurrentPictureStyle() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType pictureStyleType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_PictureStyle, 0,
shun-iwasawa 31accf
                           &pictureStyleType, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_PictureStyle, 0, sizeof(size),
shun-iwasawa 31accf
                           &data);
shun-iwasawa 31accf
  std::string wbString = m_pictureStyleMap[data];
shun-iwasawa 31accf
  return QString::fromStdString(m_pictureStyleMap[data]);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getCurrentColorTemperature() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType colorTempType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_ColorTemperature, 0,
shun-iwasawa 31accf
                           &colorTempType, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_ColorTemperature, 0,
shun-iwasawa 31accf
                           sizeof(size), &data);
shun-iwasawa 31accf
shun-iwasawa 31accf
  return QString::number(data);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
QString Canon::getCurrentBatteryLevel() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsDataType batteryLevelType;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 data;
shun-iwasawa 31accf
  QString result;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(m_camera, kEdsPropID_BatteryLevel, 0,
shun-iwasawa 31accf
                           &batteryLevelType, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_BatteryLevel, 0, sizeof(size),
shun-iwasawa 31accf
                           &data);
shun-iwasawa 31accf
  if (data == 0xffffffff) {
shun-iwasawa 31accf
    result = tr("AC Power");
shun-iwasawa 31accf
  } else if (data >= 80) {
shun-iwasawa 31accf
    result = tr("Full");
shun-iwasawa 31accf
  } else {
shun-iwasawa 31accf
    // at least  the 60D reports battery values as 59, 49. . .
shun-iwasawa 31accf
    // round up
shun-iwasawa 31accf
    if (data % 10 == 9) data += 1;
shun-iwasawa 31accf
    result = QString::number(data) + "%";
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  return result;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::setShutterSpeed(QString shutterSpeed) {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsUInt32 value;
shun-iwasawa 31accf
  auto it = m_tvMap.begin();
shun-iwasawa 31accf
  while (it != m_tvMap.end()) {
shun-iwasawa 31accf
    if (it->second == shutterSpeed.toStdString()) {
shun-iwasawa 31accf
      value = it->first;
shun-iwasawa 31accf
      break;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    it++;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_Tv, 0, sizeof(value), &value);
shun-iwasawa 31accf
  emit(shutterSpeedChangedSignal(shutterSpeed));
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::setIso(QString iso) {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsUInt32 value;
shun-iwasawa 31accf
  auto it = m_isoMap.begin();
shun-iwasawa 31accf
  while (it != m_isoMap.end()) {
shun-iwasawa 31accf
    if (it->second == iso.toStdString()) {
shun-iwasawa 31accf
      value = it->first;
shun-iwasawa 31accf
      break;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    it++;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_ISOSpeed, 0, sizeof(value),
shun-iwasawa 31accf
                           &value);
shun-iwasawa 31accf
  emit(isoChangedSignal(iso));
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::setAperture(QString aperture) {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsUInt32 value;
shun-iwasawa 31accf
  auto it = m_avMap.begin();
shun-iwasawa 31accf
  while (it != m_avMap.end()) {
shun-iwasawa 31accf
    if (it->second == aperture.toStdString()) {
shun-iwasawa 31accf
      value = it->first;
shun-iwasawa 31accf
      err =
shun-iwasawa 31accf
          EdsSetPropertyData(m_camera, kEdsPropID_Av, 0, sizeof(value), &value);
shun-iwasawa 31accf
      if (err == EDS_ERR_OK) {
shun-iwasawa 31accf
        break;
shun-iwasawa 31accf
      } else {
shun-iwasawa 31accf
        // some aperture values have two entries in the avMap
shun-iwasawa 31accf
        it++;
shun-iwasawa 31accf
        value = it->first;
shun-iwasawa 31accf
        err   = EdsSetPropertyData(m_camera, kEdsPropID_Av, 0, sizeof(value),
shun-iwasawa 31accf
                                 &value);
shun-iwasawa 31accf
        break;
shun-iwasawa 31accf
      }
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    it++;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  emit(apertureChangedSignal(aperture));
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::setExposureCompensation(QString exposure) {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsUInt32 value;
shun-iwasawa 31accf
  auto it = m_exposureMap.begin();
shun-iwasawa 31accf
  while (it != m_exposureMap.end()) {
shun-iwasawa 31accf
    if (it->second == exposure.toStdString()) {
shun-iwasawa 31accf
      value = it->first;
shun-iwasawa 31accf
      break;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    it++;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_ExposureCompensation, 0,
shun-iwasawa 31accf
                           sizeof(value), &value);
shun-iwasawa 31accf
  emit(exposureChangedSignal(exposure));
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::setWhiteBalance(QString whiteBalance) {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsUInt32 value;
shun-iwasawa 31accf
  auto it = m_whiteBalanceMap.begin();
shun-iwasawa 31accf
  while (it != m_whiteBalanceMap.end()) {
shun-iwasawa 31accf
    if (it->second == whiteBalance.toStdString()) {
shun-iwasawa 31accf
      value = it->first;
shun-iwasawa 31accf
      break;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    it++;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_WhiteBalance, 0, sizeof(value),
shun-iwasawa 31accf
                           &value);
shun-iwasawa 31accf
  emit(whiteBalanceChangedSignal(whiteBalance));
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::setImageQuality(QString quality) {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsUInt32 value;
shun-iwasawa 31accf
  auto it = m_imageQualityMap.begin();
shun-iwasawa 31accf
  while (it != m_imageQualityMap.end()) {
shun-iwasawa 31accf
    if (it->second == quality.toStdString()) {
shun-iwasawa 31accf
      value = it->first;
shun-iwasawa 31accf
      break;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    it++;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_ImageQuality, 0, sizeof(value),
shun-iwasawa 31accf
                           &value);
shun-iwasawa 31accf
  emit(imageQualityChangedSignal(quality));
shun-iwasawa 31accf
  m_proxyImageDimensions = TDimension(0, 0);
shun-iwasawa 31accf
  m_proxyDpi             = TPointD(0.0, 0.0);
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::setPictureStyle(QString style) {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsUInt32 value;
shun-iwasawa 31accf
  auto it = m_pictureStyleMap.begin();
shun-iwasawa 31accf
  while (it != m_pictureStyleMap.end()) {
shun-iwasawa 31accf
    if (it->second == style.toStdString()) {
shun-iwasawa 31accf
      value = it->first;
shun-iwasawa 31accf
      break;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    it++;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_PictureStyle, 0, sizeof(value),
shun-iwasawa 31accf
                           &value);
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_PictureStyle, 0, sizeof(value),
shun-iwasawa 31accf
                           &value);
shun-iwasawa 31accf
  emit(pictureStyleChangedSignal(style));
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::setColorTemperature(QString temp) {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsUInt32 value;
shun-iwasawa 31accf
  value = temp.toInt();
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_ColorTemperature, 0,
shun-iwasawa 31accf
                           sizeof(value), &value);
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_Evf_ColorTemperature, 0,
shun-iwasawa 31accf
                           sizeof(value), &value);
shun-iwasawa 31accf
  emit(colorTemperatureChangedSignal(temp));
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::setUseScaledImages(bool on) {
shun-iwasawa 31accf
  m_useScaledImages         = on;
shun-iwasawa 31accf
  StopMotionUseScaledImages = int(on);
shun-iwasawa 31accf
  emit(scaleFullSizeImagesSignal(on));
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
bool Canon::downloadImage(EdsBaseRef object) {
shun-iwasawa 31accf
  EdsError err        = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsStreamRef stream = NULL;
shun-iwasawa 31accf
  EdsDirectoryItemInfo dirItemInfo;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetDirectoryItemInfo(object, &dirItemInfo);
shun-iwasawa 31accf
  err = EdsCreateMemoryStream(0, &stream);
shun-iwasawa 31accf
  err = EdsDownload(object, dirItemInfo.size, stream);
shun-iwasawa 31accf
  EdsDownloadComplete(object);
shun-iwasawa 31accf
shun-iwasawa 6bac0f
  // tj code
shun-iwasawa 31accf
shun-iwasawa 31accf
#ifdef MACOSX
shun-iwasawa 31accf
  UInt64 mySize = 0;
shun-iwasawa 31accf
#else
shun-iwasawa 31accf
  unsigned __int64 mySize = 0;
shun-iwasawa 31accf
#endif
shun-iwasawa 31accf
  unsigned char* data = NULL;
shun-iwasawa 31accf
  err                 = EdsGetPointer(stream, (EdsVoid**)&data);
shun-iwasawa 31accf
  err                 = EdsGetLength(stream, &mySize);
shun-iwasawa 31accf
shun-iwasawa 31accf
  int width, height, pixelFormat;
shun-iwasawa 31accf
  // long size;
shun-iwasawa 31accf
  int inSubsamp, inColorspace;
shun-iwasawa 31accf
  // unsigned long jpegSize;
shun-iwasawa 31accf
  tjhandle tjInstance   = NULL;
shun-iwasawa 31accf
  unsigned char* imgBuf = NULL;
shun-iwasawa 31accf
  tjInstance            = tjInitDecompress();
shun-iwasawa 31accf
  tjDecompressHeader3(tjInstance, data, mySize, &width, &height, &inSubsamp,
shun-iwasawa 31accf
                      &inColorspace);
shun-iwasawa 31accf
shun-iwasawa 31accf
  pixelFormat = TJPF_BGRX;
shun-iwasawa 31accf
  imgBuf = (unsigned char*)tjAlloc(width * height * tjPixelSize[pixelFormat]);
shun-iwasawa 31accf
  int flags = 0;
shun-iwasawa 31accf
  flags |= TJFLAG_BOTTOMUP;
shun-iwasawa 31accf
  int tempWidth, tempHeight;
shun-iwasawa 31accf
shun-iwasawa 31accf
  if (m_useScaledImages) {
shun-iwasawa 31accf
    int factorsNum;
shun-iwasawa 31accf
    tjscalingfactor scalingFactor = {1, 1};
shun-iwasawa 31accf
    tjscalingfactor* factor       = tjGetScalingFactors(&factorsNum);
shun-iwasawa 31accf
    int intRatio                  = (float)width / (float)height * 100.0;
shun-iwasawa 31accf
    int i                         = 0;
shun-iwasawa 31accf
shun-iwasawa 31accf
    TCamera* camera =
shun-iwasawa 31accf
        TApp::instance()->getCurrentScene()->getScene()->getCurrentCamera();
shun-iwasawa 31accf
    TDimension res = camera->getRes();
shun-iwasawa 31accf
shun-iwasawa 31accf
    // find the scaling factor that is at least as big as the current camera
shun-iwasawa 31accf
    while (i < factorsNum) {
shun-iwasawa 31accf
      scalingFactor = factor[i];
shun-iwasawa 31accf
      tempWidth     = TJSCALED(width, scalingFactor);
shun-iwasawa 31accf
      if (tempWidth < res.lx && i > 0) {
shun-iwasawa 31accf
        scalingFactor = factor[i - 1];
shun-iwasawa 31accf
        break;
shun-iwasawa 31accf
      }
shun-iwasawa 31accf
      i++;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    // make sure the scaling factor has the right aspect ratio
shun-iwasawa 31accf
    while (i >= 0) {
shun-iwasawa 31accf
      tempWidth  = TJSCALED(width, scalingFactor);
shun-iwasawa 31accf
      tempHeight = TJSCALED(height, scalingFactor);
shun-iwasawa 31accf
      if ((int)((float)tempWidth / (float)tempHeight * 100.0) == intRatio) {
shun-iwasawa 31accf
        break;
shun-iwasawa 31accf
      }
shun-iwasawa 31accf
      i--;
shun-iwasawa 31accf
      scalingFactor = factor[i];
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  } else {
shun-iwasawa 31accf
    tempWidth  = width;
shun-iwasawa 31accf
    tempHeight = height;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  if (m_useScaledImages || !getCurrentImageQuality().contains("Large")) {
shun-iwasawa 31accf
    TCamera* camera =
shun-iwasawa 31accf
        TApp::instance()->getCurrentScene()->getScene()->getCurrentCamera();
shun-iwasawa 31accf
    TDimensionD size       = camera->getSize();
shun-iwasawa 31accf
    m_proxyImageDimensions = TDimension(tempWidth, tempHeight);
shun-iwasawa 31accf
    double minimumDpi      = std::min(m_proxyImageDimensions.lx / size.lx,
shun-iwasawa 31accf
                                 m_proxyImageDimensions.ly / size.ly);
shun-iwasawa 6bac0f
    m_proxyDpi             = TPointD(minimumDpi, minimumDpi);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  tjDecompress2(tjInstance, data, mySize, imgBuf, tempWidth,
shun-iwasawa 31accf
                tempWidth * tjPixelSize[pixelFormat], tempHeight, pixelFormat,
shun-iwasawa 31accf
                flags);
shun-iwasawa 31accf
shun-iwasawa 31accf
  StopMotion::instance()->m_newImage = TRaster32P(tempWidth, tempHeight);
shun-iwasawa 31accf
  StopMotion::instance()->m_newImage->lock();
shun-iwasawa 31accf
  uchar* rawData = StopMotion::instance()->m_newImage->getRawData();
shun-iwasawa 31accf
  memcpy(rawData, imgBuf, tempWidth * tempHeight * tjPixelSize[pixelFormat]);
shun-iwasawa 31accf
  StopMotion::instance()->m_newImage->unlock();
shun-iwasawa 31accf
shun-iwasawa 31accf
  tjFree(imgBuf);
shun-iwasawa 31accf
  imgBuf = NULL;
shun-iwasawa 31accf
  tjDestroy(tjInstance);
shun-iwasawa 31accf
  tjInstance = NULL;
shun-iwasawa 31accf
shun-iwasawa 31accf
  // end tj code
shun-iwasawa 31accf
shun-iwasawa 31accf
  if (m_useScaledImages) {
shun-iwasawa 31accf
    QFile fullImage(StopMotion::instance()->m_tempFile);
shun-iwasawa 31accf
    fullImage.open(QIODevice::WriteOnly);
shun-iwasawa 31accf
    QDataStream dataStream(&fullImage);
shun-iwasawa 31accf
    dataStream.writeRawData((const char*)data, mySize);
shun-iwasawa 31accf
    fullImage.close();
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  EdsRelease(stream);
shun-iwasawa 31accf
  stream = NULL;
shun-iwasawa 31accf
  if (object) EdsRelease(object);
shun-iwasawa 31accf
shun-iwasawa 31accf
  if (err == EDS_ERR_OK) {
shun-iwasawa 31accf
    emit(newCanonImageReady());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::takePicture() {
shun-iwasawa 31accf
  EdsError err;
shun-iwasawa 31accf
  err = EdsSendCommand(m_camera, kEdsCameraCommand_PressShutterButton,
shun-iwasawa 31accf
                       kEdsCameraCommand_ShutterButton_Completely_NonAF);
shun-iwasawa 31accf
  err = EdsSendCommand(m_camera, kEdsCameraCommand_PressShutterButton,
shun-iwasawa 31accf
                       kEdsCameraCommand_ShutterButton_OFF);
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::extendCameraOnTime() {
shun-iwasawa 31accf
  EdsError err;
shun-iwasawa 31accf
  EdsInt32 param = 0;
shun-iwasawa 31accf
  err = EdsSendCommand(m_camera, kEdsCameraCommand_ExtendShutDownTimer, param);
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::startCanonLiveView() {
shun-iwasawa 31accf
  if (m_camera && m_sessionOpen) {
shun-iwasawa 31accf
    EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
    // Get the output device for the live view image
shun-iwasawa 31accf
    EdsUInt32 device;
shun-iwasawa 31accf
    err = EdsGetPropertyData(m_camera, kEdsPropID_Evf_OutputDevice, 0,
shun-iwasawa 31accf
                             sizeof(device), &device);
shun-iwasawa 31accf
    // PC live view starts by setting the PC as the output device for the live
shun-iwasawa 31accf
    // view image.
shun-iwasawa 31accf
    if (err == EDS_ERR_OK) {
shun-iwasawa 31accf
      device |= kEdsEvfOutputDevice_PC;
shun-iwasawa 31accf
      err = EdsSetPropertyData(m_camera, kEdsPropID_Evf_OutputDevice, 0,
shun-iwasawa 31accf
                               sizeof(device), &device);
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    if (err == EDS_ERR_OK) {
shun-iwasawa 31accf
      StopMotion::instance()->m_liveViewStatus = 1;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    // A property change event notification is issued from the camera if
shun-iwasawa 31accf
    // property settings are made successfully. Start downloading of the live
shun-iwasawa 31accf
    // view image once the property change notification arrives.
shun-iwasawa 31accf
    return err;
shun-iwasawa 31accf
  } else
shun-iwasawa 31accf
    return EDS_ERR_DEVICE_NOT_FOUND;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::endCanonLiveView() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  // Get the output device for the live view image
shun-iwasawa 31accf
  EdsUInt32 device;
shun-iwasawa 31accf
  err = EdsGetPropertyData(m_camera, kEdsPropID_Evf_OutputDevice, 0,
shun-iwasawa 31accf
                           sizeof(device), &device);
shun-iwasawa 31accf
  // PC live view ends if the PC is disconnected from the live view image output
shun-iwasawa 31accf
  // device.
shun-iwasawa 31accf
  if (err == EDS_ERR_OK) {
shun-iwasawa 31accf
    device &= ~kEdsEvfOutputDevice_PC;
shun-iwasawa 31accf
    err = EdsSetPropertyData(m_camera, kEdsPropID_Evf_OutputDevice, 0,
shun-iwasawa 31accf
                             sizeof(device), &device);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  StopMotion::instance()->m_liveViewStatus = 0;
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::zoomLiveView() {
shun-iwasawa 31accf
  if (!m_sessionOpen || !StopMotion::instance()->m_liveViewStatus > 0)
shun-iwasawa 31accf
    return EDS_ERR_DEVICE_INVALID;
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  if (m_pickLiveViewZoom) toggleZoomPicking();
shun-iwasawa 31accf
  if (m_liveViewZoom == 1) {
shun-iwasawa 31accf
    m_liveViewZoom = 5;
shun-iwasawa 31accf
    m_zooming      = true;
shun-iwasawa 31accf
    StopMotion::instance()->toggleNumpadForFocusCheck(true);
shun-iwasawa 31accf
  } else if (m_liveViewZoom == 5) {
shun-iwasawa 31accf
    m_liveViewZoom = 1;
shun-iwasawa 31accf
    m_zooming      = false;
shun-iwasawa 31accf
    StopMotion::instance()->toggleNumpadForFocusCheck(false);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_Evf_Zoom, 0,
shun-iwasawa 31accf
                           sizeof(m_liveViewZoom), &m_liveViewZoom);
shun-iwasawa 31accf
  if (m_liveViewZoom == 5) setZoomPoint();
shun-iwasawa 31accf
  emit(focusCheckToggled(m_liveViewZoom > 1));
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::makeZoomPoint(TPointD pos) {
shun-iwasawa 31accf
  m_liveViewZoomPickPoint = pos;
shun-iwasawa 31accf
  calculateZoomPoint();
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::toggleZoomPicking() {
shun-iwasawa 31accf
  if (m_sessionOpen && StopMotion::instance()->m_liveViewStatus > 0 &&
shun-iwasawa 31accf
      !m_zooming) {
shun-iwasawa 31accf
    if (m_pickLiveViewZoom) {
shun-iwasawa 31accf
      m_pickLiveViewZoom = false;
shun-iwasawa 31accf
      StopMotion::instance()->toggleNumpadForFocusCheck(false);
shun-iwasawa 31accf
    } else {
shun-iwasawa 31accf
      m_pickLiveViewZoom = true;
shun-iwasawa 31accf
      if (m_liveViewZoomPickPoint == TPointD(0.0, 0.0)) {
shun-iwasawa 31accf
        makeZoomPoint(m_liveViewZoomPickPoint);
shun-iwasawa 31accf
      }
shun-iwasawa 31accf
      StopMotion::instance()->toggleNumpadForFocusCheck(true);
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  emit(pickFocusCheckToggled(m_pickLiveViewZoom));
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::setZoomPoint() {
shun-iwasawa 31accf
  // make sure this is set AFTER starting zoom
shun-iwasawa 31accf
  EdsError err              = EDS_ERR_OK;
shun-iwasawa 31accf
  m_liveViewZoomReadyToPick = false;
shun-iwasawa 31accf
  EdsPoint zoomPoint;
shun-iwasawa 31accf
shun-iwasawa 31accf
  calculateZoomPoint();
shun-iwasawa 31accf
shun-iwasawa 31accf
  zoomPoint.x = m_finalZoomPoint.x;
shun-iwasawa 31accf
  zoomPoint.y = m_finalZoomPoint.y;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsSetPropertyData(m_camera, kEdsPropID_Evf_ZoomPosition, 0,
shun-iwasawa 31accf
                           sizeof(zoomPoint), &zoomPoint);
shun-iwasawa 31accf
  m_liveViewZoomReadyToPick = true;
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::calculateZoomPoint() {
shun-iwasawa 31accf
  m_fullImageDimensions = StopMotion::instance()->m_fullImageDimensions;
shun-iwasawa 31accf
  m_fullImageDpi        = StopMotion::instance()->m_fullImageDpi;
shun-iwasawa 31accf
shun-iwasawa 31accf
  bool outOfBounds = false;
shun-iwasawa 31accf
  if (m_liveViewZoomPickPoint == TPointD(0.0, 0.0)) {
shun-iwasawa 31accf
    m_calculatedZoomPoint =
shun-iwasawa 31accf
        TPoint(m_fullImageDimensions.lx / 2, m_fullImageDimensions.ly / 2);
shun-iwasawa 31accf
    m_finalZoomPoint.x = m_calculatedZoomPoint.x - (m_zoomRectDimensions.x / 2);
shun-iwasawa 31accf
    m_finalZoomPoint.y = m_calculatedZoomPoint.y - (m_zoomRectDimensions.y / 2);
shun-iwasawa 31accf
  } else {
shun-iwasawa 31accf
    // get the image size in OpenToonz dimensions
shun-iwasawa 31accf
    double maxFullWidth =
shun-iwasawa 31accf
        (double)m_fullImageDimensions.lx / m_fullImageDpi.x * Stage::inch;
shun-iwasawa 31accf
    double maxFullHeight =
shun-iwasawa 31accf
        (double)m_fullImageDimensions.ly / m_fullImageDpi.y * Stage::inch;
shun-iwasawa 31accf
    // OpenToonz coordinates are based on center at 0, 0
shun-iwasawa 31accf
    // convert that to top left based coordinates
shun-iwasawa 31accf
    double newX = m_liveViewZoomPickPoint.x + maxFullWidth / 2.0;
shun-iwasawa 31accf
    double newY = -m_liveViewZoomPickPoint.y + maxFullHeight / 2.0;
shun-iwasawa 31accf
    // convert back to the normal image dimensions to talk to the camera
shun-iwasawa 31accf
    m_calculatedZoomPoint.x = newX / Stage::inch * m_fullImageDpi.x;
shun-iwasawa 31accf
    m_calculatedZoomPoint.y = newY / Stage::inch * m_fullImageDpi.x;
shun-iwasawa 31accf
    // the Canon SDK wants the top left corner of the zoom rect, not the center
shun-iwasawa 31accf
    m_finalZoomPoint.x = m_calculatedZoomPoint.x - (m_zoomRectDimensions.x / 2);
shun-iwasawa 31accf
    m_finalZoomPoint.y = m_calculatedZoomPoint.y - (m_zoomRectDimensions.y / 2);
shun-iwasawa 31accf
    // finally make sure everything actually fits on the image
shun-iwasawa 31accf
    if (m_finalZoomPoint.x < 0) {
shun-iwasawa 31accf
      m_finalZoomPoint.x = 0;
shun-iwasawa 31accf
      outOfBounds        = true;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    if (m_finalZoomPoint.y < 0) {
shun-iwasawa 31accf
      m_finalZoomPoint.y = 0;
shun-iwasawa 31accf
      outOfBounds        = true;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    if (m_finalZoomPoint.x >
shun-iwasawa 31accf
        m_fullImageDimensions.lx - (m_zoomRectDimensions.x)) {
shun-iwasawa 31accf
      m_finalZoomPoint.x = m_fullImageDimensions.lx - (m_zoomRectDimensions.x);
shun-iwasawa 31accf
      outOfBounds        = true;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    if (m_finalZoomPoint.y >
shun-iwasawa 31accf
        m_fullImageDimensions.ly - (m_zoomRectDimensions.y)) {
shun-iwasawa 31accf
      m_finalZoomPoint.y = m_fullImageDimensions.ly - (m_zoomRectDimensions.y);
shun-iwasawa 31accf
      outOfBounds        = true;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
shun-iwasawa 31accf
    // if out of bounds, recalculate backwards to get the correct location
shun-iwasawa 31accf
    if (outOfBounds) {
shun-iwasawa 31accf
      TPoint tempCalculated;
shun-iwasawa 31accf
      // recenter the point in the rect
shun-iwasawa 31accf
      tempCalculated.x = m_finalZoomPoint.x + (m_zoomRectDimensions.x / 2);
shun-iwasawa 31accf
      tempCalculated.y = m_finalZoomPoint.y + (m_zoomRectDimensions.y / 2);
shun-iwasawa 31accf
      // convert to OpenToonz Dimensions
shun-iwasawa 31accf
      newX = tempCalculated.x / m_fullImageDpi.x * Stage::inch;
shun-iwasawa 31accf
      newY = tempCalculated.y / m_fullImageDpi.y * Stage::inch;
shun-iwasawa 31accf
      // get center based coordinates
shun-iwasawa 31accf
      m_liveViewZoomPickPoint.x = newX - (maxFullWidth / 2.0);
shun-iwasawa 31accf
      m_liveViewZoomPickPoint.y = (newY - (maxFullHeight / 2.0)) * -1;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  // calculate the zoom rectangle position on screen
shun-iwasawa 31accf
shun-iwasawa 31accf
  // get the image size in OpenToonz dimensions
shun-iwasawa 31accf
  double maxFullWidth =
shun-iwasawa 31accf
      (double)m_fullImageDimensions.lx / m_fullImageDpi.x * Stage::inch;
shun-iwasawa 31accf
  double maxFullHeight =
shun-iwasawa 31accf
      (double)m_fullImageDimensions.ly / m_fullImageDpi.y * Stage::inch;
shun-iwasawa 31accf
  m_zoomRect =
shun-iwasawa 31accf
      TRect(m_finalZoomPoint.x, m_finalZoomPoint.y + m_zoomRectDimensions.y,
shun-iwasawa 31accf
            m_finalZoomPoint.x + m_zoomRectDimensions.x, m_finalZoomPoint.y);
shun-iwasawa 31accf
  TRect tempCalculated;
shun-iwasawa 31accf
shun-iwasawa 31accf
  // convert to OpenToonz Dimensions
shun-iwasawa 31accf
  tempCalculated.x0 = m_zoomRect.x0 / m_fullImageDpi.x * Stage::inch;
shun-iwasawa 31accf
  tempCalculated.y0 = m_zoomRect.y0 / m_fullImageDpi.y * Stage::inch;
shun-iwasawa 31accf
  tempCalculated.x1 = m_zoomRect.x1 / m_fullImageDpi.x * Stage::inch;
shun-iwasawa 31accf
  tempCalculated.y1 = m_zoomRect.y1 / m_fullImageDpi.y * Stage::inch;
shun-iwasawa 31accf
  // get center based coordinates
shun-iwasawa 31accf
  m_zoomRect.x0 = tempCalculated.x0 - (maxFullWidth / 2.0);
shun-iwasawa 31accf
  m_zoomRect.y0 = (tempCalculated.y0 - (maxFullHeight / 2.0)) * -1;
shun-iwasawa 31accf
  m_zoomRect.x1 = tempCalculated.x1 - (maxFullWidth / 2.0);
shun-iwasawa 31accf
  m_zoomRect.y1 = (tempCalculated.y1 - (maxFullHeight / 2.0)) * -1;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
bool Canon::downloadEVFData() {
shun-iwasawa 31accf
  EdsError err            = EDS_ERR_OK;
shun-iwasawa 31accf
  EdsStreamRef stream     = NULL;
shun-iwasawa 31accf
  EdsEvfImageRef evfImage = NULL;
shun-iwasawa 31accf
shun-iwasawa 31accf
  // Create memory stream.
shun-iwasawa 31accf
  err = EdsCreateMemoryStream(0, &stream);
shun-iwasawa 31accf
  // Create EvfImageRef.
shun-iwasawa 31accf
  if (err == EDS_ERR_OK) {
shun-iwasawa 31accf
    err = EdsCreateEvfImageRef(stream, &evfImage);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  // Download live view image data.
shun-iwasawa 31accf
  if (err == EDS_ERR_OK) {
shun-iwasawa 31accf
    err = EdsDownloadEvfImage(m_camera, evfImage);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  EdsDataType evfZoom;
shun-iwasawa 31accf
  EdsDataType evfZoomPos;
shun-iwasawa 31accf
  EdsDataType evfZoomRect;
shun-iwasawa 31accf
  EdsUInt32 size;
shun-iwasawa 31accf
  EdsUInt32 sizePos;
shun-iwasawa 31accf
  EdsUInt32 sizeRect;
shun-iwasawa 31accf
  EdsUInt32 sizeImagePos;
shun-iwasawa 31accf
  EdsUInt32 sizeCoordSys;
shun-iwasawa 31accf
  EdsUInt32 zoomAmount;
shun-iwasawa 31accf
  EdsPoint zoomPos;
shun-iwasawa 31accf
  EdsRect zoomRect;
shun-iwasawa 31accf
  EdsPoint imagePos;
shun-iwasawa 31accf
  EdsSize coordSys;
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(evfImage, kEdsPropID_Evf_Zoom, 0, &evfZoom, &size);
shun-iwasawa 31accf
  err = EdsGetPropertyData(evfImage, kEdsPropID_Evf_Zoom, 0, sizeof(size),
shun-iwasawa 31accf
                           &zoomAmount);
shun-iwasawa 31accf
shun-iwasawa 31accf
  // this is the top left corner of the zoomed image
shun-iwasawa 31accf
  err = EdsGetPropertySize(evfImage, kEdsPropID_Evf_ZoomPosition, 0,
shun-iwasawa 31accf
                           &evfZoomPos, &sizePos);
shun-iwasawa 31accf
  err = EdsGetPropertyData(evfImage, kEdsPropID_Evf_ZoomPosition, 0, sizePos,
shun-iwasawa 31accf
                           &zoomPos);
shun-iwasawa 31accf
  // this is the size of the zoomed image
shun-iwasawa 31accf
  err = EdsGetPropertySize(evfImage, kEdsPropID_Evf_ZoomRect, 0, &evfZoomRect,
shun-iwasawa 31accf
                           &sizeRect);
shun-iwasawa 31accf
  err = EdsGetPropertyData(evfImage, kEdsPropID_Evf_ZoomRect, 0, sizeRect,
shun-iwasawa 31accf
                           &zoomRect);
shun-iwasawa 31accf
shun-iwasawa 31accf
  err = EdsGetPropertySize(evfImage, kEdsPropID_Evf_ImagePosition, 0,
shun-iwasawa 31accf
                           &evfZoomRect, &sizeImagePos);
shun-iwasawa 31accf
  err = EdsGetPropertyData(evfImage, kEdsPropID_Evf_ImagePosition, 0,
shun-iwasawa 31accf
                           sizeImagePos, &imagePos);
shun-iwasawa 31accf
  // this returns the size of the full image
shun-iwasawa 31accf
  err = EdsGetPropertySize(evfImage, kEdsPropID_Evf_CoordinateSystem, 0,
shun-iwasawa 31accf
                           &evfZoomRect, &sizeCoordSys);
shun-iwasawa 31accf
  err = EdsGetPropertyData(evfImage, kEdsPropID_Evf_CoordinateSystem, 0,
shun-iwasawa 31accf
                           sizeCoordSys, &coordSys);
shun-iwasawa 31accf
shun-iwasawa 31accf
  // Get the incidental data of the image.
shun-iwasawa 31accf
  if (err == EDS_ERR_OK) {
shun-iwasawa 31accf
    JpgConverter* converter = new JpgConverter;
shun-iwasawa 31accf
    converter->setStream(stream);
shun-iwasawa 31accf
    converter->setScale(m_useScaledImages);
shun-iwasawa 31accf
shun-iwasawa 31accf
    connect(converter, SIGNAL(imageReady(bool)), this, SLOT(onImageReady(bool)),
shun-iwasawa 31accf
            Qt::QueuedConnection);
shun-iwasawa 31accf
    connect(converter, SIGNAL(finished()), this, SLOT(onFinished()),
shun-iwasawa 31accf
            Qt::QueuedConnection);
shun-iwasawa 31accf
shun-iwasawa 31accf
    converter->start();
shun-iwasawa 31accf
shun-iwasawa 31accf
    while (!l_quitLoop)
shun-iwasawa 31accf
      QCoreApplication::processEvents(QEventLoop::AllEvents |
shun-iwasawa 31accf
                                      QEventLoop::WaitForMoreEvents);
shun-iwasawa 31accf
shun-iwasawa 31accf
    l_quitLoop                                 = false;
shun-iwasawa 31accf
    StopMotion::instance()->m_liveViewImage    = converter->getImage();
shun-iwasawa 31accf
    StopMotion::instance()->m_hasLiveViewImage = true;
shun-iwasawa 31accf
    delete converter;
shun-iwasawa 31accf
    if (stream != NULL) {
shun-iwasawa 31accf
      EdsRelease(stream);
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    stream = NULL;
shun-iwasawa 31accf
    if (evfImage != NULL) {
shun-iwasawa 31accf
      EdsRelease(evfImage);
shun-iwasawa 31accf
      evfImage = NULL;
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    if (!m_converterSucceeded) return EDS_ERR_UNEXPECTED_EXCEPTION;
shun-iwasawa 31accf
shun-iwasawa 31accf
    // sometimes zoomRect returns the wrong dimensions if called too fast
shun-iwasawa 31accf
    if (zoomRect.size.width < 5000 && zoomRect.size.height < 5000) {
shun-iwasawa 31accf
      m_zoomRectDimensions = TPoint(zoomRect.size.width, zoomRect.size.height);
shun-iwasawa 31accf
      if (m_zoomRect == TRect(0, 0, 0, 0)) {
shun-iwasawa 31accf
        m_zoomRect = TRect(zoomPos.x, zoomPos.y + zoomRect.size.height,
shun-iwasawa 31accf
                           zoomPos.x + zoomRect.size.width, zoomPos.y);
shun-iwasawa 31accf
        calculateZoomPoint();
shun-iwasawa 31accf
      }
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    if (zoomAmount == 5 && m_zoomRectDimensions == TPoint(0, 0)) {
shun-iwasawa 31accf
      setZoomPoint();
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    StopMotion::instance()->m_fullImageDimensions =
shun-iwasawa 31accf
        TDimension(coordSys.width, coordSys.height);
shun-iwasawa 31accf
shun-iwasawa 31accf
    return true;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  return false;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::focusNear() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  err          = EdsSendCommand(m_camera, kEdsCameraCommand_DriveLensEvf,
shun-iwasawa 31accf
                       kEdsEvfDriveLens_Near1);
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::focusFar() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  err          = EdsSendCommand(m_camera, kEdsCameraCommand_DriveLensEvf,
shun-iwasawa 31accf
                       kEdsEvfDriveLens_Far1);
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::focusNear2() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  err          = EdsSendCommand(m_camera, kEdsCameraCommand_DriveLensEvf,
shun-iwasawa 31accf
                       kEdsEvfDriveLens_Near2);
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::focusFar2() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  err          = EdsSendCommand(m_camera, kEdsCameraCommand_DriveLensEvf,
shun-iwasawa 31accf
                       kEdsEvfDriveLens_Far2);
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::focusNear3() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  err          = EdsSendCommand(m_camera, kEdsCameraCommand_DriveLensEvf,
shun-iwasawa 31accf
                       kEdsEvfDriveLens_Near3);
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::focusFar3() {
shun-iwasawa 31accf
  EdsError err = EDS_ERR_OK;
shun-iwasawa 31accf
  err          = EdsSendCommand(m_camera, kEdsCameraCommand_DriveLensEvf,
shun-iwasawa 31accf
                       kEdsEvfDriveLens_Far3);
shun-iwasawa 31accf
  return err;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::handleObjectEvent(EdsObjectEvent event, EdsBaseRef object,
shun-iwasawa 31accf
                                  EdsVoid* context) {
shun-iwasawa 31accf
  if (event == kEdsObjectEvent_DirItemRequestTransfer) {
shun-iwasawa 31accf
    instance()->downloadImage(object);
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  return EDS_ERR_OK;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::handlePropertyEvent(EdsPropertyEvent event,
shun-iwasawa 31accf
                                    EdsPropertyID property, EdsUInt32 param,
shun-iwasawa 31accf
                                    EdsVoid* context) {
shun-iwasawa 31accf
  if (property == kEdsPropID_Evf_OutputDevice &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    if (StopMotion::instance()->m_liveViewStatus == 1)
shun-iwasawa 31accf
      StopMotion::instance()->m_liveViewStatus = 2;
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_AEMode &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    emit(instance()->modeChanged());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_BatteryLevel &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    emit(instance()->modeChanged());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_Av &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyDescChanged) {
shun-iwasawa 31accf
    emit(instance()->apertureOptionsChanged());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  if (property == kEdsPropID_Av && event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    emit(instance()->apertureChangedSignal(instance()->getCurrentAperture()));
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  if (property == kEdsPropID_Tv &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyDescChanged) {
shun-iwasawa 31accf
    emit(instance()->shutterSpeedOptionsChanged());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_Tv && event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    emit(instance()->shutterSpeedChangedSignal(
shun-iwasawa 31accf
        instance()->getCurrentShutterSpeed()));
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_ISOSpeed &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyDescChanged) {
shun-iwasawa 31accf
    emit(instance()->isoOptionsChanged());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_ISOSpeed &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    emit(instance()->isoChangedSignal(instance()->getCurrentIso()));
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_ExposureCompensation &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyDescChanged) {
shun-iwasawa 31accf
    emit(instance()->exposureOptionsChanged());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_ExposureCompensation &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    emit(instance()->exposureChangedSignal(
shun-iwasawa 31accf
        instance()->getCurrentExposureCompensation()));
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_WhiteBalance &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyDescChanged) {
shun-iwasawa 31accf
    emit(instance()->whiteBalanceOptionsChanged());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_WhiteBalance &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    emit(instance()->whiteBalanceChangedSignal(
shun-iwasawa 31accf
        instance()->getCurrentWhiteBalance()));
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_PictureStyle &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyDescChanged) {
shun-iwasawa 31accf
    emit(instance()->pictureStyleOptionsChanged());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_PictureStyle &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    emit(instance()->pictureStyleChangedSignal(
shun-iwasawa 31accf
        instance()->getCurrentPictureStyle()));
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_ImageQuality &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyDescChanged) {
shun-iwasawa 31accf
    emit(instance()->imageQualityOptionsChanged());
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (property == kEdsPropID_ImageQuality &&
shun-iwasawa 31accf
      event == kEdsPropertyEvent_PropertyChanged) {
shun-iwasawa 31accf
    emit(instance()->imageQualityChangedSignal(
shun-iwasawa 31accf
        instance()->getCurrentImageQuality()));
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
shun-iwasawa 31accf
  return EDS_ERR_OK;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::handleStateEvent(EdsStateEvent event, EdsUInt32 parameter,
shun-iwasawa 31accf
                                 EdsVoid* context) {
shun-iwasawa 31accf
  if (event == kEdsStateEvent_Shutdown) {
shun-iwasawa 6bac0f
    instance()->m_sessionOpen = false;
shun-iwasawa 6bac0f
    instance()->releaseCamera();
shun-iwasawa 31accf
    if (instance()->m_sessionOpen && instance()->getCameraCount() > 0) {
shun-iwasawa 6bac0f
      // instance()->closeCameraSession();
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
    StopMotion::instance()->m_liveViewStatus = 0;
shun-iwasawa 31accf
    emit(instance()->canonCameraChanged(QString("")));
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  if (event == kEdsStateEvent_WillSoonShutDown) {
shun-iwasawa 31accf
    instance()->extendCameraOnTime();
shun-iwasawa 31accf
    if (StopMotion::instance()->m_liveViewStatus > 1) {
shun-iwasawa 31accf
      StopMotion::instance()->toggleLiveView();
shun-iwasawa 31accf
    }
shun-iwasawa 31accf
  }
shun-iwasawa 31accf
  return EDS_ERR_OK;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
EdsError Canon::handleCameraAddedEvent(EdsVoid* context) {
shun-iwasawa 31accf
  instance()->cameraAdded();
shun-iwasawa 31accf
  return EDS_ERR_OK;
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::buildAvMap() {
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x00, "00"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x08, "1"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x0B, "1.1"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x0C, "1.2"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x0D, "1.2"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x10, "1.4"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x13, "1.6"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x14, "1.8"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x15, "1.8"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x18, "2"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x1B, "2.2"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x1C, "2.5"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x1D, "2.5"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x20, "2.8"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x23, "3.2"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x24, "3.5"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x25, "3.5"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x28, "4"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x2B, "4.5"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x2C, "4.5"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x2D, "5.0"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x30, "5.6"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x33, "6.3"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x34, "6.7"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x35, "7.1"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x38, "8"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x3B, "9"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x3C, "9.5"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x3D, "10"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x40, "11"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x43, "13"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x44, "13"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x45, "14"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x48, "16"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x4B, "18"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x4C, "19"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x4D, "20"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x50, "22"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x53, "25"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x54, "27"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x55, "29"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x58, "32"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x5B, "36"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x5C, "38"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x5D, "40"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x60, "45"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x63, "51"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x64, "54"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x65, "57"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x68, "64"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x6B, "72"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x6C, "76"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x6D, "80"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0x70, "91"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0xFF, "Auto"));</edsuint32,>
shun-iwasawa 31accf
  m_avMap.insert(std::pair<edsuint32, char*="" const="">(0xffffffff, "unknown"));</edsuint32,>
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::buildIsoMap() {
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x00, "Auto"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x28, "6"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x30, "12"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x38, "25"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x40, "50"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x48, "100"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x4b, "125"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x4d, "160"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x50, "200"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x53, "250"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x55, "320"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x58, "400"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x5b, "500"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x5d, "640"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x60, "800"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x63, "1000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x65, "1250"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x68, "1600"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x6b, "2000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x6d, "2500"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x70, "3200"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x73, "4000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x75, "5000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x78, "6400"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x7b, "8000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x7d, "10000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x80, "12800"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x83, "16000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x85, "20000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x88, "25600"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x8b, "32000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x8d, "40000"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x90, "51200"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0x98, "102400"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0xa0, "204800"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0xa8, "409600"));</edsuint32,>
shun-iwasawa 31accf
  m_isoMap.insert(std::pair<edsuint32, char*="" const="">(0xffffffff, "unknown"));</edsuint32,>
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::buildTvMap() {
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x04, "Auto"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x0c, "Bulb"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x10, "30\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x13, "25\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x14, "20\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x15, "20\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x18, "15\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x1B, "13\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x1C, "10\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x1D, "10\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x20, "8\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x23, "6\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x24, "6\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x25, "5\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x28, "4\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x2B, "3\"2"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x2C, "3\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x2D, "2\"5"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x30, "2\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x33, "1\"6"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x34, "1\"5"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x35, "1\"3"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x38, "1\""));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x3B, "0\"8"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x3C, "0\"7"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x3D, "0\"6"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x40, "0\"5"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x43, "0\"4"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x44, "0\"3"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x45, "0\"3"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x48, "1/4"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x4B, "1/5"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x4C, "1/6"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x4D, "1/6"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x50, "1/8"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x53, "1/10"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x54, "1/10"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x55, "1/13"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x58, "1/15"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x5B, "1/20"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x5C, "1/20"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x5D, "1/25"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x60, "1/30"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x63, "1/40"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x64, "1/45"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x65, "1/50"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x68, "1/60"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x6B, "1/80"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x6C, "1/90"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x6D, "1/100"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x70, "1/125"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x73, "1/160"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x74, "1/180"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x75, "1/200"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x78, "1/250"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x7B, "1/320"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x7C, "1/350"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x7D, "1/400"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x80, "1/500"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x83, "1/640"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x84, "1/750"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x85, "1/800"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x88, "1/1000"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x8B, "1/1250"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x8C, "1/1500"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x8D, "1/1600"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x90, "1/2000"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x93, "1/2500"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x94, "1/3000"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x95, "1/3200"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x98, "1/4000"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x9B, "1/5000"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x9C, "1/6000"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0x9D, "1/6400"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0xA0, "1/8000"));</edsuint32,>
shun-iwasawa 31accf
  m_tvMap.insert(std::pair<edsuint32, char*="" const="">(0xffffffff, "unknown"));</edsuint32,>
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::buildModeMap() {
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(0, "P"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(1, "Tv"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(2, "Av"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(3, "M"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(55, "FV"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(4, "Bulb"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(5, "A-DEP"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(6, "DEP"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(7, "C1"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(16, "C2"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(17, "C3"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(8, "Lock"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(9, "GreenMode"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(10, "Night Portrait"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(11, "Sports"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(13, "LandScape"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(14, "Close-Up"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(15, "No Strobo"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(12, "Portrait"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(19, "Creative Auto"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(20, "Movies"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(25, "SCN"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(22, "Scene Intelligent Auto"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(29, "Creative filters"));</edsuint32,>
shun-iwasawa 31accf
  m_modeMap.insert(std::pair<edsuint32, char*="" const="">(0xffffffff, "unknown"));</edsuint32,>
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::buildExposureMap() {
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x28, "+5"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x25, "+4 2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x24, "+4 1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x23, "+4 1/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x20, "+4"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x1D, "+3 2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x1C, "+3 1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x1B, "+3 1/3"));</edsuint32,>
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x18, "+3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x15, "+2 2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x14, "+2 1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x13, "+2 1/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x10, "+2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x0d, "+1 2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x0c, "+1 1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x0b, "+1 1/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x08, "+1"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x05, "+2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x04, "+1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x03, "+1/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0x00, "0"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xfd, "-1/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xfc, "-1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xfb, "-2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xf8, "-1"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xf5, "-1 1/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xf4, "-1 1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xf3, "-1 2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xf0, "-2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xed, "-2 1/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xec, "-2 1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xeb, "-2 2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xe8, "-3"));</edsuint32,>
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xE5, "-3 1/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xE4, "-3 1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xE3, "-3 2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xE0, "-4"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xDD, "-4 1/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xDC, "-4 1/2"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xDB, "-4 2/3"));</edsuint32,>
shun-iwasawa 31accf
  m_exposureMap.insert(std::pair<edsuint32, char*="" const="">(0xD8, "-5"));</edsuint32,>
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_exposureMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(0xffffffff, "unknown"));</edsuint32,>
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::buildWhiteBalanceMap() {
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(0, "Auto: Ambience Priority"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(1, "Daylight"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(2, "Cloudy"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(3, "Tungsten"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(4, "Fluorescent"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(5, "Flash"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(6, "Manual"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(8, "Shade"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(9, "Color Temperature"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(10, "Custom 1"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(11, "Custom 2"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(12, "Custom 3"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(15, "Manual 2"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(16, "Manual 3"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(18, "Manual 4"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(19, "Manual 5"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(20, "Custom 4"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(std::pair<edsuint32, char*="" const="">(21, "Custom 5"));</edsuint32,>
shun-iwasawa 31accf
  m_whiteBalanceMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(23, "Auto: White Priority"));</edsuint32,>
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::buildImageQualityMap() {
shun-iwasawa 31accf
  m_imageQualityMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(EdsImageQuality_LR, "RAW"));</edsuint32,>
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRLJF, "RAW + Large Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRMJF, "RAW + Middle Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRSJF, "RAW + Small Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRLJN, "RAW + Large Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRMJN, "RAW + Middle Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRSJN, "RAW + Small Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRS1JF, "RAW + Small1 Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRS1JN, "RAW + Small1 Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRS2JF, "RAW + Small2 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRS3JF, "RAW + Small3 Jpeg"));
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRLJ, "RAW + Large Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRM1J, "RAW + Middle1 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRM2J, "RAW + Middle2 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LRSJ, "RAW + Small Jpeg"));
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MR, "Middle Raw(Small RAW1)"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRLJF, "Middle Raw(Small RAW1) + Large Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRMJF, "Middle Raw(Small RAW1) + Middle Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRSJF, "Middle Raw(Small RAW1) + Small Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRLJN, "Middle Raw(Small RAW1) + Large Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRMJN, "Middle Raw(Small RAW1) + Middle Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRSJN, "Middle Raw(Small RAW1) + Small Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRS1JF, "Middle RAW + Small1 Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRS1JN, "Middle RAW + Small1 Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRS2JF, "Middle RAW + Small2 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRS3JF, "Middle RAW + Small3 Jpeg"));
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRLJ, "Middle Raw + Large Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRM1J, "Middle Raw + Middle1 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRM2J, "Middle Raw + Middle2 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MRSJ, "Middle Raw + Small Jpeg"));
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SR, "Small RAW(Small RAW2)"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRLJF, "Small RAW(Small RAW2) + Large Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRMJF, "Small RAW(Small RAW2) + Middle Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRSJF, "Small RAW(Small RAW2) + Small Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRLJN, "Small RAW(Small RAW2) + Large Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRMJN, "Small RAW(Small RAW2) + Middle Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRSJN, "Small RAW(Small RAW2) + Small Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRS1JF, "Small RAW + Small1 Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRS1JN, "Small RAW + Small1 Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRS2JF, "Small RAW + Small2 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRS3JF, "Small RAW + Small3 Jpeg"));
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRLJ, "Small RAW + Large Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRM1J, "Small RAW + Middle1 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRM2J, "Small RAW + Middle2 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SRSJ, "Small RAW + Small Jpeg"));
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_imageQualityMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(EdsImageQuality_CR, "CRAW"));</edsuint32,>
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRLJF, "CRAW + Large Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRMJF, "CRAW + Middle Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRM1JF, "CRAW + Middle1 Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRM2JF, "CRAW + Middle2 Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRSJF, "CRAW + Small Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRS1JF, "CRAW + Small1 Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRS2JF, "CRAW + Small2 Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRS3JF, "CRAW + Small3 Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRLJN, "CRAW + Large Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRMJN, "CRAW + Middle Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRM1JN, "CRAW + Middle1 Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRM2JN, "CRAW + Middle2 Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRSJN, "CRAW + Small Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRS1JN, "CRAW + Small1 Normal Jpeg"));
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRLJ, "CRAW + Large Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRM1J, "CRAW + Middle1 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRM2J, "CRAW + Middle2 Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_CRSJ, "CRAW + Small Jpeg"));
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LJF, "Large Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_LJN, "Large Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MJF, "Middle Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_MJN, "Middle Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SJF, "Small Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_SJN, "Small Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_S1JF, "Small1 Fine Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      EdsImageQuality_S1JN, "Small1 Normal Jpeg"));
shun-iwasawa 31accf
  m_imageQualityMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(EdsImageQuality_S2JF, "Small2 Jpeg"));</edsuint32,>
shun-iwasawa 31accf
  m_imageQualityMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(EdsImageQuality_S3JF, "Small3 Jpeg"));</edsuint32,>
shun-iwasawa 31accf
shun-iwasawa 31accf
  m_imageQualityMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(EdsImageQuality_LJ, "Large Jpeg"));</edsuint32,>
shun-iwasawa 31accf
  m_imageQualityMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(EdsImageQuality_M1J, "Middle1 Jpeg"));</edsuint32,>
shun-iwasawa 31accf
  m_imageQualityMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(EdsImageQuality_M2J, "Middle2 Jpeg"));</edsuint32,>
shun-iwasawa 31accf
  m_imageQualityMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(EdsImageQuality_SJ, "Small Jpeg"));</edsuint32,>
shun-iwasawa 31accf
}
shun-iwasawa 31accf
shun-iwasawa 31accf
//-----------------------------------------------------------------
shun-iwasawa 31accf
shun-iwasawa 31accf
void Canon::buildPictureStyleMap() {
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_Standard, "Standard"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_Portrait, "Portrait"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      kEdsPictureStyle_Landscape, "Landscape"));
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_Neutral, "Neutral"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_Faithful, "Faithful"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      kEdsPictureStyle_Monochrome, "Monochrome"));
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_Auto, "Auto"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(std::pair<edsuint32, char*="" const="">(</edsuint32,>
shun-iwasawa 31accf
      kEdsPictureStyle_FineDetail, "Fine Detail"));
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_User1, "User 1"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_User2, "User 2"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_User3, "User 3"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_PC1, "Computer 1"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_PC2, "Computer 2"));</edsuint32,>
shun-iwasawa 31accf
  m_pictureStyleMap.insert(
shun-iwasawa 31accf
      std::pair<edsuint32, char*="" const="">(kEdsPictureStyle_PC3, "Computer 3"));</edsuint32,>
shun-iwasawa 31accf
}
shun-iwasawa 31accf
#endif