Commit 1af56869 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

mf/tests: Check sample grabber RGB / NV12 orientation.

parent 7b08bf97
......@@ -53,7 +53,44 @@ typedef struct attribute_desc media_type_desc[32];
#define ATTR_RATIO(k, n, d, ...) {.key = &k, .name = #k, {.vt = VT_UI8, .uhVal = {.HighPart = n, .LowPart = d}}, .ratio = TRUE, __VA_ARGS__ }
#define ATTR_UINT64(k, v, ...) {.key = &k, .name = #k, {.vt = VT_UI8, .uhVal = {.QuadPart = v}}, __VA_ARGS__ }
#define check_media_type(a, b, c) check_attributes_(__LINE__, (IMFAttributes *)a, b, c)
#define check_attributes(a, b, c) check_attributes_(__LINE__, a, b, c)
extern void check_attributes_(int line, IMFAttributes *attributes, const struct attribute_desc *desc, ULONG limit);
#define check_media_type(a, b, c) check_attributes_(__FILE__, __LINE__, (IMFAttributes *)a, b, c)
#define check_attributes(a, b, c) check_attributes_(__FILE__, __LINE__, a, b, c)
extern void check_attributes_(const char *file, int line, IMFAttributes *attributes,
const struct attribute_desc *desc, ULONG limit);
extern void init_media_type(IMFMediaType *mediatype, const struct attribute_desc *desc, ULONG limit);
typedef DWORD (*compare_cb)(const BYTE *data, DWORD *length, const RECT *rect, const BYTE *expect);
extern DWORD compare_nv12(const BYTE *data, DWORD *length, const RECT *rect, const BYTE *expect);
extern DWORD compare_i420(const BYTE *data, DWORD *length, const RECT *rect, const BYTE *expect);
extern DWORD compare_rgb32(const BYTE *data, DWORD *length, const RECT *rect, const BYTE *expect);
extern DWORD compare_pcm16(const BYTE *data, DWORD *length, const RECT *rect, const BYTE *expect);
typedef void (*dump_cb)(const BYTE *data, DWORD length, const RECT *rect, HANDLE output);
extern void dump_rgb32(const BYTE *data, DWORD length, const RECT *rect, HANDLE output);
extern void dump_nv12(const BYTE *data, DWORD length, const RECT *rect, HANDLE output);
extern void dump_i420(const BYTE *data, DWORD length, const RECT *rect, HANDLE output);
struct buffer_desc
{
DWORD length;
BOOL todo_length;
compare_cb compare;
dump_cb dump;
RECT rect;
};
struct sample_desc
{
const struct attribute_desc *attributes;
LONGLONG sample_time;
LONGLONG sample_duration;
DWORD buffer_count;
const struct buffer_desc *buffers;
DWORD repeat_count;
BOOL todo_length;
LONGLONG todo_time;
};
#define check_mf_sample_collection(a, b, c) check_mf_sample_collection_(__FILE__, __LINE__, a, b, c)
extern DWORD check_mf_sample_collection_(const char *file, int line, IMFCollection *samples,
const struct sample_desc *expect_samples, const WCHAR *expect_data_filename);
......@@ -68,6 +68,10 @@ h264data.bin RCDATA h264data.bin
nv12frame.bmp RCDATA nv12frame.bmp
/* Generated from running the tests on Windows */
/* @makedep: nv12frame-grabber.bmp */
nv12frame-grabber.bmp RCDATA nv12frame-grabber.bmp
/* Generated from running the tests on Windows */
/* @makedep: i420frame.bmp */
i420frame.bmp RCDATA i420frame.bmp
......@@ -78,3 +82,16 @@ rgb32frame.bmp RCDATA rgb32frame.bmp
/* Generated from running the tests on Windows */
/* @makedep: rgb32frame-vp.bmp */
rgb32frame-vp.bmp RCDATA rgb32frame-vp.bmp
/* Generated from running the tests on Windows */
/* @makedep: rgb32frame-grabber.bmp */
rgb32frame-grabber.bmp RCDATA rgb32frame-grabber.bmp
/* Generated with:
* gst-launch-1.0 videotestsrc num-buffers=60 pattern=smpte100 ! \
* video/x-raw,format=I420,width=64,height=64,framerate=30000/1001 ! \
* videoflip method=clockwise ! videoconvert ! \
* x264enc ! mp4mux ! filesink location=dlls/mf/tests/test.mp4
*/
/* @makedep: test.mp4 */
test.mp4 RCDATA test.mp4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment