MediaMetadataRetriever 사용하기
출처: http://kanirody.blogspot.kr/2015/07/sd-card-video-file-bitmap.html SD card에 있는 video file 을 Bitmap 으로 추출하기(MediaMetadataRetriever사용하기) 프로젝트 진행 도중에 sdcard에 저장되어있는 mp4 file 을 불러와서 Bitmap으로 추출해야하는 작업이 필요했다. 소스를 분석하기에 앞서 MediaMetadataRetriever에 대해서 알 필요가 있다고 생각하여 간단히 설명하려한다. 말그대로 media의 metadata를 가져올수 있는 class이다. google 공식 api에서는 MediaMetadataRetriever extends Object java.lang.Object ↳ android.media.MediaMetadataRetriever Class Overview MediaMetadataRetriever class provides a unified interface for retrieving frame and meta data from an input media file. MediaMetadataRetriever 클래스는 입력 된 미디어 파일로부터 프레임 메타 데이터를 검색하기위한 통일 된 인터페이스를 제공한다. 라고 설명하고 있다. 이제소스를 보자 import android.app.Activity; import android.graphics.Bitmap; import android.media.MediaMetadataRetriever; import android.media.MediaPlayer; import android.net.Uri; import android.os.Bundle; import android.os.Environment; ...
댓글
댓글 쓰기