2014-05-18 07:05:46 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsIThread.idl"
|
|
|
|
|
|
|
|
%{C++
|
2014-06-30 03:02:39 +04:00
|
|
|
#include "nsTArray.h"
|
|
|
|
#include "nsStringGlue.h"
|
2014-08-03 01:29:26 +04:00
|
|
|
class GMPAudioDecoderProxy;
|
2014-07-28 03:20:34 +04:00
|
|
|
class GMPDecryptorProxy;
|
2014-07-11 07:35:56 +04:00
|
|
|
class GMPVideoDecoderProxy;
|
|
|
|
class GMPVideoEncoderProxy;
|
2014-05-18 07:05:46 +04:00
|
|
|
class GMPVideoHost;
|
|
|
|
%}
|
|
|
|
|
2014-07-11 07:35:56 +04:00
|
|
|
[ptr] native GMPVideoDecoderProxy(GMPVideoDecoderProxy);
|
|
|
|
[ptr] native GMPVideoEncoderProxy(GMPVideoEncoderProxy);
|
2014-05-18 07:05:46 +04:00
|
|
|
[ptr] native GMPVideoHost(GMPVideoHost);
|
2014-06-30 03:02:39 +04:00
|
|
|
[ptr] native TagArray(nsTArray<nsCString>);
|
2014-07-28 03:20:34 +04:00
|
|
|
[ptr] native GMPDecryptorProxy(GMPDecryptorProxy);
|
2014-08-03 01:29:26 +04:00
|
|
|
[ptr] native GMPAudioDecoderProxy(GMPAudioDecoderProxy);
|
2014-05-18 07:05:46 +04:00
|
|
|
|
2015-02-09 23:54:12 +03:00
|
|
|
[scriptable, uuid(fed4d2d8-87d8-42fe-a141-98c15b5f7a1e)]
|
2014-05-18 07:05:46 +04:00
|
|
|
interface mozIGeckoMediaPluginService : nsISupports
|
|
|
|
{
|
2014-10-13 02:53:43 +04:00
|
|
|
|
2014-07-10 22:48:11 +04:00
|
|
|
/**
|
|
|
|
* The GMP thread. Callable from any thread.
|
|
|
|
*/
|
2014-05-18 07:05:46 +04:00
|
|
|
readonly attribute nsIThread thread;
|
|
|
|
|
2014-07-17 06:59:17 +04:00
|
|
|
/**
|
|
|
|
* Get a plugin that supports the specified tags.
|
|
|
|
* Callable on any thread
|
|
|
|
*/
|
|
|
|
[noscript]
|
2014-10-14 04:52:56 +04:00
|
|
|
boolean hasPluginForAPI(in ACString api, in TagArray tags);
|
2014-07-17 06:59:17 +04:00
|
|
|
|
2015-02-20 04:37:49 +03:00
|
|
|
/**
|
|
|
|
* Get the version of the plugin that supports the specified tags.
|
|
|
|
* Callable on any thread
|
|
|
|
*/
|
|
|
|
[noscript]
|
2015-02-24 17:03:56 +03:00
|
|
|
void getPluginVersionForAPI(in ACString api, in TagArray tags,
|
|
|
|
out boolean hasPlugin, out ACString version);
|
2015-02-20 04:37:49 +03:00
|
|
|
|
2014-07-10 22:48:11 +04:00
|
|
|
/**
|
|
|
|
* Get a video decoder that supports the specified tags.
|
|
|
|
* The array of tags should at least contain a codec tag, and optionally
|
|
|
|
* other tags such as for EME keysystem.
|
|
|
|
* Callable only on GMP thread.
|
|
|
|
*/
|
|
|
|
[noscript]
|
2014-07-11 07:35:56 +04:00
|
|
|
GMPVideoDecoderProxy getGMPVideoDecoder(in TagArray tags,
|
2014-10-13 02:53:43 +04:00
|
|
|
[optional] in ACString nodeId,
|
2014-07-11 07:35:56 +04:00
|
|
|
out GMPVideoHost outVideoHost);
|
2014-05-18 07:05:46 +04:00
|
|
|
|
2014-07-10 22:48:11 +04:00
|
|
|
/**
|
|
|
|
* Get a video encoder that supports the specified tags.
|
|
|
|
* The array of tags should at least contain a codec tag, and optionally
|
|
|
|
* other tags.
|
|
|
|
* Callable only on GMP thread.
|
|
|
|
*/
|
|
|
|
[noscript]
|
2014-07-11 07:35:56 +04:00
|
|
|
GMPVideoEncoderProxy getGMPVideoEncoder(in TagArray tags,
|
2014-10-13 02:53:43 +04:00
|
|
|
[optional] in ACString nodeId,
|
2014-07-11 07:35:56 +04:00
|
|
|
out GMPVideoHost outVideoHost);
|
2014-07-10 22:48:11 +04:00
|
|
|
|
2014-08-03 01:29:26 +04:00
|
|
|
// Returns an audio decoder that supports the specified tags.
|
|
|
|
// The array of tags should at least contain a codec tag, and optionally
|
|
|
|
// other tags such as for EME keysystem.
|
|
|
|
// Callable only on GMP thread.
|
|
|
|
GMPAudioDecoderProxy getGMPAudioDecoder(in TagArray tags,
|
2014-10-13 02:53:43 +04:00
|
|
|
[optional] in ACString nodeId);
|
2014-08-03 01:29:26 +04:00
|
|
|
|
2014-07-28 03:20:34 +04:00
|
|
|
// Returns a decryption session manager that supports the specified tags.
|
|
|
|
// The array of tags should at least contain a key system tag, and optionally
|
|
|
|
// other tags.
|
|
|
|
// Callable only on GMP thread.
|
2014-10-13 02:53:43 +04:00
|
|
|
GMPDecryptorProxy getGMPDecryptor(in TagArray tags, in ACString nodeId);
|
2014-07-28 03:20:34 +04:00
|
|
|
|
2014-10-13 02:53:43 +04:00
|
|
|
/**
|
|
|
|
* Gets the NodeId for a (origin, urlbarOrigin, isInprivateBrowsing) tuple.
|
|
|
|
*/
|
|
|
|
ACString getNodeId(in AString origin,
|
|
|
|
in AString topLevelOrigin,
|
|
|
|
in bool inPrivateBrowsingMode);
|
2014-05-18 07:05:46 +04:00
|
|
|
};
|