UsbCameraCapturerAndroid

tee3.webrtc

## 类 UsbCameraCapturerAndroid

- java.lang.Object
- - tee3.webrtc.UsbCameraCapturerAndroid

- 所有已实现的接口:
    SurfaceTextureHelper.OnTextureFrameAvailableListener, VideoCapturer

      public class UsbCameraCapturerAndroid
      extends java.lang.Object
      implements VideoCapturer, SurfaceTextureHelper.OnTextureFrameAvailableListener

  ANR报错 1. tee3.webrtc.UsbCameraCapturerAndroid.stopCapture(UsbCameraCapturerAndroid.java) 2. com.serenegiant.usb.UVCCamera.nativeStopPreview(Native Method) com.serenegiant.usb.UVCCamera.stopPreview(UVCCamera.java:452) com.serenegiant.usb.UVCCamera.close(UVCCamera.java:247) com.serenegiant.usb.UVCCamera.destroy(UVCCamera.java:460)

- - ### 嵌套类概要

    嵌套类
    限定符和类型 | 类和说明
    --- | ---
    `static interface` | `UsbCameraCapturerAndroid.UsbCameraEvent`

    - ### 从接口继承的嵌套类/接口 tee3.webrtc.VideoCapturer

      `VideoCapturer.CapturerObserver`

  - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `boolean` | `isAttached`
    `static java.lang.String` | `TAG`

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `UsbCameraCapturerAndroid` | `addUsbCameraListener(UsbCameraCapturerAndroid.UsbCameraEvent usbCameraEvent)`
    `void` | `changeCaptureFormat(int width, int height, int ignoredFramerate)`
    `void` | `dispose()` Perform any final cleanup here.
    `static UsbCameraCapturerAndroid` | `getInstance()`
    `long` | `getNumCapturedFrames()`
    `void` | `initialize(SurfaceTextureHelper surfaceTextureHelper, android.content.Context applicationContext, VideoCapturer.CapturerObserver capturerObserver)` This function is used to initialize the camera thread, the android application context, and the capture observer.
    `boolean` | `isAttached()`
    `boolean` | `isScreencast()`
    `void` | `onTextureFrameAvailable(int oesTextureId, float[] transformMatrix, long timestampNs)`
    `UsbCameraCapturerAndroid` | `setupUsbCameraMonitor(android.content.Context applicationContext)`
    `void` | `startCapture(int width, int height, int ignoredFramerate)` Start capturing frames in a format that is as close as possible to `width x height` and `framerate`.
    `void` | `stopCapture()` Stop capturing.
    `UsbCameraCapturerAndroid` | `stopUsbCameraMonitor()`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 字段详细资料

    - #### TAG

          public static final java.lang.String TAG

    - #### isAttached

          public boolean isAttached

  - ### 方法详细资料

    - #### getInstance

          public static UsbCameraCapturerAndroid getInstance()

    - #### addUsbCameraListener

          public UsbCameraCapturerAndroid addUsbCameraListener(UsbCameraCapturerAndroid.UsbCameraEvent usbCameraEvent)

    - #### setupUsbCameraMonitor

          public UsbCameraCapturerAndroid setupUsbCameraMonitor(android.content.Context applicationContext)

    - #### stopUsbCameraMonitor

          public UsbCameraCapturerAndroid stopUsbCameraMonitor()

    - #### initialize

          public void initialize(SurfaceTextureHelper surfaceTextureHelper,
                                 android.content.Context applicationContext,
                                 VideoCapturer.CapturerObserver capturerObserver)

      从接口复制的说明: `VideoCapturer`
      This function is used to initialize the camera thread, the android application context, and the capture observer. It will be called only once and before any startCapture() request. The camera thread is guaranteed to be valid until dispose() is called. If the VideoCapturer wants to deliver texture frames, it should do this by rendering on the SurfaceTexture in `surfaceTextureHelper`, register itself as a listener, and forward the frames to CapturerObserver.onFrameCaptured(). The caller still has ownership of `surfaceTextureHelper` and is responsible for making sure surfaceTextureHelper.dispose() is called. This also means that the caller can reuse the SurfaceTextureHelper to initialize a new VideoCapturer once the previous VideoCapturer has been disposed.
      指定者:
        `initialize` 在接口中 `VideoCapturer`

    - #### startCapture

          public void startCapture(int width,
                                   int height,
                                   int ignoredFramerate)

      从接口复制的说明: `VideoCapturer`
      Start capturing frames in a format that is as close as possible to `width x height` and `framerate`.
      指定者:
        `startCapture` 在接口中 `VideoCapturer`

    - #### stopCapture

          public void stopCapture()

      从接口复制的说明: `VideoCapturer`
      Stop capturing. This function should block until capture is actually stopped.
      指定者:
        `stopCapture` 在接口中 `VideoCapturer`

    - #### dispose

          public void dispose()

      从接口复制的说明: `VideoCapturer`
      Perform any final cleanup here. No more capturing will be done after this call.
      指定者:
        `dispose` 在接口中 `VideoCapturer`

    - #### changeCaptureFormat

          public void changeCaptureFormat(int width,
                                          int height,
                                          int ignoredFramerate)

      指定者:
        `changeCaptureFormat` 在接口中 `VideoCapturer`

    - #### onTextureFrameAvailable

          public void onTextureFrameAvailable(int oesTextureId,
                                              float[] transformMatrix,
                                              long timestampNs)

      指定者:
        `onTextureFrameAvailable` 在接口中 `SurfaceTextureHelper.OnTextureFrameAvailableListener`

    - #### isScreencast

          public boolean isScreencast()

      指定者:
        `isScreencast` 在接口中 `VideoCapturer`
      返回:
        true if-and-only-if this is a screen capturer.

    - #### getNumCapturedFrames

          public long getNumCapturedFrames()

    - #### isAttached

          public boolean isAttached()