View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

StreamInputPort

	/**
	 * Start receiving a stream. 
	 * Services can acquire UI object from the returned StreamController.
	 * This method returns null if there is no peer to communicate with is registered to this port.
	 * @return
	 */
	public StreamController receive() throws CommunicationException;


StreamController

	/*
	 * Created on 2005/02/02
	 *
	 * TODO To change the template for this generated file go to
	 * Window - Preferences - Java - Code Style - Code Templates
	 */
	package edu.gatech.cc.realjin.umiddle.net;
	
	import javax.swing.JPanel;
	
	/**
	 * @author jin
	 *
	 * TODO To change the template for this generated type comment go to
	 * Window - Preferences - Java - Code Style - Code Templates
	 */
	public interface StreamController {
		/**
		 * Returns UI object for playback. If the corresponding stream port is 
		 * output port, the ui is for monitoring.
		 * @return
		 */
		public JPanel getPlayerPanel();
		
		/**
		 * Start sending stream, or restart it when paused.
		 *
		 */
		public void start() throws CommunicationException;
		
		public void setStreamListener(StreamListener l);
		
		/**
		 * Pause sending stream.
		 *
		 */
		public void pause() throws CommunicationException;
		
		/**
		 * Stop sending/receiving stream, and go back to the begining.
		 *
		 */
		public void stop() throws CommunicationException;
		
		/**
		 * Stop sending/receiving stream, and deallocate all the resources.
		 * @throws CommunicationException
		 */
		public void destroy() throws CommunicationException;
	
		/**
		 * Sets image scale if this stream contains video.
		 * @param d value greater than 0 and less than or equal to 1
		 */
		public void setScale(double d) throws CommunicationException;
		
		/**
		 * Sets transmittion rate to fastforward/rewind.
		 * @param d value between -1(fastest rewind) and 1(fastest forward)
		 */
		public void setRate(double d) throws CommunicationException;
	}


Link to this Page