Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: media/ffmpeg/ffmpeg_common.h

Issue 1422113002: Enable pcm_s32le audio decoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: DEPS roll Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/cast/test/fake_media_source.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Used for FFmpeg error codes. 8 // Used for FFmpeg error codes.
9 #include <cerrno> 9 #include <cerrno>
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // Converts FFmpeg's channel layout to chrome's ChannelLayout. |channels| can 116 // Converts FFmpeg's channel layout to chrome's ChannelLayout. |channels| can
117 // be used when FFmpeg's channel layout is not informative in order to make a 117 // be used when FFmpeg's channel layout is not informative in order to make a
118 // good guess about the plausible channel layout based on number of channels. 118 // good guess about the plausible channel layout based on number of channels.
119 MEDIA_EXPORT ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout, 119 MEDIA_EXPORT ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout,
120 int channels); 120 int channels);
121 121
122 MEDIA_EXPORT AVCodecID VideoCodecToCodecID(VideoCodec video_codec); 122 MEDIA_EXPORT AVCodecID VideoCodecToCodecID(VideoCodec video_codec);
123 123
124 // Converts FFmpeg's audio sample format to Chrome's SampleFormat. 124 // Converts FFmpeg's audio sample format to Chrome's SampleFormat.
125 MEDIA_EXPORT SampleFormat 125 MEDIA_EXPORT SampleFormat
126 AVSampleFormatToSampleFormat(AVSampleFormat sample_format); 126 AVSampleFormatToSampleFormat(AVSampleFormat sample_format, AVCodecID codec_id);
127 127
128 // Converts FFmpeg's pixel formats to its corresponding supported video format. 128 // Converts FFmpeg's pixel formats to its corresponding supported video format.
129 MEDIA_EXPORT VideoPixelFormat 129 MEDIA_EXPORT VideoPixelFormat
130 AVPixelFormatToVideoPixelFormat(AVPixelFormat pixel_format); 130 AVPixelFormatToVideoPixelFormat(AVPixelFormat pixel_format);
131 131
132 // Converts video formats to its corresponding FFmpeg's pixel formats. 132 // Converts video formats to its corresponding FFmpeg's pixel formats.
133 AVPixelFormat VideoPixelFormatToAVPixelFormat(VideoPixelFormat video_format); 133 AVPixelFormat VideoPixelFormatToAVPixelFormat(VideoPixelFormat video_format);
134 134
135 ColorSpace AVColorSpaceToColorSpace(AVColorSpace color_space, 135 ColorSpace AVColorSpaceToColorSpace(AVColorSpace color_space,
136 AVColorRange color_range); 136 AVColorRange color_range);
137 137
138 // Convert FFmpeg UTC representation (YYYY-MM-DD HH:MM:SS) to base::Time. 138 // Convert FFmpeg UTC representation (YYYY-MM-DD HH:MM:SS) to base::Time.
139 // Returns true and sets |*out| if |date_utc| contains a valid 139 // Returns true and sets |*out| if |date_utc| contains a valid
140 // date string. Otherwise returns fals and timeline_offset is unmodified. 140 // date string. Otherwise returns fals and timeline_offset is unmodified.
141 MEDIA_EXPORT bool FFmpegUTCDateToTime(const char* date_utc, base::Time* out); 141 MEDIA_EXPORT bool FFmpegUTCDateToTime(const char* date_utc, base::Time* out);
142 142
143 // Returns a 32-bit hash for the given codec name. See the VerifyUmaCodecHashes 143 // Returns a 32-bit hash for the given codec name. See the VerifyUmaCodecHashes
144 // unit test for more information and code for generating the histogram XML. 144 // unit test for more information and code for generating the histogram XML.
145 MEDIA_EXPORT int32_t HashCodecName(const char* codec_name); 145 MEDIA_EXPORT int32_t HashCodecName(const char* codec_name);
146 146
147 } // namespace media 147 } // namespace media
148 148
149 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ 149 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_
OLDNEW
« no previous file with comments | « media/cast/test/fake_media_source.cc ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698