Missing Hardware Inventory for client - Possible database problems

I have a few workstations with SCCM clients that didn't install correctly. Once uninstalled, and later re-installed, I can't get a hardware inventory from these workstations (windows 8). In the SCCM Console on the device's client activity, Policy Request,
Heartbeat DDR, and Software Scan are all up to date. Hardware Scan remains blank. I have many other Windows 8 VMs that report accurate hardware inventory.
In the C:\Program Files\Microsoft Configuration Manager\Logs\dataldr.log, here are some of the errors:
ERROR - attempt to update non-existent row (sp = pWorkstationStatus_DATA). Invalid command: 
exec dbo.pWorkstationStatus_DATA
~Cannot process MIF XXXXXXX.MIF
I've tried removing the client, deleting the client's C:\Windows\SMSCFG.ini file, and deleting the computer entry in the SCCM console. I then waited a few days, reinstalled the SCCM client on the problematic workstation, but I get the same result: Hardware
Inventory date is blank, and errors in the dataldr.log.
I've also gone into the SQL database, and queried one of the problematic machines. There was no entry in System_DATA, System_DISC, or in WorkstationStatus_DATA. I started adding records in the database tables for one problematic machine, with the help of
the dataldr.log. Whenever there was a missing entry, I would add it. I gave up after the most recent:
ERROR - attempt to update non-existent row (sp = pBROWSER_HELPER_OBJECT_DATA). Invalid command: 
exec dbo.pWorkstationStatus_DATA
I did another SCCM client uninstall, and delete the smscfg.ini. I changed the hierarchy settings for managing conflicting records to "Manually resolve conflicting records" just to *see* if anything appears. After several days, nothing appears in
Monitoring\System Status\Conflicting Records.
Is there a hardware ID stored somewhere? How can fix this problem with the database?

The errors in the dataldr.log are pretty specific about what table a record is missing during an update. If SCCM needs to update a record that doesn't exist, why not create, so SCCM can update it?
When I uninstalled the client, deleted the smscfg.ini file from the client, deleted the device in SCCM, and reinstalled the client, I get a brand new ResourceID. I kept track of previous ResourceIDs, and deleted records associated with those old ResourceIDs.
Because updating a single table will not update everything that is need. Then you will get into interesting issues where the wrong ResourceID is populated for different computers.
Running the Heartbeat discovery (discovery data collection cycle) should solved your problem by create creating the PC within CM12. if it doesn't then you have a bigger issue and you need to dig deeper into the logs to find out why.
I would start by tracking the DDR fro the computer to the MP then to the inboxes and finally into the db. This will get you started.
http://www.enhansoft.com/blog/troubleshooting-inventory-flow
Garth Jones | My blogs: Enhansoft and
Old Blog site | Twitter:
@GarthMJ

