ReactOS 0.4.17-dev-934-g091855f
passthrough.c File Reference
#include "quartz_private.h"
Include dependency graph for passthrough.c:

Go to the source code of this file.

Classes

struct  seeking_passthrough
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (quartz)
 
static struct seeking_passthrough * impl_from_IUnknown (IUnknown *iface)
 
static HRESULT WINAPI seeking_passthrough_QueryInterface (IUnknown *iface, REFIID iid, void **out)
 
static ULONG WINAPI seeking_passthrough_AddRef (IUnknown *iface)
 
static ULONG WINAPI seeking_passthrough_Release (IUnknown *iface)
 
HRESULT seeking_passthrough_create (IUnknown *outer, IUnknown **out)
 

Variables

static const IUnknownVtbl seeking_passthrough_vtbl
 

Function Documentation

◆ impl_from_IUnknown()

static struct seeking_passthrough * impl_from_IUnknown ( IUnknown *  iface)
static

Definition at line 34 of file passthrough.c.

35{
36 return CONTAINING_RECORD(iface, struct seeking_passthrough, IUnknown_inner);
37}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by seeking_passthrough_AddRef(), seeking_passthrough_QueryInterface(), and seeking_passthrough_Release().

◆ seeking_passthrough_AddRef()

static ULONG WINAPI seeking_passthrough_AddRef ( IUnknown *  iface)
static

Definition at line 64 of file passthrough.c.

65{
68
69 TRACE("%p increasing refcount to %lu.\n", passthrough, refcount);
70 return refcount;
71}
#define InterlockedIncrement
Definition: armddk.h:53
static struct seeking_passthrough * impl_from_IUnknown(IUnknown *iface)
Definition: passthrough.c:34
#define TRACE(s)
Definition: solgame.cpp:4
struct strmbase_passthrough passthrough
Definition: passthrough.c:27
uint32_t ULONG
Definition: typedefs.h:59

◆ seeking_passthrough_create()

HRESULT seeking_passthrough_create ( IUnknown *  outer,
IUnknown **  out 
)

Definition at line 94 of file passthrough.c.

95{
97
98 TRACE("outer %p, out %p.\n", outer, out);
99
100 if (!(object = calloc(1, sizeof(*object))))
101 return E_OUTOFMEMORY;
102
103 object->IUnknown_inner.lpVtbl = &seeking_passthrough_vtbl;
104 object->outer_unk = outer ? outer : &object->IUnknown_inner;
105 object->refcount = 1;
106
107 strmbase_passthrough_init(&object->passthrough, object->outer_unk);
108
109 TRACE("Created seeking passthrough %p.\n", object);
110 *out = &object->IUnknown_inner;
111 return S_OK;
112}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const IUnknownVtbl seeking_passthrough_vtbl
Definition: passthrough.c:87
#define S_OK
Definition: intsafe.h:52
static IUnknown * outer
Definition: compobj.c:82
#define calloc
Definition: rosglue.h:14
void strmbase_passthrough_init(struct strmbase_passthrough *passthrough, IUnknown *outer)
Definition: pospass.c:725
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

◆ seeking_passthrough_QueryInterface()

static HRESULT WINAPI seeking_passthrough_QueryInterface ( IUnknown *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 39 of file passthrough.c.

40{
42
43 TRACE("passthrough %p, iid %s, out %p.\n", passthrough, debugstr_guid(iid), out);
44
45 if (IsEqualGUID(iid, &IID_IUnknown))
46 *out = iface;
47 else if (IsEqualGUID(iid, &IID_IMediaPosition))
48 *out = &passthrough->passthrough.IMediaPosition_iface;
49 else if (IsEqualGUID(iid, &IID_IMediaSeeking))
50 *out = &passthrough->passthrough.IMediaSeeking_iface;
51 else if (IsEqualGUID(iid, &IID_ISeekingPassThru))
52 *out = &passthrough->passthrough.ISeekingPassThru_iface;
53 else
54 {
55 *out = NULL;
56 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
57 return E_NOINTERFACE;
58 }
59
60 IUnknown_AddRef((IUnknown *)*out);
61 return S_OK;
62}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define NULL
Definition: types.h:112
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ seeking_passthrough_Release()

static ULONG WINAPI seeking_passthrough_Release ( IUnknown *  iface)
static

Definition at line 73 of file passthrough.c.

74{
77
78 TRACE("%p decreasing refcount to %lu.\n", passthrough, refcount);
79 if (!refcount)
80 {
83 }
84 return refcount;
85}
#define InterlockedDecrement
Definition: armddk.h:52
#define free
Definition: debug_ros.c:5
void strmbase_passthrough_cleanup(struct strmbase_passthrough *passthrough)
Definition: pospass.c:738

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( quartz  )

Variable Documentation

◆ seeking_passthrough_vtbl

const IUnknownVtbl seeking_passthrough_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI seeking_passthrough_Release(IUnknown *iface)
Definition: passthrough.c:73
static HRESULT WINAPI seeking_passthrough_QueryInterface(IUnknown *iface, REFIID iid, void **out)
Definition: passthrough.c:39
static ULONG WINAPI seeking_passthrough_AddRef(IUnknown *iface)
Definition: passthrough.c:64

Definition at line 87 of file passthrough.c.

Referenced by seeking_passthrough_create().