关键词不能为空

当前您在: 主页 > 英语 >

processing 多个视频播放

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-28 11:32
tags:

-

2021年2月28日发(作者:bonanza)


processing


制作循环播放视频问题




来自


:


c olour-4


(


[器味



生活设计]


)


2012-04-03 09:46:51



我想问可否用


pr ocessing


实现一个功能,







< /p>


1.


轮流,循环播放


5

< br>段电影(编号


1



2

< p>


3



4



5


)。全屏,无需鼠标键盘交互。

< br>







2.


播放 每段影片开始时候,向串口发送当前电影编号字符(


1



2



3


< p>
4



5


)。即比如某时刻 开


始播放影片


1


,则发串口文字


“1”








3.


五段视频播放完毕,有一个短暂间隔。





第一个点是重点,后面两个希望有 空也帮忙解决一下。因为涉及到毕业创作,所以比较赶,要是


能帮我解决万分感激啊


~




import .*;


String PATH =


Movie mov;


Movie mov1;


Movie mov2;


Movie mov3;


int newFrame = 0;


int movFrameRate = 30;


boolean speedSet = false;


boolean once = true;


boolean ismov=false;


boolean ismov1 =false;


boolean ismov2 =false;


boolean ismov3 =false;


boolean isPlaying;


boolean isLooping;


void setup() {




size(640, 360);




background(0);




// Load and set the video to play. Setting the video





// in play mode is needed so at least one frame is read




// and we can get duration, size and other information from




// the video stream.



//



frameRate(25);


// mov = new Movie(this, PA


TH);


//();


// (5);


// (0);




mov = new Movie(this,



// ();




mov1 = new Movie(this,



// ();




mov2 = new Movie(this,




//();




mov3 = new Movie(this,


//



();





}



void movieEvent(Movie m) {



();



// if (speedSet == true) {



//




speedSet = false;



// }


}



void draw() {




background(0);




if(ismov==true){




image(mov, 0, 0, width, height);}






if(ismov1==true){




image(mov1, 0, 0, width, height);}






if(ismov2==true){




image(mov2, 0, 0, width, height);}






if(ismov3==true){




image(mov3, 0, 0, width, height);}







fill(255);




text(getFrame() +


}


void Rverse(Movie movie)


{




if (speedSet == false && once == true) {






// Setting the speed should be done only once,






// this is the reason for the if statement.






speedSet = true;






once = false;






(on());






// -1 means backward playback at normal speed.






(-1.0);






// Setting to play again, since the movie stop






// playback once it reached the end.






();




}



}


void moviespeed(Movie movie)


{




float newSpeed = map(mouseX, 0, width, 0.1, 2);




(newSpeed);







fill(255);




text(nfc(newSpeed, 2) +



}


void moviescratch(Movie movie)


{



if (ble()) {






();






// A new time position is calculated using the current mouse location:






float f = map(mouseX, 0, width, 0, 1);






float t = on() * f;






();






(t);






();




}




}


void movieplay(Movie movie)


{




// Pausing the video at the first frame.





();



// (0);



// ();


}


void movieloop(Movie movie)


{


();


}


void moviestop(Movie movie)


{


();


}



void keyPressed() {



// if (key == CODED) {

-


-


-


-


-


-


-


-



本文更新与2021-02-28 11:32,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/680717.html

processing 多个视频播放的相关文章