But what if the input is RGB32?
umc_video_enc_con assumes VideoData input object is initialized with some YUV color format. Later, for MPEG-2 stream type, GetNextYUVBuffer is called to setup the input buffer.
If I initialize instead with RGB32 color format, how are input buffers setup for MPEG-2? If I call GetNextYUVBuffer, I observe an exception, apparently because a color format other than YUV was selected.
Is there a way to encode MPEG-2 with RGB32 input? Thanks.
The umc_video_enc_con is a simple application to show how to use VideoEncoder class. If you are developing complicated media player or transcoder application then you have to care on RGB2YUVcolor conversion step.
Tovarich, Vladimir, I understand that umc_video_enc_con is a simple application. Question is: can MPEG-2 encoder accept RGB32 input? And if so, how to condition the input buffers?
TovarichVladimir: if VideoEncoder does not support color conversion inside, does that mean that all input to MPEG2 VideoEncoder must be YUV? My particular context is an OnPaint method that is passed an RGB32 bitmap. I want the OnPaint method to call video encoder to write an encoded output frame.