Package javax.media.control

Examples of javax.media.control.PacketSizeControl


            Object[] controls3 = processor.getControls();
            for (int i=0; i<controls3.length; i++)
            {
                if ( controls3[i] instanceof PacketSizeControl )
                {
                    PacketSizeControl psc = (PacketSizeControl)controls3[i];
                    System.out.println("### current packetsize is " + psc.getPacketSize() + " bytes");
                    psc.setPacketSize(1400);
                    System.out.println("### packetsize was set to " + psc.getPacketSize() + " bytes");
                    break;
                }
            }

            // QualityControl
View Full Code Here


                        System.err.println("Track " + i + " is set to transmit as:");
                        System.err.println("  " + chosen);

                        if (tracks[i].getFormat() instanceof AudioFormat) {
                            int packetRate = 20;
                            PacketSizeControl pktCtrl = (PacketSizeControl) processor.getControl(PacketSizeControl.class.getName());
                            if (pktCtrl != null) {
                                try {
                                    pktCtrl.setPacketSize(getPacketSize(tracks[i].getFormat(), packetRate));
                                }
                                catch (IllegalArgumentException e) {
                                    pktCtrl.setPacketSize(80);
                                    // Do nothing
                                }
                            }

                            if (tracks[i].getFormat().getEncoding().equals(AudioFormat.ULAW_RTP)) {
View Full Code Here

                        LOGGER.error("Track " + i + " is set to transmit as:");
                        LOGGER.error("  " + chosen);

                        if (tracks[i].getFormat() instanceof AudioFormat) {
                            int packetRate = 20;
                            PacketSizeControl pktCtrl = (PacketSizeControl) processor.getControl(PacketSizeControl.class.getName());
                            if (pktCtrl != null) {
                                try {
                                    pktCtrl.setPacketSize(getPacketSize(tracks[i].getFormat(), packetRate));
                                }
                                catch (IllegalArgumentException e) {
                                    pktCtrl.setPacketSize(80);
                                    // Do nothing
                                }
                            }

                            if (tracks[i].getFormat().getEncoding().equals(AudioFormat.ULAW_RTP)) {
View Full Code Here

TOP

Related Classes of javax.media.control.PacketSizeControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.