зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1323100 - Stop double-registering the Media_Encoder thread with the profiler. r=froydnj
MozReview-Commit-ID: 8TQMVhbw13s --HG-- extra : rebase_source : b2a55afe65d9a68d1d20d08806cb016ce040d044
This commit is contained in:
Родитель
942cdc08a8
Коммит
927eee33e9
|
@ -283,8 +283,6 @@ class MediaRecorder::Session: public nsIObserver,
|
||||||
} else {
|
} else {
|
||||||
// Flush out remaining encoded data.
|
// Flush out remaining encoded data.
|
||||||
mSession->Extract(true);
|
mSession->Extract(true);
|
||||||
if (mSession->mIsRegisterProfiler)
|
|
||||||
profiler_unregister_thread();
|
|
||||||
if (NS_FAILED(NS_DispatchToMainThread(
|
if (NS_FAILED(NS_DispatchToMainThread(
|
||||||
new DestroyRunnable(mSession)))) {
|
new DestroyRunnable(mSession)))) {
|
||||||
MOZ_ASSERT(false, "NS_DispatchToMainThread DestroyRunnable failed");
|
MOZ_ASSERT(false, "NS_DispatchToMainThread DestroyRunnable failed");
|
||||||
|
@ -419,7 +417,6 @@ public:
|
||||||
, mTimeSlice(aTimeSlice)
|
, mTimeSlice(aTimeSlice)
|
||||||
, mStopIssued(false)
|
, mStopIssued(false)
|
||||||
, mIsStartEventFired(false)
|
, mIsStartEventFired(false)
|
||||||
, mIsRegisterProfiler(false)
|
|
||||||
, mNeedSessionEndTask(true)
|
, mNeedSessionEndTask(true)
|
||||||
, mSelectedVideoTrackID(TRACK_NONE)
|
, mSelectedVideoTrackID(TRACK_NONE)
|
||||||
{
|
{
|
||||||
|
@ -607,12 +604,6 @@ private:
|
||||||
MOZ_ASSERT(NS_GetCurrentThread() == mReadThread);
|
MOZ_ASSERT(NS_GetCurrentThread() == mReadThread);
|
||||||
LOG(LogLevel::Debug, ("Session.Extract %p", this));
|
LOG(LogLevel::Debug, ("Session.Extract %p", this));
|
||||||
|
|
||||||
if (!mIsRegisterProfiler) {
|
|
||||||
char aLocal;
|
|
||||||
profiler_register_thread("Media_Encoder", &aLocal);
|
|
||||||
mIsRegisterProfiler = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
PROFILER_LABEL("MediaRecorder", "Session Extract",
|
PROFILER_LABEL("MediaRecorder", "Session Extract",
|
||||||
js::ProfileEntry::Category::OTHER);
|
js::ProfileEntry::Category::OTHER);
|
||||||
|
|
||||||
|
@ -922,8 +913,6 @@ private:
|
||||||
bool mStopIssued;
|
bool mStopIssued;
|
||||||
// Indicate the session had fire start event. Encoding thread only.
|
// Indicate the session had fire start event. Encoding thread only.
|
||||||
bool mIsStartEventFired;
|
bool mIsStartEventFired;
|
||||||
// The register flag for "Media_Encoder" thread to profiler
|
|
||||||
bool mIsRegisterProfiler;
|
|
||||||
// False if the InitEncoder called successfully, ensure the
|
// False if the InitEncoder called successfully, ensure the
|
||||||
// ExtractRunnable/DestroyRunnable will end the session.
|
// ExtractRunnable/DestroyRunnable will end the session.
|
||||||
// Main thread only.
|
// Main thread only.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче