Removes kStateFree and kStateDecoding, added a free_frames_ list which simplifies finding a free frame.

The idea is to have all frames not in use be stored in free_frames_, and whenever a packet from a new frame arrives we can just pop a frame from free_frames_. When a frame is grabbed for decoding it will be removed from all lists, and will be added to free_frames_ when it's returned to the jitter buffer.

We should be able to remove the state enum completely later, as their state is defined by the list they are in. But I'll keep it around for now to simplify the cl.

TEST=try bots and vie_auto_test --automated
R=mikhal@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1721004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4273 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org
2013-06-27 15:20:14 +00:00
parent 7bcc7e3b43
commit 4cf1a8af69
8 changed files with 161 additions and 257 deletions

View File

@ -40,7 +40,7 @@ public:
VCMFrameBufferStateEnum GetState() const;
// Get current state and timestamp of frame
VCMFrameBufferStateEnum GetState(uint32_t& timeStamp) const;
void SetState(VCMFrameBufferStateEnum state); // Set state of frame
void PrepareForDecode(bool continuous);
bool IsRetransmitted() const;
bool IsSessionComplete() const;
@ -83,11 +83,9 @@ public:
// them.
int NotDecodablePackets() const;
protected:
void RestructureFrameInformation();
void PrepareForDecode();
private:
void SetState(VCMFrameBufferStateEnum state); // Set state of frame
VCMFrameBufferStateEnum _state; // Current state of the frame
bool _frameCounted; // Was this frame counted by JB?
VCMSessionInfo _sessionInfo;