| Index: content/browser/renderer_host/p2p/socket_host.h
|
| diff --git a/content/browser/renderer_host/p2p/socket_host.h b/content/browser/renderer_host/p2p/socket_host.h
|
| index a4c82f3ecf79de557a9466361bb24276189362d5..980d0c5ee7a5a70cfc965ad673503f5de9b8e32a 100644
|
| --- a/content/browser/renderer_host/p2p/socket_host.h
|
| +++ b/content/browser/renderer_host/p2p/socket_host.h
|
| @@ -37,7 +37,8 @@ CONTENT_EXPORT bool ApplyPacketOptions(char* data, int length,
|
|
|
| // Helper method which finds RTP ofset and length if the packet is encapsulated
|
| // in a TURN Channel Message or TURN Send Indication message.
|
| -CONTENT_EXPORT bool GetRtpPacketStartPositionAndLength(char* data, int length,
|
| +CONTENT_EXPORT bool GetRtpPacketStartPositionAndLength(const char* data,
|
| + int length,
|
| int* rtp_start_pos,
|
| int* rtp_packet_length);
|
| // Helper method which updates absoulute send time extension if present.
|
| @@ -53,7 +54,9 @@ class CONTENT_EXPORT P2PSocketHost {
|
| static const int kStunHeaderSize = 20;
|
| // Creates P2PSocketHost of the specific type.
|
| static P2PSocketHost* Create(IPC::Sender* message_sender,
|
| - int id, P2PSocketType type,
|
| + int socket_id,
|
| + int render_process_host_id,
|
| + P2PSocketType type,
|
| net::URLRequestContextGetter* url_context,
|
| P2PMessageThrottler* throttler);
|
|
|
| @@ -74,6 +77,9 @@ class CONTENT_EXPORT P2PSocketHost {
|
|
|
| virtual bool SetOption(P2PSocketOption option, int value) = 0;
|
|
|
| + void StartRtpDump(bool incoming, bool outgoing);
|
| + void StopRtpDump(bool incoming, bool outgoing);
|
| +
|
| protected:
|
| friend class P2PSocketHostTcpTestBase;
|
|
|
| @@ -111,7 +117,9 @@ class CONTENT_EXPORT P2PSocketHost {
|
| STATE_ERROR,
|
| };
|
|
|
| - P2PSocketHost(IPC::Sender* message_sender, int id);
|
| + P2PSocketHost(IPC::Sender* message_sender,
|
| + int socket_id,
|
| + int render_process_host_id);
|
|
|
| // Verifies that the packet |data| has a valid STUN header. In case
|
| // of success stores type of the message in |type|.
|
| @@ -119,9 +127,21 @@ class CONTENT_EXPORT P2PSocketHost {
|
| StunMessageType* type);
|
| static bool IsRequestOrResponse(StunMessageType type);
|
|
|
| + static void DumpRtpPacketOnUIThread(scoped_ptr<char[]> packet_header,
|
| + size_t header_length,
|
| + size_t packet_length,
|
| + bool incoming,
|
| + int render_process_host_id);
|
| +
|
| + // Calls RenderProcessHostImpl::OnRtpPacket to record the RTP header.
|
| + void DumpRtpPacket(const char* packet, size_t length, bool incoming);
|
| +
|
| IPC::Sender* message_sender_;
|
| int id_;
|
| + int render_process_host_id_;
|
| State state_;
|
| + bool dump_incoming_rtp_packet_;
|
| + bool dump_outgoing_rtp_packet_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(P2PSocketHost);
|
| };
|
|
|