michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim:set ts=2 sw=2 sts=2 et cindent: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #if !defined(MediaPluginHost_h_) michael@0: #define MediaPluginHost_h_ michael@0: michael@0: #include "nsTArray.h" michael@0: #include "MediaResource.h" michael@0: #include "MPAPI.h" michael@0: #include "MediaResourceServer.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: class MediaPluginReader; michael@0: michael@0: class MediaPluginHost { michael@0: nsRefPtr mResourceServer; michael@0: nsTArray mPlugins; michael@0: michael@0: MPAPI::Manifest *FindPlugin(const nsACString& aMimeType); michael@0: public: michael@0: MediaPluginHost(); michael@0: ~MediaPluginHost(); michael@0: michael@0: static void Shutdown(); michael@0: michael@0: bool FindDecoder(const nsACString& aMimeType, const char* const** aCodecs); michael@0: MPAPI::Decoder *CreateDecoder(mozilla::MediaResource *aResource, const nsACString& aMimeType); michael@0: void DestroyDecoder(MPAPI::Decoder *aDecoder); michael@0: }; michael@0: michael@0: MediaPluginHost *GetMediaPluginHost(); michael@0: michael@0: } // namespace mozilla michael@0: michael@0: #endif