Implement MP4ContainerParser::ParseStartAndEndTimestamps

RESOLVED FIXED in mozilla34

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ajones, Assigned: ajones)

Tracking

(Depends on 1 bug)

Trunk
mozilla34
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Add time stamp parsing to MP4 container parser to fix bug 1044498 for MP4.
Comment on attachment 8477197 [details] [diff] [review]
Parse timestamps for MP4 fragments

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

::: content/media/mediasource/SourceBuffer.cpp
@@ +161,5 @@
> +
> +  virtual bool ParseStartAndEndTimestamps(const uint8_t* aData, uint32_t aLength,
> +                                          double& aStart, double& aEnd)
> +  {
> +    if (!aLength) {

Is this check needed?  Is a zero length BufferStream invalid?

@@ +181,5 @@
> +
> +    if (compositionRange.IsNull()) {
> +      return false;
> +    }
> +    aStart = compositionRange.start / 1000000.0;

Use an existing (or define a new) named constant for 1000000.0.
Attachment #8477197 - Flags: review?(kinetik) → review+
This is the same with BufferStream.h and BufferStream.cpp included
Attachment #8478076 - Flags: review?(edwin)
Attachment #8477195 - Attachment is obsolete: true
Comment on attachment 8478076 [details] [diff] [review]
Remove MoofParser dependency on stagefright

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

::: media/libstagefright/binding/include/mp4_demuxer/BufferStream.h
@@ +8,5 @@
> +#include "mp4_demuxer/mp4_demuxer.h"
> +
> +namespace mp4_demuxer {
> +
> +class BufferStream: public Stream

Style is
class BufferStream : public Stream

@@ +11,5 @@
> +
> +class BufferStream: public Stream
> +{
> +public:
> +  BufferStream(const uint8_t* aData, size_t aLength);

Leave a comment that this class doesn't take ownership of the buffer and that it shouldn't be used past the destruction of the buffer.
Attachment #8478076 - Flags: review?(edwin) → review+
https://hg.mozilla.org/mozilla-central/rev/f595c29365b8
https://hg.mozilla.org/mozilla-central/rev/23d73d6bed54
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.