Source code: com/siemens/mp/media/Player.java
1 /*
2 * Siemens API for MicroEmulator
3 * Copyright (C) 2003 Markus Heberling <markus@heberling.net>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 package com.siemens.mp.media;
20
21 public interface Player
22 extends Controllable
23 {
24
25 public abstract void realize()
26 throws MediaException;
27
28 public abstract void prefetch()
29 throws MediaException;
30
31 public abstract void start()
32 throws MediaException;
33
34 public abstract void stop()
35 throws MediaException;
36
37 public abstract void deallocate();
38
39 public abstract void close();
40
41 public abstract void setTimeBase(TimeBase timebase)
42 throws MediaException;
43
44 public abstract TimeBase getTimeBase();
45
46 public abstract long setMediaTime(long l)
47 throws MediaException;
48
49 public abstract long getMediaTime();
50
51 public abstract int getState();
52
53 public abstract long getDuration();
54
55 public abstract String getContentType();
56
57 public abstract void setLoopCount(int i);
58
59 public abstract void addPlayerListener(PlayerListener playerlistener);
60
61 public abstract void removePlayerListener(PlayerListener playerlistener);
62
63 public static final int UNREALIZED = 100;
64 public static final int REALIZED = 200;
65 public static final int PREFETCHED = 300;
66 public static final int STARTED = 400;
67 public static final int CLOSED = 0;
68 public static final long TIME_UNKNOWN = -1L;
69 }