net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.imgstreaming
Class ImageStream
java.lang.Object
net.java.sip.communicator.impl.neomedia.control.AbstractControls
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractBufferStream
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractPullBufferStream
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.AbstractVideoPullBufferStream
net.java.sip.communicator.impl.neomedia.jmfext.media.protocol.imgstreaming.ImageStream
- All Implemented Interfaces:
- javax.media.Controls, javax.media.protocol.PullBufferStream, javax.media.protocol.SourceStream
public class ImageStream
- extends AbstractVideoPullBufferStream
The stream used by JMF for our image streaming.
- Author:
- Sebastien Vincent, Lyubomir Marinov, Damian Minkov
| Fields inherited from interface javax.media.protocol.SourceStream |
LENGTH_UNKNOWN |
|
Constructor Summary |
ImageStream(DataSource dataSource,
javax.media.control.FormatControl formatControl)
Initializes a new ImageStream instance which is to have a
specific FormatControl |
|
Method Summary |
protected void |
doRead(javax.media.Buffer buffer)
Blocks and reads into a Buffer from this
PullBufferStream. |
byte[] |
readScreen(byte[] output,
Dimension dim)
Read screen. |
void |
setDisplayIndex(int index)
Set display index. |
void |
setOrigin(int x,
int y)
Set Origin of capture. |
void |
start()
Start desktop capture stream. |
void |
stop()
Stop desktop capture stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.media.protocol.PullBufferStream |
getFormat |
| Methods inherited from interface javax.media.protocol.SourceStream |
endOfStream, getContentDescriptor, getContentLength |
| Methods inherited from interface javax.media.Controls |
getControl, getControls |
ImageStream
ImageStream(DataSource dataSource,
javax.media.control.FormatControl formatControl)
- Initializes a new ImageStream instance which is to have a
specific FormatControl
- Parameters:
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 data
doRead
protected void doRead(javax.media.Buffer buffer)
throws IOException
- Blocks and reads into a Buffer from this
PullBufferStream.
- Specified by:
doRead in class AbstractVideoPullBufferStream
- Parameters:
buffer - the Buffer this PullBufferStream is to
read into
- Throws:
IOException - if an I/O error occurs while this
PullBufferStream reads into the specified Buffer- See Also:
AbstractVideoPullBufferStream.doRead(Buffer)
setDisplayIndex
public void setDisplayIndex(int index)
- Set display index.
- Parameters:
index - display index
setOrigin
public void setOrigin(int x,
int y)
- Set Origin of capture.
- Parameters:
x - x coordinatey - y coordinate
start
public void start()
- Start desktop capture stream.
- Overrides:
start in class AbstractVideoPullBufferStream
- See Also:
AbstractBufferStream.start()
stop
public void stop()
- Stop desktop capture stream.
- Overrides:
stop in class AbstractVideoPullBufferStream
- See Also:
AbstractBufferStream.stop()
readScreen
public byte[] readScreen(byte[] output,
Dimension dim)
- Read screen.
- Parameters:
output - output buffer for screen bytesdim - dimension of the screen
- Returns:
- raw bytes, it could be equal to output or not. Take care in the
caller to check if output is the returned value.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.