Re: unknown software exception with SampleGrabber

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"winston84" <winstonkl01@xxxxxxxxxxx> wrote in message
news:1BC6FDF6-D085-4AD5-A764-3C8C5697535E@xxxxxxxxxxxxxxxx
>I found the error.
>
> I created the class c_GrabberCB inside the function AddGrabber, but i have
> to declare the class global.
>
> But now I've got another question:
> How do I get a pointer to the buffer, where I can work on the buffer?
> I have read something about in the SampleCB function, but there I only got
> a
> pointer to the IMediaSample-Object?
> Can I call there the GetPointer-function to get the pointer?
>
> Am I on the right way?
>

If you use the 2nd SampleGrabber function - you get a pointer to the buffer:

STDMETHODIMP BufferCB( double SampleTime, BYTE * pBuffer, long
BufferSize )

just change:
pSGrabber->SetCallback(&c_GrabberCB, 0);
to
pSGrabber->SetCallback(&c_GrabberCB, 1); <-- 2nd function

Mechi




.



Relevant Pages

  • Re: some unanswered questions on C
    ... but what exactly is an uninitialised pointer? ... You've said that localvar is a pointer to an int, ... > what i want to ask is that when i declare my buffer for fgets as ... but you haven't declared any space for the buffer. ...
    (comp.unix.programmer)
  • Re: Write to file & Change Directory
    ... working, of course, but the do_*functions operate in context of the ... So, before initializing, I have to declare what type of pointer it will ... as well as a buffer in his own address space. ...
    (comp.os.minix)
  • Re: unknown software exception with SampleGrabber
    ... I created the class c_GrabberCB inside the function AddGrabber, ... to declare the class global. ... How do I get a pointer to the buffer, where I can work on the buffer? ...
    (microsoft.public.win32.programmer.directx.video)
  • [net-next PATCH 4/5] igb: Add support for enabling VFs to PF driver.
    ... pointer to the hardware struct ... under the terms and conditions of the GNU General Public License, ... * @msg: The message buffer ... * returns SUCCESS if it successfully copied message into the buffer ...
    (Linux-Kernel)
  • Re: some unanswered questions on C
    ... A pointer variable that's never been given a value. ... you don't know what memory you're modifying. ... >what i want to ask is that when i declare my buffer for fgets as ... "char *buffer" creates a pointer, ...
    (comp.unix.programmer)