@@ -249,6 +249,29 @@ public function provideSaveData()
249
249
$ format ->expects ($ this ->any ())
250
250
->method ('getPasses ' )
251
251
->will ($ this ->returnValue (2 ));
252
+ $ format ->expects ($ this ->any ())
253
+ ->method ('getAdditionalParameters ' )
254
+ ->will ($ this ->returnValue (array ('foo ' , 'bar ' )));
255
+
256
+ $ format2 = $ this ->getMock ('FFMpeg\Format\VideoInterface ' );
257
+ $ format2 ->expects ($ this ->any ())
258
+ ->method ('getExtraParams ' )
259
+ ->will ($ this ->returnValue (array ()));
260
+ $ format2 ->expects ($ this ->any ())
261
+ ->method ('getKiloBitrate ' )
262
+ ->will ($ this ->returnValue (663 ));
263
+ $ format2 ->expects ($ this ->any ())
264
+ ->method ('getAudioKiloBitrate ' )
265
+ ->will ($ this ->returnValue (92 ));
266
+ $ format2 ->expects ($ this ->any ())
267
+ ->method ('getAudioChannels ' )
268
+ ->will ($ this ->returnValue (2 ));
269
+ $ format2 ->expects ($ this ->any ())
270
+ ->method ('getPasses ' )
271
+ ->will ($ this ->returnValue (2 ));
272
+ $ format2 ->expects ($ this ->any ())
273
+ ->method ('getAdditionalParameters ' )
274
+ ->will ($ this ->returnValue (array ('foo ' , 'bar ' )));
252
275
253
276
$ audioFormat = $ this ->getMock ('FFMpeg\Format\AudioInterface ' );
254
277
$ audioFormat ->expects ($ this ->any ())
@@ -289,6 +312,9 @@ public function provideSaveData()
289
312
$ audioVideoFormat ->expects ($ this ->any ())
290
313
->method ('getPasses ' )
291
314
->will ($ this ->returnValue (2 ));
315
+ $ audioVideoFormat ->expects ($ this ->any ())
316
+ ->method ('getAdditionalParameters ' )
317
+ ->will ($ this ->returnValue (array ()));
292
318
293
319
$ audioVideoFormatSinglePass = $ this ->getMock ('FFMpeg\Format\VideoInterface ' );
294
320
$ audioVideoFormatSinglePass ->expects ($ this ->any ())
@@ -312,6 +338,9 @@ public function provideSaveData()
312
338
$ audioVideoFormatSinglePass ->expects ($ this ->any ())
313
339
->method ('getPasses ' )
314
340
->will ($ this ->returnValue (1 ));
341
+ $ audioVideoFormatSinglePass ->expects ($ this ->any ())
342
+ ->method ('getAdditionalParameters ' )
343
+ ->will ($ this ->returnValue (array ()));
315
344
316
345
$ formatExtra = $ this ->getMock ('FFMpeg\Format\VideoInterface ' );
317
346
$ formatExtra ->expects ($ this ->any ())
@@ -329,6 +358,29 @@ public function provideSaveData()
329
358
$ formatExtra ->expects ($ this ->any ())
330
359
->method ('getPasses ' )
331
360
->will ($ this ->returnValue (2 ));
361
+ $ formatExtra ->expects ($ this ->any ())
362
+ ->method ('getAdditionalParameters ' )
363
+ ->will ($ this ->returnValue (array ()));
364
+
365
+ $ formatExtra2 = $ this ->getMock ('FFMpeg\Format\VideoInterface ' );
366
+ $ formatExtra2 ->expects ($ this ->any ())
367
+ ->method ('getExtraParams ' )
368
+ ->will ($ this ->returnValue (array ('extra ' , 'param ' )));
369
+ $ formatExtra2 ->expects ($ this ->any ())
370
+ ->method ('getKiloBitrate ' )
371
+ ->will ($ this ->returnValue (665 ));
372
+ $ formatExtra2 ->expects ($ this ->any ())
373
+ ->method ('getAudioKiloBitrate ' )
374
+ ->will ($ this ->returnValue (92 ));
375
+ $ formatExtra2 ->expects ($ this ->any ())
376
+ ->method ('getAudioChannels ' )
377
+ ->will ($ this ->returnValue (2 ));
378
+ $ formatExtra2 ->expects ($ this ->any ())
379
+ ->method ('getPasses ' )
380
+ ->will ($ this ->returnValue (2 ));
381
+ $ formatExtra2 ->expects ($ this ->any ())
382
+ ->method ('getAdditionalParameters ' )
383
+ ->will ($ this ->returnValue (array ()));
332
384
333
385
$ listeners = array ($ this ->getMock ('Alchemy\BinaryDriver\Listeners\ListenerInterface ' ));
334
386
@@ -353,6 +405,27 @@ public function provideSaveData()
353
405
->method ('getPasses ' )
354
406
->will ($ this ->returnValue (2 ));
355
407
408
+ $ progressableFormat2 = $ this ->getMockBuilder ('Tests\FFMpeg\Unit\Media\Prog ' )
409
+ ->disableOriginalConstructor ()->getMock ();
410
+ $ progressableFormat2 ->expects ($ this ->any ())
411
+ ->method ('getExtraParams ' )
412
+ ->will ($ this ->returnValue (array ()));
413
+ $ progressableFormat2 ->expects ($ this ->any ())
414
+ ->method ('createProgressListener ' )
415
+ ->will ($ this ->returnValue ($ listeners ));
416
+ $ progressableFormat2 ->expects ($ this ->any ())
417
+ ->method ('getKiloBitrate ' )
418
+ ->will ($ this ->returnValue (666 ));
419
+ $ progressableFormat2 ->expects ($ this ->any ())
420
+ ->method ('getAudioKiloBitrate ' )
421
+ ->will ($ this ->returnValue (92 ));
422
+ $ progressableFormat2 ->expects ($ this ->any ())
423
+ ->method ('getAudioChannels ' )
424
+ ->will ($ this ->returnValue (2 ));
425
+ $ progressableFormat2 ->expects ($ this ->any ())
426
+ ->method ('getPasses ' )
427
+ ->will ($ this ->returnValue (2 ));
428
+
356
429
$ progressableAudioFormat = $ this ->getMockBuilder ('Tests\FFMpeg\Unit\Media\AudioProg ' )
357
430
->disableOriginalConstructor ()->getMock ();
358
431
$ progressableAudioFormat ->expects ($ this ->any ())
@@ -379,14 +452,14 @@ public function provideSaveData()
379
452
'-y ' , '-i ' , __FILE__ , '-b:v ' , '663k ' ,
380
453
'-refs ' , '6 ' , '-coder ' , '1 ' , '-sc_threshold ' , '40 ' , '-flags ' , '+loop ' ,
381
454
'-me_range ' , '16 ' , '-subq ' , '7 ' , '-i_qfactor ' , '0.71 ' , '-qcomp ' , '0.6 ' ,
382
- '-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , ' 2 ' , '-pass ' , ' 1 ' , '-passlogfile ' ,
455
+ '-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , 2 , ' foo ' , 'bar ' , ' -pass ' , 1 , '-passlogfile ' ,
383
456
'/target/file ' ,
384
457
), array (
385
458
'-y ' , '-i ' , __FILE__ ,
386
459
'-b:v ' , '663k ' ,
387
460
'-refs ' , '6 ' , '-coder ' , '1 ' , '-sc_threshold ' , '40 ' , '-flags ' , '+loop ' ,
388
461
'-me_range ' , '16 ' , '-subq ' , '7 ' , '-i_qfactor ' , '0.71 ' , '-qcomp ' , '0.6 ' ,
389
- '-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , ' 2 ' , '-pass ' , ' 2 ' , '-passlogfile ' ,
462
+ '-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , 2 , ' foo ' , 'bar ' , ' -pass ' , 2 , '-passlogfile ' ,
390
463
'/target/file ' ,
391
464
)), null , $ format ),
392
465
array (false , array (array (
@@ -436,17 +509,17 @@ public function provideSaveData()
436
509
'-threads ' , 24 , '-b:v ' , '663k ' ,
437
510
'-refs ' , '6 ' , '-coder ' , '1 ' , '-sc_threshold ' , '40 ' , '-flags ' , '+loop ' ,
438
511
'-me_range ' , '16 ' , '-subq ' , '7 ' , '-i_qfactor ' , '0.71 ' , '-qcomp ' , '0.6 ' ,
439
- '-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , ' 2 ' , '-pass ' , ' 1 ' , '-passlogfile ' ,
512
+ '-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , 2 , ' foo ' , 'bar ' , ' -pass ' , 1 , '-passlogfile ' ,
440
513
'/target/file ' ,
441
514
), array (
442
515
'-y ' , '-i ' , __FILE__ ,
443
516
'-threads ' , 24 ,
444
517
'-b:v ' , '663k ' ,
445
518
'-refs ' , '6 ' , '-coder ' , '1 ' , '-sc_threshold ' , '40 ' , '-flags ' , '+loop ' ,
446
519
'-me_range ' , '16 ' , '-subq ' , '7 ' , '-i_qfactor ' , '0.71 ' , '-qcomp ' , '0.6 ' ,
447
- '-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , ' 2 ' , '-pass ' , ' 2 ' , '-passlogfile ' ,
520
+ '-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , 2 , ' foo ' , 'bar ' , ' -pass ' , 2 , '-passlogfile ' ,
448
521
'/target/file ' ,
449
- )), null , $ format ),
522
+ )), null , $ format2 ),
450
523
array (true , array (array (
451
524
'-y ' , '-i ' , __FILE__ ,
452
525
'extra ' , 'param ' , '-threads ' , 24 , '-b:v ' , '665k ' ,
@@ -461,7 +534,7 @@ public function provideSaveData()
461
534
'-me_range ' , '16 ' , '-subq ' , '7 ' , '-i_qfactor ' , '0.71 ' , '-qcomp ' , '0.6 ' ,
462
535
'-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , '2 ' , '-pass ' , '2 ' , '-passlogfile ' ,
463
536
'/target/file ' ,
464
- )), null , $ formatExtra ),
537
+ )), null , $ formatExtra2 ),
465
538
array (false , array (array (
466
539
'-y ' , '-i ' , __FILE__ , '-b:v ' , '666k ' ,
467
540
'-refs ' , '6 ' , '-coder ' , '1 ' , '-sc_threshold ' , '40 ' , '-flags ' , '+loop ' ,
@@ -475,7 +548,7 @@ public function provideSaveData()
475
548
'-me_range ' , '16 ' , '-subq ' , '7 ' , '-i_qfactor ' , '0.71 ' , '-qcomp ' , '0.6 ' ,
476
549
'-qdiff ' , '4 ' , '-trellis ' , '1 ' , '-b:a ' , '92k ' , '-ac ' , '2 ' , '-pass ' , '2 ' , '-passlogfile ' ,
477
550
'/target/file ' ,
478
- )), $ listeners , $ progressableFormat ),
551
+ )), $ listeners , $ progressableFormat2 ),
479
552
array (true , array (array (
480
553
'-y ' , '-i ' , __FILE__ ,
481
554
'-threads ' , 24 , '-b:v ' , '666k ' ,
0 commit comments