Class VideoTrack

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addSink​(VideoSink videoSink)
      Add a video sink to receive frames from the video track.
      protected VideoFrame constructBlackFrame​(int width, int height)  
      java.lang.String getName()
      Returns the video track name.
      java.util.List<VideoSink> getSinks()
      The list of sinks receiving video from this video track.
      boolean isEnabled()
      Check if this video track is enabled.
      void removeSink​(VideoSink videoSink)
      Remove a video sink to stop receiving video from the video track.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addSink

        public void addSink​(@NonNull
                            VideoSink videoSink)
        Add a video sink to receive frames from the video track.
        Parameters:
        videoSink - video sink that receives video.
      • removeSink

        public void removeSink​(@NonNull
                               VideoSink videoSink)
        Remove a video sink to stop receiving video from the video track.
        Parameters:
        videoSink - the video sink that should no longer receive video.
      • getSinks

        @NonNull
        public java.util.List<VideoSink> getSinks()
        The list of sinks receiving video from this video track. An empty list will be returned if the video track has been released.
      • isEnabled

        public boolean isEnabled()
        Check if this video track is enabled.
        Specified by:
        isEnabled in interface Track
        Returns:
        true if track is enabled.
      • getName

        @NonNull
        public java.lang.String getName()
        Returns the video track name. A pseudo random string is returned if no track name was specified.
        Specified by:
        getName in interface Track
      • constructBlackFrame

        protected VideoFrame constructBlackFrame​(int width,
                                                 int height)