01: /*
02: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License version
07: * 2 only, as published by the Free Software Foundation.
08: *
09: * This program is distributed in the hope that it will be useful, but
10: * WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * General Public License version 2 for more details (a copy is
13: * included at /legal/license.txt).
14: *
15: * You should have received a copy of the GNU General Public License
16: * version 2 along with this work; if not, write to the Free Software
17: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18: * 02110-1301 USA
19: *
20: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
21: * Clara, CA 95054 or visit www.sun.com if you need additional
22: * information or have any questions.
23: */
24: package javax.microedition.media;
25:
26: import java.io.IOException;
27:
28: /**
29: * This class is defined by the JSR-135 specification
30: * <em>Mobile Media API,
31: * Version 1.2.</em>
32: */
33: // JAVADOC COMMENT ELIDED
34:
35: public interface Player extends Controllable {
36:
37: // JAVADOC COMMENT ELIDED
38: static final int UNREALIZED = 100;
39:
40: // JAVADOC COMMENT ELIDED
41: static final int REALIZED = 200;
42:
43: // JAVADOC COMMENT ELIDED
44: static final int PREFETCHED = 300;
45:
46: // JAVADOC COMMENT ELIDED
47: static final int STARTED = 400;
48:
49: // JAVADOC COMMENT ELIDED
50: static final int CLOSED = 0;
51:
52: // JAVADOC COMMENT ELIDED
53: static final long TIME_UNKNOWN = -1;
54:
55: // JAVADOC COMMENT ELIDED
56: void realize() throws MediaException;
57:
58: // JAVADOC COMMENT ELIDED
59: void prefetch() throws MediaException;
60:
61: // JAVADOC COMMENT ELIDED
62: void start() throws MediaException;
63:
64: // JAVADOC COMMENT ELIDED
65: void stop() throws MediaException;
66:
67: // JAVADOC COMMENT ELIDED
68: void deallocate();
69:
70: // JAVADOC COMMENT ELIDED
71: void close();
72:
73: // JAVADOC COMMENT ELIDED
74: long setMediaTime(long now) throws MediaException;
75:
76: // JAVADOC COMMENT ELIDED
77: long getMediaTime();
78:
79: // JAVADOC COMMENT ELIDED
80: int getState();
81:
82: // JAVADOC COMMENT ELIDED
83: long getDuration();
84:
85: // JAVADOC COMMENT ELIDED
86: String getContentType();
87:
88: // JAVADOC COMMENT ELIDED
89: void setLoopCount(int count);
90:
91: // JAVADOC COMMENT ELIDED
92: void addPlayerListener(PlayerListener playerListener);
93:
94: // JAVADOC COMMENT ELIDED
95: void removePlayerListener(PlayerListener playerListener);
96: }
|