@@ -657,40 +657,6 @@ public void setSurface(Surface surface) {
657657 updateSurfaceScreenOn ();
658658 }
659659
660- /**
661- * Sets the {@link SurfaceTexture} to be used as the sink for the
662- * video portion of the media. Either a surface or surface texture
663- * must be set if a video sink is needed. The same surface texture
664- * can be re-set without harm. Setting a surface texture will un-set
665- * any surface that was set via {@link #setDisplay(SurfaceHolder)}.
666- * Not calling this method or {@link #setDisplay(SurfaceHolder)}
667- * when playing back a video will result in only the audio track
668- * being played. Note that if a SurfaceTexture is used, the value
669- * set via setScreenOnWhilePlaying has no effect.
670- *
671- * The timestamps provided by {@link SurfaceTexture#getTimestamp()} for a
672- * SurfaceTexture set as the video sink have an unspecified zero point,
673- * and cannot be directly compared between different media sources or different
674- * instances of the same media source, or across multiple runs of the same
675- * program. The timestamp is normally monotonically increasing and unaffected
676- * by time-of-day adjustments, but is reset when the position is set.
677- */
678- public void setTexture (SurfaceTexture st ) {
679- // TODO: This method should be hidden before it is published and setSurface
680- // should be unhidden and made public instead.
681- if (st != null ) {
682- Surface surface = new Surface (st );
683- setSurface (surface );
684-
685- // It is safe and desired to release the newly created Surface here since the
686- // native code will grab a reference to the underlying ISurfaceTexture. At that
687- // point the Surface we just created is no longer needed.
688- surface .release ();
689- } else {
690- setSurface (null );
691- }
692- }
693-
694660 /**
695661 * Convenience method to create a MediaPlayer for a given Uri.
696662 * On success, {@link #prepare()} will already have been called and must not be called again.
0 commit comments