Проблемы с написание фильтра в DirectShow
От: teos  
Дата: 31.08.09 15:20
Оценка:
Написал такую систуму: фильтр принемает кадр видео и сохраняет его в памяти, а другой класс выводит его на эран.
Такой вопрос: В MSDN-не написанно что он принимает подтипы видео "RGB-24, RGB-32, UYVY, and so forth." мне что для каждого формата писать приобразователь в RGB24?
Так как второй класс выводит колько RGB24 на экран. Может есть такой фильт каторый приобразует все форматы в какой-нибуть понятный формат?
Библиотека с фильтром:http://www.gamedev.ru/files/?id=45534
Приложение используюеще библиотеку:http://www.gamedev.ru/files/?id=45535
Re: Проблемы с написание фильтра в DirectShow
От: D. Mon Великобритания http://thedeemon.livejournal.com
Дата: 31.08.09 18:03
Оценка:
T>Такой вопрос: В MSDN-не написанно что он принимает подтипы видео "RGB-24, RGB-32, UYVY, and so forth." мне что для каждого формата писать приобразователь в RGB24?

В DirectShow есть готовый фильтр Color Space Converter, он как раз из кучи форматов делает RGB. Старый рендерер, который принимал только RGB, обычно на пару с ним работал.

P.S. Кажется, у тебя проблемы с написанием не только фильтра.
Re[2]: Проблемы с написание фильтра в DirectShow
От: teos  
Дата: 01.09.09 11:59
Оценка:
Здравствуйте, D. Mon, Вы писали:

T>>Такой вопрос: В MSDN-не написанно что он принимает подтипы видео "RGB-24, RGB-32, UYVY, and so forth." мне что для каждого формата писать приобразователь в RGB24?


DM>В DirectShow есть готовый фильтр Color Space Converter, он как раз из кучи форматов делает RGB. Старый рендерер, который принимал только RGB, обычно на пару с ним работал.


DM>P.S. Кажется, у тебя проблемы с написанием не только фильтра.


Спасибо что ответили.
Нашел в MSDN-е вот: Color Space Converter Filter
This transform filter converts from one RGB color type to another RGB type, such as between 24-bit and 8-bit RGB color. Since this type of conversion is generally handled more efficiently within a video decompressor, the main use of the Color Space Converter is when the stream source consists of uncompressed RGB frames.

и вот это: MSYUV Color Space Converter Codec
MSYUV is a YUV-to-RGB color space converter codec. It enables playback of video source data in YUV formats on clients whose video display adapter cannot be used for YUV-to-RGB conversions in hardware. The codec participates in filter graphs through the AVI Decompressor wrapper filter.

Digital conferencing cameras with 1394 or USB interfaces can produce image data in various YUV formats. If the display hardware does not support on-board YUV-to-RGB conversion, or if the hardware conversion capability cannot be used for some other reason, then the YUV image data must be converted to RGB format before it is sent to the Video Renderer.

Because of the Video Renderer's requirement for an RGB input type at connection time, this filter might be inserted into a graph upstream from the Video Renderer during automatic graph building. Specifically, if the Graph Builder detects a YUV format in the media type of the upstream filter's output pin, the Graph Builder will insert the AVI Decompressor, which will then load the MSYUV codec and configure it initially to perform the conversion to RGB. After the graph first transitions to a run or paused state, the Video Renderer filter can detect whether the video display adapter can perform the conversion in hardware. If it can, then the AVI Decompressor is notified and it reconfigures MSYUV to operate in "pass-through mode," which causes the codec to skip the conversion and copy the YUV image data directly onto a DirectDraw overlay surface in video memory.

Because the Video Mixing Renderers (VMR-7 and VMR-9) never use GDI, they do not require an RGB type at connect time, and the MSYUV Color Space Converter is never inserted before the VMR in a graph.

MSYUV converts packed YUV formats to RGB, as shown in the following list:

Input formats: UYVY, YUY2, YVYU
Output formats: RGB 8, RGB 16, RGB 24, RGB 32

Не могли бы вы, если вас не затруднит скинуть пример как добавлять, и какой фильтр в граф.

P.S. Вот такие не гамотные программисты в наш век пошли.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.