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

Side by Side Diff: talk/media/base/mediachannel.h

Issue 1668493002: Replace uses of cricket::VideoRenderer by rtc::VideoSinkInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « talk/media/base/fakemediaengine.h ('k') | talk/media/base/videoengine_unittest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 24 matching lines...) Expand all
35 #include "talk/media/base/constants.h" 35 #include "talk/media/base/constants.h"
36 #include "talk/media/base/streamparams.h" 36 #include "talk/media/base/streamparams.h"
37 #include "webrtc/base/basictypes.h" 37 #include "webrtc/base/basictypes.h"
38 #include "webrtc/base/buffer.h" 38 #include "webrtc/base/buffer.h"
39 #include "webrtc/base/dscp.h" 39 #include "webrtc/base/dscp.h"
40 #include "webrtc/base/logging.h" 40 #include "webrtc/base/logging.h"
41 #include "webrtc/base/optional.h" 41 #include "webrtc/base/optional.h"
42 #include "webrtc/base/sigslot.h" 42 #include "webrtc/base/sigslot.h"
43 #include "webrtc/base/socket.h" 43 #include "webrtc/base/socket.h"
44 #include "webrtc/base/window.h" 44 #include "webrtc/base/window.h"
45 #include "webrtc/media/base/videosinkinterface.h"
45 // TODO(juberti): re-evaluate this include 46 // TODO(juberti): re-evaluate this include
46 #include "talk/session/media/audiomonitor.h" 47 #include "talk/session/media/audiomonitor.h"
47 48
48 namespace rtc { 49 namespace rtc {
49 class Buffer; 50 class Buffer;
50 class RateLimiter; 51 class RateLimiter;
51 class Timing; 52 class Timing;
52 } 53 }
53 54
54 namespace webrtc { 55 namespace webrtc {
55 class AudioSinkInterface; 56 class AudioSinkInterface;
56 } 57 }
57 58
58 namespace cricket { 59 namespace cricket {
59 60
60 class AudioRenderer; 61 class AudioRenderer;
61 class ScreencastId; 62 class ScreencastId;
62 class VideoCapturer; 63 class VideoCapturer;
63 class VideoRenderer; 64 class VideoFrame;
64 struct RtpHeader; 65 struct RtpHeader;
65 struct VideoFormat; 66 struct VideoFormat;
66 67
67 const int kMinRtpHeaderExtensionId = 1; 68 const int kMinRtpHeaderExtensionId = 1;
68 const int kMaxRtpHeaderExtensionId = 255; 69 const int kMaxRtpHeaderExtensionId = 255;
69 const int kScreencastDefaultFps = 5; 70 const int kScreencastDefaultFps = 5;
70 71
71 template <class T> 72 template <class T>
72 static std::string ToStringIfSet(const char* key, const rtc::Optional<T>& val) { 73 static std::string ToStringIfSet(const char* key, const rtc::Optional<T>& val) {
73 std::string str; 74 std::string str;
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 ERROR_REC_DEVICE_IN_USE, // Device is in already use. 976 ERROR_REC_DEVICE_IN_USE, // Device is in already use.
976 ERROR_REC_DEVICE_REMOVED, // Device is removed. 977 ERROR_REC_DEVICE_REMOVED, // Device is removed.
977 ERROR_REC_SRTP_ERROR, // Generic sender SRTP failure. 978 ERROR_REC_SRTP_ERROR, // Generic sender SRTP failure.
978 ERROR_REC_SRTP_AUTH_FAILED, // Failed to authenticate packets. 979 ERROR_REC_SRTP_AUTH_FAILED, // Failed to authenticate packets.
979 ERROR_REC_CPU_MAX_CANT_DOWNGRADE, // Can't downgrade capture anymore. 980 ERROR_REC_CPU_MAX_CANT_DOWNGRADE, // Can't downgrade capture anymore.
980 ERROR_PLAY_SRTP_ERROR = 200, // Generic receiver SRTP failure. 981 ERROR_PLAY_SRTP_ERROR = 200, // Generic receiver SRTP failure.
981 ERROR_PLAY_SRTP_AUTH_FAILED, // Failed to authenticate packets. 982 ERROR_PLAY_SRTP_AUTH_FAILED, // Failed to authenticate packets.
982 ERROR_PLAY_SRTP_REPLAY, // Packet replay detected. 983 ERROR_PLAY_SRTP_REPLAY, // Packet replay detected.
983 }; 984 };
984 985
985 VideoMediaChannel() : renderer_(NULL) {} 986 VideoMediaChannel() {}
986 virtual ~VideoMediaChannel() {} 987 virtual ~VideoMediaChannel() {}
987 988
988 virtual bool SetSendParameters(const VideoSendParameters& params) = 0; 989 virtual bool SetSendParameters(const VideoSendParameters& params) = 0;
989 virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0; 990 virtual bool SetRecvParameters(const VideoRecvParameters& params) = 0;
990 // Gets the currently set codecs/payload types to be used for outgoing media. 991 // Gets the currently set codecs/payload types to be used for outgoing media.
991 virtual bool GetSendCodec(VideoCodec* send_codec) = 0; 992 virtual bool GetSendCodec(VideoCodec* send_codec) = 0;
992 // Starts or stops transmission (and potentially capture) of local video. 993 // Starts or stops transmission (and potentially capture) of local video.
993 virtual bool SetSend(bool send) = 0; 994 virtual bool SetSend(bool send) = 0;
994 // Configure stream for sending. 995 // Configure stream for sending.
995 virtual bool SetVideoSend(uint32_t ssrc, 996 virtual bool SetVideoSend(uint32_t ssrc,
996 bool enable, 997 bool enable,
997 const VideoOptions* options) = 0; 998 const VideoOptions* options) = 0;
998 // Sets the renderer object to be used for the specified stream. 999 // Sets the sink object to be used for the specified stream.
999 // If SSRC is 0, the renderer is used for the 'default' stream. 1000 // If SSRC is 0, the renderer is used for the 'default' stream.
1000 virtual bool SetRenderer(uint32_t ssrc, VideoRenderer* renderer) = 0; 1001 virtual bool SetSink(uint32_t ssrc,
1002 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) = 0;
1001 // If |ssrc| is 0, replace the default capturer (engine capturer) with 1003 // If |ssrc| is 0, replace the default capturer (engine capturer) with
1002 // |capturer|. If |ssrc| is non zero create a new stream with |ssrc| as SSRC. 1004 // |capturer|. If |ssrc| is non zero create a new stream with |ssrc| as SSRC.
1003 virtual bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) = 0; 1005 virtual bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) = 0;
1004 // Gets quality stats for the channel. 1006 // Gets quality stats for the channel.
1005 virtual bool GetStats(VideoMediaInfo* info) = 0; 1007 virtual bool GetStats(VideoMediaInfo* info) = 0;
1006
1007 protected:
1008 VideoRenderer *renderer_;
1009 }; 1008 };
1010 1009
1011 enum DataMessageType { 1010 enum DataMessageType {
1012 // Chrome-Internal use only. See SctpDataMediaChannel for the actual PPID 1011 // Chrome-Internal use only. See SctpDataMediaChannel for the actual PPID
1013 // values. 1012 // values.
1014 DMT_NONE = 0, 1013 DMT_NONE = 0,
1015 DMT_CONTROL = 1, 1014 DMT_CONTROL = 1,
1016 DMT_BINARY = 2, 1015 DMT_BINARY = 2,
1017 DMT_TEXT = 3, 1016 DMT_TEXT = 3,
1018 }; 1017 };
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 // Signal when the media channel is ready to send the stream. Arguments are: 1128 // Signal when the media channel is ready to send the stream. Arguments are:
1130 // writable(bool) 1129 // writable(bool)
1131 sigslot::signal1<bool> SignalReadyToSend; 1130 sigslot::signal1<bool> SignalReadyToSend;
1132 // Signal for notifying that the remote side has closed the DataChannel. 1131 // Signal for notifying that the remote side has closed the DataChannel.
1133 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; 1132 sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
1134 }; 1133 };
1135 1134
1136 } // namespace cricket 1135 } // namespace cricket
1137 1136
1138 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_ 1137 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_
OLDNEW
« no previous file with comments | « talk/media/base/fakemediaengine.h ('k') | talk/media/base/videoengine_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698