mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1265427 - nsDOMCameraControl needs an mOwnedStream to be consistent towards its VideoStreamTrack r=me
MozReview-Commit-ID: HfKPa4H7FyH --HG-- extra : rebase_source : f40927672b9808d86a88e502a14ca68fafdb7497
This commit is contained in:
parent
cb1c20b3c3
commit
d72257eb98
@ -29,7 +29,7 @@ FakeMediaStreamGraph::DispatchToMainThreadAfterStreamStateUpdate(already_AddRefe
|
||||
}
|
||||
|
||||
CameraPreviewMediaStream::CameraPreviewMediaStream(DOMMediaStream* aWrapper)
|
||||
: MediaStream(aWrapper)
|
||||
: ProcessedMediaStream(aWrapper)
|
||||
, mMutex("mozilla::camera::CameraPreviewMediaStream")
|
||||
, mInvalidatePending(0)
|
||||
, mDiscardedFrames(0)
|
||||
@ -130,6 +130,13 @@ CameraPreviewMediaStream::Invalidate()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CameraPreviewMediaStream::ProcessInput(GraphTime aFrom, GraphTime aTo,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
CameraPreviewMediaStream::RateLimit(bool aLimit)
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ protected:
|
||||
* A camera preview requests no delay and no buffering stream,
|
||||
* but the SourceMediaStream does not support it.
|
||||
*/
|
||||
class CameraPreviewMediaStream : public MediaStream
|
||||
class CameraPreviewMediaStream : public ProcessedMediaStream
|
||||
{
|
||||
typedef mozilla::layers::Image Image;
|
||||
|
||||
@ -56,6 +56,8 @@ public:
|
||||
|
||||
void Invalidate();
|
||||
|
||||
void ProcessInput(GraphTime aFrom, GraphTime aTo, uint32_t aFlags) override;
|
||||
|
||||
// Call these on any thread.
|
||||
void SetCurrentFrame(const gfx::IntSize& aIntrinsicSize, Image* aImage);
|
||||
void ClearCurrentFrame();
|
||||
|
@ -262,6 +262,7 @@ nsDOMCameraControl::nsDOMCameraControl(uint32_t aCameraId,
|
||||
{
|
||||
DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
|
||||
mInput = new CameraPreviewMediaStream(this);
|
||||
mOwnedStream = mInput;
|
||||
|
||||
BindToOwner(aWindow);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user