Beispiel #1
0
 /**
  * The SDK triggers this callback when IVideoFrameConsumer is released by the media engine. You
  * can now release the video source as well as IVideoFrameConsumer.
  */
 public void OnDispose()
 {
     Log.Error(TAG, "SwitchExternalVideo-onDispose");
     _consumer = null;
 }
 public void Init(IVideoFrameConsumer frameConsumer)
 {
     this.frameConsumer = frameConsumer;
 }
Beispiel #3
0
 /**
  * This callback initializes the video source. You can enable the camera or initialize the video
  * source and then pass one of the following return values to inform the media engine whether
  * the video source is ready.
  *
  * @param consumer The IVideoFrameConsumer object which the media engine passes back. You need
  *                 to reserve this object and pass the video frame to the media engine through
  *                 this object once the video source is initialized. See the following contents
  *                 for the definition of IVideoFrameConsumer.
  * @return true: The external video source is initialized.
  * false: The external video source is not ready or fails to initialize, the media engine stops
  * and reports the error.
  * PS:
  * When initializing the video source, you need to specify a buffer type in the getBufferType
  * method and pass the video source in the specified type to the media engine.
  */
 public bool OnInitialize(IVideoFrameConsumer consumer)
 {
     _consumer = consumer;
     return(true);
 }