Class AbstractMediaDevice

    • Constructor Detail

      • AbstractMediaDevice

        public AbstractMediaDevice()
    • Method Detail

      • connect

        public void connect​(javax.media.protocol.DataSource captureDevice)
                     throws IOException
        Connects to a specific CaptureDevice given in the form of a DataSource. Explicitly defined in order to allow extenders to customize the connect procedure.
        Parameters:
        captureDevice - the CaptureDevice to be connected to
        Throws:
        IOException - if anything wrong happens while connecting to the specified captureDevice
      • createOutputDataSource

        protected abstract javax.media.protocol.DataSource createOutputDataSource()
        Creates a DataSource instance for this MediaDevice which gives access to the captured media.
        Returns:
        a DataSource instance which gives access to the media captured by this MediaDevice
      • createPlayer

        protected javax.media.Processor createPlayer​(javax.media.protocol.DataSource dataSource)
                                              throws Exception
        Initializes a new Processor instance which is to be used to play back media on this MediaDevice. Allows extenders to, for example, disable the playback on this MediaDevice by completely overriding and returning null.
        Parameters:
        dataSource - the DataSource which is to be played back by the new Processor instance
        Returns:
        a new Processor instance which is to be used to play back the media provided by the specified dataSource or null if the specified dataSource is to not be played back
        Throws:
        Exception - if an exception is thrown by DataSource.connect(), Manager.createProcessor(DataSource), or DataSource.disconnect()
      • createRenderer

        protected javax.media.Renderer createRenderer()
        Initializes a new Renderer instance which is to play back media on this MediaDevice. Allows extenders to initialize a specific Renderer instance. The implementation of AbstractMediaDevice returns null which means that it is left to FMJ to choose a suitable Renderer irrespective of this MediaDevice.
        Returns:
        a new Renderer instance which is to play back media on this MediaDevice or null if a suitable Renderer is to be chosen irrespective of this MediaDevice
      • createSession

        public MediaDeviceSession createSession()
        Creates a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream.
        Returns:
        a new MediaDeviceSession instance which is to represent the use of this MediaDevice by a MediaStream
      • getSupportedExtensions

        public List<RTPExtension> getSupportedExtensions()
        Returns a List containing (at the time of writing) a single extension descriptor indicating RECVONLY support for mixer-to-client audio levels.
        Specified by:
        getSupportedExtensions in interface MediaDevice
        Returns:
        a List containing the CSRC_AUDIO_LEVEL_URN extension descriptor.