This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package us.sosia.net.udt; | |
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.ServerSocketChannel; | |
import java.nio.channels.SocketChannel; | |
import java.util.Iterator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package us.sosia.net.udt.channel; | |
import java.io.IOException; | |
import java.net.SocketAddress; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.ServerSocketChannel; | |
import java.nio.channels.SocketChannel; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void write(ByteBuffer data){ | |
if (data == null) { | |
return; | |
} | |
writeBuffers.offer(data); | |
//start an notify | |
writer.execute(new Runnable() { | |
@Override | |
public void run() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package us.sosia.media.webcam; | |
import java.awt.image.BufferedImage; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.ScheduledFuture; | |
import java.util.concurrent.ScheduledThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package us.sosia.media.ui; | |
import java.awt.BasicStroke; | |
import java.awt.Color; | |
import java.awt.FontMetrics; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.RenderingHints; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package us.sosia.media.video; | |
import java.awt.image.BufferedImage; | |
import java.nio.ByteBuffer; | |
import us.sosia.net.udt.codec.AbstractChainO2OEncode; | |
import com.xuggle.xuggler.ICodec; | |
import com.xuggle.xuggler.IPacket; | |
import com.xuggle.xuggler.IPixelFormat.Type; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***************************************************************************** | |
Copyright (c) 2001 - 2011, The Board of Trustees of the University of Illinois. | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are | |
met: | |
* Redistributions of source code must retain the above | |
copyright notice, this list of conditions and the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package us.sosia.media.video; | |
import java.awt.image.BufferedImage; | |
import java.nio.ByteBuffer; | |
import us.sosia.media.video.channel.VideoClientChannel.VideoStreamListener; | |
import us.sosia.utils.logger.Logger; | |
import com.xuggle.ferry.IBuffer; | |
import com.xuggle.xuggler.ICodec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package us.sosia.media.video; | |
import java.awt.image.BufferedImage; | |
import java.nio.ByteBuffer; | |
import us.sosia.net.udt.codec.AbstractChainO2OEncode; | |
import com.xuggle.xuggler.ICodec; | |
import com.xuggle.xuggler.IPacket; | |
import com.xuggle.xuggler.IPixelFormat.Type; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package us.sosia.media.video; | |
import java.awt.image.BufferedImage; | |
public class ImageUtils { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { |
OlderNewer