com.qiniu.pili.droid.streaming.WatermarkSetting Java Examples
The following examples show how to use
com.qiniu.pili.droid.streaming.WatermarkSetting.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AVStreamingActivity.java From PLDroidMediaStreaming with Apache License 2.0 | 6 votes |
/** * Accept only 32 bit png (ARGB) * @return */ private WatermarkSetting buildWatermarkSetting() { if (!mEncodingConfig.mIsWatermarkEnabled) { return null; } WatermarkSetting watermarkSetting = new WatermarkSetting(this); watermarkSetting.setResourceId(R.drawable.qiniu_logo); watermarkSetting.setAlpha(mEncodingConfig.mWatermarkAlpha); watermarkSetting.setSize(mEncodingConfig.mWatermarkSize); if (mEncodingConfig.mWatermarkCustomWidth != 0 || mEncodingConfig.mWatermarkCustomHeight != 0) { watermarkSetting.setCustomSize(mEncodingConfig.mWatermarkCustomWidth, mEncodingConfig.mWatermarkCustomHeight); } if (mEncodingConfig.mIsWatermarkLocationPreset) { watermarkSetting.setLocation(mEncodingConfig.mWatermarkLocationPreset); } else { watermarkSetting.setCustomPosition(mEncodingConfig.mWatermarkLocationCustomX, mEncodingConfig.mWatermarkLocationCustomY); } return watermarkSetting; }
Example #2
Source File: QiniucloudPushPlatformView.java From FlutterQiniucloudLivePlugin with Apache License 2.0 | 5 votes |
/** * 更新动态水印 */ private void updateWatermarkSetting(MethodCall call, final MethodChannel.Result result) { watermarkSetting = new WatermarkSetting(context); watermarkSetting.setResourcePath(CommonUtil.getParam(call, result, "resourcePath").toString()); watermarkSetting.setSize(WatermarkSetting.WATERMARK_SIZE.valueOf(CommonUtil.getParam(call, result, "size").toString())); watermarkSetting.setLocation(WatermarkSetting.WATERMARK_LOCATION.valueOf(CommonUtil.getParam(call, result, "location").toString())); watermarkSetting.setAlpha(Integer.valueOf(CommonUtil.getParam(call, result, "alpha").toString())); manager.updateWatermarkSetting(watermarkSetting); result.success(null); }