/** * Initializes a new <tt>IVFMediaDevice</tt> instance which will read * the IVF file located at <tt>filename</tt>. * * @param filename the location of the IVF the <tt>IVFStream<tt> * will read. */ public IVFMediaDevice(String filename) { super(new CaptureDeviceInfo( filename, new MediaLocator("ivffile:"+filename), IVFMediaDevice.SUPPORTED_FORMATS), MediaType.VIDEO); } }
/** * Create a new audio <tt>MediaDevice</tt> instance which will read * the rtpdump file located at <tt>filePath</tt>, and which will have the * encoding format <tt>format</tt>. * * Note: for proper function, <tt>format</tt> has to implement correctly * the <tt>computeDuration(long)</tt> 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 * {@link RtpdumpStream#RtpdumpStream(DataSource, javax.media.control.FormatControl)} * TODO: Avoid this hack... * * @param filePath the location of the rtpdump file * @param format the <tt>AudioFormat</tt> of the data contained in the * payload of the recorded rtp packet in the rtpdump file. * @return a <tt>MediaDevice</tt> that will read the rtpdump file given. */ public static MediaDevice createRtpdumpAudioMediaDevice( String filePath, AudioFormat format) { return new MyAudioMediaDeviceImpl(new CaptureDeviceInfo( "Audio rtpdump file", new MediaLocator("rtpdumpfile:" + filePath), new Format[]{format})); }
/** * Initializes a new <tt>VideoGreyFadingMediaDevice</tt> with the given * framerate and dimension. * @param framerate the framerate of the <tt>CaptureDevice</tt> behind this * <tt>MediaDevice</tt>. * @param dimension the dimension (width & height) of the * <tt>CaptureDevice</tt> behind this <tt>MediaDevice</tt>. */ public VideoGreyFadingMediaDevice(int framerate, Dimension dimension) { super(new CaptureDeviceInfo( "GreyFadingVideo", new MediaLocator("greyfading:"), new Format[] { new RGBFormat( dimension, // size Format.NOT_SPECIFIED, // maxDataLength Format.byteArray, // dataType framerate, // frameRate 32, // bitsPerPixel 2 /* red */, 3 /* green */, 4 /* blue */) }), MediaType.VIDEO); } }
= new CaptureDeviceInfo( name + " " + display, new MediaLocator(
new CaptureDeviceInfo( "Video rtpdump file", new MediaLocator("rtpdumpfile:" + filePath),
= new CaptureDeviceInfo( name, new MediaLocator(LOCATOR_PROTOCOL + ':' + name),
}; CaptureDeviceInfo cdi = new CaptureDeviceInfo( name + " " + i, new MediaLocator(LOCATOR_PROTOCOL + ":" + i),
new CaptureDeviceInfo(), MediaType.VIDEO)); streamRTPManager = new StreamRTPManager(mediaStream, translator);
new CaptureDeviceInfo( name, new MediaLocator(LOCATOR_PROTOCOL + ":" + deviceName),
= new CaptureDeviceInfo( inputDevice.localizedDisplayName(), new MediaLocator(