Class RtpdumpMediaDevice


  • public class RtpdumpMediaDevice
    extends Object
    This class contains the method createRtpdumpMediaDevice that can create MediaDevices that will read the rtpdump file given. This static method is here for convenience.
    Author:
    Thomas Kuntz
    • Constructor Detail

      • RtpdumpMediaDevice

        public RtpdumpMediaDevice()
    • Method Detail

      • createRtpdumpVideoMediaDevice

        public static MediaDevice createRtpdumpVideoMediaDevice​(String filePath,
                                                                String rtpEncodingConstant,
                                                                MediaFormat format)
        Create a new video MediaDevice instance which will read the rtpdump file located at filePath, and which will have the encoding format encodingConstant.
        Parameters:
        filePath - the location of the rtpdump file
        rtpEncodingConstant - the format this MediaDevice will have. You can find the list of possible format in the class Constants of libjitsi (ex : Constants.VP8_RTP).
        format - the MediaFormat of the data contained in the payload of the recorded rtp packet in the rtpdump file.
        Returns:
        a MediaDevice that will read the rtpdump file given.
      • createRtpdumpAudioMediaDevice

        public static MediaDevice createRtpdumpAudioMediaDevice​(String filePath,
                                                                javax.media.format.AudioFormat format)
        Create a new audio MediaDevice instance which will read the rtpdump file located at filePath, and which will have the encoding format format. Note: for proper function, format has to implement correctly the computeDuration(long) method, because FMJ insists on using this to compute its own RTP timestamps. Note: The RtpdumpStream instance needs to know the RTP clock rate to correctly interpret the RTP timestamps. We use the sampleRate field of AudioFormat, or the frameRate field of VideoFormat, to piggyback the RTP clock rate. See RtpdumpStream(DataSource, javax.media.control.FormatControl) TODO: Avoid this hack...
        Parameters:
        filePath - the location of the rtpdump file
        format - the AudioFormat of the data contained in the payload of the recorded rtp packet in the rtpdump file.
        Returns:
        a MediaDevice that will read the rtpdump file given.