Similar Messages

  • SCCM 2012 Secondary site some client's are scan hardware inventory for more than 30 days

    Hi, 
    In our SCCM 2012 environment we have secondary site configured which connected with 8500 computers, on those 5500 machines scanning hardware inventory and send latest inventory details to Secondary Site Management Point, but remaing 3000 machines are not
    sending latest hardware inventory for more than 30 days. I verified clients log  found it is generating report on inventory agent.log however it is not available with secondary site Management Point.
    Are anyone experienced this issue, please share your thought how to fix this issue.
    Thanks in advance. 
    Madhan

    Yes i did verify but the client isn't listed on both log files. Also i couldn't open IIS log because of it size has more than 800MB. currently this site has connected with 8500 machines do you think these many clients are supported by secondary site server. 
    If you can't open the IIS log then how do you know that the Client's IP is not listed within them?
    5000 is the max for a secondary site. You will need to secondary sites at this location.
    http://technet.microsoft.com/en-us/library/gg682077.aspx#BKMK_SupConfigClientNumbers
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • ...recommended system & hardware requirements for clients P6 8.2 Clien&Webs

    What are the recommended system & hardware requirements for clients P6 Professional and Client Web for P6 8.2 ???
    I need to know the recommended systems & hardware requirements for clients P6 Professional and Client Web for P6 8.2
    I mean what kind of processor, memory ram minimum and maximus to run or to deploy P6 Professional Client from P6 8.2 version and the requeriments to run the P6 8.2 Web application.
    I need like a chart (not necesary) with the most common configuration with hardware and software like the example below
         SO     Ram     Hdd     Processor
    P6 Professional 8,2     Windows Xp Sp3     4 Gb     2 Gb +     Core2Duo 1,8 +
         Oracle Linux     4 Gb     3 Gb     Core2Duo 1,6 +
    P6 Web 8,2     Windows Xp Sp3     4 Gb     2 Gb +     Core2Duo 1,8 +
         Oracle Linux     4 Gb     3 Gb     Core2Duo 1,6 +
    Because all information I saw it´s about Server (Database, Server Application and others) and not very clever about P6 8.2 Client and P6 8.2 Web.

    I haven't seen PC requirements for a Win workstation per se either. Here are the only 8.2 client requirements I can find.
    Supported Configurations for Client Modules
    For Clients Accessing P6
     Microsoft Internet Explorer (IE) 8, IE 9, Firefox 8+, Safari 5.1.x+, Chrome 15+
     Sun JRE (the required version will install automatically with P6); Always install the latest supported patch update with security fixes
     TCP/IP network protocol
    For Clients Accessing P6 Progress Reporter
     IE 8, IE 9, Firefox 8+, Safari 5.1.x+, Chrome 15+
     Sun JRE (the required version will install automatically with P6 Progress Reporter);
    Always install the latest supported patch update with security fixes
     TCP/IP network protocol
     Optional software:
     Java Access Bridge 2.01 (for 508 accessibility)
     P6 Progress Reporter has been tested with the following technologies:
     JAWS® for Windows screen reading software, version 7.0
     ZoomText Magnifier 9.0
    For Database Clients Running P6 Professional
     Database client release 11.1.0.7.0 is supported for Oracle 10gR2, Oracle 11gR1
    databases and 11.2.0.2.0 for Oracle 11gR2 (required only for Oracle databases and
    supports only the 32-bit version).
     TCP/IP network protocol

  • Hardware inventory for windows 8.1 SCCM 2007

    I have SCCM 2007  primary site with SP2/R3 installed.
    I have also installed KB for windows 8 and for windows 8.1
    I only stood up two clients with windows 8.1. For one reason or another each time I try to get hardware inventory I get the following.
    failed to retrieve the requested  schedule 80041002
    failed to send schedule 80041002.
    The MP has received the software inventory and does process it  according to MP_SINv but Hardware fails.
    I have reset the wmi repository recreated guid keys  standard wmi practices.  One of the bigger issues is the fact that wmidiag is not supported by windows 8.1 has any one ran into this issue?

    It's actually silly I forgot to update my MOF update collection to include 2207 sccm client version. After the collection update and sms_def.mof and configuration.mof files got copied to user's computer hardware inventory ran as scheduled

  • Duplicating de confirmation for Clients with credit problems

    Hi,
    We are using GATP to confirmed the sales orders quantities. In the check instructions,
    we are using check availability and then RBA (product substitution)
    When I create a sales order for a client with credit problems the confirmed quantity
    is being duplicated after releasing the order.
    The steps I am following are next:
    1.        VA01: create sales order (i.e: order product D 10 PC, I got 10 PC of product E confirmed because of the RBA)
    2.        VKM3: Release the order
    3.        VA03: display the sales order
    (it duplicates the lines with confirmed quantity - i.e: I got line 10: product D 0 PC confirmed; line 11: product E 10 PC confirmed; line 12: product E 10 PC confirmed, so line 12 is repeating line 11)
    We have explore any issues related to the availability check, but it seems to be a problem with the configuration of the credit processing.
    Have you ever had this issue? Any recommendation to solve it?
    Thanks a lot in advance.

    777,
    Are you using product allocation?
    In what case you see duplicate confirmation? in case of partial delivered order? if so check OSS note 1442425.
    Regards,
    Harshil Desai

  • Hardware Inventory for Ipad

    I have integrated SCCM 2012 R2 with Windows Intune and created APN for apple devices. I have enrolled my ipad and see it in Mobile devices in SCCM 2012 R2 console. However when I right click Ipad and select Resource Explorer the hardware , hardware history
    is blank. How can I inventory Ipad? Am I missing something here?

    It might take some time until inventory shows up. How long have you waited so far?
    Torsten Meringer | http://www.mssccmfaq.de

  • Tracking hardware inventory of client machines

    hi experts
    Is there any mechanism in oracle forms or other technology( in oracle ) provides to get track hardware status of the client machines.
    or is there any other way to solve this thing.
    pl give me the solution
    Thanks in advande

    What would you like to track?
    Local IP?
    Computer name?
    MAC address?
    what type of information do you need?
    In java you can get some system info with this:
    // Get all system properties
    Properties props = System.getProperties();
    // Enumerate all system properties
    Enumeration enum = props.propertyNames();
    for (; enum.hasMoreElements(); ) {
    // Get property name
    String propName = (String)enum.nextElement();
    // Get property value
    String propValue = (String)props.get(propName); } this is my bean to read some information as PJC bean
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.*;
    import oracle.forms.ui.*;
    import java.net.InetAddress;
    public class ClientInfo extends VBean {
        private static final ID CLIENT_IP   = ID.registerProperty("CLIENT_IP");
        private static final ID CLIENT_NAME = ID.registerProperty("CLIENT_NAME");
        private static final ID CLIENT_OS   = ID.registerProperty("CLIENT_OS");
        private static final ID CLIENT_USER   = ID.registerProperty("CLIENT_USER");
        private IHandler mHandler;
        private String hostAddress = "";
        private String hostName = "";
        private String hostOs = "";
        private String hostUser="";
        public ClientInfo() {
            try {
                System.out.println("+----------------------+");
                System.out.println("+ClientInfro PJC       +");
                System.out.println("+Dat spr: 10.09.2007   +");
                System.out.println("+Dat spr: 04.07.2008   +");
                System.out.println("+Dat spr: 10.07.2008   +");
                System.out.println("+----------------------+\n");
                this.hostAddress = InetAddress.getLocalHost().getHostAddress();
                this.hostName = InetAddress.getLocalHost().getHostName();
                this.hostOs = System.getProperty("os.name");
                this.hostUser = System.getProperty("user.name");
                System.out.println("Host   adress: " + hostAddress);
                System.out.println("Host     name: " + hostAddress);
                System.out.println("Host op. syst: " + hostOs);
                System.out.println("Host username: " + hostUser);
            } catch (Exception e) {
                System.out.println("Napaka pri inicializaciji beana: " +
                    e.toString());
        public void init(IHandler handler) {
            super.init(handler);
            mHandler = handler;
            System.out.println("Bean initialized..");
        * metoda setira vrednost variable v formsih
        * @return
        * @param pid
        public Object getProperty(ID pid) {
            if (pid == CLIENT_IP) {
                System.out.println("Client IP: " + this.hostAddress);
                return ""+this.hostAddress;
            if (pid == CLIENT_NAME) {
                System.out.println("Client Name: " + this.hostName);
                return ""+this.hostName;
            if (pid == CLIENT_OS) {
                System.out.println("Client os: " + this.hostOs);
                return ""+this.hostOs;
            if (pid == CLIENT_USER) {
                System.out.println("Clientuser: " + this.hostUser);
                return ""+this.hostUser;
            return super.getProperty(pid);
    }You can also get other infor for example "motherboard serial number" as this
    import java.io.File;
    import java.io.FileWriter;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    public class MiscUtils {
      private MiscUtils() {  }
      public static String getMotherboardSN() {
      String result = "";
        try {
          File file = File.createTempFile("realhowto",".vbs");
          file.deleteOnExit();
          FileWriter fw = new java.io.FileWriter(file);
          String vbs =
             "Set objWMIService = GetObject(\"winmgmts:\\\\.\\root\\cimv2\")\n"
            + "Set colItems = objWMIService.ExecQuery _ \n"
            + "   (\"Select * from Win32_BaseBoard\") \n"
            + "For Each objItem in colItems \n"
            + "    Wscript.Echo objItem.SerialNumber \n"
            + "    exit for  ' do the first cpu only! \n"
            + "Next \n";
          fw.write(vbs);
          fw.close();
          Process p = Runtime.getRuntime().exec("cscript //NoLogo " + file.getPath());
          BufferedReader input =
            new BufferedReader
              (new InputStreamReader(p.getInputStream()));
          String line;
          while ((line = input.readLine()) != null) {
             result += line;
          input.close();
        catch(Exception e){
            e.printStackTrace();
        return result.trim();
      public static void main(String[] args){
        String cpuId = MiscUtils.getMotherboardSN();
        javax.swing.JOptionPane.showConfirmDialog((java.awt.Component)
             null, cpuId, "Motherboard serial number",
             javax.swing.JOptionPane.DEFAULT_OPTION);
    }or hardisk serial number
    public static String getSerialNumber(String drive) {
      String result = "";
        try {
          File file = File.createTempFile("realhowto",".vbs");
          file.deleteOnExit();
          FileWriter fw = new java.io.FileWriter(file);
          String vbs = "Set objFSO = CreateObject(\"Scripting.FileSystemObject\")\n"
                      +"Set colDrives = objFSO.Drives\n"
                      +"Set objDrive = colDrives.item(\"" + drive + "\")\n"
                      +"Wscript.Echo objDrive.SerialNumber";  // see note
          fw.write(vbs);
          fw.close();
          Process p = Runtime.getRuntime().exec("cscript //NoLogo " + file.getPath());
          BufferedReader input =
            new BufferedReader
              (new InputStreamReader(p.getInputStream()));
          String line;
          while ((line = input.readLine()) != null) {
             result += line;
          input.close();
        catch(Exception e){
            e.printStackTrace();
        return result.trim();
      }Or you can write a DLL in C, C++ and use it in Java with jni..
    Edited by: Peterv6i on Aug 30, 2010 10:58 AM

  • Hardware Inventory Not working for sccm 2012

    Version 5.00.7804.1000 Devices 3,000
    One of the guys who left broke Hardware Inventory no client are able to report. I do see Software info in the Resource Explorer. It's enabled on the server. I don't see anything in Program Files\Microsoft Configuration Manager\MP\OUTBOXES\hinv.box
    The dataldr.log Checking inbox for any MIFs to process... Waiting for a MIF...Looking for inventory schema changes......no inventory schema changes found. I think the configuration.mof  in Program Files\Microsoft Configuration Manager\inboxes\clifiles.src\hinv
    was changed. if so how can I fix this it might be corrupted. At lease clients are getting their packages. hey I have to look at the good I'm just a packager.

    Copy the configuration.mof file and import a new mof file from another ConfigMgr environment.
    Kent Agerlund | My blogs: blog.coretech.dk/kea and
    SCUG.dk/ | Twitter:
    @Agerlund | Linkedin: Kent Agerlund |
    Mastering ConfigMgr 2012 The Fundamentals

  • Hardware inventory not reflecting in reports in SCCM 2012 SP1

    Hi,
    I am using SCCM 2012 SP1. During hardware inventory my client sending logs to MP server(i checked in InventoryAgent.log).
    From server end its also showing successful in logs (MP_Hinv.log). But when i m using resource explorer by clicking on a particular device its not giving information about inventory. Its giving only three option (Kindly refer snapshot).
    Kindly suggest .
    Regards
    Manish

    We're just not wanting to lead anyone else astray into thinking that this really is the solution if they were to run into the same scenario. We're all very happy that you have things working now, but were just trying to really understand how it got fixed
    so that others who do come across this thread would see the real answer. But if all you changed was the boundary group, so be it.
    Again, we're all glad you are working now.
    Wally Mead

  • Is there is any way to find the data transfer from client to Configuration Manager for health monitoring and hardware Inventory

    Hi
    Can Configuration Manager provide a way to find the data transfer from client to Configuration Manager for health monitoring and hardware Inventory. How can I know what amount of data is consumed during that process

    Place archive_reports.sms in %systemroot%\ccm\inventory\temp\ for both 64-bit and 32-bit computers.
    There are two situations where you can use this depending on the type of client:
    1. To keep inventory reports on a client (that is not an MP), create the following file:
    %systemroot%\ccm\inventory\temp\archive_reports.sms
    2. To keep inventory reports on a MP (that is also a client), create the following file:
    <x>:\sms_ccm\inventory\temp\archive_reports.sms
    The XML file will be saved in the inventory\temp folder.
    More information on the above here: http://blogs.technet.com/b/configurationmgr/archive/2012/09/17/controlling-configuration-manager-2012-using-hidden-files.aspx

  • Hardware Inventory - WMI Class or Registry extend Problem (NULL Values)

    Hello guys,
    I need your help please,
    I'm New to SCCM 2012, I'm trying to extend the hardware inventory, here's the steps:
    1. Default Client Settings -> Hardware Inventory -> Set Classes,
    2. For WMI - I import Class from Workstation in the network for example Root\Cimv2\TerminalServices -> Win32_TSDeploymentSettings 
    For Registry Import i use reg2mof - then import the mof file and enable it.
    If i do anything wrong, please let me know as well,
    Now for the problem...
    I can see data in the database for one computer(record) but when i import more then one computer the database has NULL Values for most of the imported data
    i can't find any solution for this problem, if you know what to do PLEASE HELP
    Thanks
    Avshalom

    After you import the classes you need to wait for hardware inventory to occur. Then the null will change to the real data.
    For registry keys, make sure that you also add the mof edit to the configuration.mof too.
    Also remember that if a computer does not have the class it will show null.
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Missing details in hardware inventory

    Hi,
    Hardware inventory details about Logical and Physical disks are not available for any of my managed workstations.
    ZLM7.2 HP3 server and agents.
    Is anyone experiencing the same problem?
    Thanks,
    Ovidiu

    Brunold,
    I activated the hardware-inventory-enabled and software-inventory-enabled options in ZCC as you suggested and now it works!
    Running rug-getprefs on the SLED10 workstation was reporting hardware inventory was also enabled before (by default), but who knows...
    As a side note, rug-getprefs on the SLES10 servers shows that hardware inventory is not enabled by default on that platform.
    Thanks a lot for your help!
    Ovidiu
    Originally Posted by brunold
    Ovidiu,
    I do not know a document about the inventory process.
    I just know what I saw in the logfiles and so on.
    Ok when hwinfo reports the disks I think zlm should notice them as well. Have you enabled the zmd setting 'hardware-inventory-enabled' fpr the zlm cleint ?
    You can run rug get at the client to check this setting.
    If it is not set I would set it in the zcc / configuration / zmd settings because there you can set it globaly for all managed devices. Then you should best restart the zlm clients because I'm not sure if this settings is just activated during client startup.
    If this was activated I think the zmd-mesages.log might show some error messages why the inventory is not collected. Grab it from /var/log (code 10) or /var/opt/novell/logs/zenworks (code 9). If there is not enough information the log level of the zlm client can be increased to the debug level to get more output. Search in the file for the string inventory and hwinfo.
    Client settings for enhancing the debug output:
    rug set log-level debug
    rug set log-soap-xml true
    rug set log-exception-traces true
    Rainer

  • Extra hardware interface for transmiting both Audio and video to client ??

    hi i m doing e-learning project. i have to capture video from webcam and voice from headphone and send to client.
    but my code is working fine for either one at a time.
    DO i need some extra hardware interface for Transmitting  both Audio and video to client im using code AVTransmit and AVReceive found from this site only
    After running TX
    i give dsound:// & vfw://0 in Media Locater only sound is received and no vedio
    and when i give vfw://0 in Media Locater only live video is transmited.
    im using JMF1.1.2e.
    if any one know the method to run or cause of it plz reply me soon. i will be very thankfull
    transmiter/server side code .first run TX on server
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.media.rtp.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    public class Tx extends JFrame implements ActionListener, KeyListener,
    MouseListener, WindowListener {
    Vector targets;
    JList list;
    JButton startXmit;
    JButton rtcp;
    JButton update;
    JButton expiration;
    JButton statistics;
    JButton addTarget;
    JButton removeTarget;
    JTextField tf_remote_address;
    JTextField tf_remote_data_port;
    JTextField tf_media_file;
    JTextField tf_data_port;
    TargetListModel listModel;
    AVTransmitter avTransmitter;
    RTCPViewer rtcpViewer;
    JCheckBox cb_loop;
    Config config;
    public Tx() {
    setTitle( "JMF/RTP Transmitter");
    config= new Config();
    GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
    JPanel p= new JPanel();
    p.setLayout( gridBagLayout);
    JPanel localPanel= createLocalPanel();
    gbc= new GridBagConstraints();
    gbc.gridx= 0;
    gbc.gridy= 0;
    gbc.gridwidth= 2;
    gbc.anchor= GridBagConstraints.CENTER;
    gbc.fill= GridBagConstraints.BOTH;
    gbc.insets= new Insets( 10, 5, 0, 0);
    ((GridBagLayout)p.getLayout()).setConstraints( localPanel, gbc);
    p.add( localPanel);
    JPanel targetPanel= createTargetPanel();
    gbc= new GridBagConstraints();
    gbc.gridx= 1;
    gbc.gridy= 1;
    gbc.weightx= 1.0;
    gbc.weighty= 1.0;
    gbc.anchor= GridBagConstraints.CENTER;
    gbc.fill= GridBagConstraints.BOTH;
    gbc.insets= new Insets( 10, 5, 0, 0);
    ((GridBagLayout)p.getLayout()).setConstraints( targetPanel, gbc);
    p.add( targetPanel);
    JPanel mediaPanel= createMediaPanel();
    gbc= new GridBagConstraints();
    gbc.gridx= 1;
    gbc.gridy= 2;
    gbc.weightx= 1.0;
    gbc.weighty= 1.0;
    gbc.anchor= GridBagConstraints.CENTER;
    gbc.fill= GridBagConstraints.BOTH;
    gbc.insets= new Insets( 10, 5, 0, 0);
    ((GridBagLayout)p.getLayout()).setConstraints( mediaPanel, gbc);
    p.add( mediaPanel);
    JPanel buttonPanel= new JPanel();
    rtcp= new JButton( "RTCP Monitor");
    update= new JButton( "Transmission Status");
    update.setEnabled( false);
    rtcp.addActionListener( this);
    update.addActionListener( this);
    buttonPanel.add( rtcp);
    buttonPanel.add( update);
    gbc= new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 3;
    gbc.gridwidth= 2;
    gbc.weightx = 1.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.insets = new Insets( 5,5,10,5);
    ((GridBagLayout)p.getLayout()).setConstraints( buttonPanel, gbc);
    p.add( buttonPanel);
    getContentPane().add( p);
    list.addMouseListener( this);
    addWindowListener( this);
    pack();
    setVisible( true);
    private JPanel createMediaPanel() {
    JPanel p= new JPanel();
    GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
    p.setLayout( gridBagLayout);
    JLabel label= new JLabel( "Media Locator:");
    gbc= new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.EAST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,10,5);
    ((GridBagLayout)p.getLayout()).setConstraints( label, gbc);
    p.add( label);
    tf_media_file= new JTextField( 35);
    gbc= new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 0;
    gbc.weightx = 1.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.insets = new Insets( 5,5,10,5);
    ((GridBagLayout)p.getLayout()).setConstraints( tf_media_file, gbc);
    p.add( tf_media_file);
    tf_media_file.setText( config.media_locator);
    cb_loop= new JCheckBox( "loop");
    startXmit= new JButton( "Start Transmission");
    startXmit.setEnabled( true);
    startXmit.addActionListener( this);
    gbc= new GridBagConstraints();
    gbc.gridx = 2;
    gbc.gridy = 0;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,10,5);
    ((GridBagLayout)p.getLayout()).setConstraints( cb_loop, gbc);
    p.add( cb_loop);
    cb_loop.setSelected( true);
    cb_loop.addActionListener( this);
    gbc= new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 1;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,10,5);
    ((GridBagLayout)p.getLayout()).setConstraints( startXmit, gbc);
    p.add( startXmit);
    TitledBorder titledBorder= new TitledBorder( new EtchedBorder(), "Source");
    p.setBorder( titledBorder);
    return p;
    private JPanel createTargetPanel() {
    JPanel p= new JPanel();
    GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
    p.setLayout( gridBagLayout);
    targets= new Vector();
    for( int i= 0; i < config.targets.size(); i++) {
    targets.addElement( config.targets.elementAt( i));
    listModel= new TargetListModel( targets);
    list= new JList( listModel);
    list.addKeyListener( this);
    list.setPrototypeCellValue( "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
    JScrollPane scrollPane= new JScrollPane( list,
    ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
    ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    gbc= new GridBagConstraints();
    gbc.gridx= 0;
    gbc.gridy= 0;
    gbc.weightx= 1.0;
    gbc.weighty= 1.0;
    gbc.anchor= GridBagConstraints.CENTER;
    gbc.fill= GridBagConstraints.BOTH;
    gbc.insets= new Insets( 10, 5, 0, 0);
    ((GridBagLayout)p.getLayout()).setConstraints( scrollPane, gbc);
    p.add( scrollPane);
    JPanel p1= new JPanel();
    p1.setLayout( gridBagLayout);
    JLabel label= new JLabel( "IP Address:");
    gbc= new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.EAST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,0,5);
    ((GridBagLayout)p1.getLayout()).setConstraints( label, gbc);
    p1.add( label);
    tf_remote_address= new JTextField( 15);
    gbc= new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 0;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,0,5);
    ((GridBagLayout)p1.getLayout()).setConstraints( tf_remote_address, gbc);
    p1.add( tf_remote_address);
    label= new JLabel( "Data Port:");
    gbc= new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 1;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.EAST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,0,5);
    ((GridBagLayout)p1.getLayout()).setConstraints( label, gbc);
    p1.add( label);
    tf_remote_data_port= new JTextField( 15);
    gbc= new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 1;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,0,5);
    ((GridBagLayout)p1.getLayout()).setConstraints( tf_remote_data_port, gbc);
    p1.add( tf_remote_data_port);
    JPanel p2= new JPanel();
    addTarget= new JButton( "Add Target");
    removeTarget= new JButton( "Remove Target");
    p2.add( addTarget);
    p2.add( removeTarget);
    addTarget.addActionListener( this);
    removeTarget.addActionListener( this);
    gbc= new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 2;
    gbc.weightx = 1.0;
    gbc.weighty = 0.0;
    gbc.gridwidth= 2;
    gbc.anchor = GridBagConstraints.CENTER;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.insets = new Insets( 20,5,0,5);
    ((GridBagLayout)p1.getLayout()).setConstraints( p2, gbc);
    p1.add( p2);
    gbc= new GridBagConstraints();
    gbc.gridx= 1;
    gbc.gridy= 0;
    gbc.weightx= 1.0;
    gbc.weighty= 1.0;
    gbc.anchor= GridBagConstraints.CENTER;
    gbc.fill= GridBagConstraints.BOTH;
    gbc.insets= new Insets( 10, 5, 0, 0);
    ((GridBagLayout)p.getLayout()).setConstraints( p1, gbc);
    p.add( p1);
    TitledBorder titledBorder= new TitledBorder( new EtchedBorder(), "Targets");
    p.setBorder( titledBorder);
    return p;
    private JPanel createLocalPanel() {
    JPanel p= new JPanel();
    GridBagLayout gridBagLayout= new GridBagLayout();
    GridBagConstraints gbc;
    p.setLayout( gridBagLayout);
    JLabel label= new JLabel( "IP Address:");
    gbc= new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.EAST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,0,5);
    ((GridBagLayout)p.getLayout()).setConstraints( label, gbc);
    p.add( label);
    JTextField tf_local_host= new JTextField( 15);
    gbc= new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 0;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,0,5);
    ((GridBagLayout)p.getLayout()).setConstraints( tf_local_host, gbc);
    p.add( tf_local_host);
    try {
    String host= InetAddress.getLocalHost().getHostAddress();
    tf_local_host.setText( host);
    } catch( UnknownHostException e) {
    label= new JLabel( "Data Port:");
    gbc= new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 1;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.EAST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,0,5);
    ((GridBagLayout)p.getLayout()).setConstraints( label, gbc);
    p.add( label);
    tf_data_port= new JTextField( 15);
    gbc= new GridBagConstraints();
    gbc.gridx = 1;
    gbc.gridy = 1;
    gbc.weightx = 0.0;
    gbc.weighty = 0.0;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.NONE;
    gbc.insets = new Insets( 5,5,10,5);
    ((GridBagLayout)p.getLayout()).setConstraints( tf_data_port, gbc);
    p.add( tf_data_port);
    tf_data_port.setText( config.local_data_port);
    TitledBorder titledBorder= new TitledBorder( new EtchedBorder(), "Local Host");
    p.setBorder( titledBorder);
    return p;
    public void actionPerformed( ActionEvent event) {
    Object source= event.getSource();
    if( source == addTarget) {
    String ip= tf_remote_address.getText().trim();
    String port= tf_remote_data_port.getText().trim();
    String localPort= tf_data_port.getText().trim();
    addTargetToList( localPort, ip, port);
    if( avTransmitter != null) {
    avTransmitter.addTarget( ip, port);
    } else if( source == removeTarget) {
    int index= list.getSelectedIndex();
    if( index != -1) {
    Target target= (Target) targets.elementAt( index);
    if( avTransmitter != null) {
    avTransmitter.removeTarget( target.ip, target.port);
    targets.removeElement( target);
    listModel.setData( targets);
    } else if( source == startXmit) {
    if( startXmit.getLabel().equals( "Start Transmission")) {
    int data_port= new Integer( tf_data_port.getText()).intValue();
    avTransmitter= new AVTransmitter( this, data_port);
    avTransmitter.start( tf_media_file.getText().trim(), targets);
    avTransmitter.setLooping( cb_loop.isSelected());
    startXmit.setLabel( "Stop Transmission");
    } else if( startXmit.getLabel().equals( "Stop Transmission")) {
    avTransmitter.stop();
    avTransmitter= null;
    removeNonBaseTargets();
    listModel.setData( targets);
    startXmit.setLabel( "Start Transmission");
    } else if( source == rtcp) {
    if( rtcpViewer == null) {
    rtcpViewer= new RTCPViewer();
    } else {
    rtcpViewer.setVisible( true);
    rtcpViewer.toFront();
    } else if( source == cb_loop) {
    if( avTransmitter != null) {
    avTransmitter.setLooping( cb_loop.isSelected());
    private void removeNonBaseTargets() {
    String localPort= tf_data_port.getText().trim();
    for( int i= targets.size(); i > 0;) {
    Target target= (Target) targets.elementAt( i - 1);
    if( !target.localPort.equals( localPort)) {
    targets.removeElement( target);
    i--;
    public void addTargetToList( String localPort,
    String ip, String port) {
    ListUpdater listUpdater= new ListUpdater( localPort, ip,
    port, listModel, targets);
    SwingUtilities.invokeLater( listUpdater);
    public void rtcpReport( String report) {
    if( rtcpViewer != null) {
    rtcpViewer.report( report);
    public void windowClosing( WindowEvent event) {
    config.local_data_port= tf_data_port.getText().trim();
    config.targets= new Vector();
    for( int i= 0; i < targets.size(); i++) {
    Target target= (Target) targets.elementAt( i);
    if( target.localPort.equals( config.local_data_port)) {
    config.addTarget( target.ip, target.port);
    config.media_locator= tf_media_file.getText().trim();
    config.write();
    System.exit( 0);
    public void windowClosed( WindowEvent event) {
    public void windowDeiconified( WindowEvent event) {
    public void windowIconified( WindowEvent event) {
    public void windowActivated( WindowEvent event) {
    public void windowDeactivated( WindowEvent event) {
    public void windowOpened( WindowEvent event) {
    public void keyPressed( KeyEvent event) {
    public void keyReleased( KeyEvent event) {
    Object source= event.getSource();
    if( source == list) {
    int index= list.getSelectedIndex();
    public void keyTyped( KeyEvent event) {
    public void mousePressed( MouseEvent e) {
    public void mouseReleased( MouseEvent e) {
    public void mouseEntered( MouseEvent e) {
    public void mouseExited( MouseEvent e) {
    public void mouseClicked( MouseEvent e) {
    Object source= e.getSource();
    if( source == list) {
    int index= list.getSelectedIndex();
    if( index != -1) {
    Target target= (Target) targets.elementAt( index);
    tf_remote_address.setText( target.ip);
    tf_remote_data_port.setText( target.port);
    int index= list.locationToIndex( e.getPoint());
    public static void main( String[] args) {
    new Tx();
    class TargetListModel extends AbstractListModel {
    private Vector options;
    public TargetListModel( Vector options) {
    this.options= options;
    public int getSize() {
    int size;
    if( options == null) {
    size= 0;
    } else {
    size= options.size();
    return size;
    public Object getElementAt( int index) {
    String name;
    if( index < getSize()) {
    Target o= (Target)options.elementAt( index);
    name= o.localPort + " ---> " + o.ip + ":" + o.port;
    } else {
    name= null;
    return name;
    public void setData( Vector data) {
    options= data;
    fireContentsChanged( this, 0, data.size());
    class ListUpdater implements Runnable {
    String localPort, ip, port;
    TargetListModel listModel;
    Vector targets;
    public ListUpdater( String localPort, String ip, String port,
    TargetListModel listModel, Vector targets) {
    this.localPort= localPort;
    this.ip= ip;
    this.port= port;
    this.listModel= listModel;
    this.targets= targets;
    public void run() {
    Target target= new Target( localPort, ip, port);
    if( !targetExists( localPort, ip, port)) {
    targets.addElement( target);
    listModel.setData( targets);
    public boolean targetExists( String localPort, String ip, String port) {
    boolean exists= false;
    for( int i= 0; i < targets.size(); i++) {
    Target target= (Target) targets.elementAt( i);
    if( target.localPort.equals( localPort)
    && target.ip.equals( ip)
    && target.port.equals( port)) {
    exists= true;
    break;
    return exists;
    import java.awt.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.*;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.format.*;
    import javax.media.control.TrackControl;
    import javax.media.control.QualityControl;
    import javax.media.rtp.*;
    import javax.media.rtp.event.*;
    import javax.media.rtp.rtcp.*;
    public class AVTransmitter implements ReceiveStreamListener, RemoteListener,
    ControllerListener {
    // Input MediaLocator
    // Can be a file or http or capture source
    private MediaLocator locator;
    private String ipAddress;
    private int portBase;
    private Processor processor = null;
    private RTPManager rtpMgrs[];
    private int localPorts[];
    private DataSource dataOutput = null;
    private int local_data_port;
    private Tx tx;
    public AVTransmitter( Tx tx, int data_port) {
    this.tx= tx;
    local_data_port= data_port;
    * Starts the transmission. Returns null if transmission started ok.
    * Otherwise it returns a string with the reason why the setup failed.
    public synchronized String start( String filename, Vector targets) {
    String result;
    locator= new MediaLocator( filename);
    // Create a processor for the specified media locator
    // and program it to output JPEG/RTP
    result = createProcessor();
    if (result != null) {
    return result;
    // Create an RTP session to transmit the output of the
    // processor to the specified IP address and port no.
    result = createTransmitter( targets);
    if (result != null) {
    processor.close();
    processor = null;
    return result;
    // Start the transmission
    processor.start();
    return null;
    * Use the RTPManager API to create sessions for each media
    * track of the processor.
    private String createTransmitter( Vector targets) {
    // Cheated. Should have checked the type.
    PushBufferDataSource pbds = (PushBufferDataSource)dataOutput;
    PushBufferStream pbss[] = pbds.getStreams();
    rtpMgrs = new RTPManager[pbss.length];
    localPorts = new int[ pbss.length];
    SessionAddress localAddr, destAddr;
    InetAddress ipAddr;
    SendStream sendStream;
    int port;
    SourceDescription srcDesList[];
    for (int i = 0; i < pbss.length; i++) {
    // for (int i = 0; i < 1; i++) {
    try {
    rtpMgrs[i] = RTPManager.newInstance();
    port = local_data_port + 2*i;
    localPorts[ i]= port;
    localAddr = new SessionAddress( InetAddress.getLocalHost(),
    port);
    rtpMgrs.initialize( localAddr);
    rtpMgrs[i].addReceiveStreamListener(this);
    rtpMgrs[i].addRemoteListener(this);
    for( int k= 0; k < targets.size(); k++) {
    Target target= (Target) targets.elementAt( k);
    int targetPort= new Integer( target.port).intValue();
    addTarget( localPorts[ i], rtpMgrs[ i], target.ip, targetPort + 2*i);
    sendStream = rtpMgrs[i].createSendStream(dataOutput, i);
    sendStream.start();
    } catch (Exception e) {
    e.printStackTrace();
    return e.getMessage();
    return null;
    public void addTarget( String ip, String port) {
    for (int i= 0; i < rtpMgrs.length; i++) {
    int targetPort= new Integer( port).intValue();
    addTarget( localPorts[ i], rtpMgrs[ i], ip, targetPort + 2*i);
    public void addTarget( int localPort, RTPManager mgr, String ip, int port) {
    try {
    SessionAddress addr= new SessionAddress( InetAddress.getByName( ip),
    new Integer( port).intValue());
    mgr.addTarget( addr);
    tx.addTargetToList( localPort + "", ip, port + "");
    } catch( Exception e) {
    e.printStackTrace();
    public void removeTarget( String ip, String port) {
    try {
    SessionAddress addr= new SessionAddress( InetAddress.getByName( ip),
    new Integer( port).intValue());
    for (int i= 0; i < rtpMgrs.length; i++) {
    rtpMgrs[ i].removeTarget( addr, "target removed from transmitter.");
    } catch( Exception e) {
    e.printStackTrace();
    boolean looping= true;
    public void controllerUpdate( ControllerEvent ce) {
    System.out.println( ce);
    if( ce instanceof DurationUpdateEvent) {
    Time duration= ((DurationUpdateEvent) ce).getDuration();
    System.out.println( "duration: " + duration.getSeconds());
    } else if( ce instanceof EndOfMediaEvent) {
    System.out.println( "END OF MEDIA - looping=" + looping);
    if( looping) {
    processor.setMediaTime( new Time( 0));
    processor.start();
    public void setLooping( boolean flag) {
    looping= flag;
    public void update( ReceiveStreamEvent event) {
    String timestamp= getTimestamp();
    StringBuffer sb= new StringBuffer();
    if( event instanceof InactiveReceiveStreamEvent) {
    sb.append( timestamp + " Inactive Receive Stream");
    } else if( event instanceof ByeEvent) {
    sb.append( timestamp + " Bye");
    } else {
    System.out.println( "ReceiveStreamEvent: "+ event);
    tx.rtcpReport( sb.toString());
    public void update( RemoteEvent event) {
    String timestamp= getTimestamp();
    if( event instanceof ReceiverReportEvent) {
    ReceiverReport rr= ((ReceiverReportEvent) event).getReport();
    StringBuffer sb= new StringBuffer();
    sb.append( timestamp + " RR");
    if( rr != null) {
    Participant participant= rr.getParticipant();
    if( participant != null) {
    sb.append( " from " + participant.getCNAME());
    sb.append( " ssrc=" + rr.getSSRC());
    } else {
    sb.append( " ssrc=" + rr.getSSRC());
    tx.rtcpReport( sb.toString());
    } else {
    System.out.println( "RemoteEvent: " + event);
    private String getTimestamp() {
    String timestamp;
    Calendar calendar= Calendar.getInstance();
    int hour= calendar.get( Calendar.HOUR_OF_DAY);
    String hourStr= formatTime( hour);
    int minute= calendar.get( Calendar.MINUTE);
    String minuteStr= formatTime( minute);
    int second= calendar.get( Calendar.SECOND);
    String secondStr= formatTime( second);
    timestamp= hourStr + ":" + minuteStr + ":" + secondStr;
    return timestamp;
    private String formatTime( int time) {
    String timeStr;
    if( time < 10) {
    timeStr= "0" + time;
    } else {
    timeStr= "" + time;
    return timeStr;
    * Stops the transmission if already started
    public void stop() {
    synchronized (this) {
    if (processor != null) {
    processor.stop();
    processor.close();
    processor = null;
    for (int i= 0; i < rtpMgrs.length; i++) {
    rtpMgrs[ i].removeTargets( "Session ended.");
    rtpMgrs[ i].dispose();
    public String createProcessor() {
    if (locator == null) {
    return "Locator is null";
    DataSource ds;
    DataSource clone;
    try {
    ds = javax.media.Manager.createDataSource(locator);
    } catch (Exception e) {
    return "Couldn't create DataSource";
    // Try to create a processor to handle the input media locator
    try {
    processor = javax.media.Manager.createProcessor(ds);
    processor.addControllerListener( this);
    } catch (NoProcessorException npe) {
    return "Couldn't create processor";
    } catch (IOException ioe) {
    return "IOException creating processor";
    // Wait for it to configure
    boolean result = waitForState(processor, Processor.Configured);
    if (result == false)
    return "Couldn't configure processor";
    // Get the tracks from the processor
    TrackControl [] tracks = processor.getTrackControls();
    // Do we have atleast one track?
    if (tracks == null || tracks.length < 1)
    return "Couldn't find tracks in processor";
    // Set the output content descriptor to RAW_RTP
    // This will limit the supported formats reported from
    // Track.getSupportedFormats to only valid RTP formats.
    ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
    processor.setContentDescriptor(cd);
    Format supported[];
    Format chosen;
    boolean atLeastOneTrack = false;
    // Program the tracks.
    for (int i = 0; i < tracks.length; i++) {
    Format format = tracks[i].getFormat();
    if (tracks[i].isEnabled()) {
    supported = tracks[i].getSupportedFormats();
    // We've set the output content to the RAW_RTP.
    // So all the supported formats should work with RTP.
    // We'll just pick the first one.
    if (supported.length > 0) {
    if (supported[0] instanceof VideoFormat) {
    // For video formats, we should double check the
    // sizes since not all formats work in all sizes.
    chosen = checkForVideoSizes(tracks[i].getFormat(),
    supported[0]);
    } else
    chosen = supported[0];
    tracks[i].setFormat(chosen);
    System.err.println("Track " + i + " is set to transmit as:");
    System.err.println(" " + chosen);
    atLeastOneTrack = true;
    } else
    tracks[i].setEnabled(false);
    } else
    tracks[i].setEnabled(false);
    if (!atLeastOneTrack)
    return "Couldn't set any of the tracks to a valid RTP format";
    // Realize the processor. This will internally create a flow
    // graph and attempt to create an output datasource for JPEG/RTP
    // audio frames.
    result = waitForState(processor, Controller.Realized);
    if (result == false)
    return "Couldn't realize processor";
    // Set the JPEG quality to .5.
    setJPEGQuality(processor, 0.5f);
    // Get the output data source of the processor
    dataOutput = processor.getDataOutput();
    return null;
    static SessionAddress destAddr1, destAddr2;
    * For JPEG and H263, we know that they only work for particular
    * sizes. So we'll perform extra checking here to make sure they
    * are of the right sizes.
    Format checkForVideoSizes(Format original, Format supported) {
    int width, height;
    Dimension size = ((VideoFormat)original).getSize();
    Format jpegFmt = new Format(VideoFormat.JPEG_RTP);
    Format h263Fmt = new Format(VideoFormat.H263_RTP);
    if (supported.matches(jpegFmt)) {
    // For JPEG, make sure width and height are divisible by 8.
    width = (size.width % 8 == 0 ? size.width :
    (int)(size.width / 8) * 8);
    height = (size.height % 8 == 0 ? size.height :
    (int)(size.height / 8) * 8);
    } else if (supported.matches(h263Fmt)) {
    // For H.263, we only support some specific sizes.
    if (size.width < 128) {
    width = 128;
    height = 96;
    } else if (size.width < 176) {
    width = 176;
    height = 144;
    } else {
    width = 352;
    height = 288;
    } else {
    // We don't know this particular format. We'll just
    // leave it alone then.
    return supported;
    return (new VideoFormat(null,
    new Dimension(width, height),
    Format.NOT_SPECIFIED,
    null,
    Format.NOT_SPECIFIED)).intersects(supported);
    * Setting the encoding quality to the specified value on the JPEG encoder.
    * 0.5 is a good default.
    void setJPEGQuality(Player p, float val) {
    Control cs[] = p.getControls();
    QualityControl qc = null;
    VideoFormat jpegFmt = new VideoFormat(VideoFormat.JPEG);
    // Loop through the controls to find the Quality control for
    // the JPEG encoder.
    for (int i = 0; i < cs.length; i++) {
    if (cs[i] instanceof QualityControl &&
    cs[i] instanceof Owned) {
    Object owner = ((Owned)cs[i]).getOwner();
    // Check to see if the owner is a Codec.
    // Then check for the output format.
    if (owner instanceof Codec) {
    Format fmts[] = ((Codec)owner).getSupportedOutputFormats(null);
    for (int j = 0; j < fmts.length; j++) {
    if (fmts[j].matches(jpegFmt)) {
    qc = (QualityControl)cs[i];
    qc.setQuality(val);
    System.err.println("- Setting quality to " +
    val + " on " + qc);
    break;
    if (qc != null)
    break;
    * Convenience methods to handle processor's state changes.
    private Integer stateLock = new Integer(0);
    private boolean failed = false;
    Integer getStateLock() {
    return stateLock;
    void setFailed() {
    failed = true;
    private synchronized boolean waitForState(Processor p, int state) {
    p.addControllerListener(new StateListener());
    failed = false;
    // Call the required method on the processor
    if (state == Processor.Configured) {
    p.configure();
    } else if (state == Processor.Realized) {
    p.realize();
    // Wait until we get an event that confirms the
    // success of the method, or a failure event.
    // See StateListener inner class
    while (p.getState() < state && !failed) {
    synchronized (getStateLock()) {
    try {
    getStateLock().wait();
    } catch (InterruptedException ie) {
    return false;
    if (failed)
    return false;
    else
    return true;
    * Inner Classes
    class StateListener implements ControllerListener {
    public void controllerUpdate(ControllerEvent ce) {
    // If there was an error during configure or
    // realize, the processor will be closed
    if (ce instanceof ControllerClosedEvent)
    setFailed();
    // All controller events, send a notification
    // to the waiting thread in waitForState method.
    if (ce instanceof ControllerEvent) {
    synchronized (getStateLock()) {
    getStateLock().notifyAll();
    import java.io.*;
    import java.util.*;
    public class Config {
    private String pathPrefix;
    public String local_data_port;
    public Vector targets;
    public String media_locator;
    public Config() {
    pathPrefix= System.getProperty( "user.home") + File.separator;
    read();
    public void read() {
    targets= new Vector();
    try {
    String path= pathPrefix + "xmit.dat";
    FileInputStream fin= new FileInputStream( path);
    BufferedInputStream bin= new BufferedInputStream( fin);
    DataInputStream din= new DataInputStream( bin);
    local_data_port= readString( din);
    int n_targets= din.readInt();
    for( int i= 0; i < n_targets; i++) {
    String ip= readString( din);
    String port= readString( din);
    targets.addElement( new Target( local_data_port, ip, port));
    media_locator= readString( din);
    fin.close();
    } catch( IOException e) {
    System.out.println( "xmit.dat file missing!");
    local_data_port= "";
    media_locator= "";
    public void write() {
    try {
    String path= pathPrefix + "xmit.dat";
    FileOutputStream fout= new FileOutputStream( path);
    BufferedOutputStream bout= new BufferedOutputStream( fout);
    DataOutputStream dout= new DataOutputStream( bout);
    writeString( dout, local_data_port);
    dout.writeInt( targets.size());
    for( int i= 0; i < targets.size(); i++) {
    Target target= (Target) targets.elementAt( i);
    writeString( dout, target.ip);
    writeString( dout, target.port);
    writeString( dout, media_locator);
    dout.flush();
    dout.close();
    fout.close();
    } catch( IOException e) {
    System.out.println( "Error writing xmit.dat!");
    public String readString( DataInputStream din) {
    String s= null;
    try {
    short length= din.readShort();
    if( length > 0) {
    byte buf[]= new byte[ length];
    din.read( buf, 0, length);
    s= new String( buf);
    } catch( IOException e) {
    System.err.println( e);
    return s;
    public void writeString( DataOutputStream dout, String str) {
    try {
    if( str != null) {
    dout.writeShort( str.length());
    dout.writeBytes( str);
    } else {
    dout.writeShort( 0);
    } catch( Exception e) {
    e.printStackTrace();
    public void addTarget( String ip, String port) {
    targets.addElement( new Target( "", ip, port));
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.media.rtp.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    public class RTCPViewer extends JFrame implements ActionListener, KeyListener,
    MouseListener, WindowListener {
    private JList list;
    private Vector reports;
    private RtcpListModel listModel;
    private JButton clear;
    private JButton start;
    private boolean recording;
    public RTCPViewer() {
    setTitle( "JMF/RTCP Tracer");
    re

    I'm also getting some really bad sound quality on facebook notifications. I've been forced to disable them they sound horrible like they are clipping.
    Trying to figure out if this is a problem on all Late 2013 15" macbook pros or if mine is defective? This occurs even at around 20-30% volume levels with the Facebook notification sound problems...

  • The Critical Problems for Creating Standby Database

    The Critical Problems for Creating Standby Database:(I want to create a physical standby database on the same system of the primary database)
    1. Should I copy all the backup datafiles, standby controlfile and password file to a same directory before the first time to mount the standby database?
    2. Before mounting the standby database, Should I change the datafile's name to a new one in the standby controlfile? How to change them?
    3. When issuing the command to mount the standby database, should I specify the controlfile's name.(using which controlfile to mount)
    These problems are not clearly secified in Oracle documentations.

    Can you point us to the Windows specific documentation you refer to?
    The parameter DB_FILE_NAME_CONVERT should take care of the new mapping for your datafiles (and LOG_FILE_NAME_CONVERT for logs), so you should be able to put them where you want and use the parameter to point Oracle to the correct location. You should not need to change the name in the controlfile.
    Place your standby controlfiles where you have the control files defined in your parameter file and Oracle should recofgnise that it is a standby db. You should not need to specify which controlfiles to use (if this is even possible), your CONTROL_FILES init parameter points to them.
    Not sure about the password file....my instances are on separate boxes and the password file has the same name on both primary and standby.

  • Last boot time data error while collecting hardware inventory in SCCM for windows embedded devices.

    In our SCCM 2007 environment every day hardware inventory collects data about the last boot time and each time the data is incremented by 1 minute.
    This data has been collected from sql.
    Can anybody help me on this.
    Regard's
    Kanik Garg

    Hi Garth
    I checked the Time listed on client machine manually connecting through WMI. Check this
    Also I queried for the GS table.
    Name0                      LastBootUpTime0                             
    timestamp
    CA23251KVS02          2014-03-21 04:10:00.000           2014-04-28 05:36:50.000 
    Here I found that on every inventory the lastbootup time changes by 1 minute. And it is happening for 100's of devices.
    Any clue Why this is happening ?
    Kanik

Maybe you are looking for

  • Work order that is open but closed in IW46

    Hi PM Gurus, I am trying to process a work order in the error log (IW46) but get the message that the order is closed. I have checked the order and it is not closed (it was just recently opened). It there something that has to be run before the error

  • Recovering computer

    My computer needs to be recovered because of problems with not being able to burn which just cannot be fixed. After I put in the recovery CD and it goes back to the original format like when I first bought it, how do I get all my songs and informatio

  • ICal won't refresh appointments unless i click on each day

    Please help! When I enter an appointment on my iPhone and synch to iCal, the appointment doesn't show up in month or week view unless I click on the particular day of the appointment. In other words, the new appointment is actually synched to iCal bu

  • Problems using DDL & EXECUTE IMMEDIATE in package

    Hi... I have an 8i package in which I am trying to execute some DDL via EXECUTE IMMEDIATE to create temporary tables from which I then populate a REF_CURSOR by selecting from the last table created in the DDL. The problem is that the compiler doesn't

  • Trouble installing disk locked

    Hi all, I downloaded and attempted to install Mountain Lion. Unfortunately, it failed. The error says my disk is locked. I looked at my partitions, and I do not have any. I really need to use my machine, and feel pretty frustrated at this point. Can