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
b64e29c81b
commit
dfc33dc92b
@ -115,6 +115,9 @@ private:
|
||||
|
||||
MediaRecorder::~MediaRecorder()
|
||||
{
|
||||
if (mStreamPort) {
|
||||
mStreamPort->Destroy();
|
||||
}
|
||||
if (mTrackUnionStream) {
|
||||
mTrackUnionStream->Destroy();
|
||||
}
|
||||
@ -192,8 +195,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