diff --git a/common_types.h b/common_types.h index 6834c0c989..5896fd62dc 100644 --- a/common_types.h +++ b/common_types.h @@ -13,7 +13,6 @@ #include #include -#include #include #include @@ -29,14 +28,6 @@ #pragma warning(disable : 4351) #endif -#if defined(WEBRTC_EXPORT) -#define WEBRTC_DLLEXPORT _declspec(dllexport) -#elif defined(WEBRTC_DLL) -#define WEBRTC_DLLEXPORT _declspec(dllimport) -#else -#define WEBRTC_DLLEXPORT -#endif - #ifndef NULL #define NULL 0 #endif @@ -55,34 +46,6 @@ namespace webrtc { -class RewindableStream { - public: - virtual ~RewindableStream() {} - virtual int Rewind() = 0; -}; - -class InStream : public RewindableStream { - public: - // Reads |len| bytes from file to |buf|. Returns the number of bytes read - // or -1 on error. - virtual int Read(void* buf, size_t len) = 0; -}; - -class OutStream : public RewindableStream { - public: - // Writes |len| bytes from |buf| to file. The actual writing may happen - // some time later. Call Flush() to force a write. - virtual bool Write(const void* buf, size_t len) = 0; -}; - -// For the deprecated MediaFile module. -enum FileFormats { - kFileFormatWavFile = 1, - kFileFormatPcm16kHzFile = 7, - kFileFormatPcm8kHzFile = 8, - kFileFormatPcm32kHzFile = 9, -}; - enum FrameType { kEmptyFrame = 0, kAudioFrameSpeech = 1, @@ -283,20 +246,6 @@ struct CodecInst { // RTP enum { kRtpCsrcSize = 15 }; // RFC 3550 page 13 -enum PayloadFrequencies { - kFreq8000Hz = 8000, - kFreq16000Hz = 16000, - kFreq32000Hz = 32000 -}; - -// Degree of bandwidth reduction. -enum VadModes { - kVadConventional = 0, // lowest reduction - kVadAggressiveLow, - kVadAggressiveMid, - kVadAggressiveHigh // highest reduction -}; - // NETEQ statistics. struct NetworkStatistics { // current jitter buffer size in ms diff --git a/rtc_base/system/file_wrapper.h b/rtc_base/system/file_wrapper.h index 85fb3fb261..4672cc43e3 100644 --- a/rtc_base/system/file_wrapper.h +++ b/rtc_base/system/file_wrapper.h @@ -18,13 +18,12 @@ #include "rtc_base/criticalsection.h" #include "typedefs.h" // NOLINT(build/include) -// Implementation of an InStream and OutStream that can read (exclusive) or -// write from/to a file. +// Implementation that can read (exclusive) or write from/to a file. namespace webrtc { -// TODO(tommi): Remove the base classes, rename to rtc::File and move to base. -class FileWrapper : public InStream, public OutStream { +// TODO(tommi): Rename to rtc::File and move to base. +class FileWrapper final { public: static const size_t kMaxFileNameSize = 1024; @@ -34,7 +33,7 @@ class FileWrapper : public InStream, public OutStream { static FileWrapper Open(const char* file_name_utf8, bool read_only); FileWrapper(FILE* file, size_t max_size); - ~FileWrapper() override; + ~FileWrapper(); // Support for move semantics. FileWrapper(FileWrapper&& other); @@ -61,9 +60,9 @@ class FileWrapper : public InStream, public OutStream { int Flush(); // Rewinds the file to the start. - int Rewind() override; - int Read(void* buf, size_t length) override; - bool Write(const void* buf, size_t length) override; + int Rewind(); + int Read(void* buf, size_t length); + bool Write(const void* buf, size_t length); private: FileWrapper();