Closed Bug 955981 Opened 10 years ago Closed 10 years ago

MediaEncoder - Make InterleaveTrackData function can be shared

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: rlin, Assigned: shelly)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

We have a implementation on AudioTrackEncoder::InterleaveTrackData
But it only can be used when class inherit from AudioTrackEncoder.
In OmxWrapper we also need this but it don't inherit from that interface.
Take it as my 2014 first bug lol.
Assignee: nobody → slin
This is mostly for the purpose of preventing duplicate copy in bug 879668, OMXCodecWrapper.cpp, ln:358.
Attachment #8356428 - Flags: review?(roc)
Comment on attachment 8356428 [details] [diff] [review]
Make function InterleaveTrackData public and static

Review of attachment 8356428 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/encoder/OpusTrackEncoder.cpp
@@ +281,5 @@
>  
>      if (!chunk.IsNull()) {
>        // Append the interleaved data to the end of pcm buffer.
> +      AudioTrackEncoder::InterleaveTrackData(chunk, frameToCopy, mChannels,
> +                         pcm.Elements() + frameCopied * mChannels);

Indent this line by just two spaces to the right of the previous line.
Attachment #8356428 - Flags: review?(roc) → review+
Updated with nit fix and carry r+ from roc.

Try result:
https://tbpl.mozilla.org/?tree=Try&rev=736af568b86e

Hi John,
Could you update the |OMXCodecWrapper| once this is checked-in? Thanks a lot.
Attachment #8356428 - Attachment is obsolete: true
Attachment #8356500 - Flags: review+
Flags: needinfo?(jolin)
(In reply to Shelly Lin [:shelly] from comment #4)
> Created attachment 8356500 [details] [diff] [review]
> Make function InterleaveTrackData public and static (checkin-patch)
> 
> Updated with nit fix and carry r+ from roc.
> 
> Try result:
> https://tbpl.mozilla.org/?tree=Try&rev=736af568b86e
> 
> Hi John,
> Could you update the |OMXCodecWrapper| once this is checked-in? Thanks a lot.

 Sure. I will update the patch and ask for roc's help to review it. Thanks a lot for your help! <(__)>
Flags: needinfo?(jolin)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7d434e24be3b
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Component: Video/Audio → Video/Audio: Recording
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: