OLD | NEW |
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 "webkit/plugins/ppapi/ppb_video_decoder_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_video_decoder_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 : PPB_VideoDecoder_Shared(instance), | 37 : PPB_VideoDecoder_Shared(instance), |
38 ppp_videodecoder_(NULL) { | 38 ppp_videodecoder_(NULL) { |
39 PluginModule* plugin_module = ResourceHelper::GetPluginModule(this); | 39 PluginModule* plugin_module = ResourceHelper::GetPluginModule(this); |
40 if (plugin_module) { | 40 if (plugin_module) { |
41 ppp_videodecoder_ = static_cast<const PPP_VideoDecoder_Dev*>( | 41 ppp_videodecoder_ = static_cast<const PPP_VideoDecoder_Dev*>( |
42 plugin_module->GetPluginInterface(PPP_VIDEODECODER_DEV_INTERFACE)); | 42 plugin_module->GetPluginInterface(PPP_VIDEODECODER_DEV_INTERFACE)); |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 PPB_VideoDecoder_Impl::~PPB_VideoDecoder_Impl() { | 46 PPB_VideoDecoder_Impl::~PPB_VideoDecoder_Impl() { |
| 47 Destroy(); |
47 } | 48 } |
48 | 49 |
49 // Convert PP_VideoDecoder_Profile to media::VideoCodecProfile. | 50 // Convert PP_VideoDecoder_Profile to media::VideoCodecProfile. |
50 static media::VideoCodecProfile PPToMediaProfile( | 51 static media::VideoCodecProfile PPToMediaProfile( |
51 const PP_VideoDecoder_Profile pp_profile) { | 52 const PP_VideoDecoder_Profile pp_profile) { |
52 switch (pp_profile) { | 53 switch (pp_profile) { |
53 case PP_VIDEODECODER_H264PROFILE_NONE: | 54 case PP_VIDEODECODER_H264PROFILE_NONE: |
54 // HACK: PPAPI contains a bogus "none" h264 profile that doesn't | 55 // HACK: PPAPI contains a bogus "none" h264 profile that doesn't |
55 // correspond to anything in h.264; but a number of released chromium | 56 // correspond to anything in h.264; but a number of released chromium |
56 // versions silently promoted this to Baseline profile, so we retain that | 57 // versions silently promoted this to Baseline profile, so we retain that |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 void PPB_VideoDecoder_Impl::NotifyFlushDone() { | 267 void PPB_VideoDecoder_Impl::NotifyFlushDone() { |
267 RunFlushCallback(PP_OK); | 268 RunFlushCallback(PP_OK); |
268 } | 269 } |
269 | 270 |
270 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { | 271 void PPB_VideoDecoder_Impl::NotifyInitializeDone() { |
271 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; | 272 NOTREACHED() << "PlatformVideoDecoder::Initialize() is synchronous!"; |
272 } | 273 } |
273 | 274 |
274 } // namespace ppapi | 275 } // namespace ppapi |
275 } // namespace webkit | 276 } // namespace webkit |
OLD | NEW |