Skip to content

MediaPlayer: add method getVideoSize()

XuanTung95 requested to merge XuanTung95/vlc-android:master into master

Description

  • This request add method getVideoSize() for MediaPlayer.
  • This method call native function libvlc_video_get_size().

Motivation and Context

This change allows users to get the video size at runtime using native get size function.

How Has This Been Tested?

  • Build libvlc-all successfully.
  • Added to maven local and used in Android app.
  • Tested with .m3u8 and flv stream: getVideoSize() return correct result.
  • If specified video does not exist, return NULL instead of int[]

Screenshots / GIFs (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking change which cleans up / improves existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the CONTRIBUTING section of the README document.

Resolves

Fixes: #2457 (closed)

Edited by XuanTung95

Merge request reports