Class MediaDeviceImpl

    • Constructor Detail

      • MediaDeviceImpl

        public MediaDeviceImpl​(javax.media.CaptureDeviceInfo captureDeviceInfo,
                               org.jitsi.utils.MediaType mediaType)
        Initializes a new MediaDeviceImpl instance which is to provide an implementation of MediaDevice for a CaptureDevice with a specific CaptureDeviceInfo and which is of a specific MediaType.
        Parameters:
        captureDeviceInfo - the CaptureDeviceInfo of the JMF CaptureDevice the new instance is to provide an implementation of MediaDevice for
        mediaType - the MediaType of the new instance
      • MediaDeviceImpl

        public MediaDeviceImpl​(org.jitsi.utils.MediaType mediaType)
        Initializes a new MediaDeviceImpl instance with a specific MediaType and with MediaDirection which does not allow sending.
        Parameters:
        mediaType - the MediaType of the new instance
    • Method Detail

      • createTracingCaptureDevice

        public static javax.media.protocol.CaptureDevice createTracingCaptureDevice​(javax.media.protocol.CaptureDevice captureDevice,
                                                                                    org.jitsi.utils.logging.Logger logger)
        Creates a new CaptureDevice which traces calls to a specific CaptureDevice for debugging purposes.
        Parameters:
        captureDevice - the CaptureDevice which is to have its calls traced for debugging output
        logger - the Logger to be used for logging the trace messages
        Returns:
        a new CaptureDevice which traces the calls to the specified captureDevice
      • createCaptureDevice

        protected javax.media.protocol.CaptureDevice createCaptureDevice()
        Creates the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for.
        Returns:
        the JMF CaptureDevice this instance represents and provides an implementation of MediaDevice for; null if the creation fails
      • getCaptureDeviceInfo

        public javax.media.CaptureDeviceInfo getCaptureDeviceInfo()
        Gets the CaptureDeviceInfo of the JMF CaptureDevice represented by this instance.
        Returns:
        the CaptureDeviceInfo of the CaptureDevice represented by this instance
      • getCaptureDeviceInfoLocatorProtocol

        public String getCaptureDeviceInfoLocatorProtocol()
        Gets the protocol of the MediaLocator of the CaptureDeviceInfo represented by this instance.
        Returns:
        the protocol of the MediaLocator of the CaptureDeviceInfo represented by this instance
      • getFormat

        public MediaFormat getFormat()
        Gets the MediaFormat in which this MediaDevice captures media.
        Returns:
        the MediaFormat in which this MediaDevice captures media
        See Also:
        MediaDevice.getFormat()
      • getMediaType

        public org.jitsi.utils.MediaType getMediaType()
        Gets the MediaType that this device supports.
        Returns:
        MediaType.AUDIO if this is an audio device or MediaType.VIDEO if this is a video device
        See Also:
        MediaDevice.getMediaType()
      • getSupportedFormats

        public List<MediaFormat> getSupportedFormats​(EncodingConfiguration encodingConfiguration)
        Gets the list of MediaFormats supported by this MediaDevice and enabled in encodingConfiguration.
        Parameters:
        encodingConfiguration - the EncodingConfiguration instance to use
        Returns:
        the list of MediaFormats supported by this device and enabled in encodingConfiguration.
        See Also:
        MediaDevice.getSupportedFormats()
      • getSupportedFormats

        public List<MediaFormat> getSupportedFormats​(QualityPreset sendPreset,
                                                     QualityPreset receivePreset)
        Gets the list of MediaFormats supported by this MediaDevice. Uses the current EncodingConfiguration from the media service (i.e. the global configuration).
        Parameters:
        sendPreset - the preset used to set some of the format parameters, used for video and settings.
        receivePreset - the preset used to set the receive format parameters, used for video and settings.
        Returns:
        the list of MediaFormats supported by this device
        See Also:
        MediaDevice.getSupportedFormats()
      • getSupportedFormats

        public List<MediaFormat> getSupportedFormats​(QualityPreset sendPreset,
                                                     QualityPreset receivePreset,
                                                     EncodingConfiguration encodingConfiguration)
        Gets the list of MediaFormats supported by this MediaDevice and enabled in encodingConfiguration.
        Parameters:
        sendPreset - the preset used to set some of the format parameters, used for video and settings.
        receivePreset - the preset used to set the receive format parameters, used for video and settings.
        encodingConfiguration - the EncodingConfiguration instance to use
        Returns:
        the list of MediaFormats supported by this device and enabled in encodingConfiguration.
        See Also:
        MediaDevice.getSupportedFormats()
      • toString

        public String toString()
        Gets a human-readable String representation of this instance.
        Overrides:
        toString in class Object
        Returns:
        a String providing a human-readable representation of this instance