Theora Playback Library  1.1.0
TheoraFrameQueue.h
Go to the documentation of this file.
1 /************************************************************************************
2 This source file is part of the Theora Video Playback Library
3 For latest info, see http://libtheoraplayer.googlecode.com
4 *************************************************************************************
5 Copyright (c) 2008-2014 Kresimir Spes (kspes@cateia.com)
6 This program is free software; you can redistribute it and/or modify it under
7 the terms of the BSD license: http://opensource.org/licenses/BSD-3-Clause
8 *************************************************************************************/
9 
10 #ifndef _TheoraFrameQueue_h
11 #define _TheoraFrameQueue_h
12 
13 #include "TheoraAsync.h"
14 #include <list>
15 #include "TheoraExport.h"
16 
17 class TheoraVideoFrame;
18 class TheoraVideoClip;
19 
25 {
26 protected:
27  std::list<TheoraVideoFrame*> mQueue;
30 
32  TheoraVideoFrame* createFrameInstance(TheoraVideoClip* clip);
33 public:
36 
43  TheoraVideoFrame* getFirstAvailableFrame();
45  TheoraVideoFrame* _getFirstAvailableFrame();
46 
48  int getUsedCount();
49 
51  int getReadyCount();
53  int _getReadyCount();
54 
64  void pop(int n = 1);
65 
67  void _pop(int n);
68 
70  void clear();
72  TheoraVideoFrame* requestEmptyFrame();
73 
79  void setSize(int n);
81  int getSize();
82 
84  bool isFull();
85 
86  TheoraMutex* getMutex() { return &mMutex; }
87 
89  std::list<TheoraVideoFrame*>& _getFrameQueue();
90 };
91 
92 #endif
TheoraMutex * getMutex()
Definition: TheoraFrameQueue.h:86
Definition: TheoraAsync.h:18
Definition: TheoraVideoFrame.h:19
TheoraVideoClip * mParent
Definition: TheoraFrameQueue.h:28
Definition: TheoraVideoClip.h:61
#define TheoraPlayerExport
Definition: TheoraExport.h:25
TheoraMutex mMutex
Definition: TheoraFrameQueue.h:29
Definition: TheoraFrameQueue.h:24
std::list< TheoraVideoFrame * > mQueue
Definition: TheoraFrameQueue.h:27