OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 video_receiver_->RegisterPacketRequestCallback(packet_request_callback); | 70 video_receiver_->RegisterPacketRequestCallback(packet_request_callback); |
71 } | 71 } |
72 | 72 |
73 VideoStreamDecoder::~VideoStreamDecoder() {} | 73 VideoStreamDecoder::~VideoStreamDecoder() {} |
74 | 74 |
75 // Do not acquire the lock of |video_receiver_| in this function. Decode | 75 // Do not acquire the lock of |video_receiver_| in this function. Decode |
76 // callback won't necessarily be called from the decoding thread. The decoding | 76 // callback won't necessarily be called from the decoding thread. The decoding |
77 // thread may have held the lock when calling VideoDecoder::Decode, Reset, or | 77 // thread may have held the lock when calling VideoDecoder::Decode, Reset, or |
78 // Release. Acquiring the same lock in the path of decode callback can deadlock. | 78 // Release. Acquiring the same lock in the path of decode callback can deadlock. |
79 int32_t VideoStreamDecoder::FrameToRender(VideoFrame& video_frame) { // NOLINT | 79 int32_t VideoStreamDecoder::FrameToRender(VideoFrame& video_frame) { // NOLINT |
80 if (pre_render_callback_) | 80 if (pre_render_callback_) { |
81 pre_render_callback_->FrameCallback(&video_frame); | 81 // Post processing is not supported if the frame is backed by a texture. |
| 82 if (!video_frame.video_frame_buffer()->native_handle()) { |
| 83 pre_render_callback_->FrameCallback(&video_frame); |
| 84 } |
| 85 } |
82 | 86 |
83 incoming_video_stream_->OnFrame(video_frame); | 87 incoming_video_stream_->OnFrame(video_frame); |
84 return 0; | 88 return 0; |
85 } | 89 } |
86 | 90 |
87 int32_t VideoStreamDecoder::ReceivedDecodedReferenceFrame( | 91 int32_t VideoStreamDecoder::ReceivedDecodedReferenceFrame( |
88 const uint64_t picture_id) { | 92 const uint64_t picture_id) { |
89 RTC_NOTREACHED(); | 93 RTC_NOTREACHED(); |
90 return 0; | 94 return 0; |
91 } | 95 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 jitter_buffer_ms, min_playout_delay_ms, render_delay_ms, last_rtt); | 134 jitter_buffer_ms, min_playout_delay_ms, render_delay_ms, last_rtt); |
131 } | 135 } |
132 | 136 |
133 void VideoStreamDecoder::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { | 137 void VideoStreamDecoder::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) { |
134 video_receiver_->SetReceiveChannelParameters(max_rtt_ms); | 138 video_receiver_->SetReceiveChannelParameters(max_rtt_ms); |
135 | 139 |
136 rtc::CritScope lock(&crit_); | 140 rtc::CritScope lock(&crit_); |
137 last_rtt_ms_ = avg_rtt_ms; | 141 last_rtt_ms_ = avg_rtt_ms; |
138 } | 142 } |
139 } // namespace webrtc | 143 } // namespace webrtc |
OLD | NEW |