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

Side by Side Diff: media/webm/webm_stream_parser.cc

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
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 #include "media/webm/webm_stream_parser.h" 5 #include "media/webm/webm_stream_parser.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/ffmpeg/ffmpeg_common.h" 9 #include "media/ffmpeg/ffmpeg_common.h"
10 #include "media/filters/ffmpeg_glue.h" 10 #include "media/filters/ffmpeg_glue.h"
(...skipping 30 matching lines...) Expand all
41 AVFormatContext* CreateFormatContext(const uint8* data, int size); 41 AVFormatContext* CreateFormatContext(const uint8* data, int size);
42 bool SetupStreamConfigs(); 42 bool SetupStreamConfigs();
43 43
44 AudioDecoderConfig audio_config_; 44 AudioDecoderConfig audio_config_;
45 VideoDecoderConfig video_config_; 45 VideoDecoderConfig video_config_;
46 46
47 // Backing buffer for |url_protocol_|. 47 // Backing buffer for |url_protocol_|.
48 scoped_array<uint8> url_protocol_buffer_; 48 scoped_array<uint8> url_protocol_buffer_;
49 49
50 // Protocol used by |format_context_|. It must outlive the context object. 50 // Protocol used by |format_context_|. It must outlive the context object.
51 scoped_ptr<FFmpegURLProtocol> url_protocol_; 51 scoped_ptr<InMemoryUrlProtocol> url_protocol_;
52 52
53 // FFmpeg format context for this demuxer. It is created by 53 // FFmpeg format context for this demuxer. It is created by
54 // avformat_open_input() during demuxer initialization and cleaned up with 54 // avformat_open_input() during demuxer initialization and cleaned up with
55 // DestroyAVFormatContext() in the destructor. 55 // DestroyAVFormatContext() in the destructor.
56 AVFormatContext* format_context_; 56 AVFormatContext* format_context_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(FFmpegConfigHelper); 58 DISALLOW_COPY_AND_ASSIGN(FFmpegConfigHelper);
59 }; 59 };
60 60
61 // WebM File Header. This is prepended to the INFO & TRACKS 61 // WebM File Header. This is prepended to the INFO & TRACKS
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (!audio_buffers.empty() && !audio_cb_.Run(audio_buffers)) 393 if (!audio_buffers.empty() && !audio_cb_.Run(audio_buffers))
394 return -1; 394 return -1;
395 395
396 if (!video_buffers.empty() && !video_cb_.Run(video_buffers)) 396 if (!video_buffers.empty() && !video_cb_.Run(video_buffers))
397 return -1; 397 return -1;
398 398
399 return bytes_parsed; 399 return bytes_parsed;
400 } 400 }
401 401
402 } // namespace media 402 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698