Closed
Bug 964197
Opened 11 years ago
Closed 11 years ago
[MediaEncoder] Add video frame duration field in ISOMediaWriter
Categories
(Core :: Audio/Video: Recording, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: ayang, Assigned: ayang)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
16.34 KB,
patch
|
ayang
:
review+
|
Details | Diff | Splinter Review |
Video frame rate is not fixed, muxer needs to keep each frame's duration for audio/video synchronization.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8365844 -
Flags: review?(cpearce)
Assignee | ||
Updated•11 years ago
|
Summary: [MediaEncoder] Keep video frame duration when muxing video → [MediaEncoder] Add video frame duration field in ISOMediaWriter
Comment 2•11 years ago
|
||
Comment on attachment 8365844 [details] [diff] [review]
keep_each_frame_duration
Review of attachment 8365844 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good.
::: content/media/encoder/fmp4_muxer/ISOControl.h
@@ +100,5 @@
> // It only means the fragment number of current accumulated frames, not
> // the current 'creating' fragment mFragNum in ISOControl.
> uint32_t mFragmentNumber;
>
> + // The last frame time tamp of last fragment. It is for cauculating the
s/time tamp/time stamp/
s/cauculating/calculating/
s/fragmenet/fragment/
::: content/media/encoder/fmp4_muxer/ISOMediaBoxes.cpp
@@ +159,5 @@
> + frag->SetLastFragmentLastFrameTime(frames.ElementAt(i)->GetTimeStamp());
> + }
> + }
> + sample_info_table[i].sample_duration =
> + frame_time * mMeta.mVidMeta->VideoFrequency / 1000000;
Is the 1000000 here a specific value? Say number of microseconds per second? If so, please make this a #defined constant (or static const uint32_t/uint64_t), so that it's unlikely that people will accidentally miss adding a 0 when they use write the literal value.
For example, VideoUtils.h defines USECS_PER_S as the number of microseconds per second here:
http://dxr.mozilla.org/mozilla-central/source/content/media/VideoUtils.h#122
You could use that (if the 1000000 here represents the number of microseconds per second), or you could define your own that semantically makes sense here.
Attachment #8365844 -
Flags: review?(cpearce) → review+
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #2)
> For example, VideoUtils.h defines USECS_PER_S as the number of microseconds
> per second here:
> http://dxr.mozilla.org/mozilla-central/source/content/media/VideoUtils.h#122
>
> You could use that (if the 1000000 here represents the number of
> microseconds per second), or you could define your own that semantically
> makes sense here.
It represents microseconds per second here. I'll use USECS_PER_S in patch.
Thanks for advice.
Assignee | ||
Comment 4•11 years ago
|
||
Carry r+.
Attachment #8365844 -
Attachment is obsolete: true
Attachment #8369138 -
Flags: review+
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 6•11 years ago
|
||
Keywords: checkin-needed
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Comment 8•11 years ago
|
||
correcting target milestone, sorry for the bugmail spam
Target Milestone: mozilla30 → mozilla29
Updated•11 years ago
|
Component: Video/Audio → Video/Audio: Recording
You need to log in
before you can comment on or make changes to this bug.
Description
•