ReactOS 0.4.17-dev-966-gf06eace
strmbase.h File Reference
#include "dshow.h"
#include "wine/debug.h"
Include dependency graph for strmbase.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  strmbase_pin
 
struct  strmbase_pin_ops
 
struct  strmbase_source
 
struct  strmbase_source_ops
 
struct  strmbase_sink
 
struct  strmbase_sink_ops
 
struct  strmbase_filter
 
struct  strmbase_filter_ops
 
struct  SourceSeeking
 
struct  strmbase_passthrough
 
struct  strmbase_renderer
 
struct  strmbase_renderer_ops
 

Typedefs

typedef HRESULT(WINAPI * BaseOutputPin_AttemptConnection) (struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt)
 
typedef HRESULT(WINAPI * BaseOutputPin_DecideBufferSize) (struct strmbase_source *pin, IMemAllocator *allocator, ALLOCATOR_PROPERTIES *props)
 
typedef HRESULT(WINAPI * BaseOutputPin_DecideAllocator) (struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator)
 
typedef HRESULT(WINAPI * BaseInputPin_Receive) (struct strmbase_sink *This, IMediaSample *pSample)
 
typedef HRESULT(WINAPI * SourceSeeking_ChangeRate) (IMediaSeeking *iface)
 
typedef HRESULT(WINAPI * SourceSeeking_ChangeStart) (IMediaSeeking *iface)
 
typedef HRESULT(WINAPI * SourceSeeking_ChangeStop) (IMediaSeeking *iface)
 
typedef struct SourceSeeking SourceSeeking
 

Enumerations

enum  strmbase_type_id {
  IBasicAudio_tid , IBasicVideo_tid , IMediaControl_tid , IMediaEvent_tid ,
  IMediaPosition_tid , IVideoWindow_tid , last_tid
}
 

Functions

