package com.app.broadcastvideo_115;

import java.io.File;

import android.content.Context;
import android.media.MediaRecorder;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

public class BroadcastPreview extends SurfaceView implements SurfaceHolder.Callback{
	public static final String TAG = "BroadcastPreview";
	//MediaRecorder recorder;
    SurfaceHolder holder;
   
//	static final String SAMPLE_PREFIX = "recording_mp4";
//	static final String SAMPLE_EXTENSION = ".3gp"; 
	
	public BroadcastPreview(Context context) {
		super(context);
        holder = getHolder();
        holder.addCallback(this);
        holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        /**
        recorder = new MediaRecorder();
        recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
        recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
        recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
        recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
        
        */
        
	}

	
	public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) {
		
	}

	
	public void surfaceCreated(SurfaceHolder arg0) {
		
		
	}
	
	
	public void surfaceDestroyed(SurfaceHolder holder) {
		
	}
	
	/**
	public MediaRecorder getRecorder() {
        return recorder;
   }
   */ 
}
