Class AudioMediaDeviceImpl

    • Constructor Detail

      • AudioMediaDeviceImpl

        public AudioMediaDeviceImpl()
        Initializes a new AudioMediaDeviceImpl instance which represents a MediaDevice with MediaType AUDIO and a MediaDirection which does not allow sending.
      • AudioMediaDeviceImpl

        public AudioMediaDeviceImpl​(javax.media.CaptureDeviceInfo captureDeviceInfo)
        Initializes a new AudioMediaDeviceImpl which is to provide an implementation of MediaDevice with MediaType AUDIO to a CaptureDevice with a specific CaptureDeviceInfo.
        Parameters:
        captureDeviceInfo - the CaptureDeviceInfo of the CaptureDevice to which the new instance is to provide an implementation of MediaDevice
    • Method Detail

      • createCaptureDevice

        protected javax.media.protocol.CaptureDevice createCaptureDevice()
        Creates the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for.
        Overrides:
        createCaptureDevice in class MediaDeviceImpl
        Returns:
        the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for; null if the creation fails
      • 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. Tries to delegate the initialization of a new Renderer instance to the AudioSystem which provides the CaptureDevice of this instance. This way both the capture and the playback are given a chance to happen within the same AudioSystem. If the discovery of the delegate fails, the implementation of MediaDeviceImpl is executed and it currently leaves it to FMJ to choose a Renderer irrespective of this MediaDevice.
        Overrides:
        createRenderer in class AbstractMediaDevice
        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
      • getSupportedExtensions

        public List<RTPExtension> getSupportedExtensions()
        Returns a List containing extension descriptor indicating RECVONLY support for mixer-to-client audio levels, and extension descriptor indicating SENDRECV support for client-to-mixer audio levels. We add the ssrc audio levels as first element, in order when making offer to be the first one (id 1) as some other systems have this hardcoded it as 1 (jicofo).
        Specified by:
        getSupportedExtensions in interface MediaDevice
        Overrides:
        getSupportedExtensions in class AbstractMediaDevice
        Returns:
        a List containing the CSRC_AUDIO_LEVEL_URN and SSRC_AUDIO_LEVEL_URN extension descriptor.
      • superCreateCaptureDevice

        protected javax.media.protocol.CaptureDevice superCreateCaptureDevice()
        Invokes the super (with respect to the AudioMediaDeviceImpl class) implementation of MediaDeviceImpl.createCaptureDevice(). Allows this instance to customize the very CaptureDevice which is to be possibly further wrapped by this instance.
        Returns:
        the CaptureDevice returned by the call to the super implementation of MediaDeviceImpl#createCaptureDevice.