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

Side by Side Diff: media/webm/chromeos/webm_encoder.h

Issue 10823006: Add proper duration to WebmEncoder-created files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/webm/chromeos/webm_encoder.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_WEBM_CHROMEOS_WEBM_ENCODER_H_ 5 #ifndef MEDIA_WEBM_CHROMEOS_WEBM_ENCODER_H_
6 #define MEDIA_WEBM_CHROMEOS_WEBM_ENCODER_H_ 6 #define MEDIA_WEBM_CHROMEOS_WEBM_ENCODER_H_
7 7
8 #include <stack> 8 #include <stack>
9 #include <stdio.h> 9 #include <stdio.h>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void EbmlSerialize(const void* buffer, int buffer_size, unsigned long len); 63 void EbmlSerialize(const void* buffer, int buffer_size, unsigned long len);
64 64
65 template <typename T> 65 template <typename T>
66 void EbmlSerializeHelper(const T* buffer, unsigned long len); 66 void EbmlSerializeHelper(const T* buffer, unsigned long len);
67 67
68 // Video dimensions and FPS. 68 // Video dimensions and FPS.
69 size_t width_; 69 size_t width_;
70 size_t height_; 70 size_t height_;
71 vpx_rational_t fps_; 71 vpx_rational_t fps_;
72 72
73 // Number of frames in video.
74 size_t frame_count_;
75
73 // VPX config in use. 76 // VPX config in use.
74 vpx_codec_enc_cfg_t config_; 77 vpx_codec_enc_cfg_t config_;
75 78
76 // VPX parameters. 79 // VPX parameters.
77 int bitrate_; 80 int bitrate_;
78 unsigned long deadline_; 81 unsigned long deadline_;
79 82
80 // EbmlWriter context. 83 // EbmlWriter context.
81 EbmlGlobal ebml_writer_; 84 EbmlGlobal ebml_writer_;
82 85
83 // Stack with start offsets of currently open sub-elements. 86 // Stack with start offsets of currently open sub-elements.
84 std::stack<long int> ebml_sub_elements_; 87 std::stack<long int> ebml_sub_elements_;
85 88
86 FilePath output_path_; 89 FilePath output_path_;
87 FILE* output_; 90 FILE* output_;
88 91
89 // True if an error occured while encoding/writing to file. 92 // True if an error occured while encoding/writing to file.
90 bool has_errors_; 93 bool has_errors_;
91 94
92 DISALLOW_COPY_AND_ASSIGN(WebmEncoder); 95 DISALLOW_COPY_AND_ASSIGN(WebmEncoder);
93 }; 96 };
94 97
95 } // namespace chromeos 98 } // namespace chromeos
96 99
97 } // namespace media 100 } // namespace media
98 101
99 #endif // MEDIA_WEBM_CHROMEOS_WEBM_ENCODER_H_ 102 #endif // MEDIA_WEBM_CHROMEOS_WEBM_ENCODER_H_
OLDNEW
« no previous file with comments | « no previous file | media/webm/chromeos/webm_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698