How can I generate tones with usb 6008 using analog out?... tia sal2

Greetings All
I've been looking at the example Sim Phone.vi that comes with labview and would like to generate similar tones out of our usb 6008 device. I can get a very faint sound out of our usb 6008 using the example Gen Multi Volt Updates-SW Timed.vi Does anyone know the best way to alter Sim Phone.vi to have the sound come out of the Analog output of our usb 6008 device. ( I have a small speaker connected to the Analog out on our USB 6008)
PS: we are using labview 7.1
Does anyone know the Analog output frequency range of the usb-6008? Is this possible?
TIA
Attachments:
Gen Mult Volt Updates-SW Timed.vi ‏78 KB

Hi sal2,
As stated earlier you could most certainly use the USB device to generate sound, but that would be at a max update rate of 150 Hz. While according to Nyquist theorem you could get frequency information for signals below 75 Hz, you may notice that the quality of the data in that spectrum to be very low due to having so few samples.
While technically possible to produce you really should look for a device with a faster Analog Output update rate. I would look for a device that supports Analog Output at least 10x the maximum frequency that you want the user to hear. Some great, yet lower cost products, would be the M-Series line of products. They would give you the performance that is really needed in the type of application that you are talking about.
If you still want to use the USB Device, then you would need to use code similar to that found in the example Gen Mult Volt Updates-SW Timed (Found here: C:\Program Files\National Instruments\LabVIEW 7.1\examples\daqmxbase\Dynamic\ao).
Best of luck getting your system together,
Otis
Training and Certification
Product Support Engineer
National Instruments

