ive been currently trying to get deep into the API to collect useful information to create windows media / FMS log fields out of it. Here is what ive come up with so far, its not perfect yet or possibly incorrect as im still trying to work out which is the proper data for bytes sent to the client from the server and bytes sent from the client to the server etc. Im trying to collect this once the stream has closed, so im still trying to work out how to get the stream name and its codec info, duration, etc. The other useful bit of info i need to find out is how to obtain client side info like the flash player version, user agent, os etc.

ive had to comment out the codec info as its nul for some reason.

//#Fields: c-dns cs-uri-stem c-starttime x-duration c-rate c-status c-playerid c-playerversion c-playerlanguage cs(User-Agent) cs(Referer) c-hostexe c-hostexever c-os c-osversion c-cpu filelength filesize avgbandwidth protocol transport audiocodec videocodec channelURL sc-bytes c-bytes s-pkts-sent c-pkts-received c-pkts-lost-client c-pkts-lost-net c-pkts-lost-cont-net c-resendreqs c-pkts-recovered-ECC c-pkts-recovered-resent c-buffercount c-totalbuffertime c-quality s-ip s-dns s-totalclients s-cpu-util cs-user-name s-session-id s-content-path cs-url cs-media-name c-max-bandwidth cs-media-role s-proxied
   
    public void streamSubscriberClose(ISubscriberStream stream) {
        IConnection conn = Red5.getConnectionLocal();

        DateFormat date = new SimpleDateFormat("yyyy-MM-dd");
        DateFormat time = new SimpleDateFormat("HH:MM:SS");
       
        log.info("c-totalbuffertime: " + stream.getStreamFlow().getClientTimeBuffer());
        log.info("x-duration: " + stream.getStreamFlow().getTotalStreamTime());
        //log.info("x-sname: " + );
        log.info("x-app: " + conn.getPath());
        log.info("x-appinst: " + conn.getScope().getName());
        log.info("avgbandwidth: " + stream.getBandwidthConfigure().getOverallBandwidth());
        log.info("maxbandwidth: " + stream.getBandwidthConfigure().getOverallBandwidth());
        log.info("c-proto: " + conn.getType());
        log.info("s-uri: " + conn.getPath());
        //log.info("audiocodec: " + stream.getCodecInfo().getAudioCodecName());
        //log.info("videocodec: " + stream.getCodecInfo().getVideoCodecName());
        log.info("date: " + date.format(new Date()));
        log.info("time: " + time.format(new Date()));
        log.info("s-session-id" + conn.getSessionId());
        log.info("c-ip: " + conn.getRemoteAddress());
        log.info("c-port: " + conn.getRemotePort());
        log.info("s-ip: " + conn.getHost());
        log.info("c-starttime: " + conn.getClient().getCreationTime());
        log.info("c-endtime: " + conn.getLastPingTime());
        log.info("c-bytes: " + conn.getWrittenBytes());
        log.info("sc-bytes: " + stream.getStreamFlow().getTotalBytesTransfered());
        log.info(conn);
    }
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to