# IRsStreamCache Interface Reference

IRsStreamCache. More...

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | QueryCache ([in] IUnknown *pSource,[in] GUID gStreamId,[out, retval] IRsCachedStream **ppStream)
HRESULT | ReleaseStream ([in] IRsCachedStream *ppStream)
HRESULT | AddStream ([in] IRsCachedStream *ppStream)
HRESULT | Destroy ()

## Detailed Description

IRsStreamCache.

Base class for cacheable streams for caching provided by Space3D package.

## Member Function Documentation

HRESULT IRsStreamCache::QueryCache | ( | [in] IUnknown * | pSource,
|  | [in] GUID | gStreamId,
|  | [out, retval] IRsCachedStream ** | ppStream |
| ) |  |  |

Query cache for stream. Stream LRU is updated.

Parameters:

  | pSource | [in] Cache source that is associated with the stream. It is used for validation control.
  | gStreamId | [in] Stream GUID to retrieve.

Returns:
  ppStream [out,retval] Stream from cache. Stream is READ-ONLY.

HRESULT IRsStreamCache::ReleaseStream | ( | [in] IRsCachedStream * | ppStream | ) |

Release stream from stream cache. Call this method, if you know that stream will no longer be used. This is just a hint to save some intermediate memory. If stream is not in stream cache, call is ignored.

Parameters:

  | pStream | [in] Stream interface to release/remove.

HRESULT IRsStreamCache::AddStream | ( | [in] IRsCachedStream * | ppStream | ) |

Add stream to stream cache. When added, stream will be set to read-only mode by issuing read lock.

Parameters:

  | pStream | [in] Stream interface to add.

HRESULT IRsStreamCache::Destroy | ( |  | ) |

Destroy & release whole stream cache.