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

Unified Diff: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h

Issue 2641923003: Create an Obj-C wrapper of the RtpReceiverObserverInterface. (Closed)
Patch Set: CR comments Created 3 years, 10 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
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/RTCRtpReceiver+Private.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h
diff --git a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h
index e98a8f3bea1d650b2677dae2d377ff780a997489..6c39a25310da5e9459b24835079e9c529c891b47 100644
--- a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h
+++ b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h
@@ -16,6 +16,35 @@
NS_ASSUME_NONNULL_BEGIN
+/** Represents the media type of the RtpReceiver. */
+typedef NS_ENUM(NSInteger, RTCRtpMediaType) {
+ RTCRtpMediaTypeAudio,
+ RTCRtpMediaTypeVideo,
+ RTCRtpMediaTypeData,
+};
+
+@class RTCRtpReceiver;
+
+RTC_EXPORT
+@protocol RTCRtpReceiverDelegate <NSObject>
+
+/** Called when the first RTP packet is received.
+ *
+ * Note: Currently if there are multiple RtpReceivers of the same media type,
+ * they will all call OnFirstPacketReceived at once.
+ *
+ * For example, if we create three audio receivers, A/B/C, they will listen to
+ * the same signal from the underneath network layer. Whenever the first audio packet
+ * is received, the underneath signal will be fired. All the receivers A/B/C will be
+ * notified and the callback of the receiver's delegate will be called.
+ *
+ * The process is the same for video receivers.
+ */
+- (void)rtpReceiver:(RTCRtpReceiver *)rtpReceiver
+ didReceiveFirstPacketForMediaType:(RTCRtpMediaType)mediaType;
+
+@end
+
RTC_EXPORT
@protocol RTCRtpReceiver <NSObject>
@@ -38,6 +67,9 @@ RTC_EXPORT
*/
@property(nonatomic, readonly) RTCMediaStreamTrack *track;
+/** The delegate for this RtpReceiver. */
+@property(nonatomic, weak) id<RTCRtpReceiverDelegate> delegate;
+
@end
RTC_EXPORT
« no previous file with comments | « webrtc/sdk/objc/Framework/Classes/RTCRtpReceiver+Private.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698