HRESULT WINAPI CopyMediaType (AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
 
void WINAPI FreeMediaType (AM_MEDIA_TYPE *pMediaType)
 
AM_MEDIA_TYPE *WINAPI CreateMediaType (AM_MEDIA_TYPE const *pSrc)
 
void WINAPI DeleteMediaType (AM_MEDIA_TYPE *pMediaType)
 
void strmbase_dump_media_type (const AM_MEDIA_TYPE *mt)
 
static const char * debugstr_time (REFERENCE_TIME time)
 
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator (struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator)
 
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection (struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt)
 
void strmbase_source_cleanup (struct strmbase_source *pin)
 
void strmbase_source_init (struct strmbase_source *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_source_ops *func_table)
 
void strmbase_sink_init (struct strmbase_sink *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_sink_ops *ops, IMemAllocator *allocator)
 
void strmbase_sink_cleanup (struct strmbase_sink *pin)
 
VOID WINAPI BaseFilterImpl_IncrementPinVersion (struct strmbase_filter *filter)
 
void strmbase_filter_init (struct strmbase_filter *filter, IUnknown *outer, const CLSID *clsid, const struct strmbase_filter_ops *func_table)
 
void strmbase_filter_cleanup (struct strmbase_filter *filter)
 
HRESULT strmbase_seeking_init (SourceSeeking *seeking, const IMediaSeekingVtbl *vtbl, SourceSeeking_ChangeStop fnChangeStop, SourceSeeking_ChangeStart fnChangeStart, SourceSeeking_ChangeRate fnChangeRate)
 
void strmbase_seeking_cleanup (SourceSeeking *seeking)
 
HRESULT WINAPI SourceSeekingImpl_GetCapabilities (IMediaSeeking *iface, DWORD *pCapabilities)
 
HRESULT WINAPI SourceSeekingImpl_CheckCapabilities (IMediaSeeking *iface, DWORD *pCapabilities)
 
HRESULT WINAPI SourceSeekingImpl_IsFormatSupported (IMediaSeeking *iface, const GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_QueryPreferredFormat (IMediaSeeking *iface, GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_GetTimeFormat (IMediaSeeking *iface, GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_IsUsingTimeFormat (IMediaSeeking *iface, const GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_SetTimeFormat (IMediaSeeking *iface, const GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_GetDuration (IMediaSeeking *iface, LONGLONG *pDuration)
 
HRESULT WINAPI SourceSeekingImpl_GetStopPosition (IMediaSeeking *iface, LONGLONG *pStop)
 
HRESULT WINAPI SourceSeekingImpl_GetCurrentPosition (IMediaSeeking *iface, LONGLONG *pCurrent)
 
HRESULT WINAPI SourceSeekingImpl_ConvertTimeFormat (IMediaSeeking *iface, LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat)
 
HRESULT WINAPI SourceSeekingImpl_SetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, DWORD dwCurrentFlags, LONGLONG *pStop, DWORD dwStopFlags)
 
HRESULT WINAPI SourceSeekingImpl_GetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, LONGLONG *pStop)
 
HRESULT WINAPI SourceSeekingImpl_GetAvailable (IMediaSeeking *iface, LONGLONG *pEarliest, LONGLONG *pLatest)
 
HRESULT WINAPI SourceSeekingImpl_SetRate (IMediaSeeking *iface, double dRate)
 
HRESULT WINAPI SourceSeekingImpl_GetRate (IMediaSeeking *iface, double *dRate)
 
HRESULT WINAPI SourceSeekingImpl_GetPreroll (IMediaSeeking *iface, LONGLONG *pPreroll)
 
HRESULT strmbase_get_typeinfo (enum strmbase_type_id tid, ITypeInfo **typeinfo)
 
void strmbase_release_typelibs (void)
 
void strmbase_passthrough_init (struct strmbase_passthrough *passthrough, IUnknown *outer)
 
void strmbase_passthrough_cleanup (struct strmbase_passthrough *passthrough)
 
void strmbase_passthrough_eos (struct strmbase_passthrough *passthrough)
 
void strmbase_passthrough_invalidate_time (struct strmbase_passthrough *passthrough)
 
void strmbase_passthrough_update_time (struct strmbase_passthrough *passthrough, REFERENCE_TIME time)
 
void strmbase_renderer_init (struct strmbase_renderer *filter, IUnknown *outer, const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_renderer_ops *ops)
 
void strmbase_renderer_cleanup (struct strmbase_renderer *filter)
 

Typedef Documentation

◆ BaseInputPin_Receive

typedef HRESULT(WINAPI * BaseInputPin_Receive) (struct strmbase_sink *This, IMediaSample *pSample)

Definition at line 116 of file strmbase.h.

◆ BaseOutputPin_AttemptConnection

typedef HRESULT(WINAPI * BaseOutputPin_AttemptConnection) (struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt)

Definition at line 86 of file strmbase.h.

◆ BaseOutputPin_DecideAllocator

typedef HRESULT(WINAPI * BaseOutputPin_DecideAllocator) (struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator)

Definition at line 88 of file strmbase.h.

◆ BaseOutputPin_DecideBufferSize

typedef HRESULT(WINAPI * BaseOutputPin_DecideBufferSize) (struct strmbase_source *pin, IMemAllocator *allocator, ALLOCATOR_PROPERTIES *props)

Definition at line 87 of file strmbase.h.

◆ SourceSeeking

◆ SourceSeeking_ChangeRate

typedef HRESULT(WINAPI * SourceSeeking_ChangeRate) (IMediaSeeking *iface)

Definition at line 181 of file strmbase.h.

◆ SourceSeeking_ChangeStart

typedef HRESULT(WINAPI * SourceSeeking_ChangeStart) (IMediaSeeking *iface)

Definition at line 182 of file strmbase.h.

◆ SourceSeeking_ChangeStop

typedef HRESULT(WINAPI * SourceSeeking_ChangeStop) (IMediaSeeking *iface)

Definition at line 183 of file strmbase.h.

Enumeration Type Documentation

◆ strmbase_type_id

Enumerator
IBasicAudio_tid 
IBasicVideo_tid 
IMediaControl_tid 
IMediaEvent_tid 
IMediaPosition_tid 
IVideoWindow_tid 
last_tid 

Definition at line 223 of file strmbase.h.

224{
232};
@ last_tid
Definition: strmbase.h:231
@ IBasicVideo_tid
Definition: strmbase.h:226
@ IVideoWindow_tid
Definition: strmbase.h:230
@ IBasicAudio_tid
Definition: strmbase.h:225
@ IMediaEvent_tid
Definition: strmbase.h:228
@ IMediaPosition_tid
Definition: strmbase.h:229
@ IMediaControl_tid
Definition: strmbase.h:227

Function Documentation

◆ BaseFilterImpl_IncrementPinVersion()

VOID WINAPI BaseFilterImpl_IncrementPinVersion ( struct strmbase_filter *  filter)

Definition at line 512 of file filter.c.

513{
514 InterlockedIncrement(&filter->pin_version);
515}
#define InterlockedIncrement
Definition: armddk.h:53
Definition: filter.c:165

Referenced by FileSource_Load().

◆ BaseOutputPinImpl_AttemptConnection()

HRESULT WINAPI BaseOutputPinImpl_AttemptConnection ( struct strmbase_source *  pin,
IPin *  peer,
const AM_MEDIA_TYPE *  mt 
)

Definition at line 710 of file pin.c.

712{
713 HRESULT hr;
714 IMemAllocator * pMemAlloc = NULL;
715
716 TRACE("(%p)->(%p, %p)\n", This, pReceivePin, pmt);
717
718 if (!query_accept(&This->pin, pmt))
720
721 This->pin.peer = pReceivePin;
722 IPin_AddRef(pReceivePin);
723 CopyMediaType(&This->pin.mt, pmt);
724
725 hr = IPin_ReceiveConnection(pReceivePin, &This->pin.IPin_iface, pmt);
726
727 /* get the IMemInputPin interface we will use to deliver samples to the
728 * connected pin */
729 if (SUCCEEDED(hr))
730 {
731 This->pMemInputPin = NULL;
732 hr = IPin_QueryInterface(pReceivePin, &IID_IMemInputPin, (LPVOID)&This->pMemInputPin);
733
734 if (SUCCEEDED(hr))
735 {
736 hr = This->pFuncsTable->pfnDecideAllocator(This, This->pMemInputPin, &pMemAlloc);
737 if (SUCCEEDED(hr))
738 This->pAllocator = pMemAlloc;
739 else if (pMemAlloc)
740 IMemAllocator_Release(pMemAlloc);
741 }
742
743 /* break connection if we couldn't get the allocator */
744 if (FAILED(hr))
745 {
746 if (This->pMemInputPin)
747 IMemInputPin_Release(This->pMemInputPin);
748 This->pMemInputPin = NULL;
749
750 IPin_Disconnect(pReceivePin);
751 }
752 }
753
754 if (FAILED(hr))
755 {
756 IPin_Release(This->pin.peer);
757 This->pin.peer = NULL;
758 FreeMediaType(&This->pin.mt);
759 }
760
761 TRACE("Returning %#lx.\n", hr);
762 return hr;
763}
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
static BOOL query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt)
Definition: pin.c:394
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: mediatype.c:150
void WINAPI FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: mediatype.c:165
#define VFW_E_TYPE_NOT_ACCEPTED
Definition: vfwmsgs.h:81

Referenced by AviMuxOut_AttemptConnection().

◆ BaseOutputPinImpl_DecideAllocator()

HRESULT WINAPI BaseOutputPinImpl_DecideAllocator ( struct strmbase_source *  pin,
IMemInputPin *  peer,
IMemAllocator **  allocator 
)

Definition at line 680 of file pin.c.

682{
683 HRESULT hr;
684
685 hr = IMemInputPin_GetAllocator(pPin, pAlloc);
686
687 if (hr == VFW_E_NO_ALLOCATOR)
688 hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL,
689 CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)pAlloc);
690
691 if (SUCCEEDED(hr))
692 {
694 ZeroMemory(&rProps, sizeof(ALLOCATOR_PROPERTIES));
695
696 IMemInputPin_GetAllocatorRequirements(pPin, &rProps);
697 hr = This->pFuncsTable->pfnDecideBufferSize(This, *pAlloc, &rProps);
698 }
699
700 if (SUCCEEDED(hr))
701 hr = IMemInputPin_NotifyAllocator(pPin, *pAlloc, FALSE);
702
703 return hr;
704}
#define FALSE
Definition: types.h:117
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
#define ZeroMemory
Definition: minwinbase.h:31
#define VFW_E_NO_ALLOCATOR
Definition: vfwmsgs.h:49

Referenced by AVICompressorOut_DecideAllocator().

◆ CopyMediaType()

HRESULT WINAPI CopyMediaType ( AM_MEDIA_TYPE *  pDest,
const AM_MEDIA_TYPE *  pSrc 
)

Definition at line 150 of file mediatype.c.

151{
152 *dest = *src;
153 if (src->pbFormat)
154 {
155 dest->pbFormat = CoTaskMemAlloc(src->cbFormat);
156 if (!dest->pbFormat)
157 return E_OUTOFMEMORY;
158 memcpy(dest->pbFormat, src->pbFormat, src->cbFormat);
159 }
160 if (dest->pUnk)
161 IUnknown_AddRef(dest->pUnk);
162 return S_OK;
163}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
GLenum src
Definition: glext.h:6340
#define S_OK
Definition: intsafe.h:52
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static char * dest
Definition: rtl.c:149

Referenced by acm_wrapper_sink_connect(), acm_wrapper_source_get_media_type(), AMStreamConfig_GetFormat(), audio_sink_ConnectionMediaType(), audio_sink_ReceiveConnection(), BaseOutputPinImpl_AttemptConnection(), configure_buffer(), CreateMediaType(), ddraw_IDirectDrawMediaStream_SetFormat(), ddraw_sink_ConnectionMediaType(), ddraw_sink_ReceiveConnection(), FileAsyncReaderPin_AttemptConnection(), FileSource_GetCurFile(), FileSource_Load(), fill_media_type(), pin_ConnectionMediaType(), sample_grabber_sink_get_media_type(), sample_grabber_source_get_media_type(), SampleGrabber_ISampleGrabber_GetConnectedMediaType(), SampleGrabber_ISampleGrabber_SetMediaType(), sink_get_media_type(), sink_ReceiveConnection(), source_get_media_type(), StdMediaSample2_GetMediaType(), StdMediaSample2_SetMediaType(), stream_config_GetFormat(), stream_config_SetFormat(), test_connect_pin(), testsink_get_media_type(), testsource_AttemptConnection(), testsource_get_media_type(), and TransformFilter_Output_GetMediaType().

◆ CreateMediaType()

AM_MEDIA_TYPE *WINAPI CreateMediaType ( AM_MEDIA_TYPE const *  pSrc)

Definition at line 176 of file mediatype.c.

177{
178 AM_MEDIA_TYPE * pDest;
179
180 pDest = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
181 if (!pDest)
182 return NULL;
183
184 if (FAILED(CopyMediaType(pDest, pSrc)))
185 {
186 CoTaskMemFree(pDest);
187 return NULL;
188 }
189
190 return pDest;
191}
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *dest, const AM_MEDIA_TYPE *src)
Definition: mediatype.c:150

◆ debugstr_time()

static const char * debugstr_time ( REFERENCE_TIME  time)
inlinestatic

Definition at line 32 of file strmbase.h.

33{
34 ULONGLONG abstime = time >= 0 ? time : -time;
35 unsigned int i = 0, j = 0;
36 char buffer[23], rev[23];
37
38 while (abstime || i <= 8)
39 {
40 buffer[i++] = '0' + (abstime % 10);
41 abstime /= 10;
42 if (i == 7) buffer[i++] = '.';
43 }
44 if (time < 0) buffer[i++] = '-';
45
46 while (i--) rev[j++] = buffer[i];
47 while (rev[j-1] == '0' && rev[j-2] != '.') --j;
48 rev[j] = 0;
49
50 return wine_dbg_sprintf("%s", rev);
51}
int rev
Definition: sort.c:17
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296
GLuint buffer
Definition: glext.h:5915
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
Definition: glfuncs.h:248
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 GLint GLint j
Definition: glfuncs.h:250
__u16 time
Definition: mkdosfs.c:8
uint64_t ULONGLONG
Definition: typedefs.h:67

Referenced by acm_wrapper_sink_Receive(), acm_wrapper_source_qc_Notify(), avi_decompressor_source_qc_Notify(), filter_Run(), get_write_pos(), image_presenter_PresentImage(), MediaFilter_Run(), MediaSeeking_GetCurrentPosition(), MediaSeeking_GetDuration(), MediaSeeking_GetStopPosition(), MediaSeeking_SetPositions(), perform_qos(), quality_control_Notify(), sink_NewSegment(), source_NewSegment(), SourceSeekingImpl_SetPositions(), StdMediaSample2_SetMediaTime(), StdMediaSample2_SetTime(), strmbase_dump_media_type(), SystemClockImpl_AdvisePeriodic(), SystemClockImpl_AdviseTime(), and SystemClockImpl_GetTime().

◆ DeleteMediaType()

◆ FreeMediaType()

◆ SourceSeekingImpl_CheckCapabilities()

HRESULT WINAPI SourceSeekingImpl_CheckCapabilities ( IMediaSeeking *  iface,
DWORD *  pCapabilities 
)

Definition at line 75 of file seeking.c.

76{
78 HRESULT hr;
79 DWORD dwCommonCaps;
80
81 TRACE("(%p)\n", pCapabilities);
82
83 if (!pCapabilities)
84 return E_POINTER;
85
86 dwCommonCaps = *pCapabilities & This->dwCapabilities;
87
88 if (!dwCommonCaps)
89 hr = E_FAIL;
90 else
91 hr = (*pCapabilities == dwCommonCaps) ? S_OK : S_FALSE;
92 *pCapabilities = dwCommonCaps;
93 return hr;
94}
#define E_FAIL
Definition: ddrawi.h:102
unsigned long DWORD
Definition: ntddk_ex.h:95
static SourceSeeking * impl_from_IMediaSeeking(IMediaSeeking *iface)
Definition: seeking.c:26
#define S_FALSE
Definition: winerror.h:3451
#define E_POINTER
Definition: winerror.h:3480

◆ SourceSeekingImpl_ConvertTimeFormat()

HRESULT WINAPI SourceSeekingImpl_ConvertTimeFormat ( IMediaSeeking *  iface,
LONGLONG *  pTarget,
const GUID *  pTargetFormat,
LONGLONG  Source,
const GUID *  pSourceFormat 
)

Definition at line 186 of file seeking.c.

187{
189 if (!pTargetFormat)
190 pTargetFormat = &This->timeformat;
191 if (!pSourceFormat)
192 pSourceFormat = &This->timeformat;
193 if (IsEqualIID(pTargetFormat, &TIME_FORMAT_MEDIA_TIME) && IsEqualIID(pSourceFormat, &TIME_FORMAT_MEDIA_TIME))
194 {
195 *pTarget = Source;
196 return S_OK;
197 }
198 /* FIXME: clear pTarget? */
199 return E_INVALIDARG;
200}
#define E_INVALIDARG
Definition: ddrawi.h:101
FxIoTarget * pTarget
Definition: fxdeviceapi.cpp:97
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ SourceSeekingImpl_GetAvailable()

HRESULT WINAPI SourceSeekingImpl_GetAvailable ( IMediaSeeking *  iface,
LONGLONG *  pEarliest,
LONGLONG *  pLatest 
)

Definition at line 272 of file seeking.c.

273{
275
276 TRACE("(%p, %p)\n", pEarliest, pLatest);
277
279 *pEarliest = 0;
280 *pLatest = This->llDuration;
282
283 return S_OK;
284}
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

◆ SourceSeekingImpl_GetCapabilities()

HRESULT WINAPI SourceSeekingImpl_GetCapabilities ( IMediaSeeking *  iface,
DWORD *  pCapabilities 
)

Definition at line 64 of file seeking.c.

65{
67
68 TRACE("(%p)\n", pCapabilities);
69
70 *pCapabilities = This->dwCapabilities;
71
72 return S_OK;
73}

◆ SourceSeekingImpl_GetCurrentPosition()

HRESULT WINAPI SourceSeekingImpl_GetCurrentPosition ( IMediaSeeking *  iface,
LONGLONG *  pCurrent 
)

Definition at line 173 of file seeking.c.

174{
176
177 TRACE("(%p)\n", pCurrent);
178
180 *pCurrent = This->llCurrent;
182
183 return S_OK;
184}

◆ SourceSeekingImpl_GetDuration()

HRESULT WINAPI SourceSeekingImpl_GetDuration ( IMediaSeeking *  iface,
LONGLONG *  pDuration 
)

Definition at line 146 of file seeking.c.

147{
149
150 TRACE("(%p)\n", pDuration);
151
153 *pDuration = This->llDuration;
155
156 return S_OK;
157}

