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. VfW Saving Compression Options

VfW Saving Compression Options

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
9 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.
  • M Offline
    M Offline
    Member 13050231
    wrote on last edited by
    #1

    hi! i wrote a very simple app to capture videos with VfW.

    HWND hwnd = capCreateCaptureWindow ("MyWindow", WS_CHILD | WS_VISIBLE , 0, 0, 160, 120, hwndParent, nID);
    capDriverConnect (hWndC, 0);
    capDlgVideoCompression(hwnd); // this displays the compression settings dialog
    capCaptureSequence (hwnd);

    does anyone know how to store the compression settings to reuse them? is there any possibility to access the internal data of the capture window? thanks in advance -arni

    L 1 Reply Last reply
    0
    • M Member 13050231

      hi! i wrote a very simple app to capture videos with VfW.

      HWND hwnd = capCreateCaptureWindow ("MyWindow", WS_CHILD | WS_VISIBLE , 0, 0, 160, 120, hwndParent, nID);
      capDriverConnect (hWndC, 0);
      capDlgVideoCompression(hwnd); // this displays the compression settings dialog
      capCaptureSequence (hwnd);

      does anyone know how to store the compression settings to reuse them? is there any possibility to access the internal data of the capture window? thanks in advance -arni

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Yes, but it depends how the information is stored by the library functions. The documentation should help.

      M 1 Reply Last reply
      0
      • L Lost User

        Yes, but it depends how the information is stored by the library functions. The documentation should help.

        M Offline
        M Offline
        Member 13050231
        wrote on last edited by
        #3

        Thanks for the reply...you are right - that's the question! the documentation doesn't say anything about that.

        L 1 Reply Last reply
        0
        • M Member 13050231

          Thanks for the reply...you are right - that's the question! the documentation doesn't say anything about that.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          How are these values set in the first place? And, surely if you can display them then you can save the results somewhere.

          M 1 Reply Last reply
          0
          • L Lost User

            How are these values set in the first place? And, surely if you can display them then you can save the results somewhere.

            M Offline
            M Offline
            Member 13050231
            wrote on last edited by
            #5

            the call to:

            capDlgVideoCompression(hwnd);

            displays a dialog to choose compression an parameters, and after "OK" they are stored somewhere (in the hwnd?) this process does work for the current session, but when i restart my app everything is gone. none of the structures (CAPDRIVERCAPS,CAPINFOCHUNK,CAPSTATUS,CAPTUREPARMS,etc.) gives me valid information about the chosen compression. what i need is the COMPVARS or AVICOMPRESSIONOPTIONS structure, but to access these seems to be a completely different approach. tia. -arno

            L 1 Reply Last reply
            0
            • M Member 13050231

              the call to:

              capDlgVideoCompression(hwnd);

              displays a dialog to choose compression an parameters, and after "OK" they are stored somewhere (in the hwnd?) this process does work for the current session, but when i restart my app everything is gone. none of the structures (CAPDRIVERCAPS,CAPINFOCHUNK,CAPSTATUS,CAPTUREPARMS,etc.) gives me valid information about the chosen compression. what i need is the COMPVARS or AVICOMPRESSIONOPTIONS structure, but to access these seems to be a completely different approach. tia. -arno

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              The HWND object only exists for the life of the application, so any values stored inside it will be lost when the application terminates. You will need to save all the values yourself in some permanent storage area. See Where should I store my data?[^]; it's written for .NET but can easily be adapted to a Win32 app.

              M 1 Reply Last reply
              0
              • L Lost User

                The HWND object only exists for the life of the application, so any values stored inside it will be lost when the application terminates. You will need to save all the values yourself in some permanent storage area. See Where should I store my data?[^]; it's written for .NET but can easily be adapted to a Win32 app.

                M Offline
                M Offline
                Member 13050231
                wrote on last edited by
                #7

                ok, i know that my classes and variables won't survive - the question was not how to SAVE the data, it's how to ACCESS it! thanks richard. anyone else has any idea?

                J 1 Reply Last reply
                0
                • M Member 13050231

                  ok, i know that my classes and variables won't survive - the question was not how to SAVE the data, it's how to ACCESS it! thanks richard. anyone else has any idea?

                  J Online
                  J Online
                  jeron1
                  wrote on last edited by
                  #8

                  Quote:

                  the question was not how to SAVE the data,

                  from the OP

                  Title:

                  VfW Saving Compression Options

                  Quote:

                  does anyone know how to store the compression settings to reuse them?

                  :confused:

                  "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

                  M 1 Reply Last reply
                  0
                  • J jeron1

                    Quote:

                    the question was not how to SAVE the data,

                    from the OP

                    Title:

                    VfW Saving Compression Options

                    Quote:

                    does anyone know how to store the compression settings to reuse them?

                    :confused:

                    "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

                    M Offline
                    M Offline
                    Member 13050231
                    wrote on last edited by
                    #9

                    plz read the whole thread! i want to store the settings, that i made in the dialog! i haven't found a way to ACCESS the data/settings programmatically - that was my question. i know thousands of ways to store/serialize/dump the data. thank you.

                    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