// Shutter speed accessors / modifiers
int getTv() {
	EdsError err = EDS_ERR_OK;
	EdsDataType dataType;
	EdsUInt32 dataSize;
	EdsInt32 Tv;
	err = EdsGetPropertySize(camera, kEdsPropID_Tv, 0, &dataType, &dataSize);
	if (!err) {
		err = EdsGetPropertyData(camera, kEdsPropID_Tv, 0, dataSize, &Tv);
		if (!err) {
			return Tv;
		}
	}

	return 0;
}
Example #2
0
CPropertyItem_Bracket::CPropertyItem_Bracket(EdsImageRef	imageRef)
{
	EdsUInt32 uValue;
	EdsRational rational;
	EdsDataType	type;
	EdsUInt32	size;	
	char value[EDS_MAX_NAME] = {0};
	if( EDS_ERR_OK == EdsGetPropertyData( imageRef, kEdsPropID_Bracket, 0, sizeof(uValue),&uValue))
	{
		char title[EDS_MAX_NAME] = {0};
		switch(uValue)
		{
		case 1:
			{
				EdsGetPropertyData( imageRef, kEdsPropID_AEBracket, 0, sizeof(rational),&rational);
				if(rational.numerator==0)
					sprintf_s( value , EDS_MAX_NAME , "%d" , rational.numerator);
				else
				{
					sprintf_s( value , EDS_MAX_NAME , "%d/%d" , rational.numerator, rational.denominator );
				}
				m_value.push_back(value);
				strcpy_s(m_title, EDS_MAX_NAME, "AE bracket");
				break;
			}
		case 2:
			{
				EdsGetPropertyData( imageRef, kEdsPropID_ISOBracket, 0, sizeof(rational),&rational);
				if(rational.numerator==0)
					sprintf_s( value , EDS_MAX_NAME , "%d" , rational.numerator);
				else
				{
					sprintf_s( value , EDS_MAX_NAME , "%d/%d" , rational.numerator, rational.denominator );
				}
				m_value.push_back(value);
				strcpy_s(m_title, EDS_MAX_NAME, "ISO bracket");
				break;
			}
		case 3:
			{
				EdsInt32 WbBrakcet[3];
				EdsGetPropertySize( imageRef, kEdsPropID_WhiteBalanceBracket, 0, &type,&size);
				EdsGetPropertyData( imageRef, kEdsPropID_WhiteBalanceBracket, 0, size, WbBrakcet);

				sprintf_s(value, EDS_MAX_NAME, "%d", WbBrakcet[0]);
				m_value.push_back(value);
				strcpy_s(m_title, EDS_MAX_NAME, "WB bracket mode");

				switch(WbBrakcet[0])
				{
				case 1:	sprintf_s(value, EDS_MAX_NAME, "AB:%d", WbBrakcet[1]);	break;
				case 2:	sprintf_s(value, EDS_MAX_NAME, "GM:%d", WbBrakcet[2]);	break;
				case 0:sprintf_s(value, EDS_MAX_NAME, "off");	break;
				default:sprintf_s(value , EDS_MAX_NAME , "Not Supported");	break;
				}
				m_value.push_back(value);
				break;
			}
		case 4:
			{
				EdsGetPropertyData( imageRef, kEdsPropID_FEBracket, 0, sizeof(rational),&rational);
				if(rational.numerator==0)
					sprintf_s( value , EDS_MAX_NAME , "%d" , rational.numerator);
				else
				{
					sprintf_s( value , EDS_MAX_NAME , "%d/%d" , rational.numerator, rational.denominator );
				}
				m_value.push_back(value);
				strcpy_s(m_title, EDS_MAX_NAME, "FE bracket");
				break;
			}
		default:
			{
				break;
			}
		}
	}
}