Closed Bug 1017471 Opened 12 years ago Closed 12 years ago

Wrong usage of ChangeExplicitBlockerCount in MediaRecorder

Categories

(Core :: Audio/Video: Recording, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: rlin, Assigned: neopleo, Mentored)

Details

(Whiteboard: [good first bug])

Attachments

(1 file, 3 obsolete files)

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.
It is a good one for newbie to practice how to submit the patches and using the try server.
Whiteboard: [mentor=rlin]
If that's the case, I'm flagging it a good first bug.
Whiteboard: [mentor=rlin] → [mentor=rlin][good first bug]
Mentor: rlin
Whiteboard: [mentor=rlin][good first bug] → [good first bug]
Hi, Is anyone currently working on this bug ?
No, as far as I know. You are welcome to take this bug. :)
Hi, JW, Let me make sure, Is this a gecko bug ?
Yes, it's gecko bug.
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 ?
Nightly will do.
: ) how to take this bug ?
Click the "take" link button after the "Assigned To:" field above.
Mentor: jwwang
Sorry, I noticed you need the permission to take the bug. I will assign the bug to you. :)
Assignee: nobody → ckjboy2003
Status: NEW → ASSIGNED
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 ? )
Thank you.
BTW, is there anyone who would like to be the mentor to this bug since I have little experience for gecko mdeia framework ?
Randy and me will mentor this bug.
Nice, thanks.
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); ???
Yes. +1 means blocking for Pause() and -1 to restore the blocking change previously made in Pause().
Attached patch 1017471.patch (obsolete) — — Splinter Review
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 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+
Hi JW, FYI, I have gained the access level 1 permission. Please let me know what is the next step I should do.
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
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.=
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 ?
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.
Can step 1 and 2 run in the same time? or It needs to wait the approval from reviewer then try server ?
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.
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
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+
(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)
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.
Hi, Please let me know the next step I should proceed to or just wait here until any conclusion to be made.
Hi JW, I will attach a hg formatted patch soon.
Attached patch 1017471_hg.patch (obsolete) — — Splinter Review
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!
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
Attached patch bug_1017471_hg.patch (obsolete) — — Splinter Review
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+
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.
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+
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.
Attachment #8444907 - Attachment is obsolete: true
Attachment #8447255 - Attachment is obsolete: true
Attachment #8447515 - Attachment is obsolete: true
Attachment #8447792 - Attachment description: bug_1017471_hg_2.patch → bug_1017471_hg.patch
Whiteboard: [good first bug] → [good first bug][checkin-needed]
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?
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]
Oh! sorry. Thank you JW and Randy.
Sam, can you also provide a try server link for this patches ? Thanks!
Hi Carsten, Yes, I can. I will provide you a try server link later.
Hi Carsten, Just to make sure that the try server link you refer to is the builds and logs link, right ?
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)
Flags: needinfo?(cbook)
I just had a brief conversation with the sheriff and this patch has been landed. Thanks to mentors and Carsten.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
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.
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: