Project

General

Profile

Download (1.57 KB) Statistics
| Branch: | Revision:

library / src / main / java / org / distorted / library / EffectQueueOther.java @ 2e18813f

1 b3618cb5 Leszek Koltunski
package org.distorted.library;
2
3
///////////////////////////////////////////////////////////////////////////////////////////////////
4
5 71887484 Leszek Koltunski
class EffectQueueOther extends EffectQueue
6 b3618cb5 Leszek Koltunski
  {
7 71887484 Leszek Koltunski
  private static final int NUM_UNIFORMS = 0;
8
  private static final int INDEX = EffectTypes.OTHER.ordinal();
9 2e18813f Leszek Koltunski
  private String[] mFilename;
10 b3618cb5 Leszek Koltunski
11
///////////////////////////////////////////////////////////////////////////////////////////////////
12
13 d07f2950 Leszek Koltunski
  public EffectQueueOther(DistortedObject obj)
14 b3618cb5 Leszek Koltunski
    {
15 71887484 Leszek Koltunski
    super(obj,NUM_UNIFORMS, INDEX );
16 2e18813f Leszek Koltunski
17
    if( mMax[INDEX]>0 )
18
      {
19
      mFilename= new String[mMax[INDEX]];
20
      }
21 b3618cb5 Leszek Koltunski
    }
22
23
///////////////////////////////////////////////////////////////////////////////////////////////////
24
25 71887484 Leszek Koltunski
  protected void moveEffect(int index)
26 b3618cb5 Leszek Koltunski
    {
27 2e18813f Leszek Koltunski
    mFilename[index] = mFilename[index+1];
28 b3618cb5 Leszek Koltunski
    }
29
30
///////////////////////////////////////////////////////////////////////////////////////////////////
31
32 71887484 Leszek Koltunski
  synchronized void send()
33 b3618cb5 Leszek Koltunski
    {
34 2e18813f Leszek Koltunski
    for(int i=0; i<mNumEffects; i++)
35
      {
36
      if (mType[i] == EffectNames.SAVE_PNG.ordinal() )
37
        {
38
        // TODO: Implement SAVE_PNG HERE
39
        }
40
      else if (mType[i] == EffectNames.SAVE_MP4.ordinal() )
41
        {
42
        // TODO: Implement SAVE_MP4 HERE
43
        }
44
      }
45 b3618cb5 Leszek Koltunski
    }
46
47
///////////////////////////////////////////////////////////////////////////////////////////////////
48
49
  synchronized long add(EffectNames eln, String filename)
50
    {
51 2e18813f Leszek Koltunski
    if( mMax[INDEX]>mNumEffects )
52
      {
53
      mFilename[mNumEffects] = filename;
54
      mInterI[mNumEffects] = null;
55
      mInterP[mNumEffects] = null;
56
57
      return addBase(eln);
58
      }
59
60
    return -1;
61 b3618cb5 Leszek Koltunski
    }
62
  }