2 * PROJECT: NyARToolkit JMF utilities.
\r
3 * --------------------------------------------------------------------------------
\r
5 * Copyright (c) 2008 nyatla
\r
6 * airmail(at)ebony.plala.or.jp
\r
7 * http://nyatla.jp/nyartoolkit/
\r
9 * Permission is hereby granted, free of charge, to any person obtaining a copy
\r
10 * of this software and associated documentation files (the "Software"), to deal
\r
11 * in the Software without restriction, including without limitation the rights
\r
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
\r
13 * copies of the Software, and to permit persons to whom the Software is
\r
14 * furnished to do so, subject to the following conditions:
\r
15 * The above copyright notice and this permission notice shall be included in
\r
16 * all copies or substantial portions of the Software.
\r
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
\r
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\r
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
\r
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
\r
27 package jp.nyatla.nyartoolkit.jmf.utils;
\r
29 import jp.nyatla.nyartoolkit.core.rasterreader.INyARBufferReader;
\r
30 import jp.nyatla.nyartoolkit.core.rasterreader.INyARRgbPixelReader;
\r
31 import jp.nyatla.nyartoolkit.core.types.NyARIntSize;
\r
33 public abstract class NyARBufferReader_Reader implements INyARRgbPixelReader,INyARBufferReader
\r
35 protected byte[] _ref_buf;
\r
36 protected NyARIntSize _ref_size;
\r
37 protected int _buf_type;
\r
38 protected NyARBufferReader_Reader(NyARIntSize i_ref_size,int i_buf_type)
\r
40 this._ref_size =i_ref_size;
\r
41 this._buf_type=i_buf_type;
\r
44 protected NyARBufferReader_Reader(NyARIntSize i_ref_size)
\r
46 this._ref_size =i_ref_size;
\r
49 final public Object getBuffer()
\r
51 return this._ref_buf;
\r
53 final public int getBufferType()
\r
55 return this._buf_type;
\r
57 final public boolean isEqualBufferType(int i_type_value)
\r
59 return this._buf_type==i_type_value;
\r
61 public abstract void changeBuffer(javax.media.Buffer i_buffer);
\r