#ifndef AVIPLAY_AVIREADSTREAMV_H
#define AVIPLAY_AVIREADSTREAMV_H

#include "AviReadStream.h"

class IVideoDecoder;

class AviReadStreamV : public AviReadStream
{
    IVideoDecoder* videodecoder;
    int flip;
public:
    AviReadStreamV(streamid_t id, IMediaReadStream* stream);
    ~AviReadStreamV();
    bool DropFrame() const;
    IVideoDecoder* GetDecoder() const { return videodecoder; }
    CImage* GetFrame(bool readframe = false);
    size_t GetFrameSize() const;
    framepos_t GetPos() const;
    HRESULT GetOutputFormat(void* format, size_t size) const;
    double GetTime(framepos_t frame = ERR) const;
    HRESULT GetVideoFormatInfo(void* bi, size_t size) const;
    bool IsStreaming() const;
    HRESULT ReadFrame(bool render = true);
    HRESULT SetDirection(bool d)
    {
	flip = d;
	return 0;
    }
    HRESULT Seek(framepos_t pos);
    HRESULT SeekTime(double pos);
    framepos_t SeekToKeyFrame(framepos_t pos);
    double SeekTimeToKeyFrame(double pos);
    HRESULT SetOutputFormat();
    HRESULT StartStreaming();
    HRESULT StopStreaming();
};

#endif // AVIPLAY_AVIREADSTREAMV_H
