OLD | NEW |
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 Loading... |
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; |
| 64 class VideoFrame; |
63 class VideoRenderer; | 65 class VideoRenderer; |
64 struct RtpHeader; | 66 struct RtpHeader; |
65 struct VideoFormat; | 67 struct VideoFormat; |
66 | 68 |
67 const int kMinRtpHeaderExtensionId = 1; | 69 const int kMinRtpHeaderExtensionId = 1; |
68 const int kMaxRtpHeaderExtensionId = 255; | 70 const int kMaxRtpHeaderExtensionId = 255; |
69 const int kScreencastDefaultFps = 5; | 71 const int kScreencastDefaultFps = 5; |
70 | 72 |
71 template <class T> | 73 template <class T> |
72 static std::string ToStringIfSet(const char* key, const rtc::Optional<T>& val) { | 74 static std::string ToStringIfSet(const char* key, const rtc::Optional<T>& val) { |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 virtual bool GetSendCodec(VideoCodec* send_codec) = 0; | 993 virtual bool GetSendCodec(VideoCodec* send_codec) = 0; |
992 // Sets the format of a specified outgoing stream. | 994 // Sets the format of a specified outgoing stream. |
993 virtual bool SetSendStreamFormat(uint32_t ssrc, | 995 virtual bool SetSendStreamFormat(uint32_t ssrc, |
994 const VideoFormat& format) = 0; | 996 const VideoFormat& format) = 0; |
995 // Starts or stops transmission (and potentially capture) of local video. | 997 // Starts or stops transmission (and potentially capture) of local video. |
996 virtual bool SetSend(bool send) = 0; | 998 virtual bool SetSend(bool send) = 0; |
997 // Configure stream for sending. | 999 // Configure stream for sending. |
998 virtual bool SetVideoSend(uint32_t ssrc, | 1000 virtual bool SetVideoSend(uint32_t ssrc, |
999 bool enable, | 1001 bool enable, |
1000 const VideoOptions* options) = 0; | 1002 const VideoOptions* options) = 0; |
| 1003 // Get the VideoSink for passing frames into a video sendstream |
| 1004 virtual rtc::VideoSinkInterface<cricket::VideoFrame>* GetSink( |
| 1005 uint32_t ssrc) = 0; |
1001 // Sets the renderer object to be used for the specified stream. | 1006 // Sets the renderer object to be used for the specified stream. |
1002 // If SSRC is 0, the renderer is used for the 'default' stream. | 1007 // If SSRC is 0, the renderer is used for the 'default' stream. |
1003 virtual bool SetRenderer(uint32_t ssrc, VideoRenderer* renderer) = 0; | 1008 virtual bool SetRenderer(uint32_t ssrc, VideoRenderer* renderer) = 0; |
1004 // If |ssrc| is 0, replace the default capturer (engine capturer) with | 1009 // If |ssrc| is 0, replace the default capturer (engine capturer) with |
1005 // |capturer|. If |ssrc| is non zero create a new stream with |ssrc| as SSRC. | 1010 // |capturer|. If |ssrc| is non zero create a new stream with |ssrc| as SSRC. |
1006 virtual bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) = 0; | 1011 virtual bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) = 0; |
1007 // Gets quality stats for the channel. | 1012 // Gets quality stats for the channel. |
1008 virtual bool GetStats(VideoMediaInfo* info) = 0; | 1013 virtual bool GetStats(VideoMediaInfo* info) = 0; |
1009 // Send an intra frame to the receivers. | 1014 // Send an intra frame to the receivers. |
1010 virtual bool SendIntraFrame() = 0; | 1015 virtual bool SendIntraFrame() = 0; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 // Signal when the media channel is ready to send the stream. Arguments are: | 1142 // Signal when the media channel is ready to send the stream. Arguments are: |
1138 // writable(bool) | 1143 // writable(bool) |
1139 sigslot::signal1<bool> SignalReadyToSend; | 1144 sigslot::signal1<bool> SignalReadyToSend; |
1140 // Signal for notifying that the remote side has closed the DataChannel. | 1145 // Signal for notifying that the remote side has closed the DataChannel. |
1141 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; | 1146 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
1142 }; | 1147 }; |
1143 | 1148 |
1144 } // namespace cricket | 1149 } // namespace cricket |
1145 | 1150 |
1146 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_ | 1151 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_ |
OLD | NEW |