title: How to add logo/watermark in Camera2 Api Custom Video Recording Application
body: <p>How to add logo/watermark in Camera2 Api Custom Video Recording Application 
  I want to add logo/watermark in my custom camera application at the top left corner</p>
  
  <pre><code>private fun recordSession() {
  
      setupMediaRecorder()
  
      val surfaceTexture = previewTextureView.surfaceTexture
      surfaceTexture.setDefaultBufferSize(MAX_WIDTH, MAX_HEIGHT)
      val textureSurface = Surface(surfaceTexture)
      val recordSurface = mediaRecorder.surface
  
      captureRequestBuilder = cameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD)
      captureRequestBuilder.addTarget(textureSurface)
      captureRequestBuilder.addTarget(recordSurface)
  
      val surfaces = ArrayList&lt;Surface&gt;().apply {
          add(textureSurface)
          add(recordSurface)
      }
  
      cameraDevice.createCaptureSession(surfaces, object : CameraCaptureSession.StateCallback() {
          override fun onConfigureFailed(p0: CameraCaptureSession) {
              Log.d("Error", "Failed Session")
          }
  
          override fun onConfigured(session: CameraCaptureSession) {
              if (session != null) {
                  captureSession = session
                  captureRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE)
                  captureSession.setRepeatingRequest(captureRequestBuilder.build(), null, null)
                  isRecording = true
                  mediaRecorder.start()
              }
          }
  
      }, backgroundHandler)
  }
  </code></pre>