Re: IMediaSample
- From: Yin99 <ws@xxxxxxxxxxx>
- Date: Thu, 26 Feb 2009 19:43:52 -0800 (PST)
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
.
- Follow-Ups:
- Re: IMediaSample
- From: Alessandro Angeli
- Re: IMediaSample
- References:
- IMediaSample
- From: Yin99
- Re: IMediaSample
- From: videophool
- IMediaSample
- Prev by Date: How to implement a DS source/splitter filter that accept live video
- Next by Date: Re: Why pReceivePin->ReceiveConnection is getting failed in my code in this code?
- Previous by thread: Re: IMediaSample
- Next by thread: Re: IMediaSample
- Index(es):
Relevant Pages
|