Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(676)

Unified Diff: webrtc/modules/audio_coding/neteq/tools/packet_source.h

Issue 2005873002: Let PacketSource::NextPacket() return an std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/tools/packet_source.h
diff --git a/webrtc/modules/audio_coding/neteq/tools/packet_source.h b/webrtc/modules/audio_coding/neteq/tools/packet_source.h
index 804a94dc49ca03c027fea94475d0baaa4a9afaba..3ec576d5c56fe590e4fc19986b30fd02655da1c8 100644
--- a/webrtc/modules/audio_coding/neteq/tools/packet_source.h
+++ b/webrtc/modules/audio_coding/neteq/tools/packet_source.h
@@ -12,6 +12,7 @@
#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_PACKET_SOURCE_H_
#include <bitset>
+#include <memory>
#include "webrtc/base/constructormagic.h"
#include "webrtc/modules/audio_coding/neteq/tools/packet.h"
@@ -26,9 +27,9 @@ class PacketSource {
PacketSource() : use_ssrc_filter_(false), ssrc_(0) {}
virtual ~PacketSource() {}
- // Returns a pointer to the next packet. Returns NULL if the source is
- // depleted, or if an error occurred.
- virtual Packet* NextPacket() = 0;
+ // Returns next packet. Returns nullptr if the source is depleted, or if an
+ // error occurred.
+ virtual std::unique_ptr<Packet> NextPacket() = 0;
virtual void FilterOutPayloadType(uint8_t payload_type) {
filter_.set(payload_type, true);

Powered by Google App Engine
This is Rietveld 408576698