OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/cast/audio_sender/audio_encoder.h" | 5 #include "media/cast/audio_sender/audio_encoder.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 if (!cast_environment->CurrentlyOn(CastEnvironment::MAIN)) { | 42 if (!cast_environment->CurrentlyOn(CastEnvironment::MAIN)) { |
43 cast_environment->PostTask( | 43 cast_environment->PostTask( |
44 CastEnvironment::MAIN, | 44 CastEnvironment::MAIN, |
45 FROM_HERE, | 45 FROM_HERE, |
46 base::Bind(&LogAudioFrameEncodedEvent, | 46 base::Bind(&LogAudioFrameEncodedEvent, |
47 cast_environment, event_time, | 47 cast_environment, event_time, |
48 rtp_timestamp, frame_id, frame_size)); | 48 rtp_timestamp, frame_id, frame_size)); |
49 return; | 49 return; |
50 } | 50 } |
51 cast_environment->Logging()->InsertEncodedFrameEvent( | 51 cast_environment->Logging()->InsertEncodedFrameEvent( |
52 event_time, kAudioFrameEncoded, rtp_timestamp, frame_id, | 52 event_time, media::cast::FRAME_ENCODED, media::cast::AUDIO_EVENT, |
| 53 rtp_timestamp, frame_id, |
53 static_cast<int>(frame_size), /* key_frame - unused */ false, | 54 static_cast<int>(frame_size), /* key_frame - unused */ false, |
54 /*target_bitrate - unused*/ 0); | 55 /*target_bitrate - unused*/ 0); |
55 } | 56 } |
56 | 57 |
57 } // namespace | 58 } // namespace |
58 | 59 |
59 | 60 |
60 // Base class that handles the common problem of feeding one or more AudioBus' | 61 // Base class that handles the common problem of feeding one or more AudioBus' |
61 // data into a buffer and then, once the buffer is full, encoding the signal and | 62 // data into a buffer and then, once the buffer is full, encoding the signal and |
62 // emitting an EncodedAudioFrame via the FrameEncodedCallback. | 63 // emitting an EncodedAudioFrame via the FrameEncodedCallback. |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 cast_environment_->PostTask(CastEnvironment::AUDIO, | 401 cast_environment_->PostTask(CastEnvironment::AUDIO, |
401 FROM_HERE, | 402 FROM_HERE, |
402 base::Bind(&AudioEncoder::ImplBase::EncodeAudio, | 403 base::Bind(&AudioEncoder::ImplBase::EncodeAudio, |
403 impl_, | 404 impl_, |
404 base::Passed(&audio_bus), | 405 base::Passed(&audio_bus), |
405 recorded_time)); | 406 recorded_time)); |
406 } | 407 } |
407 | 408 |
408 } // namespace cast | 409 } // namespace cast |
409 } // namespace media | 410 } // namespace media |
OLD | NEW |