Re: IMediaSample

Tech-Archive recommends: Speed Up your PC by fixing your registry



On Feb 26, 3:44 pm, videoph...@xxxxxxxxxxx wrote:
The data you write into a sample buffer depends on the media format
that was negotiated during connection.  You can not simply put data
into the smaple and expect the downstream filter to recognize it.  I
suggest that you look at the sample filters that are included in the
SDK.

true, i coded SetMediaType and when I load my Pushfilter in Graph
Studio and "RendeR" pin, it loads the codec and video render like I
want...

but my question is in the IMediaSample data buffer it contains, can
this be the raw video, or does it have to be a complete frame? if raw
video can it be any size buffer I want. For example, lets say I
open a h264 file from disk, load it into a memory BYTE buffer, what
I'd like to do is take first 4096 bytes, put in the "payload" or this
buffer thats in IMediaSample, send downstream, take next 4096 bytes,
put in the payload, send down stream, get next 4096 bytes, put in
payload, well you get the idea and parse binary byte by byte shoving
into this payload buffer thats in IMediasample, and will this work?

OR, do i need to actually parse the video myself, find a complete
frame, set timestamps, and shove frame by frame into IMEdiaSample's
buffer and send downstream?

I've read SDK Docs, looked online everywhere, and examples with
bitmaps are everywhere, but nowhere can I find somebody trying to play
a video file by putting the data into IMediaSample's buffer. or if
there is an example of this anywhere online please let me know!!
Thanks!

Yin

.



Relevant Pages

  • Re: Question about Camera driver with DirectShow
    ... Does the null driver support YUV422? ... > I tried the camera application in pimg.exe. ... The video files captured are playable and they are a little jerky. ... >> As for frame buffer allocation, we support three different modes, driver ...
    (microsoft.public.windowsce.embedded)
  • Re: In-tree version of new FireWire drivers available
    ... Just to recap, the dual buffer receive mode, as described in section ... quadlet aligned amount of header data can be appended into one buffer ... *either* the header buffer or the payload buffer fills up. ... enough to hold headers for all the packets it takes to fill up the ...
    (Linux-Kernel)
  • Re: Question about Camera driver with DirectShow
    ... I did not made any modifications to the NULL driver. ... I tried the camera application in pimg.exe. ... The video files captured are playable and they are a little jerky. ... > As for frame buffer allocation, we support three different modes, driver ...
    (microsoft.public.windowsce.embedded)
  • Re: Xbox Extender giving network congestion errors
    ... video play - although it doesn't really appear to be. ... Its only for recorded video and most predominant when captioning is enabled. ... Makes sense that the buffer gets depleted and doesn't get ... the Xbox can't refill its buffers. ...
    (microsoft.public.windows.mediacenter)
  • Re: Xbox Extender giving network congestion errors
    ... dropped video frames, but full audio (video looks choppy, audio is ... > itself and the stream continues on its merry way until it reaches the end ... If you're seeing the same problem as Kraig with network throughput dropping ... > The video buffer in the software reaches the end. ...
    (microsoft.public.windows.mediacenter)