Processor doesn't work correctly in saving stream to file
hi,
i write this code for saving in a file video and audio from a web cam, but when i do p.getDataOuput it returns always null. Why? help me
public void setupvideocapture()
c=getContentPane();
c.setLayout(new FlowLayout());
try
try {
p = Manager.createProcessor(new MediaLocator("vfw://0"));
} catch (Exception e) {
System.err.println("Impossibile creare il processor!" + e);
p.addControllerListener(this);
p.configure();
waitForState(p.Configured);
p.setContentDescriptor(null);
p.realize();
waitForState(p.Realized);
p.prefetch();
waitForState(p.Prefetched);
c.add(p.getVisualComponent());
if ((dest = new MediaLocator("file:"+"foo.mov")) == null) System.err.println("Impossibile costruire MediaLocator " + "dalla url: " + dest);
try {source = Manager.createDataSource(dest);
} catch (Exception e) {
System.err.println("Impossibile creare Datasource da: "+ dest);
System.err.println("Eccezione: "+e);}
catch(Exception e)
System.out.println(e);
public void actionPerformed(ActionEvent ae)
String str;
str=ae.getActionCommand();
if(str=="Play")
try
p.start();
System.out.println(p);
source=p.getDataOutput();
System.out.println(source);
sink = Manager.createDataSink(source,dest);
dataSinkListener = new MyDataSinkListener();
sink.addDataSinkListener(dataSinkListener);
sink.open();
sink.start();
} catch (Exception e) {e.printStackTrace();
else if(str=="Stop")
try
sink.stop();
dataSinkListener.waitEndOfStream(0);
sink.close();
p.stop();
p.close();
catch(Exception e)
{e.printStackTrace();
}
hi,
i write this code for saving in a file video and audio from a web cam, but when i do p.getDataOuput it returns always null. Why? help me
public void setupvideocapture()
c=getContentPane();
c.setLayout(new FlowLayout());
try
try {
p = Manager.createProcessor(new MediaLocator("vfw://0"));
} catch (Exception e) {
System.err.println("Impossibile creare il processor!" + e);
p.addControllerListener(this);
p.configure();
waitForState(p.Configured);
p.setContentDescriptor(null);
p.realize();
waitForState(p.Realized);
p.prefetch();
waitForState(p.Prefetched);
c.add(p.getVisualComponent());
if ((dest = new MediaLocator("file:"+"foo.mov")) == null) System.err.println("Impossibile costruire MediaLocator " + "dalla url: " + dest);
try {source = Manager.createDataSource(dest);
} catch (Exception e) {
System.err.println("Impossibile creare Datasource da: "+ dest);
System.err.println("Eccezione: "+e);}
catch(Exception e)
System.out.println(e);
public void actionPerformed(ActionEvent ae)
String str;
str=ae.getActionCommand();
if(str=="Play")
try
p.start();
System.out.println(p);
source=p.getDataOutput();
System.out.println(source);
sink = Manager.createDataSink(source,dest);
dataSinkListener = new MyDataSinkListener();
sink.addDataSinkListener(dataSinkListener);
sink.open();
sink.start();
} catch (Exception e) {e.printStackTrace();
else if(str=="Stop")
try
sink.stop();
dataSinkListener.waitEndOfStream(0);
sink.close();
p.stop();
p.close();
catch(Exception e)
{e.printStackTrace();
}
Similar Messages
-
Game Center doesn't work correctly
Game Center on iPod Touch 2nd Gen doesn't work correctly under iOS 4.2.1
It shows wrong language (Englist but not my native language. My region setting is right and the system language right too.)
Besides, the "Games" page only has a button "Find Game Center Games", while it should show my Game Center Games.
The Friends page shows all my friends. But when I press a friend the sub page doesn't show the game my friend and I have in common.
I've restored my device several times, but it didn't help.
How to solve it?I've had exactly the same problem on my 2nd gen since early May when it just stopped working out of the blue.
There are a few threads here on the subject. I believe that every 2nd gen is affected as I've yet to hear a 2nd gen owner say that theirs works.
Other than waiting for Apple to fix it I don't think there is a solution. -
AddChild doesn't work correctly in 11.9
comparing the two releases listed below, somehow my Flash program doesn't work correctly on the latest version anymore, nothing was changed in my program but after upgrading to the latest Flash Player, it doesn't work properly anymore, specifically, the items I add through the addChild method doesn't appear properly, was there any changes in between these versions that could have affected the addChild behavior? I'm testing with Windows 7 IE debug version and I see no script errors
Released 10/8/2013) Flash Player 11.9.900.117 (156.2 MB)
(Released 9/24/2013) Flash Player 11.8.800.175 (Win IE only) (50 MB)Could you please open a new bug report on this over at bugbase.adobe.com? When adding the bug, please include sample code, test url or a test swf so we can quickly test this out internally. If you'd like to keep this private, feel free to email the attachment to me directly ([email protected]).
Once added, please post back with the bug URL and I'll investigate internally.
-
IPhoto doesn`t work correctly with german "umlaut" (ä,ö,ü) in keywords
iPhoto doesn`t work correctly with german "umlaut" (ä,ö,ü) in keywords. They get to ä̈,ö̈, ü̈ when I write the keyword a second time. Can anybody tell me why. Thank you. Heinz
It apparently does not like non-standard English characters - use A-Z and 0-9 adn you should be OK
report to Apple - iPhoto menu ==> provide iPhoto feedback
LN -
After upgrade my iphone 4 to IOS6, sound doesn't work correctly
After upgrade my iphone 4 to IOS6, sound doesn't work correctly.
During a phone call, there is no sound. But if I turn on the speaker, there is sound. itune works fine since it's on the speaker.Dear All
i have done the same activity ( buy a new iphone 4 -> upgrade to ios5 - > configure email) with success-
than when i start to move the contacts from old mobile to iphone (using the microsim) i receive the same crash
in disgnosis e use i saw 2 dump with this title 'latestCrash-Preferences.plist and LatestCrash.plist. in each file the date is the same and i read:
Exception Tyle: EXC_CRASH (SIGABRT)
Exception code: 0x00000000, 0x00000000
Chrashed Thread: 6
in thread 6: name: Dispatch queue:
com.apple.addressBookUI.ContactsSettingPlugin
and thaan a lot of data.
Have you any idea?
thank in advance
Fabio -
Translation from CS5 to Cloud doesn't work correct, navi and linked images are broken.
Translation from CS5 to Cloud doesn't work correct, <navi> and linked images are broken.
The data of CS5 was created at another PC. I installed Cloud version into two different PC. One has had the site data since dreamweaver CS5 and it works correct in Cloud version. Another PC got the site data from remote server and it doesn't work correct. <navi> and linked image are broken.Another PC got the site data from remote server and it doesn't work correct. <navi> and linked image are broken.
This implies your site is not properly defined in DW. Go to Site > Manage Sites.
Or simply go to your other installation of DW and export the site definition file from Manage Sites.
Save it to a flash stick or other removable drive. Then import the STE file into your 2nd installation of DW.
Nancy O. -
ITunes 10.4 full screen with Win7-64bit doesn't work correctly.
iTunes 10.4 full screen with Win7-64 doesn't work correctly. I have the Windows taskbar on the left side of my screen. Maximized iTunes is panned to the left.
Same issue here. When the Windows taskbar is position on the top of the screen and then the iTunes windows is maximised, it's position is as if the Windows taskbar is at the bottom of the screen so the top of the iTunes window sits under the taskbar.
For those wanting a workaround, hold shift and right click the iTunes icon in the taskbar/quick launch bar and click restore, at least then you can adjust it to be full screen manually.
System:
Windows 7 Ultimate x64
iTunes 10.4
ATI 5750 video card -
Revision: 4028
Author: [email protected]
Date: 2008-11-06 09:04:26 -0800 (Thu, 06 Nov 2008)
Log Message:
Bug: Draining of buffered messages doesn't work correctly with long-polling.
QA: Yes - please make sure both nio and regular long-polling channels work with throttling.
Doc: No
Checkintests: Pass.
Details: Made sure that buffered messages are drained properly with all polling channels (polling, long-polling, and nio-long-polling).
Modified Paths:
blazeds/trunk/modules/core/src/flex/messaging/client/FlexClient.javaSounds like you've probably already looked but the CUPS article in the wiki led me through setting up a printer without any problems. http://wiki.archlinux.org/index.php/CUPS
The first section describes how to troubleshoot CUPS and printing problems.
I've also found a few other posts and links that may help.
http://hplipopensource.com/hplip-web/mo … eries.html
http://ubuntuforums.org/showthread.php?t=419163
Hope this helps! -
how can I avoid duplicates on contacts and how do I get contacts created on iPhone/ipad synchronized on my mac? so far it doesn't work correctly, just sometimes. same for icalendar
On your Mac, for duplicates, switching Contacts off then back on in System Preferences > iCloud may prevent duplicates.
On the iPhone / iPad tap Settings > iCloud. Make sure Contacts and Calendars are swtiched on.
Try restarting your Mac and your iOS devices when items won't sync as they should.
To restart an iOS device: Hold the On/Off Sleep/Wake button down until the red slider appears. Slide your finger across the slider to turn off iPhone. To turn iPhone back on, press and hold the On/Off Sleep/Wake button until the Apple logo appears. -
ASR1002 - For DNS it seems that NAT doesn't work correctly
Hi Folks,
For DNS it seems that NAT doesn't work correctly
The ASR 1002 works as a NAT-Router. But for DNS it seems that NAT doesn't work correctly.
All DNS packets with a frame size greater than 512byte are not processed (they donїt arrive at the DNS Server), but we can't verify if they are dropped or just not processed.Sorry guys its everytime*
-
Link on my website doesn't work correctly on my iMac. It works okay when using Safari. It also works correctly on my laptop using either browser.
We worked out my problem. My solution turned out to be: Firefox Preferences/Applications. Scroll down until you find "Portable Document Format (application)", click on it and use the dropdown menu to the right and changed "Save file" to "Use Adobe Acrobat Pro (default). I had trouble at first finding if the listing was under Adobe, Acrobat, or what so I used the search feature and found it immediately.
Hope this helps. -
Opening files with Illustrator and photoshop doesn't work, i have to drag the files from finder in to the program.
This problem appears after opening 4 a 5 files, rebooting helps another 4 a 5 times and appears again.I'd recommend reposting in the Boot Camp forum, that is where the Boot Camp and Windows gurus hang out.
Good luck. -
why does fcpx suddenly stops reading audio files? ever since i upgraded to Yosemite. Than when I check it on my hard drive it doesn't work as well. Only this file. Am in a trouble of delivering now. Any help?
Could be systems logs or some other system file growing.
Use OmniDiskSweeper or DaisyDisk to map what's being used.
Regards,
Shawn -
My AS3 Quiz Widget doesn't work correctly
First of all, yes I have set the project options to export as
"AS3" and yes, the widget is also "AS3", so there should be no
compatibility issues.
I'm a flash programmer for 10 years now and this really
brings me down to my knees whining and screaming...
I programmed a very simple widget which displays a "Yes" and
a "no" button instead of the radio-buttons you're forced to use
otherwise for this type of question.
I started with an AS3-Version which almost worked. The XML
couldn't be received correctly and the result of hitting the right
button didn't seem to have been recognized by the underlying
Captivate movie.
Then I converted it to AS2. (also setting project options to
export as as2). Everything worked immediately as expected.
Then I converted it BACK to AS3 to be sure to have the exact
same program-logic and changed everything according to the AS3
guidlines. Again, this didn't work.
I suspect that the following functions aren't properly
integrated in Captivate 4 yet:
function answeredCorrectly(isSurvey:Boolean):Boolean
This function never gets called from anywhere in the
Captivate movie whenever I click on "send" or anything! But it
really shoud be, because it's the only way to communicate the
result to Captivate.
var myXML:XML = new XML(movieHandle.widgetParams());
This one doesn't get me the Parameter I was expecting. Even
though the setInspector... and getInspector... functions work fine
and I am able to set everything in the inspector window, this one
always returns crap instead of the variables I set before using the
inspector-functions.
I included the whole code which doesn't work.
On the stage is:
btnJa => yes button
btnNein => no button
cbRightAnswer => pulldown for setting the right answer
lblRightAnswer => label for pulldown
dbg => debug window (because otherwise it would be a huge
pain in the *** debugging this)
So if anyone can spot the error, I'd be quite relieved,
because this is driving me nuts.Yay, got it running!
Sadly, the function that got it running was NOT included in
the quiz-widget Template and I really wonder why, because this will
cause some big frustrations among some users.
I implemented the answers():Array function.
And I wonder why the AS2-version did work flawlessly without
it. And why it isn't included in the AS3 widget as-files. This
could have saved me 3-4 hours of research. -
Hi,
I generally enjoy using Grapher in OS X (I am using Mountain Lion v10.8.2). However, I have repeatedly encountered what seems to be broken basic functionality in setting the limits on the display frame (View> Frame Limits…). When opening saved Grapher files with multiple valid equations in them (equations which include constant terms defined as sets of numbers), I repeatedly get the following behavior:
1. Frame limits are not correctly saved. As in, the file opens with a different view than it was saved and closed in.
2. Frame limits no longer work as expected. For example, I might set the Y axis frame limits to be -2 to 2, but the Y axis of the frame display will run from about -1.95 to about -0.35.
3 Performance is degraded. Making a change to the frame limits (for ecxample, changing the Y frame limits to -2.2 and 5 in an attempt to display something approximating the range -2 to 2) take an inordinate amount of both processor time and clock time. The spinning ball appears and hangs out far longer than is welcome, and at times seems to hang requiring a force quit of Grapher.
These problems occur regardless of coordinate system.
Is there a solution? If I create a new file and start from scratch the problems reappear. The problems reappear across a wide range of 2D equation types.
Is Grapher simply broken in this regard?
Thanks for the input.Bonjour Lexy-Lou,
You are right, the bug was born with Grapher as you may read on the website
<http://y.barois.free.fr/grapher/> :
Grapher’s bugs and their remedies (OS X in French).
Bug nr. 1. (Grapher 1.1, 2.0, 2.1, 2.2, 2.3). When modifying the main 2D window size, the graph length and height already formatted (menu Format) are changed : axis scale values stay the same, added objects remain same size on the same places (unit pixel) relative to the graph left upper corner ; but the graph view changes for the ratio H/L do so : very annoying !
The remedy : To restore the 2D graph after changing the window size : menu Format > Layout > Size > redo the initial choice (paper size or L and H values)… or avoid having to do so by selecting a window large enough to begin with.
Proposed correction : making the graph size independent of the main window’s one.
Bug nr. 2. (Grapher 1.1, 2.0, 2.1, 2.2, 2.3). Saving is wrong in 2D (menu File > Save, Save as, Save a copy as). Are not seved : the last location on the screen of the main window, the graph size, the maximum and minimum values of the ordinate scale : very very annoying !
Note : The new windows of Grapher 1.1 (Grapher secondary window > New Graph > 2D or 3D Graph) always open in the same place on the screen( OS X 10.4.11 configured in French) depending on the language used by Grapher : if it’s English, well placed and covering most of the screen, if it is French, the windows are half length but same height and are located on the right side of the screen. This anomaly disappeared with Grapher 2.0, 2.1, 2.2 (English or French).
The remedy : to restore the 2D graph after opening a GCX files (.gcx) : menu Format > Layout > Size > redo the initial choice (Paper size or L and H values) to be done twice ; then menu View > Frame limits... > enter minimum and maximum vaues of the y scale. This requires to note four numerical values, L, H, y-min, y-max, for example at the top of the equation list (or at the bottom : see bug nr. 27).
Proposed correction : complete saving in 2D.
For the full list of Grapher's bugs please download "Instructions for Use - Grapher" (English) or "Mode d'emploi de Grapher" (French). Quick glance at the Contents (pages 2 & 3) you'll be surprised by the possibilities of Grapher.app despite the bugs.
Enjoy,
Au revoir,
YB24
Maybe you are looking for
-
How to hide columns that are getting added dynamically to UI Element 'Table
In SRM 7.0 while displaying a RFx, click on "responses and awards" button. In the response comparision tab once the user selects response number and clicks on "compare all responses". Item details table is displayed with fields item number,internal n
-
Write up the value adjustment in Asset Accounting
Hi All, I did the asset transfer with in the company code using T-code: ABUMN Old Asset # 1000 Asset Value Date: 18/04/2006 Estimated Life time: 5 Years Depreciation: Every year: $ 5400.00/12 = $ 450.00 p.m. For the current year up to 31 Mar 2007 P
-
I have tested my website on my laptop using web-kit browsers, IE and Firefox but Firefox alone displays text to be slightly bigger than the rest of the browsers. It has same rendering effects when it comes to images. I tried defining these elements u
-
How to copy Customizing Requests
Hi Experts, As a requirement we need to copy the customizing requests of an existing R/3 System to a new system. I have 2 questions on it. 1. Is it possible to copy the customizing requests of one system to another fresh system. 2. If it is possible,
-
hi, i am debugging other people's work. on this form there are database item and non db items. and in post query trigger it populates non db items. the problem is when user key down, it goes to next record and fires post query trigger. but on key up