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

« back to all changes in this revision

Viewing changes to mpeglib/lib/util/render/pictureArray.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
  nice try of an X11 output plugin
 
3
  Copyright (C) 1999  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 __VIDEOOUTPUTX11_H
 
16
#define __VIDEOOUTPUTX11_H
 
17
 
 
18
 
 
19
#include "yuvPicture.h"
 
20
#include <stdlib.h>
 
21
 
 
22
#define _PICTURE_ARRAY_SIZE     5
 
23
 
 
24
class PictureArray {
 
25
 
 
26
  class YUVPicture* pictureArray[_PICTURE_ARRAY_SIZE];
 
27
 
 
28
  class YUVPicture* past;                /* Past predictive frame.     */
 
29
  class YUVPicture* future;              /* Future predictive frame.   */
 
30
  class YUVPicture* current;             /* Current frame.             */
 
31
  
 
32
  double picPerSec;
 
33
  int width;
 
34
  int heigth;
 
35
 
 
36
  int imageType;
 
37
 
 
38
 public:
 
39
  PictureArray(int width, int height);
 
40
  ~PictureArray();
 
41
 
 
42
  inline YUVPicture* getPast() {return past;}
 
43
  inline YUVPicture* getFuture() {return future;}
 
44
  inline YUVPicture* getCurrent() {return current;}
 
45
 
 
46
 
 
47
  inline void setPast(YUVPicture* pic) {past=pic;}
 
48
  inline void setFuture(YUVPicture* pic) {future=pic;}
 
49
  inline void setCurrent(YUVPicture* pic) {current=pic;}
 
50
  inline int getWidth()      { return width; }
 
51
  inline int getWidth_Half() { return width/2; }
 
52
  
 
53
  // attention with these!
 
54
  // these are shares pointer
 
55
  // only call after mpegVidRsrc and then set them back to NULL
 
56
  YUVPicture* getYUVPictureCallback();
 
57
  void setYUVPictureCallback(YUVPicture* pic);
 
58
 
 
59
 
 
60
  void forward();
 
61
 
 
62
  void setPicturePerSecond(double val);
 
63
  double getPicturePerSecond();
 
64
 
 
65
  // use these to swap the yuv Mode
 
66
  inline int getImageType()           { return imageType; }
 
67
  void setImageType(int mode);
 
68
 
 
69
 
 
70
 private:
 
71
  YUVPicture* pictureCallback;
 
72
 
 
73
 
 
74
};
 
75
#endif
 
76