Пример #1
0
PVideoFrame __stdcall Cache::GetFrame(int n, IScriptEnvironment* env)
{
  // :FIXME: Need a better model to find the 1st cache in the getframe chain
  // :FIXME: When a host hits us from multiple threads this is totally inadequate
  if (cacheDepth == 0) InterlockedIncrement(&Clock);
  Tick = Clock;

  n = min(vi.num_frames-1, max(0, n));  // Inserted to avoid requests beyond framerange.

  __asm {emms} // Protection from rogue filter authors

  if (h_policy == CACHE_NOTHING) { // don't want a cache. Typically filters that only ever seek forward.
    __asm mov ebx,ebx  // Hack! prevent compiler from trusting ebx contents across call
    return childGetFrame(n, env);
  }
Пример #2
0
PVideoFrame __stdcall Cache::GetFrame(int n, IScriptEnvironment* env) 
{ 
  if (cacheDepth == 0) Clock+=1;
  Tick = Clock;

  n = std::min(vi.num_frames-1, std::max(0,n));  // Inserted to avoid requests beyond framerange.

#ifdef ENABLE_INLINE_ASSEMBLY_MMX_SSE  
  __asm {emms} // Protection from rogue filter authors
#endif // ENABLE_INLINE_ASSEMBLY_MMX_SSE

  if (h_policy == CACHE_NOTHING) { // don't want a cache. Typically filters that only ever seek forward.
#ifdef ENABLE_INLINE_ASSEMBLY_MMX_SSE
    __asm mov ebx,ebx  // Hack! prevent compiler from trusting ebx contents across call
#endif // ENABLE_INLINE_ASSEMBLY_MMX_SSE
    return childGetFrame(n, env);
  }