447{
449 FILTER_INFO filter_info;
461 double fps;
464
465
467 &IID_IMediaDet, (
LPVOID*)&pM);
469 ok(pM !=
NULL,
"pM is NULL\n");
470
473
476
479
482
484 hr = IMediaDet_get_OutputStreams(pM, &
count);
487
489
490 hr = IMediaDet_get_CurrentStream(pM, &
index);
493
494 hr = IMediaDet_get_CurrentStream(pM,
NULL);
496
497
498 hr = IMediaDet_put_CurrentStream(pM, 0);
500
501 hr = IMediaDet_put_CurrentStream(pM, -1);
503
504 hr = IMediaDet_get_StreamMediaType(pM, &mt);
506
507 hr = IMediaDet_get_StreamMediaType(pM,
NULL);
509
510 hr = IMediaDet_get_StreamType(pM, &
guid);
512
513 hr = IMediaDet_get_StreamType(pM,
NULL);
515
516 hr = IMediaDet_get_StreamTypeB(pM, &bstr);
518
519 hr = IMediaDet_get_StreamTypeB(pM,
NULL);
521
522 hr = IMediaDet_get_Filter(pM,
NULL);
524
526 hr = IMediaDet_get_Filter(pM, &unk);
528 ok(!unk,
"Got filter %p.\n", unk);
529
534#ifdef __REACTOS__
536 {
537 skip(
"Failed to open file, hr %#lx.\n",
hr);
538 IMediaDet_Release(pM);
539 return;
540 }
541#endif
542
544
545 hr = IMediaDet_get_CurrentStream(pM, &
index);
548
550 hr = IMediaDet_get_StreamMediaType(pM, &mt);
553
554 hr = IMediaDet_get_StreamType(pM, &
guid);
557
558 hr = IMediaDet_get_StreamTypeB(pM, &bstr);
560 ok(!
wcscmp(bstr,
L"{73646976-0000-0010-8000-00AA00389B71}"),
563
564
565 hr = IMediaDet_put_CurrentStream(pM, 1);
567
568 hr = IMediaDet_get_OutputStreams(pM, &
count);
571
578
579 hr = IMediaDet_get_Filename(pM,
NULL);
581
583 hr = IMediaDet_get_CurrentStream(pM, &
index);
586
587 hr = IMediaDet_get_CurrentStream(pM,
NULL);
589
590 hr = IMediaDet_put_CurrentStream(pM, -1);
592
593 hr = IMediaDet_put_CurrentStream(pM, 1);
595
596
598 hr = IMediaDet_get_CurrentStream(pM, &
index);
601
602 hr = IMediaDet_put_CurrentStream(pM, 0);
604
606 hr = IMediaDet_get_CurrentStream(pM, &
index);
609
611 hr = IMediaDet_get_StreamMediaType(pM, &mt);
614 "IMediaDet_get_StreamMediaType\n");
616
617 hr = IMediaDet_get_StreamType(pM, &
guid);
620
621 hr = IMediaDet_get_StreamTypeB(pM, &bstr);
623 ok(!
wcscmp(bstr,
L"{73646976-0000-0010-8000-00AA00389B71}"),
626
627 hr = IMediaDet_get_FrameRate(pM,
NULL);
629
630 hr = IMediaDet_get_FrameRate(pM, &fps);
632 ok(fps == 10.0,
"IMediaDet_get_FrameRate: fps is %f\n", fps);
633
634 ref = IMediaDet_Release(pM);
635 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
636
637
639 &IID_IMediaDet, (
LPVOID*)&pM);
641 ok(pM !=
NULL,
"pM is NULL\n");
642
647#ifdef __REACTOS__
649 {
650 skip(
"Failed to open file, hr %#lx.\n",
hr);
651 IMediaDet_Release(pM);
652 return;
653 }
654#endif
655
656 hr = IMediaDet_get_OutputStreams(pM, &
count);
659
666
667
668
670
671 for (
i = 0;
i < 2; ++
i)
672 {
673 hr = IMediaDet_put_CurrentStream(pM,
i);
675
677 hr = IMediaDet_get_CurrentStream(pM, &
index);
680
682 hr = IMediaDet_get_StreamMediaType(pM, &mt);
685 ? 1
687 ? 2
688 : 0));
689
691 {
692 hr = IMediaDet_get_StreamType(pM, &
guid);
695
696 hr = IMediaDet_get_StreamTypeB(pM, &bstr);
698 ok(!
wcscmp(bstr,
L"{73647561-0000-0010-8000-00AA00389B71}"),
701
702 hr = IMediaDet_get_FrameRate(pM, &fps);
704 }
705
707 }
708 ok(
flags == 3,
"IMediaDet_get_StreamMediaType: flags are %i\n",
flags);
709
710 hr = IMediaDet_put_CurrentStream(pM, 2);
712
714 hr = IMediaDet_get_CurrentStream(pM, &
index);
717
719 hr = IMediaDet_get_Filter(pM, &unk);
721 ok(!!unk,
"Expected a non-NULL filter.\n");
724 IUnknown_Release(unk);
725
726 hr = IBaseFilter_EnumPins(
filter, &enumpins);
728 hr = IEnumPins_Next(enumpins, 1, &pin,
NULL);
730 hr = IPin_EnumMediaTypes(pin, &
type);
732 hr = IEnumMediaTypes_Next(
type, 1, &pmt,
NULL);
734 ok(
IsEqualGUID(&pmt->majortype, &MEDIATYPE_Stream),
"Got major type %s.\n",
736 IEnumMediaTypes_Release(
type);
739 IPin_Release(pin);
740
741 hr = IEnumPins_Next(enumpins, 1, &pin,
NULL);
743 IEnumPins_Release(enumpins);
744
745 hr = IBaseFilter_QueryFilterInfo(
filter, &filter_info);
747 ok(!
wcscmp(filter_info.achName,
L"Source"),
"Got name %s.\n",
debugstr_w(filter_info.achName));
748 IFilterGraph_Release(filter_info.pGraph);
749 IBaseFilter_Release(
filter);
750
751 ref = IMediaDet_Release(pM);
752 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
753}
void WINAPI CoTaskMemFree(void *ptr)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define VFW_E_INVALIDMEDIATYPE