Skip to content

Commit

Permalink
Remove video surface adapter parameter for callback media players
Browse files Browse the repository at this point in the history
It is not used for callback players, only for AWT integration for
video surfaces like Canvas.
  • Loading branch information
caprica committed Jan 26, 2025
1 parent 994bf8a commit 8e4bcf4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public ComponentIdVideoSurface newVideoSurface(long componentId) {
* @return video surface
*/
public CallbackVideoSurface newVideoSurface(BufferFormatCallback bufferFormatCallback, RenderCallback renderCallback, boolean lockBuffers) {
return new CallbackVideoSurface(bufferFormatCallback, renderCallback, lockBuffers, VideoSurfaceAdapters.getVideoSurfaceAdapter());
return new CallbackVideoSurface(bufferFormatCallback, renderCallback, lockBuffers);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ public class CallbackVideoSurface extends VideoSurface {
* @param bufferFormatCallback callback providing the video buffer format
* @param renderCallback callback used to render the video frame buffer
* @param lockBuffers <code>true</code> if the video buffer should be locked; <code>false</code> if not
* @param videoSurfaceAdapter adapter to attach a video surface to a native media player
*/
public CallbackVideoSurface(BufferFormatCallback bufferFormatCallback, RenderCallback renderCallback, boolean lockBuffers, VideoSurfaceAdapter videoSurfaceAdapter) {
super(videoSurfaceAdapter);
public CallbackVideoSurface(BufferFormatCallback bufferFormatCallback, RenderCallback renderCallback, boolean lockBuffers) {
super(null);

this.bufferFormatCallback = bufferFormatCallback;
this.renderCallback = renderCallback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ public abstract class VideoSurface {

/**
* Operating System specific video surface adapter implementation.
* <p>
* May be <pre>null</pre>, e.g. for "callback" media players.
*/
protected final VideoSurfaceAdapter videoSurfaceAdapter;

/**
* Create a new video surface wrapper.
*
* @param videoSurfaceAdapter video surface adapter implementation
* @param videoSurfaceAdapter video surface adapter implementation, may be <pre>null</pre>
*/
protected VideoSurface(VideoSurfaceAdapter videoSurfaceAdapter) {
this.videoSurfaceAdapter = videoSurfaceAdapter;
Expand Down

0 comments on commit 8e4bcf4

Please sign in to comment.