22#ifndef HOLLYWOOD_RUNAWAY_VIDEO_H
23#define HOLLYWOOD_RUNAWAY_VIDEO_H
25#include "common/array.h"
26#include "common/ptr.h"
27#include "hollywood/resource.h"
28#include "hollywood/runaway/graphics.h"
29#include "video/video_decoder.h"
37 enum FrameStatus { kFrameError, kFramePending, kFrameReady };
38 bool load(
const char *name);
40 bool decodeToFrame(uint frame);
41 bool seekToFrame(uint frame);
43 void cacheFrames(uint first, uint last);
45 FrameStatus prepareFrame(uint frame, uint maxFrames);
46 FrameStatus prefetchFrame(uint frame, uint maxFrames);
47 uint width()
const {
return _frame ? _frame->
w : 0; }
48 uint height()
const {
return _frame ? _frame->
h : 0; }
49 uint frameCount()
const {
return _decoder ? _decoder->
getFrameCount() : 0; }
50 uint frameAtTime(uint32 milliseconds)
const;
55 bool useCachedFrame(uint frame);
56 bool decodeFrames(uint frame);
63 uint32 _cacheBytes = 0;
74 bool load(
char chapter, uint movie);
76 RunawayVideo::FrameStatus prepare(uint portrait, uint maxFrames);
91 int _loadedPortrait = -1;
92 uint _preparedFrames = 0;
Definition: managed_surface.h:51
Definition: resource.h:59
Definition: graphics.h:54
uint32 getFrameCount() const
int16 h
Definition: surface.h:76
int16 w
Definition: surface.h:71