diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-10-10 06:37:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-10 06:37:08 +0200 |
commit | ea5b5766a92bc13fc7eb9dc484e133a7a0638d50 (patch) | |
tree | a986c0e98d6c437ee1da1cc0ed0e318cf2132942 /dom/media/webm/WebMDemuxer.h | |
parent | 237f05bcdc3e5e1316b5454a43ffaecd4ff12577 (diff) | |
parent | 81c39ba87667566a83febdc8c22e300ea8313897 (diff) | |
download | UXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.tar UXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.tar.gz UXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.tar.lz UXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.tar.xz UXP-ea5b5766a92bc13fc7eb9dc484e133a7a0638d50.zip |
Merge pull request #830 from trav90/media-work
Several WebM/VPX fixes
Diffstat (limited to 'dom/media/webm/WebMDemuxer.h')
-rw-r--r-- | dom/media/webm/WebMDemuxer.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dom/media/webm/WebMDemuxer.h b/dom/media/webm/WebMDemuxer.h index 6fff38e7d..09780e8d3 100644 --- a/dom/media/webm/WebMDemuxer.h +++ b/dom/media/webm/WebMDemuxer.h @@ -111,7 +111,8 @@ public: bool GetOffsetForTime(uint64_t aTime, int64_t* aOffset); // Demux next WebM packet and append samples to MediaRawDataQueue - bool GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSamples); + nsresult GetNextPacket(TrackInfo::TrackType aType, + MediaRawDataQueue *aSamples); nsresult Reset(TrackInfo::TrackType aType); @@ -175,11 +176,13 @@ private: // Read a packet from the nestegg file. Returns nullptr if all packets for // the particular track have been read. Pass TrackInfo::kVideoTrack or // TrackInfo::kVideoTrack to indicate the type of the packet we want to read. - RefPtr<NesteggPacketHolder> NextPacket(TrackInfo::TrackType aType); + nsresult NextPacket(TrackInfo::TrackType aType, + RefPtr<NesteggPacketHolder>& aPacket); // Internal method that demuxes the next packet from the stream. The caller // is responsible for making sure it doesn't get lost. - RefPtr<NesteggPacketHolder> DemuxPacket(TrackInfo::TrackType aType); + nsresult DemuxPacket(TrackInfo::TrackType aType, + RefPtr<NesteggPacketHolder>& aPacket); // libnestegg audio and video context for webm container. // Access on reader's thread only. @@ -237,8 +240,7 @@ private: int64_t mLastWebMBlockOffset; const bool mIsMediaSource; - Maybe<uint32_t> mLastSeenFrameWidth; - Maybe<uint32_t> mLastSeenFrameHeight; + Maybe<nsIntSize> mLastSeenFrameSize; // This will be populated only if a resolution change occurs, otherwise it // will be left as null so the original metadata is used RefPtr<SharedTrackInfo> mSharedVideoTrackInfo; @@ -276,7 +278,7 @@ private: ~WebMTrackDemuxer(); void UpdateSamples(nsTArray<RefPtr<MediaRawData>>& aSamples); void SetNextKeyFrameTime(); - RefPtr<MediaRawData> NextSample (); + nsresult NextSample(RefPtr<MediaRawData>& aData); RefPtr<WebMDemuxer> mParent; TrackInfo::TrackType mType; UniquePtr<TrackInfo> mInfo; |