CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2007
    Posts
    129

    Unhappy DirectShow frustrations.

    Hi all,

    Not sure if this is the right forum, but here goes.

    I've been struggling to create a very simple DirectShow application that will display a live video stream in a window of our choosing with text overlay. I can get the video stream to show, but always in its own window, not the main form. Also, the attempts at text overlay have met with limited success, either not displaying or only showing the text in the main window sans video.

    The test project that's attached will show you what I'm talking about. The commented sections, such as the VMR stuff, are part of the myriad tests I've been doing.

    Any help would be appreciated. Thanks.
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2007
    Posts
    129

    Unhappy Re: DirectShow frustrations.

    Can anyone help me? I am stumped.

  3. #3
    Join Date
    Nov 2007
    Posts
    129

    Unhappy Re: DirectShow frustrations.

    Does anyone understand DirectShow?
    I've been trying to learn, but I think I'm missing something and I really can't figure out what I'm doing wrong.
    I've been stuck on this problem for 2 months now with almost no progress.
    I attempt to output video in windowless mode to my window, but it always draws to its own window. And when I attempt to overlay text, either the text show up on my window over a "black" image (obviously not my input video source), or nothing is displayed at all.

    Can anyone help?

  4. #4
    Join Date
    Feb 2005
    Posts
    2,160

    Re: DirectShow frustrations.

    Perhaps I'm misreading your question, but my understanding of DirectX is that the window is superfluous. It is only used for its rectangle as an indicator to the area reserved for DirectX output. Any GDI, etc, graphics operations using the windows handle will necessarily fail because the area is already reserved for direct screen memory access.

  5. #5
    Join Date
    Nov 2007
    Posts
    129

    Re: DirectShow frustrations.

    The problem is that the video I'm speaking of is not getting drawn to my window. It's getting drawn to it's own window and I don't know why.

    It's set up for Windowless Mode. Can't figure out why it won't draw to the window I already set up.

  6. #6
    Join Date
    Nov 2007
    Posts
    129

    Unhappy Re: DirectShow frustrations.

    I attempt to draw text text to a windowless vmr9, and I am able to get text overlay but my text either only shows up in white or not at all.

    Attached is my project - Compiles in VS2008
    Attached Files Attached Files

  7. #7
    Join Date
    Nov 2007
    Posts
    129

    Unhappy Re: DirectShow frustrations.

    Can anyone help me?
    I attempt to draw text text to a windowless vmr9, and I am able to get text overlay but my text either only shows up in white or not at all.
    The funny thing is that I can only draw white text. There appears to be a problem with the offscreen bitmap I am drawing the text to because any color other than white DOES NOT SHOW UP AT ALL.

    My code is attached in my previous post. It compiles in Visual Studio 2008.

  8. #8
    Join Date
    Nov 2007
    Posts
    129

    Unhappy Re: DirectShow frustrations.

    Does anyone know why drawing text to an offscreen bitmap to a Windowless VMR only allows white text?

    The DirectShow overlay samples seem to work with various colors, and I just can't understand why attempting to draw text to my offscreen bitmap only shows up if the text is white.

    Her is a link to my project (not sure what the link TAG is). It compiles in Visual Studio 2008.

    http://www.codeguru.com/forum/attach...1&d=1260829454

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured