Files
android/proprietary/wvm/include/WVMFileSource.h
Elliott Hughes b4abf77efc Remove manual #include "AndroidConfig.h".
That file (a) was always forced upon you anyway and (b) no longer
exists.

Change-Id: I5964a0420e9114419b62d5b98e7ecef6c5b48296
(cherry picked from commit c2d4ae15fbbb4ebee364449cf9693566e10d07a1)
2015-08-28 20:53:41 +00:00

40 lines
807 B
C++

/*
* Copyright (C) 2011 Google, Inc. All Rights Reserved
*/
#ifndef WVFILE_SOURCE_H_
#define WVFILE_SOURCE_H_
#include "WVStreamControlAPI.h"
#include <media/stagefright/DataSource.h>
#include <utils/RefBase.h>
//
// Supports reading data from local file descriptor instead of URI-based streaming
// as we normally do.
//
namespace android {
class WVMFileSource : public WVFileSource, public RefBase {
public:
WVMFileSource(sp<DataSource> &dataSource);
virtual ~WVMFileSource() {}
virtual unsigned long long GetSize();
virtual unsigned long long GetOffset();
virtual void Seek(unsigned long long offset);
virtual size_t Read(size_t amount, unsigned char *buffer);
private:
sp<DataSource> mDataSource;
unsigned long long mOffset;
bool mLogOnce;
};
};
#endif