Remove obsolete types from common_types.h
- #define WEBRTC_DLLEXPORT - class RewindableStream, InStream, OutStream - enum FileFormats, PayloadFrequencies, VadModes Bug: webrtc:7626 Change-Id: Idcbb241f3b48204ca9ac760987197f0458157527 Reviewed-on: https://webrtc-review.googlesource.com/69300 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22839}
This commit is contained in:
parent
09abeb9d11
commit
98a91ad454
@ -13,7 +13,6 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user