summaryrefslogtreecommitdiffstats
path: root/dom/media/webm/WebMDemuxer.h
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-08 21:43:06 -0500
committertrav90 <travawine@palemoon.org>2018-10-08 21:43:06 -0500
commit632b67483c9d964cd84ee90d162e88b510a70707 (patch)
treee58d67dd63f1f45b5019843840639a7bd43e15b2 /dom/media/webm/WebMDemuxer.h
parent3ec54eeacb8fcb5b844aa07c803cf52d1aedb0d4 (diff)
downloadUXP-632b67483c9d964cd84ee90d162e88b510a70707.tar
UXP-632b67483c9d964cd84ee90d162e88b510a70707.tar.gz
UXP-632b67483c9d964cd84ee90d162e88b510a70707.tar.lz
UXP-632b67483c9d964cd84ee90d162e88b510a70707.tar.xz
UXP-632b67483c9d964cd84ee90d162e88b510a70707.zip
[webm] Treat demuxing errors differently than EOS
Otherwise the WebM demuxer makes no difference between a genuine EOS and encountering an error.
Diffstat (limited to 'dom/media/webm/WebMDemuxer.h')
-rw-r--r--dom/media/webm/WebMDemuxer.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/dom/media/webm/WebMDemuxer.h b/dom/media/webm/WebMDemuxer.h
index a5008022f..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.
@@ -275,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;