◆ SourceSeekingImpl_GetPositions()

HRESULT WINAPI SourceSeekingImpl_GetPositions ( IMediaSeeking *  iface,
LONGLONG *  pCurrent,
LONGLONG *  pStop 
)

Definition at line 258 of file seeking.c.

259{
261
262 TRACE("(%p, %p)\n", pCurrent, pStop);
263
265 IMediaSeeking_GetCurrentPosition(iface, pCurrent);
266 IMediaSeeking_GetStopPosition(iface, pStop);
268
269 return S_OK;
270}

◆ SourceSeekingImpl_GetPreroll()

HRESULT WINAPI SourceSeekingImpl_GetPreroll ( IMediaSeeking *  iface,
LONGLONG *  pPreroll 
)

Definition at line 323 of file seeking.c.

324{
325 TRACE("(%p)\n", pPreroll);
326
327 *pPreroll = 0;
328 return S_OK;
329}

◆ SourceSeekingImpl_GetRate()

HRESULT WINAPI SourceSeekingImpl_GetRate ( IMediaSeeking *  iface,
double *  dRate 
)

Definition at line 309 of file seeking.c.

310{
312
313 TRACE("(%p)\n", dRate);
314
316 /* Forward? */
317 *dRate = This->dRate;
319
320 return S_OK;
321}

◆ SourceSeekingImpl_GetStopPosition()

HRESULT WINAPI SourceSeekingImpl_GetStopPosition ( IMediaSeeking *  iface,
LONGLONG *  pStop 
)

Definition at line 159 of file seeking.c.

160{
162
163 TRACE("(%p)\n", pStop);
164
166 *pStop = This->llStop;
168
169 return S_OK;
170}

◆ SourceSeekingImpl_GetTimeFormat()

HRESULT WINAPI SourceSeekingImpl_GetTimeFormat ( IMediaSeeking *  iface,
GUID *  pFormat 
)

Definition at line 111 of file seeking.c.

112{
114 TRACE("(%s)\n", debugstr_guid(pFormat));
115
117 *pFormat = This->timeformat;
119
120 return S_OK;
121}
#define debugstr_guid
Definition: kernel32.h:35

◆ SourceSeekingImpl_IsFormatSupported()

HRESULT WINAPI SourceSeekingImpl_IsFormatSupported ( IMediaSeeking *  iface,
const GUID *  pFormat 
)

Definition at line 96 of file seeking.c.

97{
98 TRACE("(%s)\n", debugstr_guid(pFormat));
99
100 return (IsEqualIID(pFormat, &TIME_FORMAT_MEDIA_TIME) ? S_OK : S_FALSE);
101}

◆ SourceSeekingImpl_IsUsingTimeFormat()

HRESULT WINAPI SourceSeekingImpl_IsUsingTimeFormat ( IMediaSeeking *  iface,
const GUID *  pFormat 
)

Definition at line 123 of file seeking.c.

124{
126 HRESULT hr = S_OK;
127
128 TRACE("(%s)\n", debugstr_guid(pFormat));
129
131 if (!IsEqualIID(pFormat, &This->timeformat))
132 hr = S_FALSE;
134
135 return hr;
136}

◆ SourceSeekingImpl_QueryPreferredFormat()

HRESULT WINAPI SourceSeekingImpl_QueryPreferredFormat ( IMediaSeeking *  iface,
GUID *  pFormat 
)

Definition at line 103 of file seeking.c.

104{
105 TRACE("(%s)\n", debugstr_guid(pFormat));
106
107 *pFormat = TIME_FORMAT_MEDIA_TIME;
108 return S_OK;
109}

◆ SourceSeekingImpl_SetPositions()

HRESULT WINAPI SourceSeekingImpl_SetPositions ( IMediaSeeking *  iface,
LONGLONG *  pCurrent,
DWORD  dwCurrentFlags,
LONGLONG *  pStop,
DWORD  dwStopFlags 
)

Definition at line 219 of file seeking.c.

220{
222 BOOL bChangeCurrent = FALSE, bChangeStop = FALSE;
223 LONGLONG llNewCurrent, llNewStop;
224
225 TRACE("iface %p, current %s, current_flags %#lx, stop %s, stop_flags %#lx.\n", iface,
226 pCurrent ? debugstr_time(*pCurrent) : "<null>", dwCurrentFlags,
227 pStop ? debugstr_time(*pStop): "<null>", dwStopFlags);
228
230
231 llNewCurrent = Adjust(This->llCurrent, pCurrent, dwCurrentFlags);
232 llNewStop = Adjust(This->llStop, pStop, dwStopFlags);
233
234 if (pCurrent)
235 bChangeCurrent = TRUE;
236 if (llNewStop != This->llStop)
237 bChangeStop = TRUE;
238
239 TRACE("Seeking from %s to %s.\n", debugstr_time(This->llCurrent), debugstr_time(llNewCurrent));
240
241 This->llCurrent = llNewCurrent;
242 This->llStop = llNewStop;
243
244 if (pCurrent && (dwCurrentFlags & AM_SEEKING_ReturnTime))
245 *pCurrent = llNewCurrent;
246 if (pStop && (dwStopFlags & AM_SEEKING_ReturnTime))
247 *pStop = llNewStop;
249
250 if (bChangeCurrent)
251 This->fnChangeStart(iface);
252 if (bChangeStop)
253 This->fnChangeStop(iface);
254
255 return S_OK;
256}
@ AM_SEEKING_ReturnTime
Definition: axcore.idl:597
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
static LONGLONG Adjust(LONGLONG value, const LONGLONG *pModifier, DWORD dwFlags)
Definition: seeking.c:202
static const char * debugstr_time(REFERENCE_TIME time)
Definition: strmbase.h:32
int64_t LONGLONG
Definition: typedefs.h:68

◆ SourceSeekingImpl_SetRate()

HRESULT WINAPI SourceSeekingImpl_SetRate ( IMediaSeeking *  iface,
double  dRate 
)

Definition at line 286 of file seeking.c.

287{
289 BOOL bChangeRate = (dRate != This->dRate);
290 HRESULT hr = S_OK;
291
292 TRACE("(%e)\n", dRate);
293
294 if (dRate > 100 || dRate < .001)
295 {
296 FIXME("Excessive rate %e, ignoring\n", dRate);
298 }
299
301 This->dRate = dRate;
302 if (bChangeRate)
303 hr = This->fnChangeRate(iface);
305
306 return hr;
307}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define VFW_E_UNSUPPORTED_AUDIO
Definition: vfwmsgs.h:112

◆ SourceSeekingImpl_SetTimeFormat()

HRESULT WINAPI SourceSeekingImpl_SetTimeFormat ( IMediaSeeking *  iface,
const GUID *  pFormat 
)

Definition at line 138 of file seeking.c.

139{
141 TRACE("%p %s\n", This, debugstr_guid(pFormat));
142 return (IsEqualIID(pFormat, &TIME_FORMAT_MEDIA_TIME) ? S_OK : E_INVALIDARG);
143}

