summaryrefslogtreecommitdiffstats
path: root/mpeglib/lib/util/render/pictureArray.h
blob: 6a7e731ce66e6e1468d97542fdf8516b0f6d60df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
  nice try of an X11 output plugin
  Copyright (C) 1999  Martin Vogt

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU Library General Public License as published by
  the Free Software Foundation.

  For more information look at the file COPYRIGHT in this package

 */



#ifndef __VIDEOOUTPUTX11_H
#define __VIDEOOUTPUTX11_H


#include "yuvPicture.h"
#include <stdlib.h>

#define _PICTURE_ARRAY_SIZE     5

class PictureArray {

  class YUVPicture* pictureArray[_PICTURE_ARRAY_SIZE];

  class YUVPicture* past;                /* Past predictive frame.     */
  class YUVPicture* future;              /* Future predictive frame.   */
  class YUVPicture* current;             /* Current frame.             */
  
  double picPerSec;
  int width;
  int height;

  int imageType;

 public:
  PictureArray(int width, int height);
  ~PictureArray();

  inline YUVPicture* getPast() {return past;}
  inline YUVPicture* getFuture() {return future;}
  inline YUVPicture* getCurrent() {return current;}


  inline void setPast(YUVPicture* pic) {past=pic;}
  inline void setFuture(YUVPicture* pic) {future=pic;}
  inline void setCurrent(YUVPicture* pic) {current=pic;}
  inline int getWidth()      { return width; }
  inline int getWidth_Half() { return width/2; }
  
  // attention with these!
  // these are shares pointer
  // only call after mpegVidRsrc and then set them back to NULL
  YUVPicture* getYUVPictureCallback();
  void setYUVPictureCallback(YUVPicture* pic);


  void forward();

  void setPicturePerSecond(double val);
  double getPicturePerSecond();

  // use these to swap the yuv Mode
  inline int getImageType()           { return imageType; }
  void setImageType(int mode);


 private:
  YUVPicture* pictureCallback;


};
#endif