Chromium Code Reviews| Index: webrtc/stream.h |
| diff --git a/webrtc/stream.h b/webrtc/stream.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a20b25757ca33922e704d5718a98f3c3625587f6 |
| --- /dev/null |
| +++ b/webrtc/stream.h |
| @@ -0,0 +1,45 @@ |
| +/* |
| + * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| +#ifndef WEBRTC_STREAM_H_ |
| +#define WEBRTC_STREAM_H_ |
| + |
| +#include "webrtc/common_types.h" |
| + |
| +namespace webrtc { |
| + |
| +enum NetworkState { |
| + kNetworkUp, |
| + kNetworkDown, |
| +}; |
| + |
| +// Common base class for streams. |
| +class Stream { |
| + public: |
| + virtual void Start() = 0; |
| + virtual void Stop() = 0; |
| + virtual void SignalNetworkState(NetworkState state) = 0; |
| + virtual bool DeliverRtcp(const uint8_t* packet, size_t length) = 0; |
| + |
| + protected: |
| + virtual ~Stream() {} |
| +}; |
| + |
| +// Common base class for receive streams. |
| +class ReceiveStream : public Stream { |
| + public: |
| + virtual bool DeliverRtp(const uint8_t* packet, size_t length) = 0; |
| +}; |
| + |
| +// Common base class for send streams. |
|
pbos-webrtc
2015/07/14 14:50:14
Imo. you can remove this one, I don't think the re
Jelena
2015/07/15 11:12:03
I prefer to keep this empty class to represent a s
|
| +class SendStream : public Stream {}; |
| + |
| +} // namespace webrtc |
| + |
| +#endif // WEBRTC_STREAM_H_ |