~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to mpeglib/lib/frame/IOFrameQueue.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  queues frames in a "empty" and "data" queue
 
3
  Copyright (C) 2001  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU Library General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
 
 
15
#ifndef __IOFRAMEQUEUE_H
 
16
#define __IOFRAMEQUEUE_H
 
17
 
 
18
#include "frameQueue.h"
 
19
 
 
20
/**
 
21
   This class can store up to <size> frames.
 
22
   The frames are marked "empty" these frames can be re-used
 
23
   and filled with data.
 
24
   The other queue stores "data" frames. These frames can 
 
25
   be dequeued and then are be passed to the "empty" queue.
 
26
 
 
27
   Note: you need to _fill_ the empty queue with allocated frames,
 
28
         after constructions. The pointers then are owned by this
 
29
         class (== deleted in destructor)
 
30
 
 
31
*/
 
32
 
 
33
class IOFrameQueue {
 
34
 
 
35
 
 
36
 public:
 
37
  IOFrameQueue(int size);
 
38
  ~IOFrameQueue();
 
39
 
 
40
  //
 
41
  // empty queue
 
42
  //
 
43
  int emptyQueueCanRead();
 
44
  int emptyQueueCanWrite();
 
45
 
 
46
 
 
47
  //
 
48
  // data queue
 
49
  //
 
50
  int dataQueueCanRead();
 
51
  int dataQueueCanWrite();
 
52
  
 
53
 
 
54
 protected:
 
55
  FrameQueue* empty;
 
56
  FrameQueue* data;
 
57
 
 
58
};
 
59
#endif