| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/filters/ffmpeg_aac_bitstream_converter.h" | 5 #include "media/filters/ffmpeg_aac_bitstream_converter.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "media/ffmpeg/ffmpeg_common.h" | 8 #include "media/ffmpeg/ffmpeg_common.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // front-center, front-left, front-right, back-left, back-right | 109 // front-center, front-left, front-right, back-left, back-right |
| 110 hdr[2] |= 1; | 110 hdr[2] |= 1; |
| 111 hdr[3] |= (1 << 6); | 111 hdr[3] |= (1 << 6); |
| 112 break; | 112 break; |
| 113 case 6: | 113 case 6: |
| 114 // front-center, front-left, front-right, back-left, back-right, | 114 // front-center, front-left, front-right, back-left, back-right, |
| 115 // LFE-channel | 115 // LFE-channel |
| 116 hdr[2] |= 1; | 116 hdr[2] |= 1; |
| 117 hdr[3] |= (2 << 6); | 117 hdr[3] |= (2 << 6); |
| 118 break; | 118 break; |
| 119 case 7: | 119 case 8: |
| 120 // front-center, front-left, front-right, side-left, side-right, | 120 // front-center, front-left, front-right, side-left, side-right, |
| 121 // back-left, back-right, LFE-channel | 121 // back-left, back-right, LFE-channel |
| 122 hdr[2] |= 1; | 122 hdr[2] |= 1; |
| 123 hdr[3] |= (3 << 6); | 123 hdr[3] |= (3 << 6); |
| 124 break; | 124 break; |
| 125 default: | 125 default: |
| 126 DLOG(ERROR) << "[" << __FUNCTION__ << "] " | 126 DLOG(ERROR) << "[" << __FUNCTION__ << "] " |
| 127 << "unsupported number of audio channels:" | 127 << "unsupported number of audio channels:" |
| 128 << channel_configuration; | 128 << channel_configuration; |
| 129 return false; | 129 return false; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 av_packet_copy_props(&dest_packet, packet); | 240 av_packet_copy_props(&dest_packet, packet); |
| 241 | 241 |
| 242 // Release the old packet. | 242 // Release the old packet. |
| 243 av_packet_unref(packet); | 243 av_packet_unref(packet); |
| 244 *packet = dest_packet; // Finally, replace the values in the input packet. | 244 *packet = dest_packet; // Finally, replace the values in the input packet. |
| 245 | 245 |
| 246 return true; | 246 return true; |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace media | 249 } // namespace media |
| OLD | NEW |