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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 renderer_->SetSink(this); | 361 renderer_->SetSink(this); |
362 } | 362 } |
363 virtual ~VoiceChannelAudioSink() { | 363 virtual ~VoiceChannelAudioSink() { |
364 if (renderer_) { | 364 if (renderer_) { |
365 renderer_->SetSink(NULL); | 365 renderer_->SetSink(NULL); |
366 } | 366 } |
367 } | 367 } |
368 void OnData(const void* audio_data, | 368 void OnData(const void* audio_data, |
369 int bits_per_sample, | 369 int bits_per_sample, |
370 int sample_rate, | 370 int sample_rate, |
371 int number_of_channels, | 371 size_t number_of_channels, |
372 size_t number_of_frames) override {} | 372 size_t number_of_frames) override {} |
373 void OnClose() override { renderer_ = NULL; } | 373 void OnClose() override { renderer_ = NULL; } |
374 AudioRenderer* renderer() const { return renderer_; } | 374 AudioRenderer* renderer() const { return renderer_; } |
375 | 375 |
376 private: | 376 private: |
377 AudioRenderer* renderer_; | 377 AudioRenderer* renderer_; |
378 }; | 378 }; |
379 | 379 |
380 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs) { | 380 bool SetRecvCodecs(const std::vector<AudioCodec>& codecs) { |
381 if (fail_set_recv_codecs()) { | 381 if (fail_set_recv_codecs()) { |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 | 939 |
940 private: | 940 private: |
941 std::vector<FakeDataMediaChannel*> channels_; | 941 std::vector<FakeDataMediaChannel*> channels_; |
942 std::vector<DataCodec> data_codecs_; | 942 std::vector<DataCodec> data_codecs_; |
943 DataChannelType last_channel_type_; | 943 DataChannelType last_channel_type_; |
944 }; | 944 }; |
945 | 945 |
946 } // namespace cricket | 946 } // namespace cricket |
947 | 947 |
948 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 948 #endif // TALK_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |