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#
  4. Capturing WebCams

Capturing WebCams

Scheduled Pinned Locked Moved C#
helpc++jsontutorialquestion
1 Posts 1 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.
  • D Offline
    D Offline
    Demian Panello
    wrote on last edited by
    #1

    Hi. I have 2 webcams connected, they are from different providers, (a Genius NB and another cam). My application must be able to capure both cams, so, I have 2 picture box and I'm using the API function capGetDriverDescription to get the descripions of the cams as the following code shows: public static Device[] GetAllDevices() { String dName = "".PadRight(100); String dVersion = "".PadRight(100); for (short i = 0; i < 10; i++) { if (capGetDriverDescriptionA(i, ref dName, 100, ref dVersion, 100)) { Device d = new Device(i); d.Name = dName.Trim(); d.Version = dVersion.Trim(); devices.Add(d); } dName = "".PadRight(100); dVersion = "".PadRight(100); } return (Device[])devices.ToArray(typeof(Device)); } This is code is from an article from here, CP. The problem is, that this code only get the description of 1 cam, I don't know why but capGetDriverDescriptionA always return true one time. Both cams works well, even there's a program called SKIN distributed by my Genius cam that can shows both devices and you can select which one to use. I don't how this program does that. But I need to show the video of 2 web cams at the same time. Which API could help me? Thank you.

    Demian. "I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone." -Bjarne Stroustrup, computer science professor, designer of C++ programming language (1950- )

    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