javauis/mmapi_akn/baseline/javasrc/com/nokia/microedition/media/PlayerBase.java
branchRCL_3
changeset 19 71c436fe3ce0
parent 14 04becd199f91
equal deleted inserted replaced
18:9ac0a0a7da70 19:71c436fe3ce0
   122 
   122 
   123     /**
   123     /**
   124      * From Player
   124      * From Player
   125      * @see Player
   125      * @see Player
   126      */
   126      */
   127     public void realize() throws MediaException
   127     synchronized public void realize() throws MediaException
   128     {
   128     {
   129         closeCheck();
   129         closeCheck();
   130         int state = getState();
   130         int state = getState();
   131 
   131 
   132         // If realize is called when the Player is in the
   132         // If realize is called when the Player is in the
   147 
   147 
   148     /**
   148     /**
   149      * From Player
   149      * From Player
   150      * @see Player
   150      * @see Player
   151      */
   151      */
   152     public void prefetch() throws MediaException
   152     synchronized public void prefetch() throws MediaException
   153     {
   153     {
   154         realize();
   154         realize();
   155 
   155 
   156         // prefetch must be ignored in other states
   156         // prefetch must be ignored in other states
   157         if (getState() == REALIZED)
   157         if (getState() == REALIZED)
   168 
   168 
   169     /**
   169     /**
   170      * interface Player
   170      * interface Player
   171      * @see Player
   171      * @see Player
   172      */
   172      */
   173     public void deallocate()
   173     synchronized public void deallocate()
   174     {
   174     {
   175         try
   175         try
   176         {
   176         {
   177             stop();
   177             stop();
   178         }
   178         }
   195 
   195 
   196     /**
   196     /**
   197      * interface Player
   197      * interface Player
   198      * @see Player
   198      * @see Player
   199      */
   199      */
   200     public void stop() throws MediaException
   200     synchronized public void stop() throws MediaException
   201     {
   201     {
   202         closeCheck();
   202         closeCheck();
   203         if (getState() == STARTED)
   203         if (getState() == STARTED)
   204         {
   204         {
   205             doStop();
   205             doStop();
   213 
   213 
   214     /**
   214     /**
   215      * interface Player
   215      * interface Player
   216      * @see Player
   216      * @see Player
   217      */
   217      */
   218     public void close()
   218     synchronized public void close()
   219     {
   219     {
   220         /*
   220         /*
   221         Releases all resources and cease all activity.
   221         Releases all resources and cease all activity.
   222         The close method indicates that the Player will no
   222         The close method indicates that the Player will no
   223         longer be used and can shut itself down.
   223         longer be used and can shut itself down.