Exemplo n.º 1
0
void getTvList(std::vector<int>& list) {
	EdsError err = EDS_ERR_OK;
	EdsPropertyDesc TvDesc;
	err = EdsGetPropertyDesc(camera, kEdsPropID_Tv, &TvDesc);
	if (!err) {
		list = std::vector<int>(TvDesc.propDesc, TvDesc.propDesc + TvDesc.numElements);
	}
}
// Stores all the possible values in a vector and sends them to the main thread,
// which is then in charge of deleting it
void PropertyPossibleValuesRetrieverTask::Process()
{
	EdsPropertyDesc propertyDesc;
	EdsError err = EdsGetPropertyDesc(camera_->GetInnerCamera(), camera_property_, &propertyDesc);
	if (EDS_ERR_OK != err)
		return;
	std::vector<int>* possibleValues = new std::vector<int>();
	for (int i = 0; i < propertyDesc.numElements; ++i)
		possibleValues->push_back(propertyDesc.propDesc[i]);
	PostMessage(complete_message_destination_, WM_PROPERTY_POSSIBLE_VALUES_CHANGED, camera_property_, (LPARAM)possibleValues);
}