문제

I'm having great difficulty getting my Android application to play videos from the SD card. It doesn't matter what size, bitrate, video format, or any other setting I can think of, neither the emulator nor my G1 will play anything I try to encode. I've also tried a number of videos from the web (various video formats, bitrates, with and without audio tracks, etc.), and none of those work either.

All I keep getting is a dialog box that says:

"Cannot play video"

"Sorry, this video cannot be played."

There are errors reported in LogCat, but I don't understand them and I've tried searching the Internet for further explanations without any luck. See below:

03-30 05:34:26.807: ERROR/QCOmxcore(51): OMXCORE API :  Free Handle 390d4
03-30 05:34:26.817: ERROR/QCOmxcore(51):  Unloading the dynamic library for OMX.qcom.video.decoder.avc
03-30 05:34:26.817: ERROR/PlayerDriver(51): Command PLAYER_PREPARE completed with an error or info PVMFErrNoResources
03-30 05:34:26.857: ERROR/MediaPlayer(14744): error (1, -15)03-30 05:34:26.867: ERROR/MediaPlayer(14744): Error (1,-15)

Sometimes I also get this:

03-30 05:49:49.267: ERROR/PlayerDriver(51): Command PLAYER_INIT completed with an error or info PVMFErrResource
03-30 05:49:49.267: ERROR/MediaPlayer(19049): error (1, -17)
03-30 05:49:49.347: ERROR/MediaPlayer(19049): Error (1,-17)

Here is the code I'm using (in my onCreate() method):

this.setContentView(R.layout.main);
//just a simple VideoView loading files from the SD card
VideoView myIntroView = (VideoView) this.findViewById(R.id.VideoView01);
MediaController mc = new MediaController(this);
myIntroView.setMediaController(mc);
myIntroView.setVideoPath("/sdcard/test.mp4");
myIntroView.requestFocus();
myIntroView.start();

Please help!

도움이 되었습니까?

해결책

S2S의 TokenHelper 메소드는 system.security.principal.windowsIdentity 유형의 매개 변수가 있습니다.신원을 전달하면 요청이 실행되도록 원할 수 있습니다.NULL을 전달하면 응용 프로그램 전용 요청입니다.

다른 팁

I have had quite a bit of trouble getting many different videos to play on my phone (HTC hero). Standard 512K mp4's play (example: http://www.archive.org/details/more_animation), check with them first to make sure it's not your code.

Here's my code, from onCreate() in a sub-activity which only plays the video file:




    protected VideoView mine;
    protected boolean done = false;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.videoshow);  
        mine = (VideoView) findViewById(R.id.video);   // Save the VideoView for touch event processing 
        try {
            String myURI = "/sdcard/" + path + "/v/" 
                          + currentItem.getFile() 
                          + "." + currentItem.getFileType();
            Uri video = Uri.parse(myURI); 
            mine.setVideoURI(video);
            mine.start();
            mine.setOnCompletionListener(new OnCompletionListener() {

                public void onCompletion(MediaPlayer mp) {  
                    result.putExtra("com.ejf.convincer01.Finished", true);
                    done = true;
                }
            });
        } catch (Exception ex) {
            Log.d(DEBUG_TAG, "Video failed: '" + ex + "'" );
        }

SharePoint Search가 사용자가 액세스 할 수있는 "STUMP"에 대한 결과 만 표시됩니다.따라서 문제를 해결하려면 웹 응용 프로그램 및 콘텐츠가 포함 된 사이트 모음의 보안을 수정해야합니다.보안을 수정 한 후에는 콘텐츠의 완전한 크롤링을 예리하게해야합니다.

각 웹 응용 프로그램, 인트라넷, 기업, 판매에 대해 3 개의 시작 주소가 있어야합니다. 사용자 프로필 서비스가 구현 된 경우 SPS3 : //로 시작하는 4 번째 시작 주소가 있어야합니다.

SSA (Search Service Application)는 웹 응용 프로그램에 구성된 기본 리더 계정이 있어야합니다. 이는 관리자 계정이 아니어야합니다.사용자가 구성 마법사를 사용자가 SSA를 빌드하는 경우 너무 많은 전원이있는 계정이 가능합니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top