mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 814756 - Disambiguate PacketQueue; r=cpearce
This commit is contained in:
parent
9891e3e945
commit
54bc84b0b4
@ -194,7 +194,7 @@ void OggCodecState::ReleasePacket(ogg_packet* aPacket) {
|
||||
delete aPacket;
|
||||
}
|
||||
|
||||
void PacketQueue::Append(ogg_packet* aPacket) {
|
||||
void OggPacketQueue::Append(ogg_packet* aPacket) {
|
||||
nsDeque::Push(aPacket);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
// Deallocates a packet, used in PacketQueue below.
|
||||
// Deallocates a packet, used in OggPacketQueue below.
|
||||
class OggPacketDeallocator : public nsDequeFunctor {
|
||||
virtual void* operator() (void* aPacket) {
|
||||
ogg_packet* p = static_cast<ogg_packet*>(aPacket);
|
||||
@ -58,10 +58,10 @@ class OggPacketDeallocator : public nsDequeFunctor {
|
||||
// frames/samples, reducing the amount of frames/samples we must decode to
|
||||
// determine start-time at a particular offset, and gives us finer control
|
||||
// over memory usage.
|
||||
class PacketQueue : private nsDeque {
|
||||
class OggPacketQueue : private nsDeque {
|
||||
public:
|
||||
PacketQueue() : nsDeque(new OggPacketDeallocator()) {}
|
||||
~PacketQueue() { Erase(); }
|
||||
OggPacketQueue() : nsDeque(new OggPacketDeallocator()) {}
|
||||
~OggPacketQueue() { Erase(); }
|
||||
bool IsEmpty() { return nsDeque::GetSize() == 0; }
|
||||
void Append(ogg_packet* aPacket);
|
||||
ogg_packet* PopFront() { return static_cast<ogg_packet*>(nsDeque::PopFront()); }
|
||||
@ -167,7 +167,7 @@ public:
|
||||
|
||||
// Queue of as yet undecoded packets. Packets are guaranteed to have
|
||||
// a valid granulepos.
|
||||
PacketQueue mPackets;
|
||||
OggPacketQueue mPackets;
|
||||
|
||||
// Is the bitstream active; whether we're decoding and playing this bitstream.
|
||||
bool mActive;
|
||||
|
@ -526,11 +526,11 @@ nsReturnRef<NesteggPacketHolder> WebMReader::NextPacket(TrackType aTrackType)
|
||||
{
|
||||
// The packet queue that packets will be pushed on if they
|
||||
// are not the type we are interested in.
|
||||
PacketQueue& otherPackets =
|
||||
WebMPacketQueue& otherPackets =
|
||||
aTrackType == VIDEO ? mAudioPackets : mVideoPackets;
|
||||
|
||||
// The packet queue for the type that we are interested in.
|
||||
PacketQueue &packets =
|
||||
WebMPacketQueue &packets =
|
||||
aTrackType == VIDEO ? mVideoPackets : mAudioPackets;
|
||||
|
||||
// Flag to indicate that we do need to playback these types of
|
||||
|
@ -62,13 +62,13 @@ class PacketQueueDeallocator : public nsDequeFunctor {
|
||||
// Typesafe queue for holding nestegg packets. It has
|
||||
// ownership of the items in the queue and will free them
|
||||
// when destroyed.
|
||||
class PacketQueue : private nsDeque {
|
||||
class WebMPacketQueue : private nsDeque {
|
||||
public:
|
||||
PacketQueue()
|
||||
WebMPacketQueue()
|
||||
: nsDeque(new PacketQueueDeallocator())
|
||||
{}
|
||||
|
||||
~PacketQueue() {
|
||||
~WebMPacketQueue() {
|
||||
Reset();
|
||||
}
|
||||
|
||||
@ -77,12 +77,12 @@ class PacketQueue : private nsDeque {
|
||||
}
|
||||
|
||||
inline void Push(NesteggPacketHolder* aItem) {
|
||||
NS_ASSERTION(aItem, "NULL pushed to PacketQueue");
|
||||
NS_ASSERTION(aItem, "NULL pushed to WebMPacketQueue");
|
||||
nsDeque::Push(aItem);
|
||||
}
|
||||
|
||||
inline void PushFront(NesteggPacketHolder* aItem) {
|
||||
NS_ASSERTION(aItem, "NULL pushed to PacketQueue");
|
||||
NS_ASSERTION(aItem, "NULL pushed to WebMPacketQueue");
|
||||
nsDeque::PushFront(aItem);
|
||||
}
|
||||
|
||||
@ -199,8 +199,8 @@ private:
|
||||
|
||||
// Queue of video and audio packets that have been read but not decoded. These
|
||||
// must only be accessed from the state machine thread.
|
||||
PacketQueue mVideoPackets;
|
||||
PacketQueue mAudioPackets;
|
||||
WebMPacketQueue mVideoPackets;
|
||||
WebMPacketQueue mAudioPackets;
|
||||
|
||||
// Index of video and audio track to play
|
||||
uint32_t mVideoTrack;
|
||||
|
Loading…
Reference in New Issue
Block a user