| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef MEDIA_FFMPEG_FFMPEG_COMMON_H_ | 5 #ifndef MEDIA_FFMPEG_FFMPEG_COMMON_H_ |
| 6 #define MEDIA_FFMPEG_FFMPEG_COMMON_H_ | 6 #define MEDIA_FFMPEG_FFMPEG_COMMON_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 // Used for FFmpeg error codes. | 10 // Used for FFmpeg error codes. |
| 11 #include <cerrno> | 11 #include <cerrno> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "media/base/audio_codecs.h" | 15 #include "media/base/audio_codecs.h" |
| 16 #include "media/base/channel_layout.h" | 16 #include "media/base/channel_layout.h" |
| 17 #include "media/base/media_export.h" | 17 #include "media/base/media_export.h" |
| 18 #include "media/base/sample_format.h" | 18 #include "media/base/sample_format.h" |
| 19 #include "media/base/video_codecs.h" | 19 #include "media/base/video_codecs.h" |
| 20 #include "media/base/video_frame.h" | 20 #include "media/base/video_frame.h" |
| 21 #include "media/ffmpeg/ffmpeg_deleters.h" | 21 #include "media/ffmpeg/ffmpeg_deleters.h" |
| 22 | 22 |
| 23 // Include FFmpeg header files. | 23 // Include FFmpeg header files. |
| 24 extern "C" { | 24 extern "C" { |
| 25 // Disable deprecated features which result in spammy compile warnings. This | 25 // Disable deprecated features which result in spammy compile warnings. This |
| 26 // list of defines must mirror those in the 'defines' section of BUILD.gn file & | 26 // list of defines must mirror those in the 'defines' section of FFmpeg's |
| 27 // ffmpeg.gyp file or the headers below will generate different structures! | 27 // BUILD.gn file or the headers below will generate different structures! |
| 28 #define FF_API_CONVERGENCE_DURATION 0 | 28 #define FF_API_CONVERGENCE_DURATION 0 |
| 29 // Upstream libavcodec/utils.c still uses the deprecated | 29 // Upstream libavcodec/utils.c still uses the deprecated |
| 30 // av_dup_packet(), causing deprecation warnings. | 30 // av_dup_packet(), causing deprecation warnings. |
| 31 // The normal fix for such things is to disable the feature as below, | 31 // The normal fix for such things is to disable the feature as below, |
| 32 // but the upstream code does not yet compile with it disabled. | 32 // but the upstream code does not yet compile with it disabled. |
| 33 // (In this case, the fix is replacing the call with a new function.) | 33 // (In this case, the fix is replacing the call with a new function.) |
| 34 // In the meantime, we directly disable those warnings in the C file. | 34 // In the meantime, we directly disable those warnings in the C file. |
| 35 //#define FF_API_AVPACKET_OLD_API 0 | 35 //#define FF_API_AVPACKET_OLD_API 0 |
| 36 | 36 |
| 37 // Temporarily disable possible loss of data warning. | 37 // Temporarily disable possible loss of data warning. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // date string. Otherwise returns fals and timeline_offset is unmodified. | 149 // date string. Otherwise returns fals and timeline_offset is unmodified. |
| 150 MEDIA_EXPORT bool FFmpegUTCDateToTime(const char* date_utc, base::Time* out); | 150 MEDIA_EXPORT bool FFmpegUTCDateToTime(const char* date_utc, base::Time* out); |
| 151 | 151 |
| 152 // Returns a 32-bit hash for the given codec name. See the VerifyUmaCodecHashes | 152 // Returns a 32-bit hash for the given codec name. See the VerifyUmaCodecHashes |
| 153 // unit test for more information and code for generating the histogram XML. | 153 // unit test for more information and code for generating the histogram XML. |
| 154 MEDIA_EXPORT int32_t HashCodecName(const char* codec_name); | 154 MEDIA_EXPORT int32_t HashCodecName(const char* codec_name); |
| 155 | 155 |
| 156 } // namespace media | 156 } // namespace media |
| 157 | 157 |
| 158 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ | 158 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ |
| OLD | NEW |