[Android] Supporting cropping in the androidsurface video output
XilasZ
xilasz at gmail.com
Tue Jul 30 19:58:07 CEST 2013
> The code in VideoPlayerActivity already has some kind of support for
> cropping, but it's only used to crop off the extra alignment at the right
> hand side of the picture. I've tried to extend this to support arbitrary
> cropping as well. This requires changing the IVideoPlayer interface though,
> which would be a breaking API change for anybody using the java libvlc APIs
> - is this acceptable do you think?
>
For me it's not an issue, it's not the first time we extend this.
> This is fixed by two patches, one for vlc.git and one for the vlc-android
> repo. For the vlc.git one, I'm not sure if the handling of
> VOUT_DISPLAY_CHANGE_SOURCE_CROP is totally correct - someone who knows the
> vlc structure better than me can hopefully comment and see if I'm doing it
> totally wrong or if it's ok.
I don't know much about the video core, but it's working fine again with
your patches after adding one missing change :
@@ -844,7 +844,7 @@ public class VideoPlayerActivity extends Activity
implements IVideoPlayer {
dw = (int) (dh * ar);
break;
case SURFACE_ORIGINAL:
- dh = mVideoHeight;
+ dh = mVideoVisibleHeight;
dw = (int) vw;
break;
}
Now we have to handle this crop in thumbnail.c too :p
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/private/android/attachments/20130730/da25289f/attachment.html>
More information about the Android
mailing list