public class ImageStream extends AbstractVideoPullBufferStream<DataSource>
dataSource, formatControl
Constructor and Description |
---|
ImageStream(DataSource dataSource,
javax.media.control.FormatControl formatControl)
Initializes a new ImageStream instance which is to have a
specific FormatControl
|
Modifier and Type | Method and Description |
---|---|
protected void |
doRead(javax.media.Buffer buffer)
Blocks and reads into a Buffer from this
PullBufferStream.
|
byte[] |
readScreen(byte[] output,
java.awt.Dimension dim)
Read screen.
|
void |
setDisplayIndex(int displayIndex)
Sets the index of the display to be used by this ImageStream.
|
void |
setOrigin(int x,
int y)
Sets the origin to be captured by this ImageStream.
|
void |
start()
Start desktop capture stream.
|
void |
stop()
Stop desktop capture stream.
|
read
willReadBlock
close, doGetFormat, doSetFormat, endOfStream, getContentDescriptor, getContentLength, getControls, getFormat
getControl, getControl, queryInterface, queryInterface
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ImageStream(DataSource dataSource, javax.media.control.FormatControl formatControl)
dataSource
- the DataSource which is creating the new
instance so that it becomes one of its streamsformatControl
- the FormatControl of the new instance which
is to specify the format in which it is to provide its media dataprotected void doRead(javax.media.Buffer buffer) throws java.io.IOException
doRead
in class AbstractVideoPullBufferStream<DataSource>
buffer
- the Buffer this PullBufferStream is to
read intojava.io.IOException
- if an I/O error occurs while this
PullBufferStream reads into the specified BufferAbstractVideoPullBufferStream.doRead(Buffer)
public byte[] readScreen(byte[] output, java.awt.Dimension dim)
output
- output buffer for screen bytesdim
- dimension of the screenpublic void setDisplayIndex(int displayIndex)
displayIndex
- the index of the display to be used by this
ImageStreampublic void setOrigin(int x, int y)
x
- the x coordinate of the origin to be set on this instancey
- the y coordinate of the origin to be set on this instancepublic void start() throws java.io.IOException
start
in class AbstractVideoPullBufferStream<DataSource>
java.io.IOException
- if anything goes wrong while starting the transfer of
media data from this AbstractBufferStreamAbstractBufferStream.start()
public void stop() throws java.io.IOException
stop
in class AbstractVideoPullBufferStream<DataSource>
java.io.IOException
- if anything goes wrong while stopping the transfer of
media data from this AbstractBufferStreamAbstractBufferStream.stop()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.