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. Problems using ICDraw.

Problems using ICDraw.

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
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.
  • R Offline
    R Offline
    Redeemer dk
    wrote on last edited by
    #1

    My problem is that when i try to use ICDraw, nothing happens. I've done exactly what the MSDN says, but it's not working :( Here's my code:

    DWORD dw;
    DWORD dwNumBuffers = 0;

    ICDrawBegin(hVideo, ICDRAW_FULLSCREEN, NULL, NULL, NULL, 0, 0, 0, 0, &VideoInfo.bmiHeader, 0, 0, VideoInfo.bmiHeader.biWidth, VideoInfo.bmiHeader.biHeight, VideoHeader.dwRate, VideoHeader.dwScale);

    avi.ReadNextVideoFrame(lpData, VideoInfo.bmiHeader.biWidth * VideoInfo.bmiHeader.biHeight * 24 / 8, VideoInfo.bmiHeader.biCompression);

    ICGetBuffersWanted(hVideo, &dwNumBuffers);

    for (dw = 0; dw < dwNumBuffers; dw++)
    {
    ICDraw(hVideo, 0, (LPVOID)&VideoInfo.bmiHeader, lpData, VideoInfo.bmiHeader.biWidth * VideoInfo.bmiHeader.biHeight * 24 / 8, dw);
    }

    ICDrawStart(hVideo);
    dw = 0;

    for (int i = 1; i < (int)((float)VideoHeader.dwRate / VideoHeader.dwScale * 60); i++)
    {
    avi.ReadNextVideoFrame(lpData, VideoInfo.bmiHeader.biWidth * VideoInfo.bmiHeader.biHeight * 24 / 8, VideoInfo.bmiHeader.biCompression);
    ICDraw(hVideo, 0, (LPVOID)&VideoInfo.bmiHeader, lpData, VideoInfo.bmiHeader.biWidth * VideoInfo.bmiHeader.biHeight * 24 / 8, dw);

    }

    ICDrawStop(hVideo);
    ICDrawFlush(hVideo);
    ICDrawEnd(hVideo);

    The avi.ReadNextVideoFrame() is a function that reads the next videoframe from the avifile. I'm not sure i'm doing it right, i don't think the MSDN illustrates very clearly how to do it. Thanks all! -Rune Svendsen

    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