随笔分类 - android多媒体部分
摘要:/*** 调用系统视频录制** @time 下午05:15:41* @author retacn yue* @Email zhenhuayue@sina.com*/@SuppressWarnings("unused")public class VideoCaptureActivity extends Activity implements OnClickListener {private static final int VIDEO_CAPTURE = 0;Button btn_play, btn_capture;VideoView videoView;private Ur
        阅读全文
            
摘要:/*** 网络视频播放** openCore** stagefright** @time 下午05:15:41* @author retacn yue* @Email zhenhuayue@sina.com*/@SuppressWarnings("unused")public class StreamVideoActivity extends Activity implements //SurfaceHolder.Callback, //OnErrorListener,//OnCompletionListener,//OnInfoListener,//OnPreparedL
        阅读全文
            
摘要:/*** mediaStore检索视频** @time 下午05:15:41* @author retacn yue* @Email zhenhuayue@sina.com*/public class VideoGalleyActivity extends Activity implements OnClickListener, OnItemClickListener {private ListView listView;private Cursor cursor;/*** 视频文件信息*/class VideoViewInfo {String filePath;String mimeType
        阅读全文
            
摘要:/**** 自定义播放器** @time 下午05:15:41* @author retacn yue* @Email zhenhuayue@sina.com*/public class CustomVidoePlayActivity extends Activity implements Callback,//OnCompletionListener,//OnErrorListener, //OnInfoListener, //OnPreparedListener, //OnSeekCompleteListener,//OnVideoSizeChangedListener,//MediaPl
        阅读全文
            
摘要:/*** 简单播放** @time 下午05:15:41* @author retacn yue* @Email zhenhuayue@sina.com*/public class VideoViewDemoActivity extends Activity implements OnClickListener, MediaPlayerControl {private VideoView videoView;@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);s
        阅读全文
            
摘要:/*** 可视化频率** @time 下午12:00:21* @author retacn yue* @Email zhenhuayue@sina.com*/public class AudioProcessingActivity extends Activity implements OnClickListener {private Button btn_start_stop;private ImageView img_frequency;private Bitmap bitmap;private Canvas canvas;private Paint paint;private Audio
        阅读全文
            
摘要:/*** 数字音频合成** @time 下午12:00:21* @author retacn yue* @Email zhenhuayue@sina.com*/public class Audio_synthesisActivity extends Activity implements OnClickListener {private Button btn_start, btn_stop;private boolean keepGoing = false;private AudioSynthesisTask synthesisTask;@Overridepublic void onCreat
        阅读全文
            
摘要:/*** 原始音频的播放和录制** audio** audioTrack*** @time 下午12:58:03* @author retacn yue* @Email zhenhuayue@sina.com*/@SuppressWarnings("static-access")public class AltAudioRecorderActivity extends Activity implements OnCompletionListener, OnClickListener {private Button btn_stop_play, btn_start_play,
        阅读全文
            
摘要:/*** 自定义捕获音频** @time 下午12:58:03* @author retacn yue* @Email zhenhuayue@sina.com*/@SuppressWarnings("unused")public class CustomRecorderActivity extends Activity implements OnCompletionListener, OnClickListener {private Button btn_finish, btn_play, btn_start_record, btn_stop_record;private 
        阅读全文
            
摘要:/**** 使用意图捕获音频** @time 下午12:58:03* @author retacn yue* @Email zhenhuayue@sina.com*/public class MediaRecorderDemoActivity extends Activity implements OnCompletionListener, OnClickListener {private static final int RECORD_REQUEST = 0;private Button btn_play, btn_record;private Uri audioFileUri;@Overr
        阅读全文
            
摘要:/*** 打开内置音乐播放器*/private void getAudio() {Intent intent = new Intent(Intent.ACTION_VIEW);File sdcard = Environment.getExternalStorageDirectory();File audioFile = new File(sdcard.getPath() + "/music/young_for_you.mp3");intent.setDataAndType(Uri.fromFile(audioFile), "audio/mp3");sta
        阅读全文
            
摘要:/*** 图像的缩放和旋转 Matrix** 1 0 0 x=1x+0y+0z** 0 1 0 y=0x+1y+0z** 0 0 1 z=0x+0y+1z*******/private void matrixTest() {Matrix matrix = new Matrix();matrix.setValues(new float[] { //1, 0, 0,//0, 1, 0,//0, 0, 1 });//// Matrix类的常用方法:旋转// matrix.setRotate(15);// 根据图片中心点进行旋转matrix.setRotate(15, bitmap.getWidth(
        阅读全文
            
摘要:/*** 图像合成** @time 下午06:21:22* @author retacn yue* @Email zhenhuayue@sina.com*/public class ChosePictureCompositeActivity extends Activity implements OnClickListener {public static final int PICKED_ONE = 0;public static final int PICKED_TWO = 1;private Button btn_choose_picture1;private Button btn_ch
        阅读全文
            
摘要:实现SurfaceHolder.Callback ,PictureCallback接口 预览service /*** 实例化按件*/private void findView() {cameraView = (SurfaceView) this.findViewById(R.id.sfv_camera_view);cameraView.setFocusable(true);cameraView.setFocusableInTouchMode(true);cameraView.setClickable(true);cameraView.setOnClickListener(this)...
        阅读全文
            
摘要:1 使用内置的camera应用程序捕获图像 /*** 拍摄一张照片保存到sd卡上*/private void takeAndSaveImage() {// 取得路径imageFilePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/myfavoritepicture.jpg";Log.i("tag", "sd card path:" + imageFilePath);File imageFile = new File(imageFilePath
        阅读全文
            
 
                     
                    
                 
                    
                 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号