public class TuCameraOption extends TuResultOption
限定符和类型 | 字段和说明 |
---|---|
boolean |
enableFaceDetection
是否开启脸部追踪 (需要相机人脸追踪权限,请访问tusdk.com 控制台开启权限)
|
构造器和说明 |
---|
TuCameraOption()
相机控制器配置选项
|
限定符和类型 | 方法和说明 |
---|---|
TuCameraFragment |
fragment()
创建相机控制器对象
|
CameraConfigs.CameraFacing |
getAvPostion()
相机方向
|
float |
getCameraViewRatio()
视频视图显示比例
|
int |
getCaptureSoundRawId()
自定义拍照声音RAW ID,默认关闭系统发声
|
protected java.lang.Class<?> |
getDefaultComponentClazz()
相机控制器控制类
|
CameraConfigs.CameraFlash |
getDefaultFlashMode()
闪关灯模式
|
protected int |
getDefaultRootViewLayoutId()
获取默认根视图布局资源ID
|
int |
getFilterBarHeight()
滤镜组选择栏高度
|
java.util.List<java.lang.String> |
getFilterGroup()
需要显示的滤镜名称列表 (如果为空将显示所有自定义滤镜)
|
int |
getFilterTableCellLayoutId()
滤镜列表行视图布局资源ID
|
int |
getFocalDistanceScale()
设置焦距初始值
|
int |
getFocusTouchViewId()
触摸聚焦视图ID
|
int |
getGroupFilterCellWidth()
行视图宽度
|
int |
getGroupTableCellLayoutId()
滤镜分组列表行视图布局资源ID
|
java.lang.Class<?> |
getOnlineFragmentClazz()
在线滤镜控制器类型 (需要继承Fragment,以及实现TuFilterOnlineFragmentInterface接口)
|
protected float |
getOutputPictureRatio()
获取输出照片比例
|
org.lasque.tusdk.core.struct.TuSdkSize |
getOutputSize()
照片输出图片长宽 (默认:全屏)
|
float |
getPreviewEffectScale()
预览视图实时缩放比例
|
java.lang.Class<? extends TuCameraPreviewFragmentBase> |
getPreviewFragmentClazz()
拍照后 图片预览控制器类型
|
float |
getPreviewRatio()
获取相机预览区域比例
|
int |
getRatioType()
视频视图显示比例类型 (默认:RatioType.ratio_all, 如果设置CameraViewRatio > 0,
将忽略RatioType)
|
int |
getRegionViewColor()
视频覆盖区域颜色 (默认:0xFF000000)
|
TuSdkWaterMarkOption |
getWaterMarkOption()
设置水印选项 (默认为空,如果设置不为空,则输出的图片上将带有水印)
|
boolean |
isAutoReleaseAfterCaptured()
自动释放相机在拍摄后 (节省手机内存, 需要手动再次启动)
|
boolean |
isAutoSelectGroupDefaultFilter()
自动选择分组滤镜指定的默认滤镜
|
boolean |
isDisableCaptureSound()
禁用系统拍照声音 (默认:false)
|
boolean |
isDisableContinueFoucs()
禁用持续自动对焦 (默认:false)
|
boolean |
isDisableFocusBeep()
禁用聚焦声音 (默认:false)
|
boolean |
isDisableMirrorFrontFacing()
禁用前置摄像头自动水平镜像 (默认: false,前置摄像头拍摄结果自动进行水平镜像)
|
boolean |
isDisplayAlbumPoster()
是否显示相册照片 (默认: false,如显示,点击照片跳转到相册)
|
boolean |
isDisplayFiltersSubtitles()
显示滤镜标题视图
|
boolean |
isDisplayGuideLine()
是否显示辅助线 (默认: false)
|
boolean |
isEnableCaptureWithVolumeKeys()
是否允许音量键拍照 (默认关闭)
|
boolean |
isEnableFilterConfig()
开启滤镜配置选项
|
boolean |
isEnableFilters()
是否开启滤镜支持
|
boolean |
isEnableFiltersHistory()
开启用户滤镜历史记录
|
boolean |
isEnableFocalDistance()
开启手势调焦 (默认:true)
|
boolean |
isEnableLongTouchCapture()
开启长按拍摄 (默认:false)
|
boolean |
isEnableNormalFilter()
开启无效果滤镜 (默认: true)
|
boolean |
isEnableOnlineFilter()
开启在线滤镜
|
boolean |
isEnablePreview()
拍照后是否开启预览
|
boolean |
isOutputImageData()
是否直接输出图片数据 (默认:false,输出已经处理好的图片Bitmap)
|
boolean |
isSaveLastFilter()
是否保存最后一次使用的滤镜
|
boolean |
isShowFilterDefault()
默认是否显示滤镜视图 (默认: 不显示, 如果mEnableFilters = false, mShowFilterDefault将失效)
|
boolean |
isUnifiedParameters()
是否需要统一配置参数 (默认false, 取消三星默认降噪,锐化)
|
void |
setAutoReleaseAfterCaptured(boolean autoReleaseAfterCaptured)
自动释放相机在拍摄后 (节省手机内存, 需要手动再次启动)
|
void |
setAutoSelectGroupDefaultFilter(boolean mAutoSelectGroupDefaultFilter)
自动选择分组滤镜指定的默认滤镜
|
void |
setAvPostion(CameraConfigs.CameraFacing mAvPostion)
相机方向
|
void |
setCameraViewRatio(float mCameraViewRatio)
视频视图显示比例
|
void |
setCaptureSoundRawId(int captureSoundRawId)
自定义拍照声音RAW ID,默认关闭系统发声
|
void |
setDefaultFlashMode(CameraConfigs.CameraFlash mDefaultFlashMode)
闪关灯模式
|
void |
setDisableCaptureSound(boolean disbleCaptureSound)
禁用系统拍照声音 (默认:false)
|
void |
setDisableContinueFoucs(boolean disableContinueFoucs)
禁用持续自动对焦 (默认:false)
|
void |
setDisableFocusBeep(boolean disableFocusBeep)
禁用聚焦声音 (默认:false)
|
void |
setDisableMirrorFrontFacing(boolean mDisableMirrorFrontFacing)
禁用前置摄像头自动水平镜像 (默认: false,前置摄像头拍摄结果自动进行水平镜像)
|
void |
setDisplayAlbumPoster(boolean mDisplayAlbumPoster)
是否显示相册照片 (默认: false,如显示,点击照片跳转到相册)
|
void |
setDisplayFiltersSubtitles(boolean mDisplayFiltersSubtitles)
显示滤镜标题视图
|
void |
setDisplayGuideLine(boolean mDisplayGuideLine)
是否显示辅助线 (默认: false)
|
void |
setEnableCaptureWithVolumeKeys(java.lang.Boolean mEnableCaptureWithVolumeKeys)
是否允许音量键拍照 (默认关闭)
|
void |
setEnableFilterConfig(boolean mEnableFilterConfig)
开启滤镜配置选项
|
void |
setEnableFilters(boolean mEnableFilters)
是否开启滤镜支持
|
void |
setEnableFiltersHistory(boolean mEnableFiltersHistory)
开启用户滤镜历史记录
|
void |
setEnableFocalDistance(boolean enableFocalDistance)
开启手势调焦 (默认:true)
|
void |
setEnableLongTouchCapture(boolean enableLongTouchCapture)
开启长按拍摄 (默认:false)
|
void |
setEnableNormalFilter(boolean mEnableNormalFilter)
开启无效果滤镜 (默认: true)
|
void |
setEnableOnlineFilter(boolean mEnableOnlineFilter)
开启在线滤镜
|
void |
setEnablePreview(boolean enablePreview)
设置是否开启拍照后预览
|
void |
setFilterBarHeight(int mFilterBarHeight)
滤镜组选择栏高度
|
void |
setFilterBarHeightDP(int mFilterBarHeightDP)
滤镜组选择栏高度 (单位:DP)
|
void |
setFilterGroup(java.util.List<java.lang.String> mFilterGroup)
需要显示的滤镜名称列表 (如果为空将显示所有自定义滤镜)
|
void |
setFilterTableCellLayoutId(int mFilterTableCellLayoutId)
滤镜列表行视图布局资源ID
|
void |
setFocalDistanceScale(int scale)
设置焦距初始值
|
void |
setFocusTouchViewId(int mFocusTouchViewId)
触摸聚焦视图ID
|
void |
setGroupFilterCellWidth(int mGroupFilterCellWidth)
行视图宽度
|
void |
setGroupFilterCellWidthDP(int mGroupFilterCellWidthDP)
行视图宽度 (单位:DP)
|
void |
setGroupTableCellLayoutId(int mGroupTableCellLayoutId)
滤镜分组列表行视图布局资源ID
|
void |
setOnlineFragmentClazz(java.lang.Class<?> mOnlineFragmentClazz)
在线滤镜控制器类型 (需要继承Fragment,以及实现TuFilterOnlineFragmentInterface接口)
|
void |
setOutputImageData(boolean outputImageData)
是否直接输出图片数据 (默认:false,输出已经处理好的图片Bitmap)
|
void |
setOutputPictureRatio(float outputPictureRatio)
设置输出照片比例
|
void |
setOutputSize(org.lasque.tusdk.core.struct.TuSdkSize mOutputSize)
照片输出分辨率
|
void |
setPreviewEffectScale(float mPreviewEffectScale)
预览视图实时缩放比例
|
void |
setPreviewFragmentClazz(java.lang.Class<? extends TuCameraPreviewFragmentBase> previewFragmentClazz) |
void |
setPreviewRatio(float previewRatio)
设置相机预览采集比例
若不设置,预览采集比例默认为16:9
|
void |
setRatioType(int mRatioType)
视频视图显示比例类型 (默认:RatioType.ratio_all, 如果设置CameraViewRatio > 0,
将忽略RatioType)
|
void |
setRegionViewColor(int mRegionViewColor)
视频覆盖区域颜色 (默认:0xFF000000)
|
void |
setSaveLastFilter(boolean mSaveLastFilter)
是否保存最后一次使用的滤镜
|
void |
setShowFilterDefault(boolean mShowFilterDefault)
默认是否显示滤镜视图 (默认: 不显示, 如果mEnableFilters = false, mShowFilterDefault将失效)
|
void |
setUnifiedParameters(boolean unifiedParameters)
是否需要统一配置参数 (默认false, 取消三星默认降噪,锐化)
|
void |
setWaterMarkOption(TuSdkWaterMarkOption mWaterMarkOption)
设置水印选项 (默认为空,如果设置不为空,则输出的图片上将带有水印)
|
fragmentInstance, getOutputCompress, getSaveToAlbumName, isSaveToAlbum, isSaveToTemp, setOutputCompress, setSaveToAlbum, setSaveToAlbumName, setSaveToTemp
getComponentClazz, getRootViewLayoutId, setComponentClazz, setRootViewLayoutId
public boolean enableFaceDetection
protected java.lang.Class<?> getDefaultComponentClazz()
getDefaultComponentClazz
在类中 TuSdkComponentOption
protected int getDefaultRootViewLayoutId()
getDefaultRootViewLayoutId
在类中 TuSdkComponentOption
org.lasque.tusdk.impl.components.camera.TuCameraFragment}
public CameraConfigs.CameraFacing getAvPostion()
CameraConfigs.CameraFacing
public void setAvPostion(CameraConfigs.CameraFacing mAvPostion)
mAvPostion
- 相机方向 (默认:CameraFacing.Back)
CameraConfigs.CameraFacing
public org.lasque.tusdk.core.struct.TuSdkSize getOutputSize()
public void setOutputSize(org.lasque.tusdk.core.struct.TuSdkSize mOutputSize)
mOutputSize
- 照片输出图片长宽 (默认:全屏)public CameraConfigs.CameraFlash getDefaultFlashMode()
{@link org.lasque.tusdk.core.utils.hardware.CameraConfigs.CameraFlash}
public void setDefaultFlashMode(CameraConfigs.CameraFlash mDefaultFlashMode)
mDefaultFlashMode
- 闪关灯模式{@link org.lasque.tusdk.core.utils.hardware.CameraConfigs.CameraFlash}
public boolean isEnableFilters()
public void setEnableFilters(boolean mEnableFilters)
mEnableFilters
- 是否开启滤镜支持 (默认: 关闭)public boolean isShowFilterDefault()
public void setShowFilterDefault(boolean mShowFilterDefault)
mShowFilterDefault
- the mShowFilterDefault to setpublic int getGroupFilterCellWidth()
public void setGroupFilterCellWidth(int mGroupFilterCellWidth)
mGroupFilterCellWidth
- the mGroupFilterCellWidth to setpublic void setGroupFilterCellWidthDP(int mGroupFilterCellWidthDP)
mGroupFilterCellWidthDP
- the mGroupFilterCellWidthDP to setpublic int getGroupTableCellLayoutId()
{@link org.lasque.tusdk.impl.components.widget.GroupFilterGroupView}
public void setGroupTableCellLayoutId(int mGroupTableCellLayoutId)
滤镜分组列表行视图布局资源ID
- (默认:
tusdk_impl_component_widget_group_filter_item_view,如需自定义请继承自
GroupFilterItemView){@link org.lasque.tusdk.impl.components.widget.GroupFilterItemView}
public int getFilterTableCellLayoutId()
{@link org.lasque.tusdk.impl.components.widget.GroupFilterItemView}
public void setFilterTableCellLayoutId(int mFilterTableCellLayoutId)
滤镜列表行视图布局资源ID
- (默认:
tusdk_impl_component_widget_group_filter_item_view,如需自定义请继承自
GroupFilterItemView){@link org.lasque.tusdk.impl.components.widget.GroupFilterItemView}
public int getFilterBarHeight()
public void setFilterBarHeight(int mFilterBarHeight)
mFilterBarHeight
- the mFilterBarHeight to setpublic void setFilterBarHeightDP(int mFilterBarHeightDP)
mFilterBarHeightDP
- the mFilterBarHeightDP to setpublic boolean isEnableFiltersHistory()
public void setEnableFiltersHistory(boolean mEnableFiltersHistory)
mEnableFiltersHistory
- the mEnableFiltersHistory to setpublic boolean isDisplayFiltersSubtitles()
public void setDisplayFiltersSubtitles(boolean mDisplayFiltersSubtitles)
mDisplayFiltersSubtitles
- the mDisplayFiltersSubtitles to setpublic java.util.List<java.lang.String> getFilterGroup()
public void setFilterGroup(java.util.List<java.lang.String> mFilterGroup)
mFilterGroup
- the mFilterGroup to setpublic boolean isEnableFilterConfig()
public void setEnableFilterConfig(boolean mEnableFilterConfig)
mEnableFilterConfig
- the mEnableFilterConfig to setpublic boolean isSaveLastFilter()
public void setSaveLastFilter(boolean mSaveLastFilter)
mSaveLastFilter
- the mSaveLastFilter to setpublic boolean isAutoSelectGroupDefaultFilter()
public void setAutoSelectGroupDefaultFilter(boolean mAutoSelectGroupDefaultFilter)
mAutoSelectGroupDefaultFilter
- the mAutoSelectGroupDefaultFilter to setpublic int getFocusTouchViewId()
{@link org.lasque.tusdk.core.utils.hardware.TuSdkVideoCameraExtendViewInterface}
public void setFocusTouchViewId(int mFocusTouchViewId)
mFocusTouchViewId
- 触摸聚焦视图ID (默认: tusdk_impl_component_camera_focus_touch_view){@link org.lasque.tusdk.core.utils.hardware.TuSdkVideoCameraExtendViewInterface}
public float getCameraViewRatio()
public void setCameraViewRatio(float mCameraViewRatio)
mCameraViewRatio
- 视频视图显示比例 (默认:0, 0 < mCameraViewRatio <= 1)public final int getRatioType()
public final void setRatioType(int mRatioType)
mRatioType
- the mRatioType to setpublic boolean isOutputImageData()
public void setOutputImageData(boolean outputImageData)
outputImageData
- the outputImageData to setpublic boolean isDisableCaptureSound()
public void setDisableCaptureSound(boolean disbleCaptureSound)
public int getCaptureSoundRawId()
public void setCaptureSoundRawId(int captureSoundRawId)
captureSoundRawId
- the captureSoundRawId to setpublic void setFocalDistanceScale(int scale)
public int getFocalDistanceScale()
public boolean isAutoReleaseAfterCaptured()
public void setAutoReleaseAfterCaptured(boolean autoReleaseAfterCaptured)
autoReleaseAfterCaptured
- the autoReleaseAfterCaptured to setpublic boolean isEnableLongTouchCapture()
public void setEnableLongTouchCapture(boolean enableLongTouchCapture)
enableLongTouchCapture
- the enableLongTouchCapture to setpublic void setEnableFocalDistance(boolean enableFocalDistance)
public boolean isEnableFocalDistance()
public boolean isDisableFocusBeep()
public void setDisableFocusBeep(boolean disableFocusBeep)
public boolean isDisableContinueFoucs()
public void setDisableContinueFoucs(boolean disableContinueFoucs)
public boolean isUnifiedParameters()
public void setUnifiedParameters(boolean unifiedParameters)
unifiedParameters
- the unifiedParameters to setpublic float getPreviewEffectScale()
public void setPreviewEffectScale(float mPreviewEffectScale)
mPreviewEffectScale
- 预览视图实时缩放比例 (默认:0.75, 实时预览时,缩小到全屏大小比例,提升预览效率, 0 <
mPreviewEffectScale <= 1)public int getRegionViewColor()
public void setRegionViewColor(int mRegionViewColor)
mRegionViewColor
- the mRegionViewColor to setpublic boolean isDisableMirrorFrontFacing()
public void setDisableMirrorFrontFacing(boolean mDisableMirrorFrontFacing)
mDisableMirrorFrontFacing
- the mDisableMirrorFrontFacing to setpublic boolean isEnableNormalFilter()
public void setEnableNormalFilter(boolean mEnableNormalFilter)
public boolean isEnableOnlineFilter()
public void setEnableOnlineFilter(boolean mEnableOnlineFilter)
public boolean isDisplayAlbumPoster()
public void setDisplayAlbumPoster(boolean mDisplayAlbumPoster)
public void setDisplayGuideLine(boolean mDisplayGuideLine)
public boolean isDisplayGuideLine()
public void setWaterMarkOption(TuSdkWaterMarkOption mWaterMarkOption)
public TuSdkWaterMarkOption getWaterMarkOption()
public java.lang.Class<?> getOnlineFragmentClazz()
org.lasque.tusdk.modules.components.filter.TuFilterOnlineFragmentInterface}
public void setOnlineFragmentClazz(java.lang.Class<?> mOnlineFragmentClazz)
org.lasque.tusdk.modules.components.filter.TuFilterOnlineFragmentInterface}
public void setEnableCaptureWithVolumeKeys(java.lang.Boolean mEnableCaptureWithVolumeKeys)
mEnableCaptureWithVolumeKeys
- public boolean isEnableCaptureWithVolumeKeys()
public boolean isEnablePreview()
public void setEnablePreview(boolean enablePreview)
enablePreview
- public java.lang.Class<? extends TuCameraPreviewFragmentBase> getPreviewFragmentClazz()
public void setPreviewFragmentClazz(java.lang.Class<? extends TuCameraPreviewFragmentBase> previewFragmentClazz)
public void setPreviewRatio(float previewRatio)
previewRatio
- public float getPreviewRatio()
public void setOutputPictureRatio(float outputPictureRatio)
outputPictureRatio
- protected float getOutputPictureRatio()
public TuCameraFragment fragment()