2013-05-21 23:17:47 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#ifndef MediaStreamAudioDestinationNode_h_
|
|
|
|
#define MediaStreamAudioDestinationNode_h_
|
|
|
|
|
|
|
|
#include "AudioNode.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2016-12-15 21:24:43 +03:00
|
|
|
class AudioContext;
|
|
|
|
struct AudioNodeOptions;
|
|
|
|
|
2015-04-28 09:42:00 +03:00
|
|
|
class MediaStreamAudioDestinationNode final : public AudioNode {
|
2013-05-21 23:17:47 +04:00
|
|
|
public:
|
2016-12-15 21:24:43 +03:00
|
|
|
static already_AddRefed<MediaStreamAudioDestinationNode> Create(
|
|
|
|
AudioContext& aAudioContext, const AudioNodeOptions& aOptions,
|
|
|
|
ErrorResult& aRv);
|
2013-05-21 23:17:47 +04:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaStreamAudioDestinationNode,
|
|
|
|
AudioNode)
|
|
|
|
|
2016-12-15 21:24:43 +03:00
|
|
|
static already_AddRefed<MediaStreamAudioDestinationNode> Constructor(
|
|
|
|
const GlobalObject& aGlobal, AudioContext& aAudioContext,
|
|
|
|
const AudioNodeOptions& aOptions, ErrorResult& aRv) {
|
|
|
|
return Create(aAudioContext, aOptions, aRv);
|
|
|
|
}
|
|
|
|
|
2016-01-18 06:22:51 +03:00
|
|
|
JSObject* WrapObject(JSContext* aCx,
|
|
|
|
JS::Handle<JSObject*> aGivenProto) override;
|
2013-05-21 23:17:47 +04:00
|
|
|
|
2018-02-06 09:46:57 +03:00
|
|
|
uint16_t NumberOfOutputs() const final { return 0; }
|
2013-05-21 23:17:47 +04:00
|
|
|
|
2019-10-02 13:23:02 +03:00
|
|
|
void DestroyMediaTrack() override;
|
2013-05-21 23:17:47 +04:00
|
|
|
|
|
|
|
DOMMediaStream* DOMStream() const { return mDOMStream; }
|
|
|
|
|
2016-01-18 06:22:51 +03:00
|
|
|
const char* NodeType() const override {
|
2014-04-13 22:08:10 +04:00
|
|
|
return "MediaStreamAudioDestinationNode";
|
|
|
|
}
|
|
|
|
|
2016-01-18 06:22:51 +03:00
|
|
|
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
|
|
|
|
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
|
2014-04-13 22:08:10 +04:00
|
|
|
|
2013-05-21 23:17:47 +04:00
|
|
|
private:
|
2016-12-15 21:24:43 +03:00
|
|
|
explicit MediaStreamAudioDestinationNode(AudioContext* aContext);
|
|
|
|
~MediaStreamAudioDestinationNode() = default;
|
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<DOMMediaStream> mDOMStream;
|
2013-05-21 23:17:47 +04:00
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2013-05-21 23:17:47 +04:00
|
|
|
|
|
|
|
#endif
|