Similar Messages

  • I have LabView Student Edition, how can I make work a USB 6008?

    The Student edition it doesnot have many Vi's that there are necesary to work with a USB 6008, I would like to know how can I make work the Usb 6008 with LabView Student Edition

    Hello Jorge,
    When you say "NI-DAQmx configuration" do you mean the NI-DAQmx Base Configuration Utility?  Are you using NI-DAQmx or NI-DAQmx Base to communicate with the 6008?
    NI-DAQmx 7.5 added support for the USB-6008.  Therefore, you can use either NI-DAQmx or NI-DAQmx Base to control this device.  Make sure that you are setting the USB-6008 to NI-DAQmx before trying to use the NI-DAQmx VIs in LabVIEW.  To do this, Open Measurement and Automation Explorer (MAX) and select Tools >> NI-DAQmx Configuration >> NI-DAQmx USB Driver Selector.  Your USB-6008 should appear in this window, indicating which driver your device is configured for.  Make sure it is set to NI-DAQmx before trying to use the NI-DAQmx VIs.
    When your 6008 is set to NI-DAQmx, you cannot use NI-DAQmx Base or any of the DAQmx Base examples.  Likewise, when the 6008 is set to NI-DAQmx Base, you cannot use any NI-DAQmx VIs.
    If you would like to use NI-DAQmx with your USB-6008, please set the driver by following the steps above and verify that "USB-6008" is listed under "Devices and Interfaces >> NI-DAQmx Devices" in MAX.
    I hope this helps.  Please let me know if you continue having trouble with your USB-6008.
    Regards,
    Sean C.

  • How can I work lsmw with table control using mm01 appl?

    Hi
    How can I work lsmw with table control using mm01 appl?
    Is it difefrent the way we handle table control in BDC?
    Thank You

    Hi
    How can I work lsmw with table control using mm01 appl?
    Is it difefrent the way we handle table control in BDC?
    Thank You

  • How can I boot Cisco1841 with USB Drive instead of CF?

    Hello
    I need to boot Cisco1841 with USB Drive instead of Compact Flash but I don't know what should I do.
    I heard I need to format USB Drive with FAT and need to save IOS on the USB Drive.
    Before boot, Need to set config register ? I am not sure which parameter should I set config register in detail.
    Please let me know if there is URL describing thease steps from the beginning.

    http://www.cisco.com/en/US/prod/collateral/modules/ps6247/prod_qas0900aecd80232483.html
         Q. What sizes of USB Flash sticks are supported?
         A. USB Flash sticks are supported in 64, 128, and 256 MB sizes. No other sizes are supported.
         Q. Can I use any USB memory stick for this application?
         A. No. Only Cisco USB memory sticks are supported.
    Q. Can I boot an image directly from the USB Flash module?
    A. Yes. USB drivers have been added to rommon, starting with version 12.4(13r)
         Q. Can I format the USB Flash module on the router?
    A. Yes. You can format the module on either a router or a PC. You must  specify "FAT16 file system" as the file system for the PC format process  to use.
    If your setup satisfies above conditions you can get the router to boot up with the IOS on the USB flash
    If you are in ROMMON mode, use 'dev' to find out the name of the USB Flash (should be usbflash0).
    set BOOT=usbflash0:
    If you are in the router,
    boot system flash usbflash0:

  • How can I video chat with someone who uses web based yahoo?

    Not long ago I purchased my first Mac (New MacBook Pro 2.53GHZ); last Summer I also purchased a MacBook Pro for my daughter. Everything works great (like driving a formula one Porsche after grappling with a battered pick-up truck (meaning Windows) for many decades; cannot imagine ever going back. But, there is one issue that I have not been able to solve and for which I would greatly appreciate any suggestions or advice. I am familiar with ichat and with AIM (my daughter uses it all the time). However, the vast majority of people with whom I communicate via IM live in parts of the world where very few people have even a computer at home much less residential internet access. As a result, near all of the folks I would be chatting with have to use public computers (internet cafes, libraries, etc) and obviously they cannot install AIM or anything else on those public computers. About 90% of them use the web based yahoo messenger which can be accessed from any computer with an internet connection (most of the rest use MSN). My question is this: I know how to do video chat in ichat but ichat does not support yahoo. How can I do video chat with someone who is using web based yahoo on a public computer that has a USB web cam? I was able to do this on my old PC which had a plug in web cam but do not know how it might work on a Mac. Should I install yahoo messenger on my MacBook Pro and will that work for me?. I know about some other Mac compatible chat clients such as Admiun but as far as I can tell none of them support video chat or in some cases yahoo. Perhaps I am overlooking something. I would be very grateful for any suggestions or advice in this matter. Thanks to anyone who reads this post and has any helpful info.

    Zurich,
    I don't think the web-based Yahoo Messenger supports video, so nothing you can do with that.
    http://messenger.yahoo.com/features/
    I think there are Mac compatible MSN clients that will do video, (i.e. aMSN) Also, Microsoft plans on releasing an updated version of Messenger for Mac soon.
    http://www.officeformac.com/blog/An-Update-on-Messenger-for-Mac
    GoogleTalk does have a browser based video chat, but your friends would need to install a browser plug-in. (which I would assume that can't do either)
    The best option is Skype, but also requires an install on their end (I would think that the internet cafes would/should have this available)
    Good Luck,
    Double_A

  • How can we generate javadocs with Jdev3

    Hello,
    I'm using JDeveloper3 to create some javabeans. I don't know how I can generate javadocs from JDeveloper3 with JDK1.2.2
    Nicolas

    With this information I don't think, that the 7334 is the right board for your application. The 7334 is a motion control board for stepper motors. As control signals it provides a step signal with variable frequency and a direction signal (high or low for fwd. or rev. direction). The step signal is generated onboard and controls the motor's trajectory (acceleration, velocity, travel distance). The duty cycle of this signal can't be changed by the control program, so this signal can't be used for your application.
    The PWM outputs provided by the 7334 is static. That means, you can set frequency and duty cycle only in software, which is quite slow and introduces significant and non-deterministic jitter (due to the asynchronous communication to the 7334 this is even true if you are using a real-time operating system). These limitations don't seem to meet your requirements.
    I still don't have a good idea about your timing requirements. If your response times requirments are in the upper milisecond regions (10 ms and above), you might be able to use the 7334. If low jitter and fast response times are important to your application, there are several alternative solutions including LabVIEW Real-Time with a multifunction data acquisition board and LabVIEW FPGA with an R-Series board.
    Regards,
    Jochen

  • How can I generate AVI with this code?

    Here is the code which I got
    import java.io.*;
    import java.util.*;
    import java.awt.Dimension;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.datasink.*;
    import javax.media.format.VideoFormat;
    * This program takes a list of JPEG image files and convert them into
    * a QuickTime movie.
    public class JpegImagesToMovie implements ControllerListener, DataSinkListener {
    public boolean doIt(int width, int height, int frameRate, Vector inFiles, MediaLocator outML) {
         ImageDataSource ids = new ImageDataSource(width, height, frameRate, inFiles);
         Processor p;
         try {
         System.err.println("- create processor for the image datasource ...");
         p = Manager.createProcessor(ids);
         } catch (Exception e) {
         System.err.println("Yikes! Cannot create a processor from the data source.");
         return false;
         p.addControllerListener(this);
         // Put the Processor into configured state so we can set
         // some processing options on the processor.
         p.configure();
         if (!waitForState(p, p.Configured)) {
         System.err.println("Failed to configure the processor.");
         return false;
         // Set the output content descriptor to QuickTime.
         p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.MSVIDEO));
         // Query for the processor for supported formats.
         // Then set it on the processor.
         TrackControl tcs[] = p.getTrackControls();
         Format f[] = tcs[0].getSupportedFormats();
         if (f == null || f.length <= 0) {
         System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
         return false;
         tcs[0].setFormat(f[0]);
         System.err.println("Setting the track format to: " + f[0]);
         // We are done with programming the processor. Let's just
         // realize it.
         p.realize();
         if (!waitForState(p, p.Realized)) {
         System.err.println("Failed to realize the processor.");
         return false;
         // Now, we'll need to create a DataSink.
         DataSink dsink;
         if ((dsink = createDataSink(p, outML)) == null) {
         System.err.println("Failed to create a DataSink for the given output MediaLocator: " + outML);
         return false;
         dsink.addDataSinkListener(this);
         fileDone = false;
         System.err.println("start processing...");
         // OK, we can now start the actual transcoding.
         try {
         p.start();
         dsink.start();
         } catch (IOException e) {
         System.err.println("IO error during processing");
         return false;
         // Wait for EndOfStream event.
         waitForFileDone();
         // Cleanup.
         try {
         dsink.close();
         } catch (Exception e) {}
         p.removeControllerListener(this);
         System.err.println("...done processing.");
         return true;
    * Create the DataSink.
    DataSink createDataSink(Processor p, MediaLocator outML) {
         DataSource ds;
         if ((ds = p.getDataOutput()) == null) {
         System.err.println("Something is really wrong: the processor does not have an output DataSource");
         return null;
         DataSink dsink;
         try {
         System.err.println("- create DataSink for: " + outML);
         dsink = Manager.createDataSink(ds, outML);
         dsink.open();
         } catch (Exception e) {
         System.err.println("Cannot create the DataSink: " + e);
         return null;
         return dsink;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(Processor p, int state) {
         synchronized (waitSync) {
         try {
              while (p.getState() < state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         evt.getSourceController().stop();
         evt.getSourceController().close();
    Object waitFileSync = new Object();
    boolean fileDone = false;
    boolean fileSuccess = true;
    * Block until file writing is done.
    boolean waitForFileDone() {
         synchronized (waitFileSync) {
         try {
              while (!fileDone)
              waitFileSync.wait();
         } catch (Exception e) {}
         return fileSuccess;
    * Event handler for the file writer.
    public void dataSinkUpdate(DataSinkEvent evt) {
         if (evt instanceof EndOfStreamEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              waitFileSync.notifyAll();
         } else if (evt instanceof DataSinkErrorEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              fileSuccess = false;
              waitFileSync.notifyAll();
    public static void main(String args[]) {
         if (args.length == 0)
         prUsage();
         // Parse the arguments.
         int i = 0;
         int width = -1, height = -1, frameRate = 1;
         Vector inputFiles = new Vector();
         String outputURL = null;
         while (i < args.length) {
         if (args.equals("-w")) {
              i++;
              if (i >= args.length)
              prUsage();
              width = new Integer(args[i]).intValue();
         } else if (args[i].equals("-h")) {
              i++;
              if (i >= args.length)
              prUsage();
              height = new Integer(args[i]).intValue();
         } else if (args[i].equals("-f")) {
              i++;
              if (i >= args.length)
              prUsage();
              frameRate = new Integer(args[i]).intValue();
         } else if (args[i].equals("-o")) {
              i++;
              if (i >= args.length)
              prUsage();
              outputURL = args[i];
         } else {
              inputFiles.addElement(args[i]);
         i++;
         if (outputURL == null || inputFiles.size() == 0)
         prUsage();
         // Check for output file extension.
         if (!outputURL.endsWith(".avi") && !outputURL.endsWith(".AVI")) {
         System.err.println("The output file extension should end with a .avi extension");
         prUsage();
         if (width < 0 || height < 0) {
         System.err.println("Please specify the correct image size.");
         prUsage();
         // Check the frame rate.
         if (frameRate < 1)
         frameRate = 1;
         // Generate the output media locators.
         MediaLocator oml;
         if ((oml = createMediaLocator(outputURL)) == null) {
         System.err.println("Cannot build media locator from: " + outputURL);
         System.exit(0);
         JpegImagesToMovie imageToMovie = new JpegImagesToMovie();
         imageToMovie.doIt(width, height, frameRate, inputFiles, oml);
         System.exit(0);
    static void prUsage() {
         System.err.println("Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...");
         System.exit(-1);
    * Create a media locator from the given string.
    static MediaLocator createMediaLocator(String url) {
         MediaLocator ml;
         if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
         return ml;
         if (url.startsWith(File.separator)) {
         if ((ml = new MediaLocator("file:" + url)) != null)
              return ml;
         } else {
         String file = "file:" + System.getProperty("user.dir") + File.separator + url;
         if ((ml = new MediaLocator(file)) != null)
              return ml;
         return null;
    // Inner classes.
    * A DataSource to read from a list of JPEG image files and
    * turn that into a stream of JMF buffers.
    * The DataSource is not seekable or positionable.
    class ImageDataSource extends PullBufferDataSource {
         ImageSourceStream streams[];
         ImageDataSource(int width, int height, int frameRate, Vector images) {
         streams = new ImageSourceStream[1];
         streams[0] = new ImageSourceStream(width, height, frameRate, images);
         public void setLocator(MediaLocator source) {
         public MediaLocator getLocator() {
         return null;
         * Content type is of RAW since we are sending buffers of video
         * frames without a container format.
         public String getContentType() {
         return ContentDescriptor.RAW;
         public void connect() {
         public void disconnect() {
         public void start() {
         public void stop() {
         * Return the ImageSourceStreams.
         public PullBufferStream[] getStreams() {
         return streams;
         * We could have derived the duration from the number of
         * frames and frame rate. But for the purpose of this program,
         * it's not necessary.
         public Time getDuration() {
         return DURATION_UNKNOWN;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    * The source stream to go along with ImageDataSource.
    class ImageSourceStream implements PullBufferStream {
         Vector images;
         int width, height;
         VideoFormat format;
         int nextImage = 0;     // index of the next image to be read.
         boolean ended = false;
         public ImageSourceStream(int width, int height, int frameRate, Vector images) {
         this.width = width;
         this.height = height;
         this.images = images;
         format = new VideoFormat(VideoFormat.JPEG,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        Format.byteArray,
                        (float)frameRate);
         * We should never need to block assuming data are read from files.
         public boolean willReadBlock() {
         return false;
         * This is called from the Processor to read a frame worth
         * of video data.
         public void read(Buffer buf) throws IOException {
         // Check if we've finished all the frames.
         if (nextImage >= images.size()) {
              // We are done. Set EndOfMedia.
              System.err.println("Done reading all images.");
              buf.setEOM(true);
              buf.setOffset(0);
              buf.setLength(0);
              ended = true;
              return;
         String imageFile = (String)images.elementAt(nextImage);
         nextImage++;
         System.err.println(" - reading image file: " + imageFile);
         // Open a random access file for the next image.
         RandomAccessFile raFile;
         raFile = new RandomAccessFile(imageFile, "r");
         byte data[] = null;
         // Check the input buffer type & size.
         if (buf.getData() instanceof byte[])
              data = (byte[])buf.getData();
         // Check to see the given buffer is big enough for the frame.
         if (data == null || data.length < raFile.length()) {
              data = new byte[(int)raFile.length()];
              buf.setData(data);
         // Read the entire JPEG image from the file.
         raFile.readFully(data, 0, (int)raFile.length());
         System.err.println(" read " + raFile.length() + " bytes.");
         buf.setOffset(0);
         buf.setLength((int)raFile.length());
         buf.setFormat(format);
         buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
         // Close the random access file.
         raFile.close();
         * Return the format of each video frame. That will be JPEG.
         public Format getFormat() {
         return format;
         public ContentDescriptor getContentDescriptor() {
         return new ContentDescriptor(ContentDescriptor.RAW);
         public long getContentLength() {
         return 0;
         public boolean endOfStream() {
         return ended;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    when I execute this file then no error comes but the output file do not get played on any player?
    where is the error?

    here is the code with QUICKTIME
    * @(#)JpegImagesToMovie.java     1.3 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.io.*;
    import java.util.*;
    import java.awt.Dimension;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.datasink.*;
    import javax.media.format.VideoFormat;
    * This program takes a list of JPEG image files and convert them into
    * a QuickTime movie.
    public class JpegImagesToMovie implements ControllerListener, DataSinkListener {
        public boolean doIt(int width, int height, int frameRate, Vector inFiles, MediaLocator outML) {
         ImageDataSource ids = new ImageDataSource(width, height, frameRate, inFiles);
         Processor p;
         try {
             System.err.println("- create processor for the image datasource ...");
             p = Manager.createProcessor(ids);
         } catch (Exception e) {
             System.err.println("Yikes!  Cannot create a processor from the data source.");
             return false;
         p.addControllerListener(this);
         // Put the Processor into configured state so we can set
         // some processing options on the processor.
         p.configure();
         if (!waitForState(p, p.Configured)) {
             System.err.println("Failed to configure the processor.");
             return false;
         // Set the output content descriptor to QuickTime.
         p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.QUICKTIME));
         // Query for the processor for supported formats.
         // Then set it on the processor.
         TrackControl tcs[] = p.getTrackControls();
         Format f[] = tcs[0].getSupportedFormats();
         if (f == null || f.length <= 0) {
             System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
             return false;
         tcs[0].setFormat(f[0]);
         System.err.println("Setting the track format to: " + f[0]);
         // We are done with programming the processor.  Let's just
         // realize it.
         p.realize();
         if (!waitForState(p, p.Realized)) {
             System.err.println("Failed to realize the processor.");
             return false;
         // Now, we'll need to create a DataSink.
         DataSink dsink;
         if ((dsink = createDataSink(p, outML)) == null) {
             System.err.println("Failed to create a DataSink for the given output MediaLocator: " + outML);
             return false;
         dsink.addDataSinkListener(this);
         fileDone = false;
         System.err.println("start processing...");
         // OK, we can now start the actual transcoding.
         try {
             p.start();
             dsink.start();
         } catch (IOException e) {
             System.err.println("IO error during processing");
             return false;
         // Wait for EndOfStream event.
         waitForFileDone();
         // Cleanup.
         try {
             dsink.close();
         } catch (Exception e) {}
         p.removeControllerListener(this);
         System.err.println("...done processing.");
         return true;
         * Create the DataSink.
        DataSink createDataSink(Processor p, MediaLocator outML) {
         DataSource ds;
         if ((ds = p.getDataOutput()) == null) {
             System.err.println("Something is really wrong: the processor does not have an output DataSource");
             return null;
         DataSink dsink;
         try {
             System.err.println("- create DataSink for: " + outML);
             dsink = Manager.createDataSink(ds, outML);
             dsink.open();
         } catch (Exception e) {
             System.err.println("Cannot create the DataSink: " + e);
             return null;
         return dsink;
        Object waitSync = new Object();
        boolean stateTransitionOK = true;
         * Block until the processor has transitioned to the given state.
         * Return false if the transition failed.
        boolean waitForState(Processor p, int state) {
         synchronized (waitSync) {
             try {
              while (p.getState() < state && stateTransitionOK)
                  waitSync.wait();
             } catch (Exception e) {}
         return stateTransitionOK;
         * Controller Listener.
        public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
             evt instanceof RealizeCompleteEvent ||
             evt instanceof PrefetchCompleteEvent) {
             synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
             synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
             evt.getSourceController().stop();
             evt.getSourceController().close();
        Object waitFileSync = new Object();
        boolean fileDone = false;
        boolean fileSuccess = true;
         * Block until file writing is done.
        boolean waitForFileDone() {
         synchronized (waitFileSync) {
             try {
              while (!fileDone)
                  waitFileSync.wait();
             } catch (Exception e) {}
         return fileSuccess;
         * Event handler for the file writer.
        public void dataSinkUpdate(DataSinkEvent evt) {
         if (evt instanceof EndOfStreamEvent) {
             synchronized (waitFileSync) {
              fileDone = true;
              waitFileSync.notifyAll();
         } else if (evt instanceof DataSinkErrorEvent) {
             synchronized (waitFileSync) {
              fileDone = true;
              fileSuccess = false;
              waitFileSync.notifyAll();
        public static void main(String args[]) {
         if (args.length == 0)
             prUsage();
         // Parse the arguments.
         int i = 0;
         int width = -1, height = -1, frameRate = 1;
         Vector inputFiles = new Vector();
         String outputURL = null;
         while (i < args.length) {
             if (args.equals("-w")) {
              i++;
              if (i >= args.length)
              prUsage();
              width = new Integer(args[i]).intValue();
         } else if (args[i].equals("-h")) {
              i++;
              if (i >= args.length)
              prUsage();
              height = new Integer(args[i]).intValue();
         } else if (args[i].equals("-f")) {
              i++;
              if (i >= args.length)
              prUsage();
              frameRate = new Integer(args[i]).intValue();
         } else if (args[i].equals("-o")) {
              i++;
              if (i >= args.length)
              prUsage();
              outputURL = args[i];
         } else {
              inputFiles.addElement(args[i]);
         i++;
         if (outputURL == null || inputFiles.size() == 0)
         prUsage();
         // Check for output file extension.
         if (!outputURL.endsWith(".mov") && !outputURL.endsWith(".MOV")) {
         System.err.println("The output file extension should end with a .mov extension");
         prUsage();
         if (width < 0 || height < 0) {
         System.err.println("Please specify the correct image size.");
         prUsage();
         // Check the frame rate.
         if (frameRate < 1)
         frameRate = 1;
         // Generate the output media locators.
         MediaLocator oml;
         if ((oml = createMediaLocator(outputURL)) == null) {
         System.err.println("Cannot build media locator from: " + outputURL);
         System.exit(0);
         JpegImagesToMovie imageToMovie = new JpegImagesToMovie();
         imageToMovie.doIt(width, height, frameRate, inputFiles, oml);
         System.exit(0);
    static void prUsage() {
         System.err.println("Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...");
         System.exit(-1);
    * Create a media locator from the given string.
    static MediaLocator createMediaLocator(String url) {
         MediaLocator ml;
         if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
         return ml;
         if (url.startsWith(File.separator)) {
         if ((ml = new MediaLocator("file:" + url)) != null)
              return ml;
         } else {
         String file = "file:" + System.getProperty("user.dir") + File.separator + url;
         if ((ml = new MediaLocator(file)) != null)
              return ml;
         return null;
    // Inner classes.
    * A DataSource to read from a list of JPEG image files and
    * turn that into a stream of JMF buffers.
    * The DataSource is not seekable or positionable.
    class ImageDataSource extends PullBufferDataSource {
         ImageSourceStream streams[];
         ImageDataSource(int width, int height, int frameRate, Vector images) {
         streams = new ImageSourceStream[1];
         streams[0] = new ImageSourceStream(width, height, frameRate, images);
         public void setLocator(MediaLocator source) {
         public MediaLocator getLocator() {
         return null;
         * Content type is of RAW since we are sending buffers of video
         * frames without a container format.
         public String getContentType() {
         return ContentDescriptor.RAW;
         public void connect() {
         public void disconnect() {
         public void start() {
         public void stop() {
         * Return the ImageSourceStreams.
         public PullBufferStream[] getStreams() {
         return streams;
         * We could have derived the duration from the number of
         * frames and frame rate. But for the purpose of this program,
         * it's not necessary.
         public Time getDuration() {
         return DURATION_UNKNOWN;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    * The source stream to go along with ImageDataSource.
    class ImageSourceStream implements PullBufferStream {
         Vector images;
         int width, height;
         VideoFormat format;
         int nextImage = 0;     // index of the next image to be read.
         boolean ended = false;
         public ImageSourceStream(int width, int height, int frameRate, Vector images) {
         this.width = width;
         this.height = height;
         this.images = images;
         format = new VideoFormat(VideoFormat.JPEG,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        Format.byteArray,
                        (float)frameRate);
         * We should never need to block assuming data are read from files.
         public boolean willReadBlock() {
         return false;
         * This is called from the Processor to read a frame worth
         * of video data.
         public void read(Buffer buf) throws IOException {
         // Check if we've finished all the frames.
         if (nextImage >= images.size()) {
              // We are done. Set EndOfMedia.
              System.err.println("Done reading all images.");
              buf.setEOM(true);
              buf.setOffset(0);
              buf.setLength(0);
              ended = true;
              return;
         String imageFile = (String)images.elementAt(nextImage);
         nextImage++;
         System.err.println(" - reading image file: " + imageFile);
         // Open a random access file for the next image.
         RandomAccessFile raFile;
         raFile = new RandomAccessFile(imageFile, "r");
         byte data[] = null;
         // Check the input buffer type & size.
         if (buf.getData() instanceof byte[])
              data = (byte[])buf.getData();
         // Check to see the given buffer is big enough for the frame.
         if (data == null || data.length < raFile.length()) {
              data = new byte[(int)raFile.length()];
              buf.setData(data);
         // Read the entire JPEG image from the file.
         raFile.readFully(data, 0, (int)raFile.length());
         System.err.println(" read " + raFile.length() + " bytes.");
         buf.setOffset(0);
         buf.setLength((int)raFile.length());
         buf.setFormat(format);
         buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
         // Close the random access file.
         raFile.close();
         * Return the format of each video frame. That will be JPEG.
         public Format getFormat() {
         return format;
         public ContentDescriptor getContentDescriptor() {
         return new ContentDescriptor(ContentDescriptor.RAW);
         public long getContentLength() {
         return 0;
         public boolean endOfStream() {
         return ended;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    and here is the output
    C:\>java JpegImagesToMovie -w 1024 -h 768 -f 1 -o out.mov file:/c:/images/5.jpg file:/c:/images/6.jp
    g
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: file:C:\\out.mov
    start processing...
    - reading image file: file:/c:/images/5.jpg
    - reading image file: file:/c:/images/6.jpg
    Done reading all images.
    Exception in thread "JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler" java.lang.
    NullPointerException
    at com.sun.media.multiplexer.video.QuicktimeMux.writeVideoSampleDescription(QuicktimeMux.jav
    a:936)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeSTSD(QuicktimeMux.java:925)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeSTBL(QuicktimeMux.java:905)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeMINF(QuicktimeMux.java:806)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeMDIA(QuicktimeMux.java:727)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeTRAK(QuicktimeMux.java:644)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeMOOV(QuicktimeMux.java:582)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeFooter(QuicktimeMux.java:519)
    at com.sun.media.multiplexer.BasicMux.close(BasicMux.java:142)
    at com.sun.media.BasicMuxModule.doClose(BasicMuxModule.java:172)
    at com.sun.media.PlaybackEngine.doClose(PlaybackEngine.java:872)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at JpegImagesToMovie.controllerUpdate(JpegImagesToMovie.java:196)
    at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254)
    at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
    at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:65)
    at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)

  • How can I back up with Time Machine using an Airport Express on LaCie D2 NAS

    I want to use Time Machine through my Airport Express to back up my computer onto my LaCie D2 NAS. But curently when I "choose a drive" in Time Machine it finds my Airport Express and says there is nothing there.

    Disks You Can Use

  • How can we generate result set report?

    how can we generate result set report ?means the out put of one query be the input of another query?how it is?

    Hi
    You have to use APD ( analysis process designer) to use results of one query as the input for the other queries.
    Check this link
    http://help.sap.com/saphelp_nw70/helpdata/en/49/7e960481916448b20134d471d36a6b/frameset.htm
    Regards

  • Please, I need help - How can I generate a text file with Word format?

    Hello friends at www.oracle.com ,
    is it possible for me to create a text file - that is, with TEXT_IO.fopen, and so on - that's already formatted as a Word document?
    We have a Forms program here, where it's needed to generate a text file with .RTF format, 8 centimeters margin, Times New Roman font, with size 7.
    Best regards,
    Franklin Goncalves Jr.

    Hello Shay,
    sincere thanks for your answer. And, to answer your last question, I'm using client-server model.
    Since I couldn't create this .RTF file by using built-ins like TEXT_IO, I tried to generate an .RTF file using Reports, passing the parameters DESTYPE, DESNAME and DESFORMAT, as shown below.
    add_parameter (pl_id, 'DESTYPE', text_parameter, 'FILE');
    add_parameter (pl_id, 'DESNAME', text_parameter, 'c:\franklin.rtf');
    add_parameter (pl_id, 'DESFORMAT', text_parameter, 'RTF');
    However, the just generated .RTF file is uncomprehensible. After opening the file at Microsoft Word, I can see the following message at the top of file:
    This file was created by Oracle Reports. Please view this document in Page Layout mode.
    ... and informations doesn't appear as desired.
    If I can't generate such text format by using TEXT_IO, and if generating an .RTF file through Reports shows me an incomprehensible result, how can I export the selected result to an .RTF file?
    When Reports is opened, choosing Generate to file -> RTF doesn't export anything.
    Thanks, and best regards,
    Franklin Goncalves Jr.

  • I updated the IPAD with the latest update and now when I turned the IPAD on, I get the itunes logo and then nothing else.  How can I fix this to let me use my IPAD?

    I updated the IPAD with the latest update and now when I turned the IPAD on, I get the itunes logo and then nothing else.  How can I fix this to let me use my IPAD?

    YOU ARE IN RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.
    3. Repeat the process if necessary.

  • How can we generate the report of backup,tablesapcefrom OEM / RMAN

    How can we generate the report of backup status,tablesapce(usedf,free space) for all the databases from OEM / RMAN
    1.)we need generate the report of tablespace used,free, archive...
    2.)How can we generate the Backup status report also

    user13584223 wrote:
    How can we generate the report of backup status,tablesapce(usedf,free space) for all the databases from OEM / RMAN
    1.)we need generate the report of tablespace used,free, archive...There are DBA_* views that expose the necessary information. They are documented in the Reference Manual.
    2.)How can we generate the Backup status report alsoThere are rman commands that give that. They are documented in the Backup and Recovery User's Guide.
    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to [url tahiti.oracle.com]tahiti.oracle.com.
    Locate the link for your Oracle product and version, and click on it.
    You are now at the entire documentation set for your selected Oracle product and version.
    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab (for 10.x) or the "Master Book List" link (for 11.x) you will find the complete documentation library.
    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    =================================

  • How can I generate a table of contents from bookmarks

    How can I generate a Table of Contents from bookmarks in Adobe Acrobat XI?

    Something to try.
    Rick Bostein  provided a "Create Bookmark Report" Acrobat Action.
    With this report as a PDF you could insert it at the start of your PDF document to serve as a "TOC". 
    Go here:
    https://acrobatusers.com/actions-exchange 
    Scroll down some.
    Be well...

  • How can I generate javadoc in PDF format?

    Hi,
    How can I generate javadoc in PDF format?
    Thanks,
    Fayezin

    HTML to PDF with Java, using OpenOffice.org - example here: [http://www.dancrintea.ro/html-to-pdf/|http://www.dancrintea.ro/html-to-pdf/]
    You can use OpenOffice.org, running as a server and command it remotely for document convertion.
    Besides HTML to PDF, there are also possible other convertions:
    doc --> pdf, html, txt, rtf
    xls --> pdf, html, csv
    ppt --> pdf, swf
    Code example:
    import officetools.OfficeFile; // this is my tools package
    FileInputStream fis = new FileInputStream(new File("c:/test.html"));
    FileOutputStream fos = new FileOutputStream(new File("c:/test.pdf"));
    // suppose OpenOffice.org runs on localhost, port 8100
    OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
    f.convert(fos,"pdf");
    -----------------------------------------------------------------------------------------------------------------------------------------

  • How can we generate proxies?

    Hi,
    I am doing one POC on ABAP client proxies. I am using WAS 6.20 as sender and receiver is XI server it self. If I use same XI System for both sender and receiver with different clients then I can generate proxies for sender using "SPROXY" transaction. But the sender is different system , how can I generate abap proxy in sender system?
    Do I need to export any things from XI server to Sender system to generate proxies? Please help me on this.
    Thanks in advance.

    Hi,
    I am doing one POC on ABAP client proxies. I am using WAS 6.20 as sender and receiver is XI server it self. If I use same XI System for both sender and receiver with different clients then I can generate proxies for sender using "SPROXY" transaction. But the sender is different system , how can I generate abap proxy in sender system?
    Do I need to export any things from XI server to Sender system to generate proxies? Please help me on this.
    Thanks in advance.

Maybe you are looking for

  • Process or Cancel Messages scheduled in IE

    Hi, I have around 17000 messages in scheduled status since April in IE. The first flag is chequered but the flag near PE is green. The messages have reached XI but couldn't make it to BPM. They are scheduled to enter BPM. I do not find any trace in t

  • Names Based On A Counter

    I have a programme which utilises several "for" loops. In one case I create a varying number of objects based on user input. For this I use a "for" to assist in naming each object. The start of this code is as follows. for(int counter=0; counter<numP

  • Different Exchange Rate in VF01 And J1IIN (CIN Version).

    I have released a document in vf01(IN USD).There my exchange rate is 46.95 and in j1iin my exchange rate is 46.0655.So its creating difference in duties of billing and excise invoice.In Company code setting exchange rate type is M.Can any one suggest

  • Applying time adjustment twice.

    I guess the time adjustment works on what is showing, not on the original photo time. I used Batch Change twice on some photos because some of them weren't imported with the time adjustment, so I thought, what the heck I'm just telling it the camera

  • Need to rename the Distrinution model ( BD64)

    Hello, Please tell us how to rename the Distribution Model (BD64) along with the  technical name. This we need to perform as  post-refresh activity. Thanks Hari