Video capture to mjpeg over udp

I'm trying to build a simple video sender and receiver by doing the following:
read video frames from the camera
convert each image from the camera to motion JPEG
deliver them via UDP to the receiver where they are rendered
As this is my 1st try using JMF and working with image processing, I did the usual scouring of forum entries and Google searches on JMF and put together the following 1st attempt (client):
            Vector videoDeviceList = CaptureDeviceManager.getDeviceList(new VideoFormat("yuv"));
            CaptureDeviceInfo vdi = null;
            if(videoDeviceList.size() > 0)
                vdi = (CaptureDeviceInfo)videoDeviceList.firstElement();
        Format outputFormats[] = new Format[] { new VideoFormat(VideoFormat.MJPG) };
        ContentDescriptor outputType = new ContentDescriptor(ContentDescriptor.RAW);
        //FileTypeDescriptor outputType = new FileTypeDescriptor(FileTypeDescriptor.MPEG);
        ProcessorModel pm = new ProcessorModel(vdi.getLocator(), outputFormats, outputType);
            Processor p = Manager.createRealizedProcessor(pm);
            DataSource src = p.getDataOutput();
        // the next line throws a ClassCastException (due to the selected ContentDescriptor?)
            PullBufferDataSource pullsrc = (PullBufferDataSource)src;
            PullBufferStream[] streams = pullsrc.getStreams();
            PullBufferStream stream = streams[0];
            Buffer buffer = new Buffer();
            DatagramSocket cs = new DatagramSocket(9876, InetAddress.getByName("localhost"));
            while(!stream.endOfStream()) {
                stream.read(buffer);
                Object data = buffer.getData();
                if(data instanceof byte[]) {
                    byte[] sendData = (byte[])data;
                    cs.send(new DatagramPacket(sendData, sendData.length));
                else
                    System.out.println(data.getClass());
            }My code fails with a "java.lang.ClassCastException: com.sun.media.multiplexer.RawBufferMux$RawBufferDataSource."
I get why, but given that the correct DataSource is an inner class, I'm guessing that this is not the right approach.
Do I need to create a custom DataSource or DataSink to accomplish my goal for the client? By the way, what roles do a DataSource and DataSink play in JMF? Any feedback/leads would be greatly appreciated.
JR

Ok, I've updated my code to use a PushBufferDataSource instead and that worked. But the overall problem of streaming the video remains.
The following code works and writes an image to disk.
            PushBufferDataSource pullsrc = (PushBufferDataSource)src;
            PushBufferStream[] streams = pullsrc.getStreams();
            PushBufferStream stream = streams[0];
            Buffer buffer = new Buffer();
            p.start();
            while(!stream.endOfStream()) {
                stream.read(buffer);
                Object data = buffer.getData();
                int sendDataLength = buffer.getLength();
                if(data instanceof byte[]) {
                    byte[] sendData = (byte[])data;
                    FileOutputStream outs = new FileOutputStream("test.jpg");
                    outs.write(sendData);
                    outs.close();
                else
                    System.out.println(data.getClass());
            System.out.println("end of stream");The following code does not work (output follows code):
            PushBufferDataSource pullsrc = (PushBufferDataSource)src;
            PushBufferStream[] streams = pullsrc.getStreams();
            PushBufferStream stream = streams[0];
            Buffer buffer = new Buffer();
            cs = new DatagramSocket();
            p.start();
            System.out.println("about to read stream");
            while(!stream.endOfStream()) {
                System.out.println("about to read buffer");
                stream.read(buffer);
                System.out.println("read buffer");
                Object data = buffer.getData();
                int sendDataLength = buffer.getLength();
                System.out.println("got data");
                if(data instanceof byte[]) {
                    byte[] sendData = (byte[])data;
                    System.out.println("about to send data, length = " + sendData.length);
                    System.out.println("or is it length = " + sendDataLength);
                    ByteArrayOutputStream bos = new ByteArrayOutputStream();
                    DataOutputStream dos = new DataOutputStream(bos);
                    dos.writeInt(sendData.length);
                    dos.flush();
                    byte[] sendDataSize = bos.toByteArray();
                    cs.send(new DatagramPacket(sendDataSize, sendDataSize.length, InetAddress.getByName("localhost"), 9876));
                    for(int i = 0; i < sendData.length; ) {
                        int sendLength = sendData.length - i < 1024 ? sendData.length - i : 1024;
                        System.out.println("about send partial data, i = " + i + ", length = " + sendLength + ", upto = " + (i+sendLength));
*cs.send(new DatagramPacket(sendData, i, i + sendLength, InetAddress.getByName("localhost"), 9876));*
                        System.out.println("sent partial data");
                        i += sendLength;
                    System.out.println("sent whole data");
                else
                    System.out.println(data.getClass());
            System.out.println("end of stream");
about to read stream
about to read buffer
read buffer
got data
about to send data, length = 76032
or is it length = 2183
about send partial data, i = 0, length = 1024, upto = 1024
sent partial data
about send partial data, i = 1024, length = 1024, upto = 2048
sent partial data
about send partial data, i = 2048, length = 1024, upto = 3072
sent partial data
about send partial data, i = 37888, length = 1024, upto = 38912
java.lang.IllegalArgumentException: illegal length or offset
    at java.net.DatagramPacket.setData(Unknown Source)
    at java.net.DatagramPacket.<init>(Unknown Source)
    at VideoSender.main(VideoSender.java:102)The line throwing the exception has been highlighted in bold above.
DatagramPacket.<init> is passed a buffer of length = 76032, an offset of 37888 and a length of 1024, so why the Exception?
One thing I notice is that ((byte[]) Buffer.getData()).length is the actual file size that resulted from running the 1st code snippet. On the other hand, buffer.getLength() = 2183 which is seemingly random to me. Am I experiencing some race condition on the Buffer's underlying data object? How can I stream each image over the network?
Thanks.

Similar Messages

  • I'm using ezcap.tv 116 ezgamer capture card to record my PS3, this is on a windows laptop, Im then moving the recorded videos in mpg format over to my MacBook Pro to use IMovie to edit them to upload to youtube but it won't let me import them.

    I'm using ezcap.tv 116 ezgamer capture card to record my PS3, this is on a windows laptop, Im then moving the recorded videos in mpg format over to my MacBook Pro to use IMovie to edit them so i can upload them to youtube but it won't let me import them, even after changeing them to MP4 format, it just comes up with the message: "No Importable Files None of the selected files or folders can be imported. Change the selection and try again."
    Ive even tried opening in itunes and copying from thier but they wont open in Itunes, no message or anything they simple just dont open. its strange because it does open in quicktime player.
    please if anyone has any ideas that can help me please let me know XD thanks.

    First problem: You're fine. The hotter it gets, the more the fans spin up. The computer is designed so that at max load, at max fan speed, it won't overheat (unless it's obstructed by something, e.g. sitting on your bed swallowed by a comforter). It's not the best thing to keep it that toasty for days at a time, but a couple hours at a time shouldn't be a problem.
    Second problem: If something in the trash won't delete, just use Secure Empty Trash and it should be fine. Since .torrent files are quite small, it should only take a couple seconds.

  • Pinnacle Video Capture for Mac

    After talking with a bunch of salesmen (considering getting a DvD writer), I took the advice of someone in the Apple Store and bought a Pinnacle Video Capture for Mac to copy my laserdiscs. It was $100 before tax, and didn't do stuff I don't plan on doing anyway. I did spend another $25 to get an S-video cable.
    I installed the software and connected it up to my LD. I started capturing the movie, and selected S-Video (although in the small window they showed, I didn't see any difference between that and video out. I selected a max time from a limited selection, and let it record.
    After a while, I went downstairs and saw that the audio and video were not synchronized at all. I let it continue.
    After a while I came down again, and the movie was finished, so I stopped it. I found the MP4 - it was in the iTunes movie directory, and played it in iTunes. I fast-forwarded it to near the end, the voice and video were way off-set.
    I haven't tried burning this yet.
    Quicktime player doesn't think this is a valid movie file. I selected "open with" and "other" and the recommended applications had iMovie greyed out.
    Why in the world would the audio and video record at different speeds?
    Do I have to buy software to edit the movie down to the correct size?
    My Mac has:
    Model Name: iMac
    Model Identifier: iMac7,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2.8 GHz
    Number Of Processors: 1
    Total Number Of Cores: 2
    L2 Cache: 4 MB
    Memory: 2 GB
    Bus Speed: 800 MHz
    Boot ROM Version: IM71.007A.B03
    SMC Version: 1.21f4
    I noticed the Pinacle Video Capture program was still running, so I tried to quit it, and got a window asking for my administrator ID and passsword to allow Pinnacle Video Capture to make changes. Why?

    The audio drifted out of sync because the Dazzle doesn't support locked audio. For short videos (say, under 10 minutes) this won't be very noticeable but when you capture longer videos it becomes progressively worse over time.
    What do you want to do with your Laserdisk copies? Watch them on your iPod? Edit and/or burn to DVD?
    A device like the Canopus ADVC-110 will do the video/audio conversion properly, keeping the audio and video in sync regardless of the length of your video. It converts to DV, not to MP4, and you would use it with iMovie or Final Cut (not iTunes). However you can export your video from iMovie or Final Cut to iPod/AppleTV formats.
    The Dazzle device will not work directly with iMovie or Final Cut.
    ps. If all you really want to do is transfer your Laserdisc videos to DVDs, it will be a whole lot faster & simpler to get a DVD player/recorder that has analog inputs and record directly to DVDs. There are many brands & models to choose from and many good ones are as inexpensive as the $100 you spent on the Pinnacle converter.

  • Video capture driver for MSI GeForce 2 Pro video card

    Hi,
     I am in need of the nVidia WDM video capture driver for my Geforce 2 Pro video card. Model #M-8831. I was able to download it from the MSI/TW website over a year ago just fine. My computer crashed from a game bug a couple of months ago and MSI/TW does not list the capture driver I need any longer. I did email the company asking for help with no response back yet (after 2 weeks). You people may be my last hope.
     I do have the cd that came with the video card, but I've never been able to install the capture driver from it. There is a button to install it, but it never gets loaded. I've tried browsing the cd and also tried installing it using the windows wizards with zero results. My only successful install was from the MSI home website.
     If you need more information, please let me know.
     Thank you,
     Bruce ?(

    If you followed the second link it says this:
    Windows XP/2000/Me/98SE - WDM Driver v1.22
    Version: 1.22
    File Size: 1.1 MB
    Release Date: December 9, 2002
    Downloads
    » Primary Download Site «
    » Mirror Site 1
    » Mirror Site 2
    » Mirror Site 3
    Release Highlights:
    First stand-alone WDM driver release for Personal Cinema and VIVO-enabled products.
    Right there at the end it says Release Highlights and says specifically that it's what you want...
    Read my man, read...
    Cheers!! 8)

  • What video capture card are you using? Do you like it?

    Hi there. I'm going to purchase a video capture card so I can feed my camcorder, vcr etc. into my iBook. I want to know what people are using and how they like it. DO you use firewire or USB? etc.

    iMovie (and Final Cut) expect video via FireWire.
    If you select a video over USB solution you will need to find a Mac compatible software application to read and recognize it.

  • How can I asociate a DataSource to a Port for my Video Capture Card???

    Hi!
    First of all, I sorry for my bad english.
    I'm trying to manage ports of my Video Capture Card.It's 4 ports. I believe I can manage it cause running this code I found in a web, I can see a panel called Video Source that contain all my capture devices (the capturer card too) and the four ports. Ports have been asociate like SVIDEO, TVTUNNER, COMPOSITE, COMPOSITE2. I'm trying use PortControl, but I don't ontain nothing. I'm learning java for around only three weeks, I don't know very much.
    My question: How can I asociate a DataSource to a Port for my Video Capture Card and so manage 4 streamings data . Should I work Port Control over a medialocator, a datastream, a player...?
    I'm looking forward your answers. I'm very sad cause this problem.
    Thanx for advance!

    xinixmayur, please don't post in threads that are long dead. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.
    db

  • Computer set up for video capture

    I believe there are special setting of the computer for video capture.  I have done these in the past but cannot remeber how or find any info.  One setting was to send the data form the camcorder straight to the hard disc.  Can anyone help me, please ?
    johnjep

    If you're capturing from a tape-based camcorder, you should capture over FireWire.
    For hard drive camcorders, you'll need to use the Media Downloader built into Premiere Elements to get the video files.
    Current computers can usually capture with no special set-up. Although Vista can use a bit of tweaking, as you can see if you click on the FAQs listed to the right of this forum.
    If you've got a second hard drive, you can get the most efficient capture by capturing to it rather than your C drive.

  • Premiere Pro 1.5.1 HDV VIDEO CAPTURE - Canon HV20

    Hi,
    For the life of me I cannot get my camera to capture in HDV. I can switch over to DV and it will capture everything just fine. The settings I recorded in are HDV standard, Widescreen 29fps. Not the 24. But it just tells me the device is ofline no matter what I try. I grabbed a stand alone CineForm HDLink and that doesn't detect it either. Any help would be greatly appreciated. The Client wants HD, not DV.
    Premiere Pro 1.5.1 HDV VIDEO CAPTURE - Canon HV20 firewire
    Thanks in advance!

    Ok, I spoke to soon. I kept searching and searching.  Finally found this..
    http://www.hv20.com/showthread.php?t=12131
    My camera was locked in DV mode. So I had to switch it to HDV/DV
    "b) As many have said you need to be sure that the camera is set ot output in HDV, and not DV locked. Because I am a bit of a dunce I found it difficult to locate that, even with the manual so here are some foolproof instructions on how to get there:
    in "Play" Mode > FUNC > MENU > PLAY/OUT SETUP2 > DV OUTPUT [set this to HDV/DV]"
    That did it.

  • Best video capture tool for Panasonic AG-DVX100A

    I'm trying to decide on the best video capture/ media converter tool for my Panasonic AG-DVX100A. The choice is between the Grass Valley ADVC 110 Media Converter and the BlackMagic Design Video Device for Mac OS10. Has anyone used either/both of these. What advantages do each have over the other? Thanks for your time and advice.

    Hi -
    The Grass Valley ADVC 110 Media Converter requirers firewire.
    I have and use the Blackmagic Video recorder which is USB based -
    http://www.bhphotovideo.com/c/product/558914-REG/BlackmagicDesign_VIDREC_Video_Recorder_USBCapture.html
    BUT it converts the video to H.264 format which is a very difficult format to edit in. It is primarily designed to allow you to load video on to your computer for viewing, posting to you tube, or other very simple uses.
    If you intend to edit these files with iMovie, you might be able to get away with it (although importing the files will be slow), if you plan to edit with Final Cut Express or Final Cut Pro you will need to convert them to an editable format.
    You might look at taking your camera somewhere to a facility that can properly capture the DV material on your Mini-DV tapes and put them on an external hard disk for you.
    Then you could plug in that disk on your computer and obtain access to the files that way.
    Hope this helps.

  • Streaming from composite video capture

    I need a USB video capture device that accepts an NTSC color 480i composite signal and presents itself as a video input device that works with QuickTime (or iChat, EvoCam, etc). That last point is important: it can't depend on its own application software (except the drivers, of course) to do the recording. It must appear to the system as a video input like a camera.
    Most Mac compatible capture devices I have looked at do not make this easy to figure out, and so far the few devices I have found require their own software to do the entire capture process. Does anybody have any experience or recommendations?

    Hi,
    A DV Converter that is Firewire to the computer is going to be preferable for iChat.
    iChat can accept USB 1.1 input from a  device with driver.
    We tend to be talking USB 1.1 web cams here as many Converters don't do Drivers for USB in a form iChat can "See"
    iChat can accept USB 2.0 UVC complaint Camera input as the Driver has  been there since 10.4.9 (and working with iChat).
    Again you don't tend to get Converters or Camcorders with UVC Compliant software - only web cams.
    I have a Hollywood Dazzle but unfortunately it no longer is fully functional. (it works only as a  Firewire Hub at present)
    Pinnacle bought out Dazzle but do not support the older products and don't make anything Firewire capable themselves.
    The Hollywood Dazzle had two Firewire ports and could in fact allow a camera connect by RCA connectors to be outputted to two computers.
    It could also of course take Firewire from the computer back out over the RCA ones to a TV so you could see what iMovie was producing.
    iChat will accept Firewire.
    That means the Original External iSight (there were three models but only mounts really changed)
    Firewire CamCorders - and as has been mentioned some will act as Analogue to DV converters
    There were more Firewire Web cams at one stage  but only the Fire-i seems to have survived.
    If I was looking to buy another converter then a Canopus would be my choice. (Preferably something that could replicate what the Dazzle would do).
    10:08 PM      Friday; June 3, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Had some old movies from reel to reel on a vcr. i converted these to mp4 format using pinnacle video capture, quality was not great but it was decent enough on my computer. when i placed these on my ipad it was much worse and very choppy.  i have handbra

    had some old movies from reel to reel on a vcr. i converted these to mp4 format using pinnacle video capture, quality was not great but it was decent enough on my computer. when i placed these on my ipad it was much worse and very choppy.  i have handbrake and thought i could maybe change the movie so i could play it on ipad but dont know what dimensions or framerate etc. currently the movie on the computer is in 640 x 480 mpeg 4  aac.  thanks derek

    Jon,
    What Julianne said at first about re-linking made perfect sense and I followed it easily, had actually already been there.  But in my situation now, it didn't have any effect.  The directory of folders which had already been added were still just as they were, and the outstanding balance are not in the desired position.  And the folders which had been brought in earlier today when I clicked "synchronize folder", were still missing all the metadata.
    Maybe this means I need to start over, and I'm fine about doing that that, but I don't know what it takes to accomplish that.  I'm concerned now that any changes I make out of guesswork could only make the problem harder to resolve.  It just feels to me like something I did at the beginning just wasn't right, and now it's a tangle.
    Can you advise?
    Thanks,
    Gary

  • Video Capture with WinProducer

    Hello,
    I just bought a Ti4200-VTD8X and I'm trying to capture DV type 2 avi using WinProducer. The hard drive that I am capturing it to has 50gb free but yet I am getting an error after 30-40 min that my hard drive is low on disk space. The resulting AVI file is a little over 9gb in size so there is still plenty of space left. I have captured DV type 2 avi using Studio 8 and Edition 5 with no problem. Does anyone know a fix to this problem?
    WinProducer 2.0
    WDM driver 1.08 (driver without Macrovision)
    Detonator driver 45.23
    Windows XP SP1
    Thank You,
    -pjman

    I have found WinProducer 2 to be feeble at doing anything other than the most simplest of editing. I did try analogue capture using the DV codec and had simular experiences. It may be memory/harddrive space but I am very sceptical though as using a decent (Media Studio Pro)video editor/capture program it does not exhibit these problems.
    Also do not get confused between firewire transfer and analogue capture they are 2 total different operations. If when you used Studio8 etc you used Firewire transfer you are only transfering a file from camera to the harddrive so very little CPU time and memory is used. Where as Analogue capture using what ever codec requires lots of processing time, memory and hardrive space to process and convert/compress the video stream. Analogue video will benefit from having a dedicated harddrive just for video purposes. It may also help to kill all background tasks prior to any analogue captures, i.e. just the neccesary system programs (no virus checker etc.) and the video capture program running in memory.

  • Transmiting video captured from a webcam to another system through internet

    Hi there, I developed an application catch video stream from the webcam and transmit it another system within LAN network , I would like know possibility to senting it over internet to another system?? is it possible sent this streams to more than one location simultaneously. Any idea?
    Best regards
    anoop

    hi tony
    Thank you very much for reply, I very appreciate this.for tansnsmitting video using rtp protocol we need to specify the network output for media transmission(ie Medialocator).what i mean is we need to create a medialocator specifing the destination of our broadcast. which look like a typical url rtp://address:port/content-type ,here the address is the address to which video must be tansmitted.to transmit in unicast mode this address should be the address of the intended machine.its working fine.to transmit in mulitcast mode with a subnet we can do this by replacing 255 with last field of the address part.it also working fine within subnet so that we can display video captured from one cam to multiple destination
    ** this is the real problem whcih i m facing now is how to make it to work in internet? to mutliple destination? whether i need to create multiple medialocator url??? anybody have any idea? plz help thanking u in advance?
    anoop

  • Hauppauge High Definition Video Capture

    Does anyone have experience of the "Hauppauge HD PVR USB Hi-def H.264 Video Capture Device,high Definition USB 2.0 Video Capture With Hardware H.264 Video Encoders"?
    If so what do you think of it?
    Leaving aside PVR (it isn't in my opinion as it needs to be connected to a PC for recording) and the over emphasis on recording gaming sessions it sounds as though it might be a handy High Definition equivalent of the Canopus ADVC analogue to digital converter range.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children

    Neale,
    I have never used one, nor have I read many articles from those, who have used it. The exception has been some users, who have had issues with Hauppage capture cards, but I do not know of any, who used this device.
    Good luck, and wish that I could help, but will follow the thread, in hopes of learning something new.
    Hunt

  • Why Expensive Video Capture Cards?

    In these times of file based workflows, how important are video capture cards apart from being able to monitor timelines on external video monitors. Considering how expensive some of these cards are.

    My Storm card is gathering dust in a PC's carcass two rooms away. I haven't used it in two years but can't bare to bin it.  Really a wonderful card, The RaptorRT as well. The RT Chroma Key was way more than Premeire could do alone, and could be run synchronously with the RT color correction and RT blur capabilities, as well as several other useful RT fx.
    For work I bought Premiere Pro 1.5, Audition, and Photoshop with a Canopus RaptorRT all for $599 from VideoGuys in 2004ish. That P4 system built for $900   I was proud of setting up a RT DV NLE system that had A\D ability, Pristine DV output and RT performance that was on par with system that cost 10 times as much.
    I'm equally enamored with the Mercury Playback Engine Hardware Acceleration. However the essential GTX or Quadro cards sort of serve in the same capacity  as the oldschool proprietary Capture\RT cards. While not used for capture, it does accelerate the RT capabilities of a properly configured system. Unlike a fixed RT I\O card, MPE performance can scale with your systems cpus, ram, and  choice of Nvidia card.
    On Topic....Modern capture cards... Very useful for Studio Capture. Analog, SDI switchers.or HDMI from cameras. Usually a fixed box integrated into control-room. Aja, Bluefish, BlackMagic are some better names. Also, you mentioned the playback\monitoring abilities these cards offer in your post. This fine monitoring ability is crucial to some peoples workflow. CS6 is supposed to help these 3rd party cards integrate better than some earlier versions.
    More from 2005.... I also chose a Matrox system..... different experience. The deal again was incredible, a premiere pro 1.5 combo suite with an upgrade to Premiere Pro 2.0 editing suite with After Affects and Audition. Plus a Matrox Card, which was a pain to get running and was never stable and offer little advantage over a vanilla kit. When the Matrox card worked, the RT color correction was a benefit, and the RT scaling & 3d perspective tools were useful. A little known benefit of a matrox card that made the purchase worthwhile for us was the ability output composite or S-video NTSC from any clip or stream  that would play in the windows media player. So we could always get odd materials to dv easy that way. Like a 3 hour landuse meeting that a tech forgot to roll tape on, but the web streaming box got it, at 360x240.  The Matrox card scaled it to NTSC.
    ... Then it Blew up. The end.

Maybe you are looking for

  • Transfer data to new macbook pro

    Hi I have purchase a new MacBook Pro and would like to transfer everything  to the new one. The old MacBook Pro will be given to my friend so I would like to delete all personal files settings etc Thanks Elijah

  • Has anyone configured Harvester to Jdeveloper successfully?

    Hi , If anyone has configured successfully the harvester onto Jdev please reply back. I have diligently followed manual to configure. But no luck yet in harvesting. I was able to configure it successfully. Getting loads of errors while i harvest. Err

  • Note 157009 - Construction Industry Scheme (CIS) UK

    Does anyone have any idea when this note is due to be released by SAP? I am conscious of the time frame left to deliver this change.... It has already been delayed by two weeks!!!!

  • ORA-36836 about cube dimensionality ???

    Hi there, I've been trying lately to use AWM to build an OLAP cube based on some sample data I have related to phone communications. Up to now I've been able although painfuly to build four dimensions (date/time, a-number, b-number, exit cause) and a

  • Results for % calculation with Condition

    I have a condition on my query in BEx Query Designer that limits the customers shown to ones who have a dollar value in a particular column.  I am now trying to get the results rows to take the condition into account. For the dollar key figures, I ca