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

Unified Diff: webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.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/acm2/acm_send_test_oldapi.h
diff --git a/webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.h b/webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.h
index 938e39e2e69a5d3fcb2a34cf91080a432d2ad7c7..c752878186cdf1606045de3bd6622b8b0e72c6dc 100644
--- a/webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.h
+++ b/webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.h
@@ -44,10 +44,8 @@ class AcmSendTestOldApi : public AudioPacketizationCallback,
// Registers an external send codec. Returns true on success, false otherwise.
bool RegisterExternalCodec(AudioEncoder* external_speech_encoder);
- // Returns the next encoded packet. Returns NULL if the test duration was
- // exceeded. Ownership of the packet is handed over to the caller.
// Inherited from PacketSource.
- Packet* NextPacket() override;
+ std::unique_ptr<Packet> NextPacket() override;
// Inherited from AudioPacketizationCallback.
int32_t SendData(FrameType frame_type,
@@ -63,9 +61,8 @@ class AcmSendTestOldApi : public AudioPacketizationCallback,
static const int kBlockSizeMs = 10;
// Creates a Packet object from the last packet produced by ACM (and received
- // through the SendData method as a callback). Ownership of the new Packet
- // object is transferred to the caller.
- Packet* CreatePacket();
+ // through the SendData method as a callback).
+ std::unique_ptr<Packet> CreatePacket();
SimulatedClock clock_;
std::unique_ptr<AudioCodingModule> acm_;
« no previous file with comments | « webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc ('k') | webrtc/modules/audio_coding/acm2/acm_send_test_oldapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698