Closed Bug 1237836 Opened 8 years ago Closed 8 years ago

Support MetadataTags in MediaFormatReader

Categories

(Core :: Audio/Video: Playback, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox46 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

Details

Attachments

(1 file)

To move the WaveReader over to the MediaFormatReader (bug 1231793) without a feature regression, the MediaFormatReader needs to support retrieving MetadataTags from demuxers.
Comment on attachment 8705409 [details]
MozReview Request: Bug 1237836 - Add support for MetadataTags to MediaFormatReader. r=?jya

https://reviewboard.mozilla.org/r/29969/#review26787

::: dom/media/MediaInfo.h:94
(Diff revision 1)
> +  nsTArray<MetadataTag> mTags;

wouldn't it have been simpler to use a UniquePtr<MetadataTags> there instead?

avoid having to convert back and forth?

I guess the issue would be common keys between the audio track and video track, but that's hardly going to be a problem if the only demuxer supporting it is WAV
Attachment #8705409 - Flags: review+
(In reply to Jean-Yves Avenard [:jya] from comment #2)
> Comment on attachment 8705409 [details]
> MozReview Request: Bug 1237836 - Add support for MetadataTags to
> MediaFormatReader. r=?jya
> 
> https://reviewboard.mozilla.org/r/29969/#review26787
> 
> ::: dom/media/MediaInfo.h:94
> (Diff revision 1)
> > +  nsTArray<MetadataTag> mTags;
> 
> wouldn't it have been simpler to use a UniquePtr<MetadataTags> there instead?
> 
> avoid having to convert back and forth?

It would have, if nsBaseHashtable had an assignment operator, but it doesn't...
but the object is on the heap, can't we just shift the ownership of the pointer around? where would we need to assign it ? UniquePtr won't take care of that?
Not sure what you're asking. In theory we could have different MetadataTags in each track, so we'd end up with multiple MetadatTags, so we can't just move one MetadataTags around, we need to merge each tracks' tags.

The issue with the assignment operator is that at DecodedStream.cpp:245 we assign a MediaInfo, and that would invoke the default assignment operator on MediaInfo and thus on the MetadataTags which is an nsBaseHashTable which lacks an assignment operator, so we get a compile error. I don't think we should add an assignment operator to nsBaseHashTable, as you get shallow vs deep copy issues.
(In reply to Pulsebot from comment #7)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/c223429a08eb

Backed out for mass test failures...
Keywords: leave-open
Status: NEW → RESOLVED
Closed: 8 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: