Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Simultaneous Previewing & Video Capture using DirectShow [modified]

Simultaneous Previewing & Video Capture using DirectShow [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
comgraphicshelpquestion
22 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A aloha1812

    I want to capture bitmap on "capture video" from "Live video" when I click button "Capture Image" on Dialog. Don't need save this bitmap. How should I do? (note: I insert a button "Capture Image") aloha

    J Offline
    J Offline
    Justin Tay
    wrote on last edited by
    #8

    So what difficulties are you facing using the GrabFrame() and GetFrame() functions? Be specific about what you have tried and what you are trying to achieve.

    A 1 Reply Last reply
    0
    • A aloha1812

      I posted this question on two forum "code project" and "code guru" because this article author posted the same . aloha

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #9

      Just because someone wrote an article does not mean they will read this forum on the day you happen to post a question. So, like I said, you need to either ask a generic question that does not refer to an article, or post the question in the forum for the article ( at the bottom of the article ) in order to generate an email that will alert the author, and then if the author is still supporting his articles, he will get back to you. So far, he probably doesn't even know that you asked a question. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      A 1 Reply Last reply
      0
      • J Justin Tay

        So what difficulties are you facing using the GrabFrame() and GetFrame() functions? Be specific about what you have tried and what you are trying to achieve.

        A Offline
        A Offline
        aloha1812
        wrote on last edited by
        #10

        please give me your email, I want to exchange on Email, to attach file aloha

        J 1 Reply Last reply
        0
        • C Christian Graus

          Just because someone wrote an article does not mean they will read this forum on the day you happen to post a question. So, like I said, you need to either ask a generic question that does not refer to an article, or post the question in the forum for the article ( at the bottom of the article ) in order to generate an email that will alert the author, and then if the author is still supporting his articles, he will get back to you. So far, he probably doesn't even know that you asked a question. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

          A Offline
          A Offline
          aloha1812
          wrote on last edited by
          #11

          I asked the author, but I don't know why doesn't reply so I posted on forum.If you are unpleasure, I'm sorry aloha

          C 1 Reply Last reply
          0
          • A aloha1812

            I asked the author, but I don't know why doesn't reply so I posted on forum.If you are unpleasure, I'm sorry aloha

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #12

            To be frank, I really don't care, except that I'd like to see you get the help you need. If the author is not replying, then I'd try rewording the question so that it doesn't refer to the article and post it here again. I'm sorry if you thought I was complaining, I was trying to direct you to where you'd be mostly likely to get the help you're wanting. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

            A 1 Reply Last reply
            0
            • C Christian Graus

              To be frank, I really don't care, except that I'd like to see you get the help you need. If the author is not replying, then I'd try rewording the question so that it doesn't refer to the article and post it here again. I'm sorry if you thought I was complaining, I was trying to direct you to where you'd be mostly likely to get the help you're wanting. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

              A Offline
              A Offline
              aloha1812
              wrote on last edited by
              #13

              I'm sorry, I don't think you are complaining, thank for your direction what's your nickname? I want to exchange on Yahoo Messenger aloha

              C 1 Reply Last reply
              0
              • A aloha1812

                please give me your email, I want to exchange on Email, to attach file aloha

                J Offline
                J Offline
                Justin Tay
                wrote on last edited by
                #14

                If you have a question post it here. There's no need to send me an e-mail.

                A 1 Reply Last reply
                0
                • A aloha1812

                  I'm sorry, I don't think you are complaining, thank for your direction what's your nickname? I want to exchange on Yahoo Messenger aloha

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #15

                  I don't have any messenger installed, sorry. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

                  A 1 Reply Last reply
                  0
                  • J Justin Tay

                    If you have a question post it here. There's no need to send me an e-mail.

                    A Offline
                    A Offline
                    aloha1812
                    wrote on last edited by
                    #16

                    I want code of ".OnCaptureImage" when insert button "Capture Image" on Dialog aloha

                    J 1 Reply Last reply
                    0
                    • C Christian Graus

                      I don't have any messenger installed, sorry. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

                      A Offline
                      A Offline
                      aloha1812
                      wrote on last edited by
                      #17

                      Can you help me to solve this problem? aloha

                      1 Reply Last reply
                      0
                      • A aloha1812

                        I want code of ".OnCaptureImage" when insert button "Capture Image" on Dialog aloha

                        J Offline
                        J Offline
                        Justin Tay
                        wrote on last edited by
                        #18

                        You didn't answer my previous question. What difficulties are you facing with the GrabFrame() and GetFrame() functions? What have you written so far in your handler? Did you even look at his OnTimer handler?

                        A 1 Reply Last reply
                        0
                        • J Justin Tay

                          You didn't answer my previous question. What difficulties are you facing with the GrabFrame() and GetFrame() functions? What have you written so far in your handler? Did you even look at his OnTimer handler?

                          A Offline
                          A Offline
                          aloha1812
                          wrote on last edited by
                          #19

                          I don't know useful of imagecapture() function, grabFrame() and GetFrame() are used for "Live Video" window aloha

                          J 1 Reply Last reply
                          0
                          • A aloha1812

                            I don't know useful of imagecapture() function, grabFrame() and GetFrame() are used for "Live Video" window aloha

                            J Offline
                            J Offline
                            Justin Tay
                            wrote on last edited by
                            #20

                            You still aren't answering my questions. And I still don't know what the problem is nor what you are trying to do. The article presents a very unconventional way of capturing an image off a filter graph, and requires that a VMR video renderer be used. Depending on what you need, and what you can assume of the system it will be installed in, this may or may not be a good technique to use. Ok how about this, you copy the OnTimer handler and put it in your handler.

                            DWORD dwSize;
                            dwSize=this->m_VMRCap.GrabFrame();
                            if(dwSize>0)
                            {
                            BYTE *pImage;
                            this->m_VMRCap.GetFrame (&pImage);
                            this->m_ctrlCaptureIMG .ShowImage (pImage);
                            }

                            A 1 Reply Last reply
                            0
                            • J Justin Tay

                              You still aren't answering my questions. And I still don't know what the problem is nor what you are trying to do. The article presents a very unconventional way of capturing an image off a filter graph, and requires that a VMR video renderer be used. Depending on what you need, and what you can assume of the system it will be installed in, this may or may not be a good technique to use. Ok how about this, you copy the OnTimer handler and put it in your handler.

                              DWORD dwSize;
                              dwSize=this->m_VMRCap.GrabFrame();
                              if(dwSize>0)
                              {
                              BYTE *pImage;
                              this->m_VMRCap.GetFrame (&pImage);
                              this->m_ctrlCaptureIMG .ShowImage (pImage);
                              }

                              A Offline
                              A Offline
                              aloha1812
                              wrote on last edited by
                              #21

                              void CDXCaptureDlg::OnCapImage() { DWORD dwSize; dwSize=this->m_VMRCap.GrabFrame (); if(dwSize>0) { BYTE *pImage; this->m_VMRCap.GetFrame (&pImage); this->m_ctrlCaptureIMG .ShowImage (pImage); } } this code is used to capture a video, but I want to capture a bitmap aloha -- modified at 2:51 Tuesday 20th June, 2006

                              J 1 Reply Last reply
                              0
                              • A aloha1812

                                void CDXCaptureDlg::OnCapImage() { DWORD dwSize; dwSize=this->m_VMRCap.GrabFrame (); if(dwSize>0) { BYTE *pImage; this->m_VMRCap.GetFrame (&pImage); this->m_ctrlCaptureIMG .ShowImage (pImage); } } this code is used to capture a video, but I want to capture a bitmap aloha -- modified at 2:51 Tuesday 20th June, 2006

                                J Offline
                                J Offline
                                Justin Tay
                                wrote on last edited by
                                #22

                                The code does not capture a video and I don't even know how you came to that conclusion. I would suggest you read the code and understand what is going on first. The code gets the current bitmap in the VMR renderer and ensures that it is in RGB24. pImage will end up as an array of RGBTRIPLEs that makes up the image. Note that he discards the bitmap header in GrabFrame() all you have is just the RGB24 data. If you want to create a HBITMAP with this, look up CreateDIBitmap on msdn.

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups