mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 896353 - Media Recording - Can't record the mediaStream created by AudioContext. r=roc
This commit is contained in:
parent
d193fbdd07
commit
ed5b4692e0
@ -116,6 +116,7 @@ private:
|
||||
MediaRecorder::~MediaRecorder()
|
||||
{
|
||||
if (mTrackUnionStream) {
|
||||
mStreamPort->Destroy();
|
||||
mTrackUnionStream->Destroy();
|
||||
}
|
||||
}
|
||||
@ -192,8 +193,7 @@ MediaRecorder::Start(const Optional<int32_t>& aTimeSlice, ErrorResult& aResult)
|
||||
MOZ_ASSERT(mEncoder, "CreateEncoder failed");
|
||||
|
||||
mTrackUnionStream->SetAutofinish(true);
|
||||
nsRefPtr<MediaInputPort> port =
|
||||
mTrackUnionStream->AllocateInputPort(mStream->GetStream(), MediaInputPort::FLAG_BLOCK_OUTPUT);
|
||||
mStreamPort = mTrackUnionStream->AllocateInputPort(mStream->GetStream(), MediaInputPort::FLAG_BLOCK_OUTPUT);
|
||||
|
||||
if (mEncoder) {
|
||||
mTrackUnionStream->AddListener(mEncoder);
|
||||
|
@ -110,6 +110,8 @@ protected:
|
||||
nsRefPtr<DOMMediaStream> mStream;
|
||||
// This media stream is used for notifying raw data to encoder and can be blocked.
|
||||
nsRefPtr<ProcessedMediaStream> mTrackUnionStream;
|
||||
// This is used for destroing the inputport when destroy the mediaRecorder
|
||||
nsRefPtr<MediaInputPort> mStreamPort;
|
||||
// This object creates on start() and destroys in ~MediaRecorder.
|
||||
nsAutoPtr<EncodedBufferCache> mEncodedBufferCache;
|
||||
// It specifies the container format as well as the audio and video capture formats.
|
||||
|
Loading…
Reference in New Issue
Block a user