ReactOS 0.4.15-dev-8241-g63935f8
mediastream.c
Go to the documentation of this file.
1/*
2 * Implementation of IMediaStream Interfaces
3 *
4 * Copyright 2005, 2008, 2012 Christian Costa
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#ifndef __REACTOS__
22#define NONAMELESSUNION
23#endif
24#define COBJMACROS
25
26#include <stdarg.h>
27#include "windef.h"
28#include "winbase.h"
29#include "wingdi.h"
30#include "dshow.h"
31
32#include "wine/strmbase.h"
33
34#include "amstream_private.h"
35
36#include "ddstream.h"
37#include "wine/debug.h"
38
40
41#include <initguid.h>
42DEFINE_GUID(IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b);
43
44static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectDrawSurface *surface,
45 const RECT *rect, IDirectDrawStreamSample **ddraw_stream_sample);
47
49
50typedef struct {
54
66
68{
69 return CONTAINING_RECORD(iface, DirectDrawMediaStreamImpl, IAMMediaStream_iface);
70}
71
72/*** IUnknown methods ***/
74 REFIID riid, void **ret_iface)
75{
77
78 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface);
79
81 IsEqualGUID(riid, &IID_IMediaStream) ||
82 IsEqualGUID(riid, &IID_IAMMediaStream))
83 {
84 IAMMediaStream_AddRef(iface);
85 *ret_iface = iface;
86 return S_OK;
87 }
88 else if (IsEqualGUID(riid, &IID_IDirectDrawMediaStream))
89 {
90 IAMMediaStream_AddRef(iface);
91 *ret_iface = &This->IDirectDrawMediaStream_iface;
92 return S_OK;
93 }
94 else if (IsEqualGUID(riid, &IID_IPin))
95 {
96 IAMMediaStream_AddRef(iface);
97 *ret_iface = &This->input_pin->pin.pin.IPin_iface;
98 return S_OK;
99 }
100 else if (IsEqualGUID(riid, &IID_IMemInputPin))
101 {
102 IAMMediaStream_AddRef(iface);
103 *ret_iface = &This->input_pin->pin.IMemInputPin_iface;
104 return S_OK;
105 }
106
107 ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ret_iface);
108 return E_NOINTERFACE;
109}
110
112{
115
116 TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
117
118 return ref;
119}
120
122{
125
126 TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
127
128 if (!ref)
129 {
131 DeleteCriticalSection(&This->critical_section);
132 if (This->ddraw)
133 IDirectDraw7_Release(This->ddraw);
135 }
136
137 return ref;
138}
139
140/*** IMediaStream methods ***/
142 IMultiMediaStream** multi_media_stream)
143{
145
146 TRACE("(%p/%p)->(%p)\n", This, iface, multi_media_stream);
147
148 if (!multi_media_stream)
149 return E_POINTER;
150
151 IMultiMediaStream_AddRef(This->parent);
152 *multi_media_stream = This->parent;
153
154 return S_OK;
155}
156
158 MSPID *purpose_id, STREAM_TYPE *type)
159{
161
162 TRACE("(%p/%p)->(%p,%p)\n", This, iface, purpose_id, type);
163
164 if (purpose_id)
165 *purpose_id = This->purpose_id;
166 if (type)
167 *type = This->stream_type;
168
169 return S_OK;
170}
171
173 IMediaStream *pStreamThatHasDesiredFormat, DWORD flags)
174{
176
177 FIXME("(%p/%p)->(%p,%x) stub!\n", This, iface, pStreamThatHasDesiredFormat, flags);
178
179 return S_FALSE;
180}
181
183 DWORD flags, IStreamSample **sample)
184{
186
187 FIXME("(%p/%p)->(%x,%p) stub!\n", This, iface, flags, sample);
188
189 return S_FALSE;
190}
191
193 IStreamSample *existing_sample, DWORD flags, IStreamSample **sample)
194{
196
197 FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, existing_sample, flags, sample);
198
199 return S_FALSE;
200}
201
203{
205
206 FIXME("(%p/%p)->(%x) stub!\n", This, iface, flags);
207
208 return S_FALSE;
209}
210
211/*** IAMMediaStream methods ***/
213 REFMSPID purpose_id, const STREAM_TYPE stream_type)
214{
216
217 FIXME("(%p/%p)->(%p,%x,%p,%u) stub!\n", This, iface, source_object, flags, purpose_id, stream_type);
218
219 return S_FALSE;
220}
221
223{
225
226 FIXME("(%p/%p)->(%u) stub!\n", This, iface, state);
227
228 return S_FALSE;
229}
230
232{
234
235 FIXME("(%p/%p)->(%p) stub!\n", This, iface, am_multi_media_stream);
236
237 return S_FALSE;
238}
239
241{
243
244 TRACE("(%p/%p)->(%p)\n", This, iface, media_stream_filter);
245
246 This->input_pin->pin.pin.pinInfo.pFilter = (IBaseFilter *)media_stream_filter;
247
248 return S_OK;
249}
250
252{
254
255 FIXME("(%p/%p)->(%p) stub!\n", This, iface, filtergraph);
256
257 return S_FALSE;
258}
259
260static const struct IAMMediaStreamVtbl DirectDrawMediaStreamImpl_IAMMediaStream_Vtbl =
261{
262 /*** IUnknown methods ***/
266 /*** IMediaStream methods ***/
273 /*** IAMMediaStream methods ***/
279};
280
282{
283 return CONTAINING_RECORD(iface, DirectDrawMediaStreamImpl, IDirectDrawMediaStream_iface);
284}
285
286/*** IUnknown methods ***/
288 REFIID riid, void **ret_iface)
289{
291 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface);
292 return IAMMediaStream_QueryInterface(&This->IAMMediaStream_iface, riid, ret_iface);
293}
294
296{
298 TRACE("(%p/%p)\n", iface, This);
299 return IAMMediaStream_AddRef(&This->IAMMediaStream_iface);
300}
301
303{
305 TRACE("(%p/%p)\n", iface, This);
306 return IAMMediaStream_Release(&This->IAMMediaStream_iface);
307}
308
309/*** IMediaStream methods ***/
311 IMultiMediaStream **multi_media_stream)
312{
314
315 TRACE("(%p/%p)->(%p)\n", This, iface, multi_media_stream);
316
317 if (!multi_media_stream)
318 return E_POINTER;
319
320 IMultiMediaStream_AddRef(This->parent);
321 *multi_media_stream = This->parent;
322
323 return S_OK;
324}
325
327 MSPID *purpose_id, STREAM_TYPE *type)
328{
330
331 TRACE("(%p/%p)->(%p,%p)\n", This, iface, purpose_id, type);
332
333 if (purpose_id)
334 *purpose_id = This->purpose_id;
335 if (type)
336 *type = This->stream_type;
337
338 return S_OK;
339}
340
342 IMediaStream *pStreamThatHasDesiredFormat, DWORD dwFlags)
343{
345
346 FIXME("(%p/%p)->(%p,%x) stub!\n", This, iface, pStreamThatHasDesiredFormat, dwFlags);
347
348 return S_FALSE;
349}
350
352 DWORD dwFlags, IStreamSample **ppSample)
353{
355
356 FIXME("(%p/%p)->(%x,%p) stub!\n", This, iface, dwFlags, ppSample);
357
358 return S_FALSE;
359}
360
362 IStreamSample *pExistingSample, DWORD dwFlags, IStreamSample **ppSample)
363{
365
366 FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, pExistingSample, dwFlags, ppSample);
367
368 return S_FALSE;
369}
370
373{
375
376 FIXME("(%p/%p)->(%x) stub!\n", This, iface, dwFlags);
377
378 return S_FALSE;
379}
380
381/*** IDirectDrawMediaStream methods ***/
383 DDSURFACEDESC *current_format, IDirectDrawPalette **palette,
384 DDSURFACEDESC *desired_format, DWORD *flags)
385{
386 FIXME("(%p)->(%p,%p,%p,%p) stub!\n", iface, current_format, palette, desired_format,
387 flags);
388
389 return MS_E_NOSTREAM;
390
391}
392
394 const DDSURFACEDESC *pDDSurfaceDesc, IDirectDrawPalette *pDirectDrawPalette)
395{
396 FIXME("(%p)->(%p,%p) stub!\n", iface, pDDSurfaceDesc, pDirectDrawPalette);
397
398 return E_NOTIMPL;
399}
400
402 IDirectDraw **ddraw)
403{
405
406 TRACE("(%p)->(%p)\n", iface, ddraw);
407
408 *ddraw = NULL;
409 if (!This->ddraw)
410 {
411 HRESULT hr = DirectDrawCreateEx(NULL, (void**)&This->ddraw, &IID_IDirectDraw7, NULL);
412 if (FAILED(hr))
413 return hr;
414 IDirectDraw7_SetCooperativeLevel(This->ddraw, NULL, DDSCL_NORMAL);
415 }
416
417 return IDirectDraw7_QueryInterface(This->ddraw, &IID_IDirectDraw, (void**)ddraw);
418}
419
421 IDirectDraw *pDirectDraw)
422{
423 FIXME("(%p)->(%p) stub!\n", iface, pDirectDraw);
424
425 return E_NOTIMPL;
426}
427
429 IDirectDrawSurface *surface, const RECT *rect, DWORD dwFlags,
430 IDirectDrawStreamSample **ppSample)
431{
432 TRACE("(%p)->(%p,%s,%x,%p)\n", iface, surface, wine_dbgstr_rect(rect), dwFlags, ppSample);
433
434 return ddrawstreamsample_create(iface, surface, rect, ppSample);
435}
436
438 STREAM_TIME *pFrameTime)
439{
440 FIXME("(%p)->(%p) stub!\n", iface, pFrameTime);
441
442 return E_NOTIMPL;
443}
444
445static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Vtbl =
446{
447 /*** IUnknown methods ***/
451 /*** IMediaStream methods ***/
458 /*** IDirectDrawMediaStream methods ***/
465};
466
468{
469 return CONTAINING_RECORD(iface, DirectDrawMediaStreamInputPin, pin.pin.IPin_iface);
470}
471
472/*** IUnknown methods ***/
474{
476
477 return IAMMediaStream_QueryInterface(&This->parent->IAMMediaStream_iface, riid, ret_iface);
478}
479
481{
483
484 return IAMMediaStream_AddRef(&This->parent->IAMMediaStream_iface);
485}
486
488{
490
491 return IAMMediaStream_Release(&This->parent->IAMMediaStream_iface);
492}
493
495{
514};
515
517{
519
520 TRACE("(%p)->(%p)\n", This, media_type);
521
522 if (IsEqualGUID(&media_type->majortype, &MEDIATYPE_Video))
523 {
524 if (IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB1) ||
525 IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB4) ||
526 IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB8) ||
527 IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB565) ||
528 IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB555) ||
529 IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB24) ||
530 IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB32))
531 {
532 TRACE("Video sub-type %s matches\n", debugstr_guid(&media_type->subtype));
533 return S_OK;
534 }
535 }
536
537 return S_FALSE;
538}
539
541{
542 return 0;
543}
544
546{
548
549 TRACE("(%p)->(%d,%p)\n", This, index, media_type);
550
551 /* FIXME: Reset structure as we only fill majortype and minortype for now */
552 ZeroMemory(media_type, sizeof(*media_type));
553
554 media_type->majortype = MEDIATYPE_Video;
555
556 switch (index)
557 {
558 case 0:
559 media_type->subtype = MEDIASUBTYPE_RGB1;
560 break;
561 case 1:
562 media_type->subtype = MEDIASUBTYPE_RGB4;
563 break;
564 case 2:
565 media_type->subtype = MEDIASUBTYPE_RGB8;
566 break;
567 case 3:
568 media_type->subtype = MEDIASUBTYPE_RGB565;
569 break;
570 case 4:
571 media_type->subtype = MEDIASUBTYPE_RGB555;
572 break;
573 case 5:
574 media_type->subtype = MEDIASUBTYPE_RGB24;
575 break;
576 case 6:
577 media_type->subtype = MEDIASUBTYPE_RGB32;
578 break;
579 default:
580 return S_FALSE;
581 }
582
583 return S_OK;
584}
585
587{
589
590 FIXME("(%p)->(%p) stub!\n", This, sample);
591
592 return E_NOTIMPL;
593}
594
596{
597 {
599 NULL,
602 },
604};
605
607 STREAM_TYPE stream_type, IAMMediaStream **media_stream)
608{
610 PIN_INFO pin_info;
611 HRESULT hr;
612
613 TRACE("(%p,%s,%p)\n", parent, debugstr_guid(purpose_id), media_stream);
614
616 if (!object)
617 return E_OUTOFMEMORY;
618
619 object->IAMMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IAMMediaStream_Vtbl;
620 object->IDirectDrawMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Vtbl;
621 object->ref = 1;
622
623 InitializeCriticalSection(&object->critical_section);
624
625 pin_info.pFilter = NULL;
626 pin_info.dir = PINDIR_INPUT;
627 pin_info.achName[0] = 'I';
628 StringFromGUID2(purpose_id, pin_info.achName + 1, MAX_PIN_NAME - 1);
631 &object->critical_section, NULL, (IPin **)&object->input_pin);
632 if (FAILED(hr))
633 goto out_object;
634
635 object->input_pin->parent = object;
636
637 object->parent = parent;
638 object->purpose_id = *purpose_id;
639 object->stream_type = stream_type;
640
641 *media_stream = &object->IAMMediaStream_iface;
642
643 return S_OK;
644
645out_object:
646 HeapFree(GetProcessHeap(), 0, object);
647
648 return hr;
649}
650
652
653typedef struct {
657
658typedef struct AudioMediaStreamImpl {
668
670{
671 return CONTAINING_RECORD(iface, AudioMediaStreamImpl, IAMMediaStream_iface);
672}
673
674/*** IUnknown methods ***/
676 REFIID riid, void **ret_iface)
677{
679
680 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface);
681
683 IsEqualGUID(riid, &IID_IMediaStream) ||
684 IsEqualGUID(riid, &IID_IAMMediaStream))
685 {
686 IAMMediaStream_AddRef(iface);
687 *ret_iface = iface;
688 return S_OK;
689 }
690 else if (IsEqualGUID(riid, &IID_IAudioMediaStream))
691 {
692 IAMMediaStream_AddRef(iface);
693 *ret_iface = &This->IAudioMediaStream_iface;
694 return S_OK;
695 }
696 else if (IsEqualGUID(riid, &IID_IPin))
697 {
698 IAMMediaStream_AddRef(iface);
699 *ret_iface = &This->input_pin->pin.pin.IPin_iface;
700 return S_OK;
701 }
702 else if (IsEqualGUID(riid, &IID_IMemInputPin))
703 {
704 IAMMediaStream_AddRef(iface);
705 *ret_iface = &This->input_pin->pin.IMemInputPin_iface;
706 return S_OK;
707 }
708
709 ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ret_iface);
710 return E_NOINTERFACE;
711}
712
714{
717
718 TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
719
720 return ref;
721}
722
724{
727
728 TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
729
730 if (!ref)
731 {
733 DeleteCriticalSection(&This->critical_section);
735 }
736
737 return ref;
738}
739
740/*** IMediaStream methods ***/
742 IMultiMediaStream** multi_media_stream)
743{
745
746 TRACE("(%p/%p)->(%p)\n", This, iface, multi_media_stream);
747
748 if (!multi_media_stream)
749 return E_POINTER;
750
751 IMultiMediaStream_AddRef(This->parent);
752 *multi_media_stream = This->parent;
753
754 return S_OK;
755}
756
758 MSPID *purpose_id, STREAM_TYPE *type)
759{
761
762 TRACE("(%p/%p)->(%p,%p)\n", This, iface, purpose_id, type);
763
764 if (purpose_id)
765 *purpose_id = This->purpose_id;
766 if (type)
767 *type = This->stream_type;
768
769 return S_OK;
770}
771
773 IMediaStream *pStreamThatHasDesiredFormat, DWORD flags)
774{
776
777 FIXME("(%p/%p)->(%p,%x) stub!\n", This, iface, pStreamThatHasDesiredFormat, flags);
778
779 return S_FALSE;
780}
781
783 DWORD flags, IStreamSample **sample)
784{
786
787 FIXME("(%p/%p)->(%x,%p) stub!\n", This, iface, flags, sample);
788
789 return S_FALSE;
790}
791
793 IStreamSample *existing_sample, DWORD flags, IStreamSample **sample)
794{
796
797 FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, existing_sample, flags, sample);
798
799 return S_FALSE;
800}
801
803{
805
806 FIXME("(%p/%p)->(%x) stub!\n", This, iface, flags);
807
808 return S_FALSE;
809}
810
811/*** IAMMediaStream methods ***/
813 REFMSPID purpose_id, const STREAM_TYPE stream_type)
814{
816
817 FIXME("(%p/%p)->(%p,%x,%p,%u) stub!\n", This, iface, source_object, flags, purpose_id, stream_type);
818
819 return S_FALSE;
820}
821
823{
825
826 FIXME("(%p/%p)->(%u) stub!\n", This, iface, state);
827
828 return S_FALSE;
829}
830
832{
834
835 FIXME("(%p/%p)->(%p) stub!\n", This, iface, am_multi_media_stream);
836
837 return S_FALSE;
838}
839
841{
843
844 TRACE("(%p/%p)->(%p)\n", This, iface, media_stream_filter);
845
846 This->input_pin->pin.pin.pinInfo.pFilter = (IBaseFilter *)media_stream_filter;
847
848 return S_OK;
849}
850
852{
854
855 FIXME("(%p/%p)->(%p) stub!\n", This, iface, filtergraph);
856
857 return S_FALSE;
858}
859
860static const struct IAMMediaStreamVtbl AudioMediaStreamImpl_IAMMediaStream_Vtbl =
861{
862 /*** IUnknown methods ***/
866 /*** IMediaStream methods ***/
873 /*** IAMMediaStream methods ***/
879};
880
882{
883 return CONTAINING_RECORD(iface, AudioMediaStreamImpl, IAudioMediaStream_iface);
884}
885
886/*** IUnknown methods ***/
888 REFIID riid, void **ret_iface)
889{
891 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface);
892 return IAMMediaStream_QueryInterface(&This->IAMMediaStream_iface, riid, ret_iface);
893}
894
896{
898 TRACE("(%p/%p)\n", iface, This);
899 return IAMMediaStream_AddRef(&This->IAMMediaStream_iface);
900}
901
903{
905 TRACE("(%p/%p)\n", iface, This);
906 return IAMMediaStream_Release(&This->IAMMediaStream_iface);
907}
908
909/*** IMediaStream methods ***/
911 IMultiMediaStream **multi_media_stream)
912{
914
915 TRACE("(%p/%p)->(%p)\n", iface, This, multi_media_stream);
916
917 if (!multi_media_stream)
918 return E_POINTER;
919
920 IMultiMediaStream_AddRef(This->parent);
921 *multi_media_stream = This->parent;
922
923 return S_OK;
924}
925
927 MSPID *purpose_id, STREAM_TYPE *type)
928{
930
931 TRACE("(%p/%p)->(%p,%p)\n", iface, This, purpose_id, type);
932
933 if (purpose_id)
934 *purpose_id = This->purpose_id;
935 if (type)
936 *type = This->stream_type;
937
938 return S_OK;
939}
940
942 IMediaStream *stream_format, DWORD flags)
943{
945
946 FIXME("(%p/%p)->(%p,%x) stub!\n", iface, This, stream_format, flags);
947
948 return S_FALSE;
949}
950
952 DWORD flags, IStreamSample **sample)
953{
955
956 FIXME("(%p/%p)->(%x,%p) stub!\n", iface, This, flags, sample);
957
958 return S_FALSE;
959}
960
962 IStreamSample *existing_sample, DWORD flags, IStreamSample **sample)
963{
965
966 FIXME("(%p/%p)->(%p,%x,%p) stub!\n", iface, This, existing_sample, flags, sample);
967
968 return S_FALSE;
969}
970
972 DWORD flags)
973{
975
976 FIXME("(%p/%p)->(%x) stub!\n", iface, This, flags);
977
978 return S_FALSE;
979}
980
981/*** IAudioMediaStream methods ***/
983{
985
986 FIXME("(%p/%p)->(%p) stub!\n", iface, This, wave_format_current);
987
988 if (!wave_format_current)
989 return E_POINTER;
990
991 return MS_E_NOSTREAM;
992
993}
994
996{
998
999 FIXME("(%p/%p)->(%p) stub!\n", iface, This, wave_format);
1000
1001 return E_NOTIMPL;
1002}
1003
1005 DWORD flags, IAudioStreamSample **sample)
1006{
1008
1009 TRACE("(%p/%p)->(%p,%u,%p)\n", iface, This, audio_data, flags, sample);
1010
1011 if (!audio_data)
1012 return E_POINTER;
1013
1014 return audiostreamsample_create(iface, audio_data, sample);
1015}
1016
1017static const struct IAudioMediaStreamVtbl AudioMediaStreamImpl_IAudioMediaStream_Vtbl =
1018{
1019 /*** IUnknown methods ***/
1023 /*** IMediaStream methods ***/
1030 /*** IAudioMediaStream methods ***/
1034};
1035
1037{
1038 return CONTAINING_RECORD(iface, AudioMediaStreamInputPin, pin.pin.IPin_iface);
1039}
1040
1041/*** IUnknown methods ***/
1043{
1045
1046 return IAMMediaStream_QueryInterface(&This->parent->IAMMediaStream_iface, riid, ret_iface);
1047}
1048
1050{
1052
1053 return IAMMediaStream_AddRef(&This->parent->IAMMediaStream_iface);
1054}
1055
1057{
1059
1060 return IAMMediaStream_Release(&This->parent->IAMMediaStream_iface);
1061}
1062
1064{
1083};
1084
1086{
1088
1089 TRACE("(%p)->(%p)\n", This, media_type);
1090
1091 if (IsEqualGUID(&media_type->majortype, &MEDIATYPE_Audio))
1092 {
1093 if (IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_PCM))
1094 {
1095 TRACE("Audio sub-type %s matches\n", debugstr_guid(&media_type->subtype));
1096 return S_OK;
1097 }
1098 }
1099
1100 return S_OK;
1101}
1102
1104{
1105 return 0;
1106}
1107
1109{
1111
1112 TRACE("(%p)->(%d,%p)\n", This, index, media_type);
1113
1114 /* FIXME: Reset structure as we only fill majortype and minortype for now */
1115 ZeroMemory(media_type, sizeof(*media_type));
1116
1117 if (index)
1118 return S_FALSE;
1119
1120 media_type->majortype = MEDIATYPE_Audio;
1121 media_type->subtype = MEDIASUBTYPE_PCM;
1122
1123 return S_OK;
1124}
1125
1127{
1129
1130 FIXME("(%p)->(%p) stub!\n", This, sample);
1131
1132 return E_NOTIMPL;
1133}
1134
1136{
1137 {
1139 NULL,
1142 },
1144};
1145
1147 STREAM_TYPE stream_type, IAMMediaStream **media_stream)
1148{
1150 PIN_INFO pin_info;
1151 HRESULT hr;
1152
1153 TRACE("(%p,%s,%p)\n", parent, debugstr_guid(purpose_id), media_stream);
1154
1156 if (!object)
1157 return E_OUTOFMEMORY;
1158
1159 object->IAMMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAMMediaStream_Vtbl;
1160 object->IAudioMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAudioMediaStream_Vtbl;
1161 object->ref = 1;
1162
1163 InitializeCriticalSection(&object->critical_section);
1164
1165 pin_info.pFilter = NULL;
1166 pin_info.dir = PINDIR_INPUT;
1167 pin_info.achName[0] = 'I';
1168 StringFromGUID2(purpose_id, pin_info.achName + 1, MAX_PIN_NAME - 1);
1171 &object->critical_section, NULL, (IPin **)&object->input_pin);
1172 if (FAILED(hr))
1173 goto out_object;
1174
1175 object->input_pin->parent = object;
1176
1177 object->parent = parent;
1178 object->purpose_id = *purpose_id;
1179 object->stream_type = stream_type;
1180
1181 *media_stream = &object->IAMMediaStream_iface;
1182
1183 return S_OK;
1184
1185out_object:
1186 HeapFree(GetProcessHeap(), 0, object);
1187
1188 return hr;
1189}
1190
1191typedef struct {
1195 IDirectDrawSurface *surface;
1198
1200{
1201 return CONTAINING_RECORD(iface, IDirectDrawStreamSampleImpl, IDirectDrawStreamSample_iface);
1202}
1203
1204/*** IUnknown methods ***/
1206 REFIID riid, void **ret_iface)
1207{
1208 TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ret_iface);
1209
1210 if (IsEqualGUID(riid, &IID_IUnknown) ||
1211 IsEqualGUID(riid, &IID_IStreamSample) ||
1212 IsEqualGUID(riid, &IID_IDirectDrawStreamSample))
1213 {
1214 IDirectDrawStreamSample_AddRef(iface);
1215 *ret_iface = iface;
1216 return S_OK;
1217 }
1218
1219 *ret_iface = NULL;
1220
1221 ERR("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ret_iface);
1222 return E_NOINTERFACE;
1223}
1224
1226{
1229
1230 TRACE("(%p)->(): new ref = %u\n", iface, ref);
1231
1232 return ref;
1233}
1234
1236{
1239
1240 TRACE("(%p)->(): new ref = %u\n", iface, ref);
1241
1242 if (!ref)
1243 {
1244 if (This->surface)
1245 IDirectDrawSurface_Release(This->surface);
1246 IMediaStream_Release(This->parent);
1248 }
1249
1250 return ref;
1251}
1252
1253/*** IStreamSample methods ***/
1255{
1256 FIXME("(%p)->(%p): stub\n", iface, media_stream);
1257
1258 return E_NOTIMPL;
1259}
1260
1262 STREAM_TIME *end_time, STREAM_TIME *current_time)
1263{
1264 FIXME("(%p)->(%p,%p,%p): stub\n", iface, start_time, end_time, current_time);
1265
1266 return E_NOTIMPL;
1267}
1268
1270 const STREAM_TIME *end_time)
1271{
1272 FIXME("(%p)->(%p,%p): stub\n", iface, start_time, end_time);
1273
1274 return E_NOTIMPL;
1275}
1276
1278 PAPCFUNC func_APC, DWORD APC_data)
1279{
1280 FIXME("(%p)->(%x,%p,%p,%u): stub\n", iface, flags, event, func_APC, APC_data);
1281
1282 return S_OK;
1283}
1284
1286{
1287 FIXME("(%p)->(%x,%u): stub\n", iface, flags, milliseconds);
1288
1289 return E_NOTIMPL;
1290}
1291
1292/*** IDirectDrawStreamSample methods ***/
1294 RECT *rect)
1295{
1297
1298 TRACE("(%p)->(%p,%p)\n", iface, ddraw_surface, rect);
1299
1300 if (ddraw_surface)
1301 {
1302 *ddraw_surface = This->surface;
1303 if (*ddraw_surface)
1304 IDirectDrawSurface_AddRef(*ddraw_surface);
1305 }
1306
1307 if (rect)
1308 *rect = This->rect;
1309
1310 return S_OK;
1311}
1312
1314{
1315 FIXME("(%p)->(%p): stub\n", iface, rect);
1316
1317 return E_NOTIMPL;
1318}
1319
1320static const struct IDirectDrawStreamSampleVtbl DirectDrawStreamSample_Vtbl =
1321{
1322 /*** IUnknown methods ***/
1326 /*** IStreamSample methods ***/
1332 /*** IDirectDrawStreamSample methods ***/
1335};
1336
1338 const RECT *rect, IDirectDrawStreamSample **ddraw_stream_sample)
1339{
1341 HRESULT hr;
1342
1343 TRACE("(%p)\n", ddraw_stream_sample);
1344
1345 object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
1346 if (!object)
1347 return E_OUTOFMEMORY;
1348
1349 object->IDirectDrawStreamSample_iface.lpVtbl = &DirectDrawStreamSample_Vtbl;
1350 object->ref = 1;
1351 object->parent = (IMediaStream*)parent;
1352 IMediaStream_AddRef(object->parent);
1353
1354 if (surface)
1355 {
1356 object->surface = surface;
1357 IDirectDrawSurface_AddRef(surface);
1358 }
1359 else
1360 {
1362 IDirectDraw *ddraw;
1363
1364 hr = IDirectDrawMediaStream_GetDirectDraw(parent, &ddraw);
1365 if (FAILED(hr))
1366 {
1367 IDirectDrawStreamSample_Release(&object->IDirectDrawStreamSample_iface);
1368 return hr;
1369 }
1370
1371 desc.dwSize = sizeof(desc);
1373 desc.dwHeight = 100;
1374 desc.dwWidth = 100;
1375 desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat);
1376 desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
1377 desc.ddpfPixelFormat.dwRGBBitCount = 32;
1378 desc.ddpfPixelFormat.dwRBitMask = 0xff0000;
1379 desc.ddpfPixelFormat.dwGBitMask = 0x00ff00;
1380 desc.ddpfPixelFormat.dwBBitMask = 0x0000ff;
1381 desc.ddpfPixelFormat.dwRGBAlphaBitMask = 0;
1383 desc.lpSurface = NULL;
1384
1385 hr = IDirectDraw_CreateSurface(ddraw, &desc, &object->surface, NULL);
1386 IDirectDraw_Release(ddraw);
1387 if (FAILED(hr))
1388 {
1389 ERR("failed to create surface, 0x%08x\n", hr);
1390 IDirectDrawStreamSample_Release(&object->IDirectDrawStreamSample_iface);
1391 return hr;
1392 }
1393 }
1394
1395 if (rect)
1396 object->rect = *rect;
1397 else if (object->surface)
1398 {
1399 DDSURFACEDESC desc = { sizeof(desc) };
1400 hr = IDirectDrawSurface_GetSurfaceDesc(object->surface, &desc);
1401 if (hr == S_OK)
1402 SetRect(&object->rect, 0, 0, desc.dwWidth, desc.dwHeight);
1403 }
1404
1405 *ddraw_stream_sample = &object->IDirectDrawStreamSample_iface;
1406
1407 return S_OK;
1408}
1409
1410typedef struct {
1416
1418{
1419 return CONTAINING_RECORD(iface, IAudioStreamSampleImpl, IAudioStreamSample_iface);
1420}
1421
1422/*** IUnknown methods ***/
1424 REFIID riid, void **ret_iface)
1425{
1426 TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ret_iface);
1427
1428 if (IsEqualGUID(riid, &IID_IUnknown) ||
1429 IsEqualGUID(riid, &IID_IStreamSample) ||
1430 IsEqualGUID(riid, &IID_IAudioStreamSample))
1431 {
1432 IAudioStreamSample_AddRef(iface);
1433 *ret_iface = iface;
1434 return S_OK;
1435 }
1436
1437 *ret_iface = NULL;
1438
1439 ERR("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ret_iface);
1440 return E_NOINTERFACE;
1441}
1442
1444{
1447
1448 TRACE("(%p)->(): new ref = %u\n", iface, ref);
1449
1450 return ref;
1451}
1452
1454{
1457
1458 TRACE("(%p)->(): new ref = %u\n", iface, ref);
1459
1460 if (!ref)
1462
1463 return ref;
1464}
1465
1466/*** IStreamSample methods ***/
1468{
1469 FIXME("(%p)->(%p): stub\n", iface, media_stream);
1470
1471 return E_NOTIMPL;
1472}
1473
1475 STREAM_TIME *end_time, STREAM_TIME *current_time)
1476{
1477 FIXME("(%p)->(%p,%p,%p): stub\n", iface, start_time, end_time, current_time);
1478
1479 return E_NOTIMPL;
1480}
1481
1483 const STREAM_TIME *end_time)
1484{
1485 FIXME("(%p)->(%p,%p): stub\n", iface, start_time, end_time);
1486
1487 return E_NOTIMPL;
1488}
1489
1491 PAPCFUNC func_APC, DWORD APC_data)
1492{
1493 FIXME("(%p)->(%x,%p,%p,%u): stub\n", iface, flags, event, func_APC, APC_data);
1494
1495 return E_NOTIMPL;
1496}
1497
1499{
1500 FIXME("(%p)->(%x,%u): stub\n", iface, flags, milliseconds);
1501
1502 return E_NOTIMPL;
1503}
1504
1505/*** IAudioStreamSample methods ***/
1507{
1508 FIXME("(%p)->(%p): stub\n", iface, audio_data);
1509
1510 return E_NOTIMPL;
1511}
1512
1513static const struct IAudioStreamSampleVtbl AudioStreamSample_Vtbl =
1514{
1515 /*** IUnknown methods ***/
1519 /*** IStreamSample methods ***/
1525 /*** IAudioStreamSample methods ***/
1527};
1528
1530{
1532
1533 TRACE("(%p)\n", audio_stream_sample);
1534
1536 if (!object)
1537 return E_OUTOFMEMORY;
1538
1539 object->IAudioStreamSample_iface.lpVtbl = &AudioStreamSample_Vtbl;
1540 object->ref = 1;
1541 object->parent = (IMediaStream*)parent;
1542 object->audio_data = audio_data;
1543
1544 *audio_stream_sample = (IAudioStreamSample*)&object->IAudioStreamSample_iface;
1545
1546 return S_OK;
1547}
static int state
Definition: maze.c:121
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define MAX_PIN_NAME
Definition: axcore.idl:47
@ PINDIR_INPUT
Definition: axcore.idl:41
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
const GUID IID_IUnknown
#define FIXME(fmt,...)
Definition: debug.h:114
#define ERR(fmt,...)
Definition: debug.h:113
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
HRESULT WINAPI DirectDrawCreateEx(LPGUID lpGUID, LPVOID *lplpDD, REFIID id, LPUNKNOWN pUnkOuter)
Definition: main.c:139
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
r parent
Definition: btrfs.c:3010
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
struct _cl_event * event
Definition: glext.h:7739
GLuint index
Definition: glext.h:6031
GLbitfield flags
Definition: glext.h:7161
REFIID riid
Definition: atlbase.h:39
Definition: axcore.idl:92
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetSameFormat(IDirectDrawMediaStream *iface, IMediaStream *pStreamThatHasDesiredFormat, DWORD dwFlags)
Definition: mediastream.c:341
static HRESULT WINAPI IAudioStreamSampleImpl_GetAudioData(IAudioStreamSample *iface, IAudioData **audio_data)
Definition: mediastream.c:1506
static ULONG WINAPI AudioMediaStreamImpl_IAMMediaStream_Release(IAMMediaStream *iface)
Definition: mediastream.c:723
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_QueryInterface(IAMMediaStream *iface, REFIID riid, void **ret_iface)
Definition: mediastream.c:675
static HRESULT WINAPI IAudioStreamSampleImpl_GetSampleTimes(IAudioStreamSample *iface, STREAM_TIME *start_time, STREAM_TIME *end_time, STREAM_TIME *current_time)
Definition: mediastream.c:1474
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_GetInformation(IAudioMediaStream *iface, MSPID *purpose_id, STREAM_TYPE *type)
Definition: mediastream.c:926
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_CreateSample(IDirectDrawMediaStream *iface, IDirectDrawSurface *surface, const RECT *rect, DWORD dwFlags, IDirectDrawStreamSample **ppSample)
Definition: mediastream.c:428
static ULONG WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Release(IDirectDrawMediaStream *iface)
Definition: mediastream.c:302
static HRESULT WINAPI AudioMediaStreamInputPin_Receive(BaseInputPin *base, IMediaSample *sample)
Definition: mediastream.c:1126
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetInformation(IDirectDrawMediaStream *iface, MSPID *purpose_id, STREAM_TYPE *type)
Definition: mediastream.c:326
static ULONG WINAPI AudioMediaStreamImpl_IAMMediaStream_AddRef(IAMMediaStream *iface)
Definition: mediastream.c:713
static HRESULT WINAPI IAudioStreamSampleImpl_CompletionStatus(IAudioStreamSample *iface, DWORD flags, DWORD milliseconds)
Definition: mediastream.c:1498
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_GetInformation(IAMMediaStream *iface, MSPID *purpose_id, STREAM_TYPE *type)
Definition: mediastream.c:157
static ULONG WINAPI DirectDrawMediaStreamInputPin_IPin_Release(IPin *iface)
Definition: mediastream.c:487
static HRESULT WINAPI IAudioStreamSampleImpl_GetMediaStream(IAudioStreamSample *iface, IMediaStream **media_stream)
Definition: mediastream.c:1467
static LONG WINAPI AudioMediaStreamInputPin_GetMediaTypeVersion(BasePin *base)
Definition: mediastream.c:1103
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetFormat(IDirectDrawMediaStream *iface, const DDSURFACEDESC *pDDSurfaceDesc, IDirectDrawPalette *pDirectDrawPalette)
Definition: mediastream.c:393
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetFormat(IDirectDrawMediaStream *iface, DDSURFACEDESC *current_format, IDirectDrawPalette **palette, DDSURFACEDESC *desired_format, DWORD *flags)
Definition: mediastream.c:382
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetTimePerFrame(IDirectDrawMediaStream *iface, STREAM_TIME *pFrameTime)
Definition: mediastream.c:437
static HRESULT WINAPI DirectDrawMediaStreamInputPin_Receive(BaseInputPin *base, IMediaSample *sample)
Definition: mediastream.c:586
static const IPinVtbl AudioMediaStreamInputPin_IPin_Vtbl
Definition: mediastream.c:1063
static DirectDrawMediaStreamImpl * impl_from_IDirectDrawMediaStream(IDirectDrawMediaStream *iface)
Definition: mediastream.c:281
static ULONG WINAPI IAudioStreamSampleImpl_Release(IAudioStreamSample *iface)
Definition: mediastream.c:1453
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_JoinFilterGraph(IAMMediaStream *iface, IFilterGraph *filtergraph)
Definition: mediastream.c:251
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_SetFormat(IAudioMediaStream *iface, const WAVEFORMATEX *wave_format)
Definition: mediastream.c:995
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_QueryInterface(IDirectDrawMediaStream *iface, REFIID riid, void **ret_iface)
Definition: mediastream.c:287
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_JoinFilterGraph(IAMMediaStream *iface, IFilterGraph *filtergraph)
Definition: mediastream.c:851
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_JoinAMMultiMediaStream(IAMMediaStream *iface, IAMMultiMediaStream *am_multi_media_stream)
Definition: mediastream.c:831
static DirectDrawMediaStreamInputPin * impl_from_DirectDrawMediaStreamInputPin_IPin(IPin *iface)
Definition: mediastream.c:467
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_SendEndOfStream(IAudioMediaStream *iface, DWORD flags)
Definition: mediastream.c:971
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_AllocateSample(IAMMediaStream *iface, DWORD flags, IStreamSample **sample)
Definition: mediastream.c:782
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_JoinFilter(IAMMediaStream *iface, IMediaStreamFilter *media_stream_filter)
Definition: mediastream.c:840
static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetSampleTimes(IDirectDrawStreamSample *iface, STREAM_TIME *start_time, STREAM_TIME *end_time, STREAM_TIME *current_time)
Definition: mediastream.c:1261
static HRESULT WINAPI IDirectDrawStreamSampleImpl_SetSampleTimes(IDirectDrawStreamSample *iface, const STREAM_TIME *start_time, const STREAM_TIME *end_time)
Definition: mediastream.c:1269
static DirectDrawMediaStreamImpl * impl_from_DirectDrawMediaStream_IAMMediaStream(IAMMediaStream *iface)
Definition: mediastream.c:67
static HRESULT WINAPI DirectDrawMediaStreamInputPin_IPin_QueryInterface(IPin *iface, REFIID riid, void **ret_iface)
Definition: mediastream.c:473
static const struct IAudioStreamSampleVtbl AudioStreamSample_Vtbl
Definition: mediastream.c:1513
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_QueryInterface(IAudioMediaStream *iface, REFIID riid, void **ret_iface)
Definition: mediastream.c:887
static HRESULT WINAPI DirectDrawMediaStreamInputPin_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *media_type)
Definition: mediastream.c:516
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_CreateSharedSample(IAudioMediaStream *iface, IStreamSample *existing_sample, DWORD flags, IStreamSample **sample)
Definition: mediastream.c:961
HRESULT ddrawmediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, STREAM_TYPE stream_type, IAMMediaStream **media_stream)
Definition: mediastream.c:606
static const BaseInputPinFuncTable AudioMediaStreamInputPin_FuncTable
Definition: mediastream.c:1135
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SendEndOfStream(IDirectDrawMediaStream *iface, DWORD dwFlags)
Definition: mediastream.c:371
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_SetSameFormat(IAMMediaStream *iface, IMediaStream *pStreamThatHasDesiredFormat, DWORD flags)
Definition: mediastream.c:772
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_SendEndOfStream(IAMMediaStream *iface, DWORD flags)
Definition: mediastream.c:202
static ULONG WINAPI IDirectDrawStreamSampleImpl_Release(IDirectDrawStreamSample *iface)
Definition: mediastream.c:1235
static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetMediaStream(IDirectDrawStreamSample *iface, IMediaStream **media_stream)
Definition: mediastream.c:1254
static IDirectDrawStreamSampleImpl * impl_from_IDirectDrawStreamSample(IDirectDrawStreamSample *iface)
Definition: mediastream.c:1199
static HRESULT WINAPI AudioMediaStreamInputPin_IPin_QueryInterface(IPin *iface, REFIID riid, void **ret_iface)
Definition: mediastream.c:1042
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_AllocateSample(IAudioMediaStream *iface, DWORD flags, IStreamSample **sample)
Definition: mediastream.c:951
HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, STREAM_TYPE stream_type, IAMMediaStream **media_stream)
Definition: mediastream.c:1146
static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetSurface(IDirectDrawStreamSample *iface, IDirectDrawSurface **ddraw_surface, RECT *rect)
Definition: mediastream.c:1293
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_JoinAMMultiMediaStream(IAMMediaStream *iface, IAMMultiMediaStream *am_multi_media_stream)
Definition: mediastream.c:231
static ULONG WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_AddRef(IAMMediaStream *iface)
Definition: mediastream.c:111
static HRESULT WINAPI IAudioStreamSampleImpl_SetSampleTimes(IAudioStreamSample *iface, const STREAM_TIME *start_time, const STREAM_TIME *end_time)
Definition: mediastream.c:1482
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_GetMultiMediaStream(IAMMediaStream *iface, IMultiMediaStream **multi_media_stream)
Definition: mediastream.c:141
static HRESULT WINAPI IAudioStreamSampleImpl_Update(IAudioStreamSample *iface, DWORD flags, HANDLE event, PAPCFUNC func_APC, DWORD APC_data)
Definition: mediastream.c:1490
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_GetInformation(IAMMediaStream *iface, MSPID *purpose_id, STREAM_TYPE *type)
Definition: mediastream.c:757
static HRESULT WINAPI DirectDrawMediaStreamInputPin_GetMediaType(BasePin *base, int index, AM_MEDIA_TYPE *media_type)
Definition: mediastream.c:545
static const struct IAudioMediaStreamVtbl AudioMediaStreamImpl_IAudioMediaStream_Vtbl
Definition: mediastream.c:1017
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_AllocateSample(IAMMediaStream *iface, DWORD flags, IStreamSample **sample)
Definition: mediastream.c:182
static ULONG WINAPI AudioMediaStreamInputPin_IPin_Release(IPin *iface)
Definition: mediastream.c:1056
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_SendEndOfStream(IAMMediaStream *iface, DWORD flags)
Definition: mediastream.c:802
static ULONG WINAPI DirectDrawMediaStreamInputPin_IPin_AddRef(IPin *iface)
Definition: mediastream.c:480
static ULONG WINAPI IDirectDrawStreamSampleImpl_AddRef(IDirectDrawStreamSample *iface)
Definition: mediastream.c:1225
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_AllocateSample(IDirectDrawMediaStream *iface, DWORD dwFlags, IStreamSample **ppSample)
Definition: mediastream.c:351
static ULONG WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_Release(IAMMediaStream *iface)
Definition: mediastream.c:121
static LONG WINAPI DirectDrawMediaStreamInputPin_GetMediaTypeVersion(BasePin *base)
Definition: mediastream.c:540
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_GetMultiMediaStream(IAMMediaStream *iface, IMultiMediaStream **multi_media_stream)
Definition: mediastream.c:741
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_JoinFilter(IAMMediaStream *iface, IMediaStreamFilter *media_stream_filter)
Definition: mediastream.c:240
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_Initialize(IAMMediaStream *iface, IUnknown *source_object, DWORD flags, REFMSPID purpose_id, const STREAM_TYPE stream_type)
Definition: mediastream.c:812
static ULONG WINAPI IAudioStreamSampleImpl_AddRef(IAudioStreamSample *iface)
Definition: mediastream.c:1443
static HRESULT WINAPI IDirectDrawStreamSampleImpl_SetRect(IDirectDrawStreamSample *iface, const RECT *rect)
Definition: mediastream.c:1313
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_GetMultiMediaStream(IAudioMediaStream *iface, IMultiMediaStream **multi_media_stream)
Definition: mediastream.c:910
static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectDrawSurface *surface, const RECT *rect, IDirectDrawStreamSample **ddraw_stream_sample)
Definition: mediastream.c:1337
static HRESULT WINAPI IDirectDrawStreamSampleImpl_QueryInterface(IDirectDrawStreamSample *iface, REFIID riid, void **ret_iface)
Definition: mediastream.c:1205
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_SetSameFormat(IAudioMediaStream *iface, IMediaStream *stream_format, DWORD flags)
Definition: mediastream.c:941
static ULONG WINAPI AudioMediaStreamInputPin_IPin_AddRef(IPin *iface)
Definition: mediastream.c:1049
static const struct IAMMediaStreamVtbl AudioMediaStreamImpl_IAMMediaStream_Vtbl
Definition: mediastream.c:860
static HRESULT WINAPI IDirectDrawStreamSampleImpl_CompletionStatus(IDirectDrawStreamSample *iface, DWORD flags, DWORD milliseconds)
Definition: mediastream.c:1285
static ULONG WINAPI AudioMediaStreamImpl_IAudioMediaStream_AddRef(IAudioMediaStream *iface)
Definition: mediastream.c:895
static AudioMediaStreamImpl * impl_from_IAudioMediaStream(IAudioMediaStream *iface)
Definition: mediastream.c:881
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_SetState(IAMMediaStream *iface, FILTER_STATE state)
Definition: mediastream.c:222
static ULONG WINAPI AudioMediaStreamImpl_IAudioMediaStream_Release(IAudioMediaStream *iface)
Definition: mediastream.c:902
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_Initialize(IAMMediaStream *iface, IUnknown *source_object, DWORD flags, REFMSPID purpose_id, const STREAM_TYPE stream_type)
Definition: mediastream.c:212
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_GetFormat(IAudioMediaStream *iface, WAVEFORMATEX *wave_format_current)
Definition: mediastream.c:982
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetDirectDraw(IDirectDrawMediaStream *iface, IDirectDraw *pDirectDraw)
Definition: mediastream.c:420
static ULONG WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_AddRef(IDirectDrawMediaStream *iface)
Definition: mediastream.c:295
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetDirectDraw(IDirectDrawMediaStream *iface, IDirectDraw **ddraw)
Definition: mediastream.c:401
static IAudioStreamSampleImpl * impl_from_IAudioStreamSample(IAudioStreamSample *iface)
Definition: mediastream.c:1417
static const struct IAMMediaStreamVtbl DirectDrawMediaStreamImpl_IAMMediaStream_Vtbl
Definition: mediastream.c:260
static AudioMediaStreamImpl * impl_from_AudioMediaStream_IAMMediaStream(IAMMediaStream *iface)
Definition: mediastream.c:669
static HRESULT WINAPI IDirectDrawStreamSampleImpl_Update(IDirectDrawStreamSample *iface, DWORD flags, HANDLE event, PAPCFUNC func_APC, DWORD APC_data)
Definition: mediastream.c:1277
static AudioMediaStreamInputPin * impl_from_AudioMediaStreamInputPin_IPin(IPin *iface)
Definition: mediastream.c:1036
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_CreateSharedSample(IAMMediaStream *iface, IStreamSample *existing_sample, DWORD flags, IStreamSample **sample)
Definition: mediastream.c:192
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetMultiMediaStream(IDirectDrawMediaStream *iface, IMultiMediaStream **multi_media_stream)
Definition: mediastream.c:310
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_QueryInterface(IAMMediaStream *iface, REFIID riid, void **ret_iface)
Definition: mediastream.c:73
static const IPinVtbl DirectDrawMediaStreamInputPin_IPin_Vtbl
Definition: mediastream.c:494
static const struct IDirectDrawStreamSampleVtbl DirectDrawStreamSample_Vtbl
Definition: mediastream.c:1320
static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_SetSameFormat(IAMMediaStream *iface, IMediaStream *pStreamThatHasDesiredFormat, DWORD flags)
Definition: mediastream.c:172
static HRESULT WINAPI IAudioStreamSampleImpl_QueryInterface(IAudioStreamSample *iface, REFIID riid, void **ret_iface)
Definition: mediastream.c:1423
static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_CreateSample(IAudioMediaStream *iface, IAudioData *audio_data, DWORD flags, IAudioStreamSample **sample)
Definition: mediastream.c:1004
static HRESULT WINAPI AudioMediaStreamInputPin_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *media_type)
Definition: mediastream.c:1085
static HRESULT audiostreamsample_create(IAudioMediaStream *parent, IAudioData *audio_data, IAudioStreamSample **audio_stream_sample)
Definition: mediastream.c:1529
static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Vtbl
Definition: mediastream.c:445
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_SetState(IAMMediaStream *iface, FILTER_STATE state)
Definition: mediastream.c:822
static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_CreateSharedSample(IDirectDrawMediaStream *iface, IStreamSample *pExistingSample, DWORD dwFlags, IStreamSample **ppSample)
Definition: mediastream.c:361
static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_CreateSharedSample(IAMMediaStream *iface, IStreamSample *existing_sample, DWORD flags, IStreamSample **sample)
Definition: mediastream.c:792
static const BaseInputPinFuncTable DirectDrawMediaStreamInputPin_FuncTable
Definition: mediastream.c:595
static HRESULT WINAPI AudioMediaStreamInputPin_GetMediaType(BasePin *base, int index, AM_MEDIA_TYPE *media_type)
Definition: mediastream.c:1108
LONGLONG STREAM_TIME
Definition: mmstream.idl:45
STREAM_TYPE
Definition: mmstream.idl:50
static const WCHAR desc[]
Definition: protectdata.c:36
static HPALETTE palette
Definition: clipboard.c:1345
long LONG
Definition: pedump.c:60
const GUID IID_IPin
Definition: pincontrol.cpp:15
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD IDirectDraw7
Definition: vmrender.idl:21
#define DDSD_WIDTH
Definition: ddraw.h:210
#define DDSD_PIXELFORMAT
Definition: ddraw.h:216
#define DDSCL_NORMAL
Definition: ddraw.h:535
#define DDSD_HEIGHT
Definition: ddraw.h:209
#define DDSCAPS_OFFSCREENPLAIN
Definition: ddraw.h:255
#define DDPF_RGB
Definition: ddraw.h:507
#define DDSD_CAPS
Definition: ddraw.h:208
#define DDSCAPS_SYSTEMMEMORY
Definition: ddraw.h:261
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
& rect
Definition: startmenu.cpp:1413
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
Definition: pin.c:248
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:988
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
Definition: pin.c:329
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
Definition: pin.c:222
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: pin.c:1015
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
Definition: pin.c:296
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO *pPinInfo, const BaseInputPinFuncTable *pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin **ppPin)
Definition: pin.c:1189
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: pin.c:273
HRESULT WINAPI BaseInputPin_Destroy(BaseInputPin *This)
Definition: pin.c:1221
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: pin.c:318
HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:968
HRESULT WINAPI BasePinImpl_Disconnect(IPin *iface)
Definition: pin.c:197
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: pin.c:285
HRESULT WINAPI BasePinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:311
HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:889
HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:881
HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin *iface)
Definition: pin.c:944
IAMMediaStream IAMMediaStream_iface
Definition: mediastream.c:659
STREAM_TYPE stream_type
Definition: mediastream.c:664
IMultiMediaStream * parent
Definition: mediastream.c:662
IAudioMediaStream IAudioMediaStream_iface
Definition: mediastream.c:660
AudioMediaStreamInputPin * input_pin
Definition: mediastream.c:665
CRITICAL_SECTION critical_section
Definition: mediastream.c:666
struct AudioMediaStreamImpl * parent
Definition: mediastream.c:655
IDirectDrawMediaStream IDirectDrawMediaStream_iface
Definition: mediastream.c:57
IAMMediaStream IAMMediaStream_iface
Definition: mediastream.c:56
DirectDrawMediaStreamInputPin * input_pin
Definition: mediastream.c:63
CRITICAL_SECTION critical_section
Definition: mediastream.c:64
IDirectDraw7 * ddraw
Definition: mediastream.c:62
IMultiMediaStream * parent
Definition: mediastream.c:59
struct DirectDrawMediaStreamImpl * parent
Definition: mediastream.c:52
IMediaStream * parent
Definition: mediastream.c:1413
IAudioStreamSample IAudioStreamSample_iface
Definition: mediastream.c:1411
IAudioData * audio_data
Definition: mediastream.c:1414
IDirectDrawSurface * surface
Definition: mediastream.c:1195
IDirectDrawStreamSample IDirectDrawStreamSample_iface
Definition: mediastream.c:1192
Definition: scsiwmi.h:51
Definition: regsvr.c:104
Definition: send.c:48
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define ZeroMemory
Definition: winbase.h:1712
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)