Cloned datasource, but unable to use the both at the same time

I used the AVTransmit java application as sampe to build my applet for transmitting realtime image from the webcam. I desired that it has a container to contain the player and it has a button for RTP transmission.
I have used the Manager.createCloneableDataSource(ds) to clone the datasource from webcam.
The applet can display realtime image on the container. While I clicked the button, the container hanged up and then changed to black. But the data can transmit by RTP part. I can receive the transmitted image in another PC.
Do you have any idea ?
     public void init() {
          Component vc = null;
          Component cp = null;
          JPanel visualContainer = new JPanel();
          visualContainer.setLayout(new BorderLayout());
          JPanel mainPanel = new JPanel();
          mainPanel.setLayout(new GridLayout(2,1));
          JPanel inputPanel = new JPanel();
          inputPanel.setLayout(new GridLayout(2,1));
          Vector vlist = CaptureDeviceManager.getDeviceList(new VideoFormat(VideoFormat.YUV));
          for (int i = 0; i < vlist.size(); i++) {
               CaptureDeviceInfo vinfo = (CaptureDeviceInfo)vlist.elementAt(i);
               locator = vinfo.getLocator();
          try {
               ds = Manager.createDataSource(locator);
          } catch (Exception e) {
               System.err.println("Unable to create DataSource from : " + locator);
               System.exit(0);
          ds = Manager.createCloneableDataSource(ds);
          if (ds == null) {
               System.err.println("Unable to clone the DataSource");
               System.exit(0);
          try {
               player = Manager.createRealizedPlayer(ds);               
          } catch (Exception e) {
               System.err.println("Unable to create a player from the DataSource :" + e);
          player.addControllerListener(new PlayerStateListener());
          //Realize the player
          player.prefetch();
          if (!waitForPlayerState(player.Prefetched)) {
               System.err.println("Failed to realize the player");
               //return false;
          if ((vc = player.getVisualComponent()) != null)
               visualContainer.add(vc, BorderLayout.CENTER);
          if ((cp = player.getVisualComponent()) != null)
               visualContainer.add(cp, BorderLayout.SOUTH);
          player.start();
          mainPanel.add(visualContainer);
          System.out.println(player);          
          setVisible(true);
          getContentPane().setLayout(new BorderLayout());
          ipAddressField = new JTextField();
          pbField = new JTextField();
          sendButton = new JButton("Submit");
          sendButton.addActionListener(this);
          inputPanel.add(ipAddressField);
          inputPanel.add(pbField);
          inputPanel.add(sendButton);
          mainPanel.add(inputPanel);
          getContentPane().add(mainPanel);
          System.out.println("locator = " + locator);
// this is the code segment for RTP transmit
          try {
               processor = javax.media.Manager.createProcessor(ds);          
          } catch (NoProcessorException npe) {
               return "Couldn't create processor";
          } catch (IOException ioe) {
               return "IOException creating processor";
          // Wait for it to configure
          boolean result = waitForProcessorState(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.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 = waitForProcessorState(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
Many thank you in advance

Dear jcparques
Thank you for your reply.
I have tried to use the clone datasoure for player and original datasource for RTP transmission, the player displayed black and the RTP successfully, as I can get the live image by another PC. I have tried to use the clone datasoure for RTP and original datasource for player, the player worked normal and the another PC awared the participant joined. It has just waiting the data from RTP.
I sured the datasource has been cloned as I can System.out.println it, it is not a null.
Any idea. Thank you very much.

Similar Messages

  • Unable to use two wireless devices at same time

    Unable to connect an HP Laserjet 1320 thru the JetDirect ew2400 External Print Server to an imac G5 that uses the 2WIRE352 (wireless) modem for ISP access thru ATT. Either the ISP is connected and printer does not work, or the printer works but no internet access. HP Tech Spt (after 1hr 15 min.) said I need to change/access the "infrastructure" in the OSX. Is that correct? & if so, how do I do this? Do I need to hire Apple Tech Support to do this? How much will that cost. I'm ready to send the Print Server back to HP for a refund.

    Infrastructure mode means the print server joins the router's local network instead of having a separate computer-to-print server (called ad hoc mode) network. I think you need to read the print server manual on how to do that.

  • I have got an iPhone MC605J version 6.0 soft bank iphon 4 but unable to use it in India.  I am trying to use Airtel sim but the phone is showing invalid sim.  So please help me out to unlock it.

    I have got an iPhone MC605J version 6.0 soft bank iphon 4 but unable to use it in India.  I am trying to use Airtel sim but the phone is showing invalid sim.  So please help me out to unlock it.

    No one here can help you, & Apple can't/won't help you. Fact is, there is no way to get that iPhone officially unlocked. Only Softbank can authorize the official unlocking of your phone, but they won't. Softbank does not offer official unlocking for any iPhone.
    It is what it is.

  • HT3819 I have 2 Ipod touch's, one a 64gb and one an 8gb.  Whats the best way to use them both on the same itunes account?

    I have 2 Ipod touch's, one a 64gb and one an 8gb.  Whats the best way to use them both on the same itunes account?

    Click here for options.
    (64410)

  • I have a Macbook with OS X 10.5.8. I am unable to use my iPhone with the iOS 6 upgrade on iTunes.

    I have a Macbook with OS X 10.5.8. I am unable to use my iPhone with the iOS 6 upgrade on iTunes.  Apparently I cannot downgrade to iOS 5 on my iPhone. Please tell me I don't have to pay anything to be able to use my products......

    Which version of iTunes?
    iTunes 10.6.3 - http://support.apple.com/kb/DL1575
    Unless this is a new iPhone 5 I believe the older ones will work with iOS6 and iTunes 10.6.3.  If it won't, you will need to upgrade operating system version.

  • Unable to use MSN Premium for the Share function within Elements 10

    I'm unable to use MSN Premium for the Share function within Elements 10 (it seems the program does not recognize MSN Premium for a valid email program for use within the Share function of Elements 10).  Is this something than can be resolved?

    No, unfortunately. You will have to either set up the adobe email or else just use the attachments button in the MSN premium instead of sending directly from PSE.

  • I have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?

    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke the EJB's method?
    thanks!

    You'd do something like:
    <%
    //vvv this part can potentially be done in initialization
    Context ctx = getInitialContext();
    BeanHome home =
    (BeanHome)PortableRemoteObject.narrow(ctx.lookup("the.jndi.name"),
    BeanHome.class);
    Bean b = home.create();
    //^^^
    Result r = b.invokeMethod();
    %>
    "toxin" <[email protected]> wrote in message
    news:3d2e95e5$[email protected]..
    >
    i have deploy an EJB in weblogic 6.1,but how to use jsp to invoke theEJB's method?
    thanks!

  • I am running Itunes in Windows 7. Every time I exit, it restarts in a few seconds. If I restart my compter and forec close it, it does not restart, but If I use it at all the whole loop starts again.

    I am running Itunes in Windows 7. Every time I exit, it restarts in a few seconds. If I restart my compter and forec close it, it does not restart, but If I use it at all the whole loop starts again.

    Sorry, just to confirm, I DID NOT ACTUALLY ANSWER MY OWN QUESTION!
    I replied to the previous message from my iphone and I managed to hit the link to "This has answered my question" by accident!
    I AM STILL LOOKING FOR A RESOLUTION TO MY ORIGINAL PROBLEM. CAN SOMEONE ALSO NIW TELL ME HOW TO GET RID OF THE GREEN TEXT TGAT SAYS TGAT MY QUESTION IS ANSWERED? That is a pain! It should at least ask you to confirm that your question is actually answered and you didn't hit it by mistake, like I did!

  • My ipad2 was set up with my apple id, i restored it and asked my apple id and password to set it up but i havent used that id for a long time i forgot everything about it what should i do?

    My ipad2 was set up with my apple id, i restored it and asked my apple id and password to set it up but i havent used that id for a long time i forgot everything about it what should i do? And i promise to my dead body i didnt steal my ipad it was a bday gift from my mom... Can anybody help me?

    If you at least know your Apple ID you can go to this Apple Support page.
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Click on Forgot My Password.
    Try to recover or set a new password. Hopefully your email addresses still get mail from Apple.

  • Satelitte C55-A Can't Use Keyboard and Mousepad at same time

    How do I change the settings so that I can use them both at the same time? I use them both for all my games, but I can't turn with my mouse pad when im walking with my keyboard keys (W,A,S,D). Does anyone know how to change this?
    I'm on Windows 8 btw.
    Thanks,
    -Evan

    There should be a setting for that in Mouse Properties, Evan. Something like "Disable touchpad while typing."
    Also, it's a "feature" of Windows 8.1.
       Button clicks for internal touchpads and pointing sticks are not responsive while or shortly after t...
    Windows 8.1 introduces a feature that is called accidental activation prevention (AAP). AAP helps ensure that unintended taps while you type on an integrated touchpad are suppressed. When this feature is enabled, taps and clicks from an integrated touchpad or pointing stick are suppressed for a while after the last keystroke..
    -Jerry

  • Can 2 supervisor engine's ports both work at same time?

    As I know that, when 1 supervisor engine is working, another engine's ports are totally down in redundancy mode .
    Is there any way to let 2 supervisor engine's ports are both working at same time?

    The two supervisor engines in a redundant supervisor engine configuration have different responsibilities. The active supervisor engine is responsible for controlling the system bus and all line cards. All protocols are running on the active supervisor engine and it performs all packet forwarding. The standby supervisor engine does not communicate with the line cards. It receives packets from the network and populates its forwarding tables with this information, but does not participate in any packet forwarding. The relevant protocols on the system are initialized, but not active, on the standby supervisor engine. The Cisco Catalyst 6500 Series supervisor engines are hot-swappable and the standby supervisor engine can be installed in a running, active system. Also please note that redundant supervisor engines do not perform load sharing. The active supervisor engine is providing the entire packet-forwarding intelligence for the system (N+1 redundancy). If the active supervisor engine fails, the standby supervisor engine can still maintain the same system load.
    The standby supervisor engine polls the active supervisor engine through the Ethernet out-of-band channel (EOBC) every 5 to10 milliseconds to monitor the online status of the active supervisor engine. The active supervisor engine might go offline for a variety of reasons such as hardware failures, system overload conditions, memory corruption issues, removal from chassis, being reset by the operator, or real-time diagnostics-driven supervisor switchover (also known as Generic Online Diagnostics) 1. The standby supervisor engine detects this type of failure and becomes the new active supervisor engine. The Catalyst OS software on the supervisor engine is responsible for restoring the protocols, line cards, and forwarding engines to normal operation. This restoration takes place through a fast switchover or a high-availability switchover.
    HTH

  • I am living USA and Mexico for my work and I do have account in USA but is that possible to make Mexican account same time? I like to keep USA account when I'm in USA

    I am living USA and Mexico for my work and I do have account in USA but is that possible to make Mexican account same time? I like to keep USA account when I'm in USA

    If you have a valid payment method in Mexico (e.g. Mexican credit card) billed to a Mexican address then I guess you could.  There are certain disadvantages to having more than one account, but in your case I don't see they apply.  Just make sure you have copies of everything you buy from each country on backup because you will no longer be able to redownload items when you can no longer use that country's store.

  • I'm using the wordpress iOS app on my iPad, but unable to load photos directly from the iPad. Help?

    Also was unable tom type in the post subject area, just the title. do I need a Bluetooth keyboard for this? I was hoping to use my iPad to blog while traveling. Frustrating.

    You should be able to use this site without a bluetooth keyboard (I do). If you are having problems with Safari then you could try the following :
    Clearing its cache : Settings > Safari > Clear Cache (and Clear History)
    If that doesn't work then try closing Safari completely and then re-open it : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    A third option is a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    In terms of blogging there is the BlogPress app, whose desription says that it works with:
    - Blogger / BlogSpot
    - MSN Live Spaces
    - WordPress
    - Movable Type
    - TypePad
    - LiveJournal
    - Drupal
    - Joomla
    - Tumblr
    - Squarespace
    - My Opera

  • Unable to use decimal data in the datasources in the IOP RELEASE 11.1.2.1

    Hi,
    I have created a datasource of type Database and given an sql query which is fetching some of the decimal data.
    But when I am checking preview for the sql query, it is showing integer data (rouding off the decimal value) even though the field type is coming as double.
    Please let me know how to resolve this issue.
    Thanks,
    Neha

    Are you mapping your datasource to a view? -- If so, this may be due to a known issue caused by jdbc. Way to work around it is to use a table instead of a view, with number columns defined with explicit precision, as in NUMBER(10,2).

  • IPAD 1 problems after ios 5.1.1 update, itunes does not recognize IPAD.. I check the device manager, it identifies an unknown device (My ipad) but unable to use it.

    I am using the generation 1 IPAD.
    I recently updated my ios from ios 4 to ios 5.1.1, I did the restore after the update and all seemed fine as it was detected the first time.
    I tried connecting the IPAD again but it shows that the computer, itunes is not able to detect the IPAD.
    I checked on the device manager, it identifies an unknown device (IPAD) and says no software for the driver. I am using windows 7 on my laptop. I never had any such problem with the iso 4. Any suggestions as to how this can be solved?
    Thanks,
    Vinay

    Thank you, I tried uninstalling the device driver to reinstall again. After doing the scan for hardware changes, nothing flashes on the device manager. I dont see anything related to the IPAD or any other device for which driver shows unidentified device. It is as though the device is not being seen by the computer at all..
    I even tried flashing the home/sleep buttons together but that doesnt seem to identify any device either.
    Anything else I am missing?

Maybe you are looking for

  • Program that run a cron job in EP?

    Hi All, My requirement is : if a user upload a file to the specified folder in EP repository. (file will be .txt format), b'z they are the big customers to our client, so that they can just upload the order file.txt in a specified folder. after uploa

  • How to check the performance of the database instance in oracle apps 11i

    hii everybody, i want to know,how to check the performance of the database instance using oracle applications 11i.your help highly appreciated,thanks.

  • Photoshop Elements 12 doesn't work

    I don;t know why, but it doesn't work

  • How to determine purity level

    Hi everybody! Oracle determines purity levels of each stored procedure/function during validation/compilation. We can also set it "manually" by using pragma_restrict declarations. For certain dynamic maintenance processes we need to know the situatio

  • Need BAPI or RFC

    Hello Gurus,    I need to search purchase order items based on batch number......please help me whether any BAPI or RFC existing for the same  or do i need to write my own report. Thanks in advance Amarender Reddy B