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/base/mac/coremedia_glue.h" | 5 #include "media/base/mac/coremedia_glue.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 // This class is used to retrieve some CoreMedia library functions. It must be | 16 // This class is used to retrieve some CoreMedia library functions. It must be |
16 // used as a LazyInstance so that it is initialised once and in a thread-safe | 17 // used as a LazyInstance so that it is initialised once and in a thread-safe |
17 // way. Normally no work is done in constructors: LazyInstance is an exception. | 18 // way. Normally no work is done in constructors: LazyInstance is an exception. |
18 class CoreMediaLibraryInternal { | 19 class CoreMediaLibraryInternal { |
19 public: | 20 public: |
20 typedef CoreMediaGlue::CMTime (*CMTimeMakeMethod)(int64_t, int32_t); | 21 typedef CoreMediaGlue::CMTime (*CMTimeMakeMethod)(int64_t, int32_t); |
21 | 22 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 int* NALUnitHeaderLengthOut) { | 350 int* NALUnitHeaderLengthOut) { |
350 return g_coremedia_handle.Get() | 351 return g_coremedia_handle.Get() |
351 .cm_video_format_description_get_h264_parameter_set_at_index_method()( | 352 .cm_video_format_description_get_h264_parameter_set_at_index_method()( |
352 videoDesc, | 353 videoDesc, |
353 parameterSetIndex, | 354 parameterSetIndex, |
354 parameterSetPointerOut, | 355 parameterSetPointerOut, |
355 parameterSetSizeOut, | 356 parameterSetSizeOut, |
356 parameterSetCountOut, | 357 parameterSetCountOut, |
357 NALUnitHeaderLengthOut); | 358 NALUnitHeaderLengthOut); |
358 } | 359 } |
OLD | NEW |