| Author |
Message |
Naroin
Guest
|
Posted:
Fri Sep 24, 2004 2:28 pm Post subject:
audio stream |
|
|
hi!
i'm trying to insert an image stream in a windows media stream
so i created a new stream
pProfile->CreateNewStream(WMMEDIATYPE_Image, &pConfigJpeg);
configured it (like in the documentation about image streams)
added it in the writer
the configuration works well, i can get the profile config without any
problem
THEN, i try to pass an image to encode
the image stream is configured for 384*288 pictures
so i create a INSSBuffer of size 331776
in the buffer, i tried - an image, - all zeros
and i do a writesample
it returns NS_E_INVALID_DATA
and i really dont know WHY!
please help!
thx
|
|
| Back to top |
|
 |
Becky Weiss [MS]
Guest
|
Posted:
Sat Sep 25, 2004 2:17 am Post subject:
RE: audio stream |
|
|
One step you didn't mention doing was pProfile->AddStream (followed, of
course, by pWMWriter->SetProfile()).
Assuming you're doing this, though, the input for image streams is somewhat
picky. It requires that the input sample be an RGB bitmap, starting with a
BITMAPINFOHEADER (note that this is different from plain old input video
frames, which don't start with the BITMAPINFOHEADER).
Another caveat I'll just mention here is that you want to make sure that
your bitrate / buffer window are nice and generous for image streams. Those
streams, as you can imagine, are quite bursty.
Becky
This posting is provided AS IS with no warranties and confers no rights.
"Naroin" wrote:
| Quote: | hi!
i'm trying to insert an image stream in a windows media stream
so i created a new stream
pProfile->CreateNewStream(WMMEDIATYPE_Image, &pConfigJpeg);
configured it (like in the documentation about image streams)
added it in the writer
the configuration works well, i can get the profile config without any
problem
THEN, i try to pass an image to encode
the image stream is configured for 384*288 pictures
so i create a INSSBuffer of size 331776
in the buffer, i tried - an image, - all zeros
and i do a writesample
it returns NS_E_INVALID_DATA
and i really dont know WHY!
please help!
thx
|
|
|
| Back to top |
|
 |
Naroin
Guest
|
Posted:
Mon Sep 27, 2004 11:42 am Post subject:
Re: audio stream |
|
|
On Fri, 24 Sep 2004 15:17:03 -0700, "Becky Weiss [MS]"
| Quote: | Assuming you're doing this, though, the input for image streams is somewhat
picky. It requires that the input sample be an RGB bitmap, starting with a
BITMAPINFOHEADER (note that this is different from plain old input video
frames, which don't start with the BITMAPINFOHEADER).
|
thank you for your help, but i still dont understand what to do:
i just tried to add a BITMAPINFOHEADER in the buffer before the raw
data but it doesnt work
the content of a .bmp file doesnt work too
what is the good format to pass to the writer?
|
|
| Back to top |
|
 |
|
|
|
|