| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 LocalAudioSinkAdapter::~LocalAudioSinkAdapter() { | 38 LocalAudioSinkAdapter::~LocalAudioSinkAdapter() { |
| 39 rtc::CritScope lock(&lock_); | 39 rtc::CritScope lock(&lock_); |
| 40 if (sink_) | 40 if (sink_) |
| 41 sink_->OnClose(); | 41 sink_->OnClose(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void LocalAudioSinkAdapter::OnData(const void* audio_data, | 44 void LocalAudioSinkAdapter::OnData(const void* audio_data, |
| 45 int bits_per_sample, | 45 int bits_per_sample, |
| 46 int sample_rate, | 46 int sample_rate, |
| 47 int number_of_channels, | 47 size_t number_of_channels, |
| 48 size_t number_of_frames) { | 48 size_t number_of_frames) { |
| 49 rtc::CritScope lock(&lock_); | 49 rtc::CritScope lock(&lock_); |
| 50 if (sink_) { | 50 if (sink_) { |
| 51 sink_->OnData(audio_data, bits_per_sample, sample_rate, number_of_channels, | 51 sink_->OnData(audio_data, bits_per_sample, sample_rate, number_of_channels, |
| 52 number_of_frames); | 52 number_of_frames); |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 | 55 |
| 56 void LocalAudioSinkAdapter::SetSink(cricket::AudioRenderer::Sink* sink) { | 56 void LocalAudioSinkAdapter::SetSink(cricket::AudioRenderer::Sink* sink) { |
| 57 rtc::CritScope lock(&lock_); | 57 rtc::CritScope lock(&lock_); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 RTC_DCHECK(!stopped_ && can_send_track()); | 311 RTC_DCHECK(!stopped_ && can_send_track()); |
| 312 const cricket::VideoOptions* options = nullptr; | 312 const cricket::VideoOptions* options = nullptr; |
| 313 VideoSourceInterface* source = track_->GetSource(); | 313 VideoSourceInterface* source = track_->GetSource(); |
| 314 if (track_->enabled() && source) { | 314 if (track_->enabled() && source) { |
| 315 options = source->options(); | 315 options = source->options(); |
| 316 } | 316 } |
| 317 provider_->SetVideoSend(ssrc_, track_->enabled(), options); | 317 provider_->SetVideoSend(ssrc_, track_->enabled(), options); |
| 318 } | 318 } |
| 319 | 319 |
| 320 } // namespace webrtc | 320 } // namespace webrtc |
| OLD | NEW |