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

Side by Side Diff: media/base/video_frame.cc

Issue 1669002: remove AVFrame Dependency (Closed)
Patch Set: more patch Created 10 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
« no previous file with comments | « media/base/video_frame.h ('k') | media/filters/ffmpeg_video_decode_engine.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/video_frame.h" 5 #include "media/base/video_frame.h"
6 6
7 namespace media { 7 namespace media {
8 8
9 // static 9 // static
10 void VideoFrame::CreateFrame(VideoFrame::Format format, 10 void VideoFrame::CreateFrame(VideoFrame::Format format,
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return false; 145 return false;
146 } 146 }
147 147
148 VideoFrame::VideoFrame(VideoFrame::Format format, 148 VideoFrame::VideoFrame(VideoFrame::Format format,
149 size_t width, 149 size_t width,
150 size_t height) { 150 size_t height) {
151 format_ = format; 151 format_ = format;
152 width_ = width; 152 width_ = width;
153 height_ = height; 153 height_ = height;
154 planes_ = 0; 154 planes_ = 0;
155 repeat_count_ = 0;
155 memset(&strides_, 0, sizeof(strides_)); 156 memset(&strides_, 0, sizeof(strides_));
156 memset(&data_, 0, sizeof(data_)); 157 memset(&data_, 0, sizeof(data_));
157 } 158 }
158 159
159 VideoFrame::~VideoFrame() { 160 VideoFrame::~VideoFrame() {
160 // In multi-plane allocations, only a single block of memory is allocated 161 // In multi-plane allocations, only a single block of memory is allocated
161 // on the heap, and other |data| pointers point inside the same, single block 162 // on the heap, and other |data| pointers point inside the same, single block
162 // so just delete index 0. 163 // so just delete index 0.
163 delete[] data_[0]; 164 delete[] data_[0];
164 } 165 }
165 166
166 bool VideoFrame::IsEndOfStream() const { 167 bool VideoFrame::IsEndOfStream() const {
167 return format_ == VideoFrame::EMPTY; 168 return format_ == VideoFrame::EMPTY;
168 } 169 }
169 170
170 } // namespace media 171 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame.h ('k') | media/filters/ffmpeg_video_decode_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698