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

Unified Diff: webrtc/modules/audio_coding/neteq/packet.h

Issue 2326953003: Added a ParsePayload method to AudioDecoder. (Closed)
Patch Set: Added some casts from size_t to int. Created 4 years, 3 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/packet.h
diff --git a/webrtc/modules/audio_coding/neteq/packet.h b/webrtc/modules/audio_coding/neteq/packet.h
index 7119c80237969d9314edba23ed2d113dd27df860..4e17a88dcd5c12bc5f90ee95702371b8cab93646 100644
--- a/webrtc/modules/audio_coding/neteq/packet.h
+++ b/webrtc/modules/audio_coding/neteq/packet.h
@@ -15,6 +15,7 @@
#include <memory>
#include "webrtc/base/buffer.h"
+#include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
#include "webrtc/modules/audio_coding/neteq/tick_timer.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/typedefs.h"
@@ -28,6 +29,7 @@ struct Packet {
rtc::Buffer payload;
bool primary = true; // Primary, i.e., not redundant payload.
std::unique_ptr<TickTimer::Stopwatch> waiting_time;
+ std::unique_ptr<AudioDecoder::EncodedAudioFrame> frame;
Packet();
~Packet();
@@ -60,6 +62,8 @@ struct Packet {
bool operator>(const Packet& rhs) const { return rhs.operator<(*this); }
bool operator<=(const Packet& rhs) const { return !operator>(rhs); }
bool operator>=(const Packet& rhs) const { return !operator<(rhs); }
+
+ bool empty() const { return !frame && payload.empty(); }
};
// A list of packets.
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc ('k') | webrtc/modules/audio_coding/neteq/packet_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698