mil.dod.th.ose.transcoder.vlc/src/mil/dod/th/ose/transcoder/vlc/VlcUtils.java
public static String createConfigString(final URI destination, final Map<String, Object> configParams)
    {
        
        final StringBuilder builder = new StringBuilder(":sout=#");
        
        //Check configParams for keys defined in {@link TranscoderService}
        if (configParams.containsKey(TranscoderService.CONFIG_PROP_BITRATE_KBPS))
        {
            final double bitrateKbps = ((Double)(configParams.get(
                    TranscoderService.CONFIG_PROP_BITRATE_KBPS))).doubleValue();

            //Value less than 0 indicates no transcoding should be done; pass along streaming data as is
            if (bitrateKbps > 0 && configParams.containsKey(TranscoderService.CONFIG_PROP_FORMAT))
            {


                final String format = (String)configParams.get(TranscoderService.CONFIG_PROP_FORMAT);
                String codecString;//NOCHECKSTYLE because it will be assigned inside the if/else statements

                if (format.equalsIgnoreCase("video/mpeg"))
                {
                    codecString = MPEG_CODEC;
                }
                else if (format.equalsIgnoreCase("video/mp4"))
                {
                    codecString = MP4_CODEC;
                }
                else
                {
                    //Default to mp2v
                    codecString = MPEG_CODEC;
                }

                builder.append("transcode{vcodec=");
                builder.append(codecString);
                builder.append(",vb=");
                builder.append(bitrateKbps);
                builder.append(",acodec=none}:");

            }

        }

        builder.append("rtp{dst=");
        builder.append(destination.getHost());
        builder.append(",port=");
        builder.append(destination.getPort());
        builder.append(",mux=ts,ttl=128}");

        return builder.toString();
    }
/**
     * Consumes the stream destination and configuration parameters to generate a String to be used
     * by VLC.
     * 
     * @param destination
     *      Address for output stream
     * @param configParams
     *      Parameters to be used for the transcoding process 
     * @return 
     *      Properly formatted configuration String to be used by VLC
     */
Consumes the stream destination and configuration parameters to generate a String to be used
by VLC.

@param destination
Address for output stream
@param configParams
Parameters to be used for the transcoding process
@return
Properly formatted configuration String to be used by VLC
Consumes the stream destination and configuration parameters to generate a String to be used by VLC . @param destination Address for output stream @param configParams Parameters to be used for the transcoding process @return Properly formatted configuration String to be used by VLC
public static String createConfigString(final URI destination, final Map<String, Object> configParams)
    {
        final StringBuilder builder = new StringBuilder(":sout=#");
        if (configParams.containsKey(TranscoderService.CONFIG_PROP_BITRATE_KBPS))
        {
            final double bitrateKbps = ((Double)(configParams.get(
                    TranscoderService.CONFIG_PROP_BITRATE_KBPS))).doubleValue();
            if (bitrateKbps > 0 && configParams.containsKey(TranscoderService.CONFIG_PROP_FORMAT))
            {
                final String format = (String)configParams.get(TranscoderService.CONFIG_PROP_FORMAT);
                String codecString;
                if (format.equalsIgnoreCase("video/mpeg"))
                {
                    codecString = MPEG_CODEC;
                }
                else if (format.equalsIgnoreCase("video/mp4"))
                {
                    codecString = MP4_CODEC;
                }
                else
                {
                    codecString = MPEG_CODEC;
                }
                builder.append("transcode{vcodec=");
                builder.append(codecString);
                builder.append(",vb=");
                builder.append(bitrateKbps);
                builder.append(",acodec=none}:");
            }
        }
        builder.append("rtp{dst=");
        builder.append(destination.getHost());
        builder.append(",port=");
        builder.append(destination.getPort());
        builder.append(",mux=ts,ttl=128}");
        return builder.toString();
    }
public static String createConfigString ( final URI destination , final Map < String , Object > configParams ) { final StringBuilder builder = new StringBuilder ( ":sout=#" ) ; if ( configParams . containsKey ( TranscoderService . CONFIG_PROP_BITRATE_KBPS ) ) { final double bitrateKbps = ( ( Double ) ( configParams . get ( TranscoderService . CONFIG_PROP_BITRATE_KBPS ) ) ) . doubleValue ( ) ; if ( bitrateKbps > 0 && configParams . containsKey ( TranscoderService . CONFIG_PROP_FORMAT ) ) { final String format = ( String ) configParams . get ( TranscoderService . CONFIG_PROP_FORMAT ) ; String codecString ; if ( format . equalsIgnoreCase ( "video/mpeg" ) ) { codecString = MPEG_CODEC ; } else if ( format . equalsIgnoreCase ( "video/mp4" ) ) { codecString = MP4_CODEC ; } else { codecString = MPEG_CODEC ; } builder . append ( "transcode{vcodec=" ) ; builder . append ( codecString ) ; builder . append ( ",vb=" ) ; builder . append ( bitrateKbps ) ; builder . append ( ",acodec=none}:" ) ; } } builder . append ( "rtp{dst=" ) ; builder . append ( destination . getHost ( ) ) ; builder . append ( ",port=" ) ; builder . append ( destination . getPort ( ) ) ; builder . append ( ",mux=ts,ttl=128}" ) ; return builder . toString ( ) ; }
Consumes the stream destination and configuration parameters to generate a String to be used
 by VLC.
Consumes the stream destination and configuration parameters to generate a String to be used by VLC .
//Check configParams for keys defined in {@link TranscoderService} //Value less than 0 indicates no transcoding should be done; pass along streaming data as is //NOCHECKSTYLE because it will be assigned inside the if/else statements //Default to mp2v