◆ strmbase_dump_media_type()

void strmbase_dump_media_type ( const AM_MEDIA_TYPE *  mt)

Definition at line 58 of file mediatype.c.

59{
60 if (!TRACE_ON(quartz) || !mt) return;
61
62 TRACE("Dumping media type %p: major type %s, subtype %s",
63 mt, strmbase_debugstr_guid(&mt->majortype), strmbase_debugstr_guid(&mt->subtype));
64 if (mt->bFixedSizeSamples) TRACE(", fixed size samples");
65 if (mt->bTemporalCompression) TRACE(", temporal compression");
66 if (mt->lSampleSize) TRACE(", sample size %ld", mt->lSampleSize);
67 if (mt->pUnk) TRACE(", pUnk %p", mt->pUnk);
68 TRACE(", format type %s.\n", strmbase_debugstr_guid(&mt->formattype));
69
70 if (!mt->pbFormat) return;
71
72 TRACE("Dumping format %p: ", mt->pbFormat);
73
74 if (IsEqualGUID(&mt->formattype, &FORMAT_WaveFormatEx) && mt->cbFormat >= sizeof(WAVEFORMATEX))
75 {
76 WAVEFORMATEX *wfx = (WAVEFORMATEX *)mt->pbFormat;
77
78 TRACE("tag %#x, %u channels, sample rate %lu, %lu bytes/sec, alignment %u, %u bits/sample.\n",
79 wfx->wFormatTag, wfx->nChannels, wfx->nSamplesPerSec,
81
82 if (wfx->cbSize)
83 {
84 const unsigned char *extra = (const unsigned char *)(wfx + 1);
85 unsigned int i;
86
87 TRACE(" Extra bytes:");
88 for (i = 0; i < wfx->cbSize; ++i)
89 {
90 if (!(i % 16)) TRACE("\n ");
91 TRACE(" %02x", extra[i]);
92 }
93 TRACE("\n");
94 }
95 }
96 else if (IsEqualGUID(&mt->formattype, &FORMAT_VideoInfo) && mt->cbFormat >= sizeof(VIDEOINFOHEADER))
97 {
98 VIDEOINFOHEADER *vih = (VIDEOINFOHEADER *)mt->pbFormat;
99
100 if (!IsRectEmpty(&vih->rcSource)) TRACE("source %s, ", wine_dbgstr_rect(&vih->rcSource));
101 if (!IsRectEmpty(&vih->rcTarget)) TRACE("target %s, ", wine_dbgstr_rect(&vih->rcTarget));
102 if (vih->dwBitRate) TRACE("bitrate %lu, ", vih->dwBitRate);
103 if (vih->dwBitErrorRate) TRACE("error rate %lu, ", vih->dwBitErrorRate);
104 TRACE("%s sec/frame, ", debugstr_time(vih->AvgTimePerFrame));
105 TRACE("size %ldx%ld, %u planes, %u bpp, compression %s, image size %lu",
110 TRACE(", resolution %ldx%ld", vih->bmiHeader.biXPelsPerMeter, vih->bmiHeader.biYPelsPerMeter);
111 if (vih->bmiHeader.biClrUsed) TRACE(", %lu colours", vih->bmiHeader.biClrUsed);
112 if (vih->bmiHeader.biClrImportant) TRACE(", %lu important colours", vih->bmiHeader.biClrImportant);
113 TRACE(".\n");
114 }
115 else if (IsEqualGUID(&mt->formattype, &FORMAT_VideoInfo2) && mt->cbFormat >= sizeof(VIDEOINFOHEADER2))
116 {
117 VIDEOINFOHEADER2 *vih = (VIDEOINFOHEADER2 *)mt->pbFormat;
118
119 if (!IsRectEmpty(&vih->rcSource)) TRACE("source %s, ", wine_dbgstr_rect(&vih->rcSource));
120 if (!IsRectEmpty(&vih->rcTarget)) TRACE("target %s, ", wine_dbgstr_rect(&vih->rcTarget));
121 if (vih->dwBitRate) TRACE("bitrate %lu, ", vih->dwBitRate);
122 if (vih->dwBitErrorRate) TRACE("error rate %lu, ", vih->dwBitErrorRate);
123 TRACE("%s sec/frame, ", debugstr_time(vih->AvgTimePerFrame));
124 if (vih->dwInterlaceFlags) TRACE("interlace flags %#lx, ", vih->dwInterlaceFlags);
125 if (vih->dwCopyProtectFlags) TRACE("copy-protection flags %#lx, ", vih->dwCopyProtectFlags);
126 TRACE("aspect ratio %lu/%lu, ", vih->dwPictAspectRatioX, vih->dwPictAspectRatioY);
127 if (vih->dwControlFlags) TRACE("control flags %#lx, ", vih->dwControlFlags);
129 {
130 const DXVA_ExtendedFormat *colorimetry = (const DXVA_ExtendedFormat *)&vih->dwControlFlags;
131
132 TRACE("chroma site %#x, range %#x, matrix %#x, lighting %#x, primaries %#x, transfer function %#x, ",
133 colorimetry->VideoChromaSubsampling, colorimetry->NominalRange, colorimetry->VideoTransferMatrix,
134 colorimetry->VideoLighting, colorimetry->VideoPrimaries, colorimetry->VideoTransferFunction);
135 }
136 TRACE("size %ldx%ld, %u planes, %u bpp, compression %s, image size %lu",
141 TRACE(", resolution %ldx%ld", vih->bmiHeader.biXPelsPerMeter, vih->bmiHeader.biYPelsPerMeter);
142 if (vih->bmiHeader.biClrUsed) TRACE(", %lu colours", vih->bmiHeader.biClrUsed);
143 if (vih->bmiHeader.biClrImportant) TRACE(", %lu important colours", vih->bmiHeader.biClrImportant);
144 TRACE(".\n");
145 }
146 else
147 TRACE("not implemented for this format type.\n");
148}
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define TRACE_ON(x)
Definition: compat.h:75
#define AMCONTROL_COLORINFO_PRESENT
Definition: dvdmedia.h:25
@ extra
Definition: id3.c:95
if(dx< 0)
Definition: linetemp.h:194
static const char * strmbase_debugstr_guid(const GUID *guid)
Definition: mediatype.c:45
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
static __inline const char * debugstr_fourcc(unsigned int cc)
Definition: debug.h:397
LONG biYPelsPerMeter
Definition: amvideo.idl:38
DWORD biCompression
Definition: amvideo.idl:35
DWORD biClrImportant
Definition: amvideo.idl:40
LONG biXPelsPerMeter
Definition: amvideo.idl:37
DWORD biSizeImage
Definition: amvideo.idl:36
DWORD nAvgBytesPerSec
Definition: audioclient.idl:43
WORD wBitsPerSample
Definition: audioclient.idl:45
DWORD nSamplesPerSec
Definition: audioclient.idl:42
DXVA_VideoTransferFunction VideoTransferFunction
Definition: dxva.h:1022
DXVA_NominalRange NominalRange
Definition: dxva.h:1018
DXVA_VideoLighting VideoLighting
Definition: dxva.h:1020
UINT VideoChromaSubsampling
Definition: dxva.h:1017
DXVA_VideoTransferMatrix VideoTransferMatrix
Definition: dxva.h:1019
DXVA_VideoPrimaries VideoPrimaries
Definition: dxva.h:1021
DWORD dwCopyProtectFlags
Definition: dvdmedia.h:34
DWORD dwPictAspectRatioX
Definition: dvdmedia.h:35
DWORD dwInterlaceFlags
Definition: dvdmedia.h:33
DWORD dwBitErrorRate
Definition: dvdmedia.h:31
DWORD dwPictAspectRatioY
Definition: dvdmedia.h:36
REFERENCE_TIME AvgTimePerFrame
Definition: dvdmedia.h:32
DWORD dwControlFlags
Definition: dvdmedia.h:38
BITMAPINFOHEADER bmiHeader
Definition: dvdmedia.h:42
BITMAPINFOHEADER bmiHeader
Definition: amvideo.idl:189
REFERENCE_TIME AvgTimePerFrame
Definition: amvideo.idl:187

Referenced by AMStreamConfig_GetFormat(), AMStreamConfig_SetFormat(), BaseRenderer_Receive(), configure_buffer(), enum_media_types_Next(), filesinkfilter_SetFileName(), FileSource_Load(), FilterGraph2_ConnectDirect(), GraphConfig_Reconnect(), pin_ConnectionMediaType(), pin_QueryAccept(), SampleGrabber_ISampleGrabber_SetMediaType(), sink_ReceiveConnection(), source_Connect(), and stream_config_SetFormat().

◆ strmbase_filter_cleanup()

void strmbase_filter_cleanup ( struct strmbase_filter *  filter)

Definition at line 540 of file filter.c.

541{
542 if (filter->clock)
543 IReferenceClock_Release(filter->clock);
544
545 filter->IBaseFilter_iface.lpVtbl = NULL;
546 if (filter->filter_cs.DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1)
547 filter->filter_cs.DebugInfo->Spare[0] = 0;
548 DeleteCriticalSection(&filter->filter_cs);
549 if (filter->stream_cs.DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1)
550 filter->stream_cs.DebugInfo->Spare[0] = 0;
551 DeleteCriticalSection(&filter->stream_cs);
552}
IReferenceClock * clock
Definition: filter.c:171
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

Referenced by acm_wrapper_destroy(), async_reader_destroy(), audio_record_destroy(), avi_compressor_destroy(), avi_decompressor_destroy(), avi_mux_create(), avi_mux_destroy(), dsound_render_create(), dsound_render_destroy(), file_writer_destroy(), sample_grabber_destroy(), smart_tee_create(), smart_tee_destroy(), strmbase_renderer_cleanup(), testfilter_destroy(), testsink_destroy(), and vfw_capture_destroy().

◆ strmbase_filter_init()

void strmbase_filter_init ( struct strmbase_filter *  filter,
IUnknown *  outer,
const CLSID *  clsid,
const struct strmbase_filter_ops *  func_table 
)

Definition at line 517 of file filter.c.

519{
520 memset(filter, 0, sizeof(*filter));
521
522 filter->IBaseFilter_iface.lpVtbl = &filter_vtbl;
523 filter->IUnknown_inner.lpVtbl = &filter_inner_vtbl;
524 filter->outer_unk = outer ? outer : &filter->IUnknown_inner;
525 filter->refcount = 1;
526
529 if (filter->filter_cs.DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1)
530 filter->filter_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_filter.filter_cs");
533 if (filter->stream_cs.DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1)
534 filter->stream_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_filter.stream_cs");
535 filter->clsid = *clsid;
536 filter->pin_version = 1;
537 filter->ops = ops;
538}
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
static IUnknown * outer
Definition: compobj.c:82
const CLSID * clsid
Definition: msctf.cpp:50
static const IBaseFilterVtbl filter_vtbl
Definition: filter.c:493
static const IUnknownVtbl filter_inner_vtbl
Definition: filter.c:262
#define memset(x, y, z)
Definition: compat.h:39
LONG refcount
Definition: filter.c:168
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:687
#define DWORD_PTR
Definition: treelist.c:76
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
Definition: winnt_old.h:1156

Referenced by acm_wrapper_create(), async_reader_create(), audio_record_create(), avi_compressor_create(), avi_dec_create(), avi_mux_create(), dsound_render_create(), file_writer_create(), sample_grabber_create(), smart_tee_create(), strmbase_renderer_init(), testfilter_init(), testsink_init(), and vfw_capture_create().

◆ strmbase_get_typeinfo()

HRESULT strmbase_get_typeinfo ( enum strmbase_type_id  tid,
ITypeInfo **  typeinfo 
)

Definition at line 38 of file dispatch.c.

39{
40 HRESULT hr;
41
42 if (!control_typelib)
43 {
45
46 hr = LoadRegTypeLib(&LIBID_QuartzTypeLib, 1, 0, LOCALE_SYSTEM_DEFAULT, &typelib);
47 if (FAILED(hr))
48 {
49 ERR("Failed to load typelib, hr %#lx.\n", hr);
50 return hr;
51 }
53 ITypeLib_Release(typelib);
54 }
56 {
58
59 hr = ITypeLib_GetTypeInfoOfGuid(control_typelib, control_tid_id[tid], &typeinfo);
60 if (FAILED(hr))
61 {
62 ERR("Failed to get type info for %s, hr %#lx.\n", debugstr_guid(control_tid_id[tid]), hr);
63 return hr;
64 }
66 ITypeInfo_Release(typeinfo);
67 }
68 ITypeInfo_AddRef(*ret = control_typeinfo[tid]);
69 return S_OK;
70}
#define ERR(fmt,...)
Definition: precomp.h:57
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:507
return ret
Definition: mutex.c:147
static TfClientId tid
#define InterlockedCompareExchangePointer
Definition: interlocked.h:144
#define LOCALE_SYSTEM_DEFAULT
static ITypeLib * control_typelib
Definition: dispatch.c:25
static REFIID control_tid_id[]
Definition: dispatch.c:28
static ITypeInfo * control_typeinfo[last_tid]
Definition: dispatch.c:26

Referenced by BaseControlWindowImpl_GetIDsOfNames(), BaseControlWindowImpl_GetTypeInfo(), BaseControlWindowImpl_Invoke(), basic_audio_GetIDsOfNames(), basic_audio_GetTypeInfo(), basic_audio_Invoke(), basic_video_GetIDsOfNames(), basic_video_GetTypeInfo(), basic_video_Invoke(), BasicAudio_GetIDsOfNames(), BasicAudio_GetTypeInfo(), BasicAudio_Invoke(), BasicVideo_GetIDsOfNames(), BasicVideo_GetTypeInfo(), BasicVideo_Invoke(), MediaControl_GetIDsOfNames(), MediaControl_GetTypeInfo(), MediaControl_Invoke(), MediaEvent_GetIDsOfNames(), MediaEvent_GetTypeInfo(), MediaEvent_Invoke(), MediaPosition_GetIDsOfNames(), MediaPosition_GetTypeInfo(), MediaPosition_Invoke(), MediaPositionPassThru_GetIDsOfNames(), MediaPositionPassThru_GetTypeInfo(), MediaPositionPassThru_Invoke(), VideoWindow_GetIDsOfNames(), VideoWindow_GetTypeInfo(), and VideoWindow_Invoke().

◆ strmbase_passthrough_cleanup()

void strmbase_passthrough_cleanup ( struct strmbase_passthrough *  passthrough)

Definition at line 738 of file pospass.c.

739{
740 passthrough->time_cs.DebugInfo->Spare[0] = 0;
741 DeleteCriticalSection(&passthrough->time_cs);
742}
PRTL_CRITICAL_SECTION_DEBUG DebugInfo
Definition: rtltypes.h:1478
CRITICAL_SECTION time_cs
Definition: strmbase.h:247

Referenced by acm_wrapper_destroy(), avi_decompressor_destroy(), dsound_render_destroy(), sample_grabber_destroy(), seeking_passthrough_Release(), and strmbase_renderer_cleanup().

◆ strmbase_passthrough_eos()

void strmbase_passthrough_eos ( struct strmbase_passthrough *  passthrough)

Definition at line 759 of file pospass.c.

760{
762 HRESULT hr;
763
764 hr = IMediaSeeking_GetStopPosition(&passthrough->IMediaSeeking_iface, &time);
765 EnterCriticalSection(&passthrough->time_cs);
766 if (SUCCEEDED(hr))
767 {
768 passthrough->timevalid = TRUE;
769 passthrough->time_earliest = time;
770 }
771 else
772 passthrough->timevalid = FALSE;
773 LeaveCriticalSection(&passthrough->time_cs);
774}
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
IMediaSeeking IMediaSeeking_iface
Definition: strmbase.h:240
REFERENCE_TIME time_earliest
Definition: strmbase.h:248

Referenced by sink_eos().

◆ strmbase_passthrough_init()

void strmbase_passthrough_init ( struct strmbase_passthrough *  passthrough,
IUnknown *  outer 
)

Definition at line 725 of file pospass.c.

726{
727 memset(passthrough, 0, sizeof(*passthrough));
728
729 passthrough->outer_unk = outer;
731 passthrough->IMediaSeeking_iface.lpVtbl = &IMediaSeekingPassThru_Vtbl;
732 passthrough->ISeekingPassThru_iface.lpVtbl = &ISeekingPassThru_Vtbl;
734 InitializeCriticalSection(&passthrough->time_cs);
735 passthrough->time_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_passthrough.time_cs" );
736}
static const IMediaSeekingVtbl IMediaSeekingPassThru_Vtbl
Definition: pospass.c:412
static const ISeekingPassThruVtbl ISeekingPassThru_Vtbl
Definition: pospass.c:78
static const IMediaPositionVtbl IMediaPositionPassThru_Vtbl
Definition: pospass.c:703
ISeekingPassThru ISeekingPassThru_iface
Definition: strmbase.h:239
IMediaPosition IMediaPosition_iface
Definition: strmbase.h:241
IUnknown * outer_unk
Definition: strmbase.h:243

Referenced by acm_wrapper_create(), avi_dec_create(), dsound_render_create(), sample_grabber_create(), seeking_passthrough_create(), and strmbase_renderer_init().

◆ strmbase_passthrough_invalidate_time()

void strmbase_passthrough_invalidate_time ( struct strmbase_passthrough *  passthrough)

Definition at line 752 of file pospass.c.

753{
754 EnterCriticalSection(&passthrough->time_cs);
755 passthrough->timevalid = FALSE;
756 LeaveCriticalSection(&passthrough->time_cs);
757}

Referenced by renderer_cleanup_stream(), and sink_end_flush().

◆ strmbase_passthrough_update_time()

void strmbase_passthrough_update_time ( struct strmbase_passthrough *  passthrough,
REFERENCE_TIME  time 
)

Definition at line 744 of file pospass.c.

745{
746 EnterCriticalSection(&passthrough->time_cs);
747 passthrough->time_earliest = time;
748 passthrough->timevalid = TRUE;
749 LeaveCriticalSection(&passthrough->time_cs);
750}

Referenced by BaseRenderer_Receive().

◆ strmbase_release_typelibs()

void strmbase_release_typelibs ( void  )

Definition at line 72 of file dispatch.c.

73{
74 unsigned int i;
75
76 for (i = 0; i < ARRAY_SIZE(control_typeinfo); ++i)
77 {
79 ITypeInfo_Release(control_typeinfo[i]);
80 }
82 ITypeLib_Release(control_typelib);
83}
#define ARRAY_SIZE(A)
Definition: main.h:20

Referenced by DllMain().

◆ strmbase_renderer_cleanup()

void strmbase_renderer_cleanup ( struct strmbase_renderer *  filter)

Definition at line 568 of file renderer.c.

569{
570 if (filter->sink.pin.peer)
571 IPin_Disconnect(filter->sink.pin.peer);
572 IPin_Disconnect(&filter->sink.pin.IPin_iface);
574
576
577 CloseHandle(filter->state_event);
578 CloseHandle(filter->advise_event);
579 CloseHandle(filter->run_event);
580 CloseHandle(filter->flush_event);
582}
#define CloseHandle
Definition: compat.h:739
void strmbase_passthrough_cleanup(struct strmbase_passthrough *passthrough)
Definition: pospass.c:738
void strmbase_sink_cleanup(struct strmbase_sink *pin)
Definition: pin.c:1185
void strmbase_filter_cleanup(struct strmbase_filter *filter)
Definition: filter.c:540
IBaseFilter * filter
Definition: filtergraph.c:75

Referenced by null_renderer_destroy(), video_renderer_create(), video_renderer_destroy(), vmr7_create(), vmr9_create(), and vmr_destroy().

◆ strmbase_renderer_init()

void strmbase_renderer_init ( struct strmbase_renderer *  filter,
IUnknown *  outer,
const CLSID *  clsid,
const WCHAR *  sink_name,
const struct strmbase_renderer_ops *  ops 
)

Definition at line 584 of file renderer.c.

586{
587 memset(filter, 0, sizeof(*filter));
589 strmbase_passthrough_init(&filter->passthrough, (IUnknown *)&filter->filter.IBaseFilter_iface);
590 ISeekingPassThru_Init(&filter->passthrough.ISeekingPassThru_iface, TRUE, &filter->sink.pin.IPin_iface);
591 filter->IQualityControl_iface.lpVtbl = &quality_control_vtbl;
592
593 filter->ops = ops;
594
595 strmbase_sink_init(&filter->sink, &filter->filter, sink_name, &sink_ops, NULL);
596
597 filter->state_event = CreateEventW(NULL, TRUE, TRUE, NULL);
598 filter->advise_event = CreateEventW(NULL, FALSE, FALSE, NULL);
599 filter->run_event = CreateEventW(NULL, TRUE, FALSE, NULL);
600 filter->flush_event = CreateEventW(NULL, TRUE, TRUE, NULL);
601}
static const IQualityControlVtbl quality_control_vtbl
Definition: renderer.c:559
static const struct strmbase_sink_ops sink_ops
Definition: renderer.c:489
static const struct strmbase_filter_ops filter_ops
Definition: renderer.c:299
void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_sink_ops *ops, IMemAllocator *allocator)
Definition: pin.c:1168
void strmbase_passthrough_init(struct strmbase_passthrough *passthrough, IUnknown *outer)
Definition: pospass.c:725
void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer, const CLSID *clsid, const struct strmbase_filter_ops *func_table)
Definition: filter.c:517
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:587

Referenced by null_renderer_create(), video_renderer_create(), vmr7_create(), and vmr9_create().

◆ strmbase_seeking_cleanup()

void strmbase_seeking_cleanup ( SourceSeeking *  seeking)

Definition at line 58 of file seeking.c.

59{
60 seeking->cs.DebugInfo->Spare[0] = 0;
61 DeleteCriticalSection(&seeking->cs);
62}
CRITICAL_SECTION cs
Definition: strmbase.h:197

◆ strmbase_seeking_init()

HRESULT strmbase_seeking_init ( SourceSeeking *  seeking,
const IMediaSeekingVtbl *  vtbl,
SourceSeeking_ChangeStop  fnChangeStop,
SourceSeeking_ChangeStart  fnChangeStart,
SourceSeeking_ChangeRate  fnChangeRate 
)

Definition at line 31 of file seeking.c.

34{
35 assert(fnChangeStop && fnChangeStart && fnChangeRate);
36
37 pSeeking->IMediaSeeking_iface.lpVtbl = Vtbl;
38 pSeeking->refCount = 1;
39 pSeeking->fnChangeRate = fnChangeRate;
40 pSeeking->fnChangeStop = fnChangeStop;
41 pSeeking->fnChangeStart = fnChangeStart;
42 pSeeking->dwCapabilities = AM_SEEKING_CanSeekForwards |
47 pSeeking->llCurrent = 0;
48 pSeeking->llStop = ((ULONGLONG)0x80000000) << 32;
49 pSeeking->llDuration = pSeeking->llStop;
50 pSeeking->dRate = 1.0;
51 pSeeking->timeformat = TIME_FORMAT_MEDIA_TIME;
53 InitializeCriticalSection(&pSeeking->cs);
54 pSeeking->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SourceSeeking.cs");
55 return S_OK;
56}
@ AM_SEEKING_CanGetDuration
Definition: axcore.idl:609
@ AM_SEEKING_CanSeekBackwards
Definition: axcore.idl:606
@ AM_SEEKING_CanSeekForwards
Definition: axcore.idl:605
@ AM_SEEKING_CanSeekAbsolute
Definition: axcore.idl:604
@ AM_SEEKING_CanGetStopPos
Definition: axcore.idl:608
#define assert(_expr)
Definition: assert.h:32

◆ strmbase_sink_cleanup()

void strmbase_sink_cleanup ( struct strmbase_sink *  pin)

Definition at line 1185 of file pin.c.

1186{
1187 FreeMediaType(&pin->pin.mt);
1188 if (pin->pAllocator)
1189 IMemAllocator_Release(pin->pAllocator);
1190 pin->pAllocator = NULL;
1191 pin->pin.IPin_iface.lpVtbl = NULL;
1192}
struct strmbase_pin pin
Definition: strmbase.h:106
IMemAllocator * pAllocator
Definition: strmbase.h:109

Referenced by acm_wrapper_destroy(), avi_compressor_destroy(), avi_decompressor_destroy(), avi_mux_destroy(), create_input_pin(), dsound_render_destroy(), file_writer_destroy(), sample_grabber_destroy(), smart_tee_destroy(), strmbase_renderer_cleanup(), testfilter_destroy(), and testsink_destroy().

◆ strmbase_sink_init()

void strmbase_sink_init ( struct strmbase_sink *  pin,
struct strmbase_filter *  filter,
const WCHAR *  name,
const struct strmbase_sink_ops *  ops,
IMemAllocator *  allocator 
)

Definition at line 1168 of file pin.c.

1170{
1171 memset(pin, 0, sizeof(*pin));
1172 pin->pin.IPin_iface.lpVtbl = &sink_vtbl;
1173 pin->pin.filter = filter;
1174 pin->pin.dir = PINDIR_INPUT;
1175 lstrcpyW(pin->pin.name, name);
1176 lstrcpyW(pin->pin.id, name);
1177 pin->pin.ops = &func_table->base;
1178 pin->pFuncsTable = func_table;
1180 if (pin->preferred_allocator)
1181 IMemAllocator_AddRef(pin->preferred_allocator);
1182 pin->IMemInputPin_iface.lpVtbl = &MemInputPin_Vtbl;
1183}
@ PINDIR_INPUT
Definition: axcore.idl:41
#define lstrcpyW
Definition: compat.h:749
static const IPinVtbl sink_vtbl
Definition: pin.c:1010
static const IMemInputPinVtbl MemInputPin_Vtbl
Definition: pin.c:26
Definition: name.c:39
const struct strmbase_sink_ops * pFuncsTable
Definition: strmbase.h:113
IMemAllocator * preferred_allocator
Definition: strmbase.h:111
IMemInputPin IMemInputPin_iface
Definition: strmbase.h:108

Referenced by acm_wrapper_create(), avi_compressor_create(), avi_dec_create(), create_input_pin(), dsound_render_create(), file_writer_create(), sample_grabber_create(), smart_tee_create(), strmbase_renderer_init(), testfilter_init(), and testsink_init().

◆ strmbase_source_cleanup()

void strmbase_source_cleanup ( struct strmbase_source *  pin)

◆ strmbase_source_init()

void strmbase_source_init ( struct strmbase_source *  pin,
struct strmbase_filter *  filter,
const WCHAR *  name,
const struct strmbase_source_ops *  func_table 
)

Definition at line 765 of file pin.c.

767{
768 memset(pin, 0, sizeof(*pin));
769 pin->pin.IPin_iface.lpVtbl = &source_vtbl;
770 pin->pin.filter = filter;
771 pin->pin.dir = PINDIR_OUTPUT;
772 lstrcpyW(pin->pin.name, name);
773 lstrcpyW(pin->pin.id, name);
774 pin->pin.ops = &func_table->base;
775 pin->pFuncsTable = func_table;
776}
@ PINDIR_OUTPUT
Definition: axcore.idl:42
static const IPinVtbl source_vtbl
Definition: pin.c:658
struct strmbase_pin_ops base
Definition: strmbase.h:92
const struct strmbase_source_ops * pFuncsTable
Definition: strmbase.h:83

Referenced by acm_wrapper_create(), audio_record_create(), avi_compressor_create(), avi_dec_create(), avi_mux_create(), FileSource_Load(), sample_grabber_create(), smart_tee_create(), testfilter_init(), and vfw_capture_create().