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

Side by Side Diff: webrtc/modules/rtp_rtcp/interface/rtp_receiver.h

Issue 1414793020: Remove interface directories kept to avoid breaking downstream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_
12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_
13
14 #pragma message("WARNING: rtp_rtcp/interface is DEPRECATED; use include dir.")
15
16 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
17 #include "webrtc/typedefs.h"
18
19 namespace webrtc {
20
21 class RTPPayloadRegistry;
22
23 class TelephoneEventHandler {
24 public:
25 virtual ~TelephoneEventHandler() {}
26
27 // The following three methods implement the TelephoneEventHandler interface.
28 // Forward DTMFs to decoder for playout.
29 virtual void SetTelephoneEventForwardToDecoder(bool forward_to_decoder) = 0;
30
31 // Is forwarding of outband telephone events turned on/off?
32 virtual bool TelephoneEventForwardToDecoder() const = 0;
33
34 // Is TelephoneEvent configured with payload type payload_type
35 virtual bool TelephoneEventPayloadType(const int8_t payload_type) const = 0;
36 };
37
38 class RtpReceiver {
39 public:
40 // Creates a video-enabled RTP receiver.
41 static RtpReceiver* CreateVideoReceiver(
42 Clock* clock,
43 RtpData* incoming_payload_callback,
44 RtpFeedback* incoming_messages_callback,
45 RTPPayloadRegistry* rtp_payload_registry);
46
47 // Creates an audio-enabled RTP receiver.
48 static RtpReceiver* CreateAudioReceiver(
49 Clock* clock,
50 RtpAudioFeedback* incoming_audio_feedback,
51 RtpData* incoming_payload_callback,
52 RtpFeedback* incoming_messages_callback,
53 RTPPayloadRegistry* rtp_payload_registry);
54
55 virtual ~RtpReceiver() {}
56
57 // Returns a TelephoneEventHandler if available.
58 virtual TelephoneEventHandler* GetTelephoneEventHandler() = 0;
59
60 // Registers a receive payload in the payload registry and notifies the media
61 // receiver strategy.
62 virtual int32_t RegisterReceivePayload(
63 const char payload_name[RTP_PAYLOAD_NAME_SIZE],
64 const int8_t payload_type,
65 const uint32_t frequency,
66 const uint8_t channels,
67 const uint32_t rate) = 0;
68
69 // De-registers |payload_type| from the payload registry.
70 virtual int32_t DeRegisterReceivePayload(const int8_t payload_type) = 0;
71
72 // Parses the media specific parts of an RTP packet and updates the receiver
73 // state. This for instance means that any changes in SSRC and payload type is
74 // detected and acted upon.
75 virtual bool IncomingRtpPacket(const RTPHeader& rtp_header,
76 const uint8_t* payload,
77 size_t payload_length,
78 PayloadUnion payload_specific,
79 bool in_order) = 0;
80
81 // Returns the currently configured NACK method.
82 virtual NACKMethod NACK() const = 0;
83
84 // Turn negative acknowledgement (NACK) requests on/off.
85 virtual void SetNACKStatus(const NACKMethod method) = 0;
86
87 // Gets the last received timestamp. Returns true if a packet has been
88 // received, false otherwise.
89 virtual bool Timestamp(uint32_t* timestamp) const = 0;
90 // Gets the time in milliseconds when the last timestamp was received.
91 // Returns true if a packet has been received, false otherwise.
92 virtual bool LastReceivedTimeMs(int64_t* receive_time_ms) const = 0;
93
94 // Returns the remote SSRC of the currently received RTP stream.
95 virtual uint32_t SSRC() const = 0;
96
97 // Returns the current remote CSRCs.
98 virtual int32_t CSRCs(uint32_t array_of_csrc[kRtpCsrcSize]) const = 0;
99
100 // Returns the current energy of the RTP stream received.
101 virtual int32_t Energy(uint8_t array_of_energy[kRtpCsrcSize]) const = 0;
102 };
103 } // namespace webrtc
104
105 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RECEIVER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h ('k') | webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698