开发者

How to apply Filters on publishing stream

开发者 https://www.devze.com 2023-01-29 05:51 出处:网络
I\'ve developed a Flash video recorder(using AS3, Flex) which captures live web cam and streams to Wowza media server.

I've developed a Flash video recorder(using AS3, Flex) which captures live web cam and streams to Wowza media server.

I am trying to apply sharpness, contrast, saturation and sharpness filters on the live video being captured.

I am ab开发者_StackOverflow社区le to apply filter effects on the video being captured on the screen. How do we apply the filters so that it reflects in the stream being published ?

Thank you in advance Rajesh


this code is from the test app that was made to research adobe stratus features and that repeats basic functionality of skype

here's the handling class:

public class RecievingObject extends Object
    {        
        public function RecievingObject(){

        }        
        public function message(str: String):void {
            ChatWindow.addText('>> ' + str);
        }
    }

and how it's attached to the stream (the whole class except NetStatusEvent handlers that do nothing):

    public final class Streams
    {

        private static var streamOut: NetStream;
        private static var streamIn: NetStream;

        public static function initIn(id: String): void {
            streamIn = new NetStream(Main.connection, id);
            streamIn.client = new RecievingObject();
            streamIn.addEventListener(NetStatusEvent.NET_STATUS, onInStatus);
            streamIn.receiveVideo(true);
            streamIn.receiveAudio(true); 
            streamIn.play('media');
            VideoWindow.initIn(streamIn);
            Mixer.initSound(streamIn);
        }

        public static function initOut(): void {
            streamOut = new NetStream(Main.connection, NetStream.DIRECT_CONNECTIONS);
            var peerConnected:Object = new Object();
                peerConnected.onPeerConnect = function(subscriberStream : NetStream) : Boolean {
                    var oo:RecievingObject = new RecievingObject();
                    subscriberStream.client = oo;
                    if(!streamIn){ initIn((subscriberStream as NetStream).farID); }                    
                    return true;
                }
            streamOut.client = peerConnected;            
            streamOut.addEventListener(NetStatusEvent.NET_STATUS, onOutStatus);            
            streamOut.attachCamera(Camera.getCamera());
            streamOut.attachAudio(Microphone.getMicrophone());
            streamOut.publish('media'); 
        }


        public static function send(data: String): void {
            if(streamOut) { streamOut.send('message', data); }
            ChatWindow.addText('<< ' + data);
        }
   }
0

精彩评论

暂无评论...
验证码 换一张
取 消