Barely working basic playback
This commit is contained in:
parent
98a443e298
commit
9b5198a6ce
19 changed files with 406 additions and 24 deletions
|
@ -144,3 +144,17 @@ const QByteArray & W::Blob::byteArray() const
|
|||
return qDataView;
|
||||
}
|
||||
|
||||
const unsigned char * W::Blob::uchar() const
|
||||
{
|
||||
return (unsigned char*) data;
|
||||
}
|
||||
|
||||
W::Blob* W::Blob::slice(uint64_t start, uint64_t length) const
|
||||
{
|
||||
char* n_data = new char[length];
|
||||
for (int i = 0; i < length; ++i) {
|
||||
n_data[i] = data[start + i];
|
||||
}
|
||||
|
||||
return new W::Blob(length, n_data);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace W
|
|||
size_type size() const override;
|
||||
|
||||
objectType getType() const override;
|
||||
Blob* slice(uint64_t start, uint64_t length = 0) const;
|
||||
|
||||
bool operator==(const W::Object & other) const override;
|
||||
|
||||
|
@ -33,6 +34,7 @@ namespace W
|
|||
static const objectType type = blob;
|
||||
|
||||
const QByteArray& byteArray() const;
|
||||
const unsigned char* uchar() const;
|
||||
|
||||
protected:
|
||||
bool hasData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue