mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
1b357db99b
Mostly-mechanical additions: - Log constructions&destructions, usually by just inheriting from DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal classes for which DecoderDoctorTraits can't be specialized), - Log links between most objects, e.g.: Media element -> decoder -> state machine -> reader -> demuxer -> resource, etc. And logging some important properties and events (JS events, duration change, frames being decoded, etc.) More will be added later on, from just converting MOZ_LOGs, and as needed. MozReview-Commit-ID: KgNhHSz35t0 --HG-- extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
35 lines
864 B
C++
35 lines
864 B
C++
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef STREAM_H_
|
|
#define STREAM_H_
|
|
|
|
#include "DecoderDoctorLogger.h"
|
|
#include "nsISupportsImpl.h"
|
|
|
|
namespace mozilla {
|
|
|
|
DDLoggedTypeDeclName(ByteStream);
|
|
|
|
class ByteStream : public DecoderDoctorLifeLogger<ByteStream>
|
|
{
|
|
public:
|
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ByteStream);
|
|
|
|
virtual bool ReadAt(int64_t offset, void* data, size_t size,
|
|
size_t* bytes_read) = 0;
|
|
virtual bool CachedReadAt(int64_t offset, void* data, size_t size,
|
|
size_t* bytes_read) = 0;
|
|
virtual bool Length(int64_t* size) = 0;
|
|
|
|
virtual void DiscardBefore(int64_t offset) {}
|
|
|
|
protected:
|
|
virtual ~ByteStream() {}
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|