mirror of
https://github.com/openharmony/multimedia_camera_lite.git
synced 2026-07-18 16:14:32 -04:00
IssueNo:#I40K06
Description:media servicing architecture Sig:multimedia Feature or Bgfix:Feature Binary Source:No Signed-off-by: z00421080 <zhangjian112@huawei.com>
This commit is contained in:
Executable
+73
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "camera_ability_impl.h"
|
||||
#include "media_log.h"
|
||||
|
||||
using namespace std;
|
||||
namespace OHOS {
|
||||
namespace Media {
|
||||
|
||||
list<int32_t> CameraAbilityImpl::GetSupportedFormats() const
|
||||
{
|
||||
// auto target = SizeMap_.find(PARAM_KEY_SIZE);
|
||||
// return target->second;
|
||||
list<int32_t> test;
|
||||
return test;
|
||||
}
|
||||
|
||||
list<CameraPicSize> CameraAbilityImpl::GetSupportedSizes(int format) const
|
||||
{
|
||||
auto target = SizeMap_.find(PARAM_KEY_SIZE);
|
||||
return target->second;
|
||||
}
|
||||
|
||||
list<CameraPicSize> CameraAbilityImpl::GetSupportParameterRange(uint32_t key) const
|
||||
{
|
||||
switch (key) {
|
||||
case PARAM_KEY_SIZE: {
|
||||
auto target = SizeMap_.find(PARAM_KEY_SIZE);
|
||||
return target->second;
|
||||
}
|
||||
default: {
|
||||
list<CameraPicSize> emptyList;
|
||||
return emptyList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CameraAbilityImpl::SetSupportParameterRange(uint32_t key, list<CameraPicSize> &rangeList)
|
||||
{
|
||||
switch (key) {
|
||||
case PARAM_KEY_SIZE:
|
||||
supportProperties_.emplace(key);
|
||||
SizeMap_[key] = rangeList;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool CameraAbilityImpl::IsParameterSupport(uint32_t key) const
|
||||
{
|
||||
if (key != PARAM_KEY_SIZE) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Media
|
||||
} // namespace OHOS
|
||||
Reference in New Issue
Block a user