Problem is having more than one FrameAccess object running in multithreads

Hi all,
I have a problem with my system which uses JMF for frame capture for frame processing. The system flow is like this -
I use a FrameAccess.java (modified from the one provided by Sun) to grab frames. I use 5 different threads to create an associated FrameAccess object (i.e. one thread owns its own FrameAccess object ). And then they will do their own processing (all of them are implementing motion estimation thing using buffered image from the frame).
The problem is , when I examine the frames captured from the 5 threads, something irregular happened.
For example, the thread A (capturing video A) may return frames captured from video C. such scenairo happened without signs and patterns. Sometimes a thread even return something like half frame from video C and half from video B.
I would like to know if there is any way to check if it is the problem of JMF (can't synchronize frame capturing), or it's the problem of FrameAccess object (but they are in five independent threads ><")
Thank you very much...

It is a problem with how you are handling threads.
Thread one calls frame access, then thread 2 calls frame access, and it is possible that thread one will only get half a frame.
You will probably have success by syncronizing your calls to frameaccess(lock), and then unlock when that thread has a complete frame.
This way only one thread will access frame access, at any one time.
I have had this exact problem, when trying to capture every single frame, save it to jpeg.
Half the problem was writing to disk before the frame was complete, thus showing have a picture.

Similar Messages

  • Can i Bind more than one Model object to the Custom controller or not

    Hi All, I trying to bind more than one model object to the custom controller, Both the model objects contains same attribute name called ( output). Both model objects created on to top of the BAPI. So when i bind first model object to the custom controller will work fine. When i am trying to bind the second model object to the same controller. This second model object also having the same attribute name called "output" . So it is giving an error of "Duplicate context element "Detail". Rename or uncheck duplicate elements.
    can i assign more than one model object to the single controller or not?
    But in the reference document, it has given that , we can create model object with more than one bapi.So in this case if both the bapis contains any element with the same name will also be problem. Any body give me the solution.
    Initially we have created one custom controller for each model object. But later i realized that, why con't we use same controller for all the model object. Because, the custom controller context is the public context. this context shared across all the view controllers.
    The concept which I am trying to do is right or wrong?

    Hi Vishal,
    of course, you can bind one controler to many models. When the same name occours you can simply RENAME binded node in controler.
    Regards
    Bogdan

  • Problem with printing more than one page (ghostscript broken?)

    Hello,
    since one of the last package updates I have problems with printing more than one page. The print problems occurs as well with pdf files as well with printing websites. I use an actual KDE system with commercial turboprint printer driver. The first page always prints fine, but all consecutive pages are corrupted.  As from a similar problem some months ago, I assume a broken ghostscript package. I tried to downgrade ghostscript to check that, but I get depency problems:
    root@arch32 dieter]# ls -l /var/cache/pacman/pkg/ghostscript-*
    -rw-r--r-- 1 root root  9906288 21. Mär 2010  /var/cache/pacman/pkg/ghostscript-8.71-3-i686.pkg.tar.xz
    -rw-r--r-- 1 root root 11402624  8. Okt 22:44 /var/cache/pacman/pkg/ghostscript-9.00-1-i686.pkg.tar.xz
    [root@arch32 dieter]# pacman -U /var/cache/pacman/pkg/ghostscript-8.71-3-i686.pkg.tar.xz
    Löse Abhängigkeiten auf...
    Suche nach Zwischen-Konflikten...
    Fehler: Konnte den Vorgang (Kann Abhängigkeiten nicht erfüllen) nicht vorbereiten
    :: libspectre: benötigt ghostscript>=9.00
    [root@arch32 dieter]#
    Anyone else having printing problems or a solution for my problem?
    Thanks, Dieter

    This may not be related but I had a problem printing a pdf today whereby the second page got corrupted. The same pdf had printed fine several months ago. I realised that (long story) for some reason I had switched drivers (HP printer) from hpijs to hpcups. I installed the printer again as a "new" printer using the hpijs driver and it printed properly this time.
    So it may be that the bug causes issues with some drivers. You could try an alternative driver for the printer as temporary workaround?

  • Startup issue when having more than one database on machine

    Startup issue when having more than one database on machine:
    I’ve installed two databases.
    When I shutdown one of the database and try to start it up using
    Startup pfile=’…location..’;
    I get ora-12514: TNS: listener does not currently know of service rquirest in connect descriptor
    when I try it again after 3 seconds, I get a new error, ora-01041: internal error. Hostdef extension doesn’t exist
    Shutdown and Startup gave no problems when I had one database. Why am I getting problems when I have two databases?
    I’m using: show parameter pfile|spfile; to make sure I have the right parameter locations, so the error shouldn’t be from location.
    I’ve never installed two databases on one machine, so maybe I’m making a first-timer’s error.
    Anyone know how to get this working, i.e. starting and stopping DB without issues?
    Using oracle 11gR2 on Windows 7 64bit, all is working normal.
    Thanks,
    Ayman
    Edited by: aymanzone on Jun 15, 2011 9:27 AM

    aymanzone wrote:
    my oracle_sid is set to the name of one of my databases
    echo %oracle_sid%
    shows me the name of my first database.
    Still not working though.
    When I start the services of both databases using Services, I can connect and run queries from both of the database.
    Edited by: aymanzone on Jun 15, 2011 11:47 AMFirstly ... the Oracle Service for the instance should be started for the DB you are trying to connect or start.
    Next ... from the command prompt:
    set oracle_sid=<Instance_Name>
    sqlplus sys as sysdba
    startup pfile='location of the respective db pfile'
    Now, if you want to start or connect to another DB which is on the same server (again assuming the Service is STARTED) ...
    From the same command prompt session or other ....
    set oracle_sid=<Other_Instance_Name>
    sqlplus sys as sysdba
    startup pfile='location of the respective db pfile'
    Edited by: Srikanth on Jun 16, 2011 12:27 AM

  • Dragging more than one display object in flex3

    As per my knowledge, we can drag and drop only one display object at a time.... What should i do if i want to drag more than one display object together as a group.
    I am having a canvas and inside it i am having a box..... In that box I am having many Panels.... Now i can create a group of adjascent panels.... And i can drag that panel group to some other place in that box only....
    So how to drag a group of display objects together.

    You can use custom code for that.  Flex doesn't use the Flash Player's dragging API.  It monitors mouse activity instead.  There is an example in Panel.as.  You can extend it to move more than one panel.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Can i open more than one Resultset object

    hi in my program i have to retrive data from three table and the data from three
    table i have to use in another one
    i wanna know that can we open more than one ResultSet object within one
    try{
    }catch{] block ( i means ResultSet rs = st.excuteQuery(query) more than one time for different -different tables)
    or there is any other way to do this

    You can only have one active result set per statement at a time.
    Depending on the driver you are using you might be able to have more than one active statement (and result set) on one connection. Or not.
    Try catch has nothing to do with that.
    If you are nesting result sets then it is likely you should be using a join (SQL) which would then only require one result set.

  • Logical table having more than one Logical table sources

    Hi ,
    Is it possible a logical table has 2 logical table sources and there is no join between the underlying table of logical table sources?
    What will happen if we create the request which contains one attribute from each source?
    Will BI server return records with Cartesian join?
    Is it mandatory if logical table is having more than one logical table sources(exp. Logical table sources are X,Y and underlying table is A,B respectively),
    The underlying tables (A&B) must be joined ?
    Can someone explain the logic behind the logical table sources? How does it work?
    Any reference of document will be appreciable.
    Thanks,Ashish

    Hi Stijn,
    Thanks for response.
    You are saying that Oracle BI server will run a query against both tables and combine the results. But if there is no possibilty of any type of join, how BI server will combine the results from both tables.
    I have a scenario like below -
    Suppose i have 2 tables A and B at physical layer. Both table contains the information of any common subject area.
    But there is no attribute is common between A and B so not any kind of join possible between two.
    Now if i create a logical table with 2 logical table source A and B and create any request having one column from A and one from B ,
    What will happen? How BI server will combine the result? Will BI server not result records after Cartesian join.
    How can i model this scenario?

  • In which IT To Date is not allowed & not having more than one record

    Hi all,
    Could you please tell me "In which IT To Date is not allowed & not having more than one record ?"
    Thanks in advance
    Regards,
    Asiya

    Hi,
    Just go through IT0003 and see if it fulfills the requirements or not.
    Param

  • Charts - more than one dimension object on the x axis of the chart

    Is it possible to add more than one dimension object on X axis of the chart ? I have two reports - one for bookings revenue for rolling 12 months period and other for forecast revenue for forward going 12 months. I have been asked by my manager to produce one chart showing 12 months rolling bookings plus revenue forcast going forward 12 months in one chart. Is it possible? and if so then how to go about to accomplish it.
    Thanks for the help in advance.
    - Fizza

    hi
    i think it is posible. for exaple  on x axis can include year, months.  on y axis may include sales revenue.
    or
    what dimensions are you going to put on the x axis and y axis?

  • Problem with starting more than one SwingWorker

    Hello
    I wonder if anyone could tell me if there are known problems with starting more than one SwingWorker thread at once?
    In response to an action the user performs, I need to obtain several lists of things from the server. This includes a couple of server-calls, and I want to do the server calls in a thread outside the awt-event thread. So I start a couple of SwingWorker-threads. This works fine sometimes, but not always. Sometimes code in some of the SwingWorkers finished method does not update the ui. I can see that the correct calls are made, but the ui is still not updated correctly. The problem seems to be related to the sequence of when the different thread are finished. For instance, if the sequence is like this:
    SwingWorker1.construct
    SwingWorker2.construct
    SwingWorker1.finished
    SwingWorker2.finished
    Things go fine, but if the sequence is:
    SwingWorker1.construct
    SwingWorker1.finished
    SwingWorker2.construct
    SwingWorker2.finished
    the ui-updates in SwingWorker1.finished is not done correctly.
    Can anyone help me with this?

    This is the point:
    In one SwingWorker thread you have 1 construct method, and 1 finish method - which are both invoked once.
    Therefore you only have one opportunity to update the gui in that thread. This forces you to use many threads if you want regular updates, which I try to avoid.
    Therefore, the solution!
    Have a loop in the construct method that executes the algorithm accordingly, updating the gui accordingly at regular times, maintaining just the 1 thread - becomes easier and nicer for the programmer and the JVM.
    The finish method in this case is to update the gui when all iterations are finished.
    There is nothing wrong with this. Just because you have a finish method that is called in the event-dispatching thread doesn't mean that all your update code must be in there.
    What you MUST ensure is that ALL your update code is executed in the event-dispatching thread, that is the most important thing. After all, SwingWorker is just a helper class, not the gospel template of how to update a gui.

  • External e-mail to more than one organizational object

    Is there any way to send an external e-mail in a mail step on the WF, to more than one organizational object, without getting their mails?.
    I mean, I have a table with OTYPE and OBJID
    (example:
    line 1: 'US' 'USERNAME'
    line 2: 'O' '123456'
    line3:  'S' '56789'
    I can send them a work-item or a notification, but can I send them an external e-mail in a mail step?
    If not, how can I get their mails with an FM?
    Thanks!!!!

    Hi,
    send an external e-mail in a mail step on the WF, to more than one organizational object
    1) Get the Email ids of the Org. Objects and stored it in a Multiline Container element and assign it in the 'Send Mail' step
    2) Other wise, you have to create a Method in the BO, in the Method get all the email ids of the Org. Object. Then using the Function Module  [SO_NEW_DOCUMENT_ATT_SEND_API1|https://wiki.sdn.sap.com/wiki/x/nYKdAw]  to send the email.
    Regards,
    Surjith
    Edited by: surjith kumar on Jun 9, 2009 6:53 PM

  • Problem with Assigning more than one value to GROUP dynamically

    Hi,
    I have a problem with assigning more than one value to GROUP varible dynamically.
    I am able to assign only one value dynamically through Initialization block
    I have even tried with the ROW-WISE initialization blocks..
    using this query..
    SELECT 'GROUP', G.GROUP_NAME
    FROM GROUP_MAP G
    WHERE G.USER_NAME = ':USER'
    if GROUP_1, GROUP_2 are two groups to be associated,
    through this, i'm getting " GROUP_1;GROUP_2 " into GROUP variable ( seen from Narative view )
    And the properties and securities of this Groups are not inherited.
    Please let me know if there is any other way to Populate the GROUP variable dynamically with more than one value.
    Thank you.,

    Hi,
    i finally got in this way..
    i had created a function which takes USER_NAME as input and returns a string that contains the GROUP names with semicolon delimeted..
    Though it is same as that of ROW-WISE initialization,
    the properties of those groups are also being inherited..
    Now, i can assign more than one groups and its properties to a user dynamically.

  • More than one URL object

    OK - I've managed to get this far without posting to the forum with this project, which shows that I'm actually beginning to grasp java.
    I'm trying to get graphics to show up on JButton in jar files - I know that you're thinking that I should search the forums and I've already done that and found part of the solution - which is so create a URL object which uses the getResource method.
    This works when I have one button - and works fine - when I have more than one for some reason the whole application crashes. If I have two buttons implemented through this way the first works fine, but the second causes the application to crash and I get:
    Uncaught error fetching image:
    java.lang.NullPointerException
            at sun.awt.image.URLImageSource.getConnection(Unknown Source)
            at sun.awt.image.URLImageSource.getDecoder(Unknown Source)
            at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
            at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
            at sun.awt.image.ImageFetcher.run(Unknown Source)My code is
    if (letter=="a"){
         URL urlA = JIEventFrame.class.getResource("alphabet_media/Angelfish.png");     
         ImageIcon picA = new ImageIcon(Toolkit.getDefaultToolkit().getImage(urlA));
              jiEventOK = new JButton(picA);  jiEventText = new JLabel ("a, Angelfish", JLabel.CENTER);}
    if (letter=="b"){
              URL urlB = JIEventFrame.class.getResource("alphabet_media/Baloons.png");     
              ImageIcon picB = new ImageIcon(Toolkit.getDefaultToolkit().getImage(urlB));
              jiEventOK = new JButton (picB); jiEventText = new JLabel ("b, Balloons", JLabel.CENTER);}letter is a String which is passed from a preceding class which creates an instance of this one.
    Any ideas why one would work and not two, even though they've got different identifiers ?
    Thanks in advance.
    adam

    Map pngs = new HashMap();
    pngs.put("a", "Angelfish");
    pngs.put("b", "Balloons");
    // and so on
    Your code which you were having a
    problem then doesn't need to have 26 if-statements, it
    should look more like this:
    String pngName = (String)pngs.get(letter);
    URL url = JIEventFrame.class.getResource("alphabet_media/" + pngName + ".png");
    ImageIcon pic = new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));
    jiEventOK = new JButton(pic);
    jiEventText = new JLabel (letter + ", " + pngName,
    JLabel.CENTER);Okay - this is a neat looking piece of code and I'm really learning. Many thanks for this. However, I'm not sure what pngName will be in this instance - will it be "a" + "Angelfish" or will it be "a", or "Angelfish"? How are the two parts separated, if at all? I've read the API for HashMap, but it isn't all that clear. I'll scour the tutorials next. How does the String know that letter is the first element "a" and that pngName is "Angelfish"?
    I want to have an ImageIcon called Angelfish.png and then another JLabel where I will show the text "a, Angelfish".
    Also there is a smallish problem in that not all the graphics are png; I also have jpg, but I could fix that by reformatting them. However, it's not an ideal fix.

  • Iphone 3g pop3 email problems when having more than 1 email account.

    sending emails from more than one pop email account...
    after checking and re-checking settings for pop email accounts [ follow the apple settings example for setting the first email account] i found that the iphone 3G does not support having more then one smtp server in other words it does not supports - different smtp servers.] so the only way to make two or more email accounts to work correctly is to use only one smtp server for all the email accounts and this will allow to send emails from more than one email account.
    i think this is a bug on the iphone 3G......!!

    I access two email accounts with the iPhone's Mail client - an IMAP account and a POP account. The accounts have different authenticated SMTP servers and I have no problems sending with either account.

  • Added more than one service objects

    Is it possible to add more than one attachment to the service for object section? It is possible to delete more than one attachments..
    Edited by: Lien Thach on Jan 14, 2010 3:20 PM

    The user wants to add more then one attachment documents in SAP..It will allow for them to delete more than one documents. can this be done through configuration? If so, can you please show me how?

Maybe you are looking for

  • Mac book wont turn off

    I have an older (5years?) MacBookPro.  It was making a clicking sound, which continued for quite a while.  No programs were running.  I could not shut down, or force quit. Finally, I just pressed the power key until it turned off. I waited 15 minutes

  • Update system time/date

    Hi, I would like to know if i can update the system time/date using java... Thanks, Thiago Nascimento

  • Convert square wave to saw tooth wave

    Hi all i need your help. I have a square wave data in for of an array. Can any one of you suggest me a method to convert this data into saw tooth data. What i mean is that i want to convert a square wave to a saw tooth wave with minimum value 0. Your

  • Production Order Settlement with error

    Dear Experts! I am facing with problems like this: Production A was created in 11.2010, then user posted materials costs into this order is 10USD, and the total input cost of this order is 10USD (no GR in this month). In the end of 11.2010, when runn

  • New_Time Zone not supporting for our time.

    Hi There is a requirement for us to store the time in GMT. I am aware there is this function NEW_TIME(SYSDATE, 'EST', 'GMT'); But this supports very few time zones. I am in GMT+5:30. (INDIA) Is there any other ready function available for convertion?