Closed
Bug 844722
Opened 11 years ago
Closed 6 years ago
videoObject.MediaSize can not be updated to frame data's size
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: biwenyang, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11 Steps to reproduce: I toggle camera between forth and back in WebApp. Actual results: The screen is black. Expected results: Showing preview data.
I open the back camera in WebApp, it works.But the screen was black when I switch camera to forth. I have look up some code of video. I think the reason is the followings: 1 The following code will call Invalidate in main thread. for (uint32_t i = 0; i < aStream->mVideoOutputs.Length(); ++i) { VideoFrameContainer* output = aStream->mVideoOutputs[i]; output->SetCurrentFrame(frame->GetIntrinsicSize(), frame->GetImage(), nsCOMPtr<nsIRunnable> event = NS_NewRunnableMethod(output, &VideoFrameContainer::Invalidate); NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL); } 2 The mNeedInvalidation will be set to false in function 'Invalidate()'. if (mImageContainer && mImageContainer->IsAsync() && mImageContainer->HasCurrentImage() && !mIntrinsicSizeChanged) { WRITELOGI("%s,this=%p, set mNeedInvalidation=false.", __func__, this); mNeedInvalidation = false; } 3 The status of mNeedInvalidation is saved when toggle camera, The next time 'Invalidate()' will return. So the updating of media size will not be called. if (!mNeedInvalidation) { WRITELOGI("%s,this=%p, not mNeedInvalidation.", __func__, this); return; } .... mElement->UpdateMediaSize(mIntrinsicSize);
Because the resolution of forth camera and back camera are the same, so Invalidate() will not be called.
Updated•9 years ago
|
Component: Audio/Video → Audio/Video: Playback
Comment 3•6 years ago
|
||
Mass closing because of inactivity. Please feel free to re-open if still relevant.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•