Closed
Bug 1017471
Opened 12 years ago
Closed 12 years ago
Wrong usage of ChangeExplicitBlockerCount in MediaRecorder
Categories
(Core :: Audio/Video: Recording, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: rlin, Assigned: neopleo, Mentored)
Details
(Whiteboard: [good first bug])
Attachments
(1 file, 3 obsolete files)
|
1.20 KB,
patch
|
neopleo
:
review+
|
Details | Diff | Splinter Review |
Pasue()
http://mxr.mozilla.org/mozilla-central/source/content/media/MediaRecorder.cpp#265
Resume()
http://mxr.mozilla.org/mozilla-central/source/content/media/MediaRecorder.cpp#276
pause should call ChangeExplicitBlockerCount(1);
Comment 1•12 years ago
|
||
http://dxr.mozilla.org/mozilla-central/source/content/media/MediaStreamGraph.h#566
The blocking counts are unsigned integers. |(uint32_t)-1| is still positive which will result in blocking. However, we should still get the semantics right.
| Reporter | ||
Comment 2•12 years ago
|
||
It is a good one for newbie to practice how to submit the patches and using the try server.
Whiteboard: [mentor=rlin]
Comment 3•12 years ago
|
||
If that's the case, I'm flagging it a good first bug.
Whiteboard: [mentor=rlin] → [mentor=rlin][good first bug]
Updated•12 years ago
|
Mentor: rlin
Whiteboard: [mentor=rlin][good first bug] → [good first bug]
| Assignee | ||
Comment 4•12 years ago
|
||
Hi, Is anyone currently working on this bug ?
Comment 5•12 years ago
|
||
No, as far as I know. You are welcome to take this bug. :)
| Assignee | ||
Comment 6•12 years ago
|
||
Hi, JW, Let me make sure, Is this a gecko bug ?
| Reporter | ||
Comment 7•12 years ago
|
||
Yes, it's gecko bug.
| Assignee | ||
Comment 8•12 years ago
|
||
Just to make sure a couple of things before taking this bug.
Will I need a device to test this bug ? or Nightly is enough ?
If I need a device to do it, is Flatfish okay ?
Comment 9•12 years ago
|
||
Nightly will do.
| Assignee | ||
Comment 10•12 years ago
|
||
: ) how to take this bug ?
Comment 11•12 years ago
|
||
Click the "take" link button after the "Assigned To:" field above.
| Reporter | ||
Updated•12 years ago
|
Mentor: jwwang
Comment 12•12 years ago
|
||
Sorry, I noticed you need the permission to take the bug. I will assign the bug to you. :)
Assignee: nobody → ckjboy2003
Status: NEW → ASSIGNED
| Assignee | ||
Comment 13•12 years ago
|
||
Hi, I dont see the take link right after the "Assigned To:", would you help me with this?
( maybe due to the insufficient permission to do so ? )
| Assignee | ||
Comment 14•12 years ago
|
||
Thank you.
| Assignee | ||
Comment 15•12 years ago
|
||
BTW, is there anyone who would like to be the mentor to this bug since I have little experience for gecko mdeia framework ?
Comment 16•12 years ago
|
||
Randy and me will mentor this bug.
Comment 17•12 years ago
|
||
| Assignee | ||
Comment 18•12 years ago
|
||
Nice, thanks.
| Assignee | ||
Comment 19•12 years ago
|
||
what's the expected result for this bug?
Only change
http://mxr.mozilla.org/mozilla-central/source/content/media/MediaRecorder.cpp#265
from
mTrackUnionStream->ChangeExplicitBlockerCount(-1);
to
mTrackUnionStream->ChangeExplicitBlockerCount(1);
???
Comment 20•12 years ago
|
||
Yes. As well as the one in Resume().
http://mxr.mozilla.org/mozilla-central/source/content/media/MediaRecorder.cpp#282
| Assignee | ||
Comment 21•12 years ago
|
||
http://mxr.mozilla.org/mozilla-central/source/content/media/MediaRecorder.cpp#282
Should this one change 1 to -1 ?
Comment 22•12 years ago
|
||
Yes. +1 means blocking for Pause() and -1 to restore the blocking change previously made in Pause().
| Assignee | ||
Comment 23•12 years ago
|
||
This quick patch changes the following variable:
1. In /content/media/MediaRecorder.cpp
nsresult Pause()
{
//mTrackUnionStream->ChangeExplicitBlockerCount(-1);
mTrackUnionStream->ChangeExplicitBlockerCount(1);
}
2. nsresult Resume()
{
//mTrackUnionStream->ChangeExplicitBlockerCount(1);
mTrackUnionStream->ChangeExplicitBlockerCount(-1);
}
Comment 24•12 years ago
|
||
Comment on attachment 8444907 [details] [diff] [review]
1017471.patch
Review of attachment 8444907 [details] [diff] [review]:
-----------------------------------------------------------------
Hi roc,
Can you review this patch?
Attachment #8444907 -
Flags: review?(roc)
Attachment #8444907 -
Flags: feedback+
| Assignee | ||
Comment 25•12 years ago
|
||
Hi JW,
FYI, I have gained the access level 1 permission. Please let me know what is the next step I should do.
Comment 26•12 years ago
|
||
Hi Sam,
1. Get an r+ from the review peer.
2. Send the patch to Try server for tests to ensure the patch doesn't break anything.
3. Put "checkin-needed" in the Keywords field above and Sheriff will check in the patch for you.
[1] try server: https://wiki.mozilla.org/ReleaseEngineering/TryServer
| Reporter | ||
Comment 27•12 years ago
|
||
Hi Hi Sam,
You can refer those documents to learn how to use hg and submit a hg format patch. :)
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Source_Code/Mercurial
https://developer.mozilla.org/en-US/docs/Mercurial
The patch header should like this:
============
# HG changeset patch
# User Benjamin Chen <bechen@mozilla.com>
# Date 1403143894 -28800
# Thu Jun 19 10:11:34 2014 +0800
# Node ID b01689da977b144fdbfd0cf72a2267c40b0392da
# Parent 9b0718a01b13ef28b27c2bad52bfb3a59dbc94d4
Bug 969372: part2: 1. Let Session hold a reference to MediaRecorder. 2. MediaRecorder implement nsIDocumentActivity. r=roc
diff --git a/content/media/MediaRecorder.cpp b/content/media/MediaRecorder.cpp
--- a/content/media/MediaRecorder.cpp
+++ b/content/media/MediaRecorder.cpp
=your change.=
| Assignee | ||
Comment 28•12 years ago
|
||
Hi JW,
Some questions here:
1. How to get review peer? Did you just request someone to do it?
Hi Hi Randy,
1. only hg format works ? git doesnt ?
Comment 29•12 years ago
|
||
Yes. You can also click the "details" button to edit a patch to request review from a peer. There is also a "Suggested reviewers" button to display reviewers if you don't know whom to ask.
| Assignee | ||
Comment 30•12 years ago
|
||
Can step 1 and 2 run in the same time? or It needs to wait the approval from reviewer then try server ?
Comment 31•12 years ago
|
||
Indeed, you should run Try server first to ensure the quality of your patch before asking for review. If the patch is simple and you are confident, you can do both at the same time.
| Reporter | ||
Comment 32•12 years ago
|
||
Hi Sam,
Git patch can be reviewed, but if Sheriff want to check-in your patch, it should be hg formatted.
Here is the Committing rules and responsibilities you can refer.
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Committing_Rules_and_Responsibilities
| Assignee | ||
Comment 33•12 years ago
|
||
Thank you both. Let me do the review and try server steps at the same time. : )
Comment on attachment 8444907 [details] [diff] [review]
1017471.patch
Review of attachment 8444907 [details] [diff] [review]:
-----------------------------------------------------------------
Amazing! We need a test for this :-)
In future patches please include at least 8 lines of context. Thanks!
Attachment #8444907 -
Flags: review?(roc) → review+
Comment 35•12 years ago
|
||
Hi Sam,
Here is a reference for you to configure your Mecurial.
https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Comment 36•12 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #34)
> Amazing! We need a test for this :-)
What kind of test do we need?
Flags: needinfo?(roc)
Something calls Pause() that can actually check if the stream was paused?
Flags: needinfo?(roc)
Comment 38•12 years ago
|
||
http://hg.mozilla.org/mozilla-central/file/f78e532e8a10/content/media/MediaStreamGraph.cpp#l778
Both ChangeExplicitBlockerCount(1) and ChangeExplicitBlockerCount(-1) will cause |explicitBlock| to be true for (uint32_t)-1 is still positive. It is fine if there is only one changing the blocking count of a stream in a reverse way (1 <=> -1). Things will be different if there are multiple clients changing the blocking count for clientA.Pause(+1) && MediaRecorder.Pause(-1) will result in non-blocking instead of blocking with count = 2.
I was thinking about passing an enum (BLOCKED or UNBLOCKED) to ChangeExplicitBlockerCount() since we should never pass something other than 1 or -1.
| Assignee | ||
Comment 39•12 years ago
|
||
Hi,
Please let me know the next step I should proceed to or just wait here until any conclusion to be made.
Comment 40•12 years ago
|
||
Hi Sam,
Please follow https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F and https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Committing_Rules_and_Responsibilities to generate a well-formed patch. Then we can ask sheriff to check in the patch.
| Assignee | ||
Comment 41•12 years ago
|
||
Hi JW,
I will attach a hg formatted patch soon.
| Assignee | ||
Comment 42•12 years ago
|
||
Dear JW and Randy,
I've attached the patch in hg format, it looks very similar to what Randy posted at @27, please help check this. Thanks!
Comment 43•12 years ago
|
||
Hi Sam,
It is nearly done. Please also include the commit message in your patch. For such a minor fix (commit message or tailing spaces), you can just set the flag to r+ without review again.
ref: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Committing_Rules_and_Responsibilities#Commit_message_restrictions
| Assignee | ||
Comment 44•12 years ago
|
||
Hi JW,
Thanks! I've added one line for commit message.
Please review it again and let me know if this one works.
Attachment #8447515 -
Flags: review+
Comment 45•12 years ago
|
||
Almost there. Please also inlcude the reviewer in the commit message. :)
ex: Bug 101741 - minor fix for the wrong usage of ChangeExplicitBlockerCount in MediaRecorder. r=roc.
| Assignee | ||
Comment 46•12 years ago
|
||
Hi JW,
I've modified the patch.
Please find the attachment and let me know what to do next.
Thank you. : )
Attachment #8447792 -
Flags: review+
Comment 47•12 years ago
|
||
Hi Sam,
Now you can click the "Details" button -> "edit details" to check the "obsolete" check box to discard the patches that are obsolete. Then put the keyword "checkin-needed" in the keywords field to notice Sheriff to check in the patch for you.
| Assignee | ||
Updated•12 years ago
|
Attachment #8444907 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Attachment #8447255 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Attachment #8447515 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Attachment #8447792 -
Attachment description: bug_1017471_hg_2.patch → bug_1017471_hg.patch
| Assignee | ||
Updated•12 years ago
|
Whiteboard: [good first bug] → [good first bug][checkin-needed]
| Assignee | ||
Comment 48•12 years ago
|
||
Hi JW,
Thanks. I've done all things you mentioned @ comment 47.
So now we just wait the Sheriff to check in this bug and close it?
Comment 49•12 years ago
|
||
You put "checkin-needed" in the wrong field.
Yes, Sheriff will take care of the rest.
Keywords: checkin-needed
Whiteboard: [good first bug][checkin-needed] → [good first bug]
| Assignee | ||
Comment 50•12 years ago
|
||
Oh! sorry. Thank you JW and Randy.
Comment 51•12 years ago
|
||
Sam, can you also provide a try server link for this patches ? Thanks!
Updated•12 years ago
|
Keywords: checkin-needed
| Assignee | ||
Comment 52•12 years ago
|
||
Hi Carsten,
Yes, I can. I will provide you a try server link later.
| Assignee | ||
Comment 53•12 years ago
|
||
Hi Carsten,
Just to make sure that the try server link you refer to is the builds and logs link, right ?
| Assignee | ||
Comment 54•12 years ago
|
||
Hi Carsten,
With your comment related to the try server link,
1. Results are in the following link:
https://tbpl.mozilla.org/?tree=Try&rev=79bc7c426e30
2. Builds and logs are available in the following link:
https://ftp-ssl.mozilla.org/pub/mozilla.org/firefox/try-builds/ckjboy2003@gmail.com-79bc7c426e30
So far I've only had these links. Please let me know if any further information you may need.
Flags: needinfo?(cbook)
| Reporter | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 55•12 years ago
|
||
Keywords: checkin-needed
Updated•12 years ago
|
Flags: needinfo?(cbook)
| Assignee | ||
Comment 56•12 years ago
|
||
I just had a brief conversation with the sheriff and this patch has been landed.
Thanks to mentors and Carsten.
| Assignee | ||
Updated•12 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Comment 57•12 years ago
|
||
Sheriff will switch bug status when the patch passes verification. You just need to put "check-in-needed" and let Sheriff take care of the rest.
Comment 58•12 years ago
|
||
Resolution: WORKSFORME → FIXED
Updated•12 years ago
|
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•