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

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

Issue 257563007: Don't double correct for discarded codec delay frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style cleanup. Fix rendundant Initialize(). Created 6 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 AVCodecContext* codec_context); 87 AVCodecContext* codec_context);
88 88
89 void AVStreamToVideoDecoderConfig( 89 void AVStreamToVideoDecoderConfig(
90 const AVStream* stream, 90 const AVStream* stream,
91 VideoDecoderConfig* config, 91 VideoDecoderConfig* config,
92 bool record_stats); 92 bool record_stats);
93 void VideoDecoderConfigToAVCodecContext( 93 void VideoDecoderConfigToAVCodecContext(
94 const VideoDecoderConfig& config, 94 const VideoDecoderConfig& config,
95 AVCodecContext* codec_context); 95 AVCodecContext* codec_context);
96 96
97 MEDIA_EXPORT void AVCodecContextToAudioDecoderConfig(
98 const AVCodecContext* codec_context,
99 bool is_encrypted,
100 AudioDecoderConfig* config,
101 bool record_stats);
102
97 // Converts FFmpeg's channel layout to chrome's ChannelLayout. |channels| can 103 // Converts FFmpeg's channel layout to chrome's ChannelLayout. |channels| can
98 // be used when FFmpeg's channel layout is not informative in order to make a 104 // be used when FFmpeg's channel layout is not informative in order to make a
99 // good guess about the plausible channel layout based on number of channels. 105 // good guess about the plausible channel layout based on number of channels.
100 ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout, 106 ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout,
101 int channels); 107 int channels);
102 108
103 // Converts FFmpeg's audio sample format to Chrome's SampleFormat. 109 // Converts FFmpeg's audio sample format to Chrome's SampleFormat.
104 MEDIA_EXPORT SampleFormat 110 MEDIA_EXPORT SampleFormat
105 AVSampleFormatToSampleFormat(AVSampleFormat sample_format); 111 AVSampleFormatToSampleFormat(AVSampleFormat sample_format);
106 112
107 // Converts FFmpeg's pixel formats to its corresponding supported video format. 113 // Converts FFmpeg's pixel formats to its corresponding supported video format.
108 MEDIA_EXPORT VideoFrame::Format PixelFormatToVideoFormat( 114 MEDIA_EXPORT VideoFrame::Format PixelFormatToVideoFormat(
109 PixelFormat pixel_format); 115 PixelFormat pixel_format);
110 116
111 // Converts video formats to its corresponding FFmpeg's pixel formats. 117 // Converts video formats to its corresponding FFmpeg's pixel formats.
112 PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format); 118 PixelFormat VideoFormatToPixelFormat(VideoFrame::Format video_format);
113 119
114 // Convert FFmpeg UTC representation (YYYY-MM-DD HH:MM:SS) to base::Time. 120 // Convert FFmpeg UTC representation (YYYY-MM-DD HH:MM:SS) to base::Time.
115 // Returns true and sets |*out| if |date_utc| contains a valid 121 // Returns true and sets |*out| if |date_utc| contains a valid
116 // date string. Otherwise returns fals and timeline_offset is unmodified. 122 // date string. Otherwise returns fals and timeline_offset is unmodified.
117 MEDIA_EXPORT bool FFmpegUTCDateToTime(const char* date_utc, base::Time* out); 123 MEDIA_EXPORT bool FFmpegUTCDateToTime(const char* date_utc, base::Time* out);
118 124
119 } // namespace media 125 } // namespace media
120 126
121 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ 127 #endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_
OLDNEW
« no previous file with comments | « no previous file | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698