.. | .. |
---|
397 | 397 | int CameraStream::initialize(uint32_t width, |
---|
398 | 398 | uint32_t height, |
---|
399 | 399 | int format, |
---|
400 | | - uint32_t usage) { |
---|
| 400 | + uint32_t usage, |
---|
| 401 | + bool mergeStreamFlag) { |
---|
401 | 402 | int res = -1; |
---|
402 | 403 | HAL_LOGD("%s: %d x %d, format:%d(%s), usage:%d.", |
---|
403 | 404 | mStreamType.c_str(), |
---|
.. | .. |
---|
407 | 408 | getHalPixelFormatString(format).c_str(), |
---|
408 | 409 | usage); |
---|
409 | 410 | |
---|
410 | | - res = stream_->SetParm(V4L2_MODE_VIDEO); |
---|
| 411 | + res = stream_->SetParm(V4L2_MODE_VIDEO, width, height); |
---|
411 | 412 | if (res) { |
---|
412 | 413 | HAL_LOGE("%s: Failed to SetParm.", mStreamType.c_str()); |
---|
413 | 414 | } |
---|
.. | .. |
---|
417 | 418 | format = HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED; |
---|
418 | 419 | } |
---|
419 | 420 | StreamFormat stream_format(format, width, height); |
---|
420 | | - res = stream_->SetFormat(stream_format, &max_buffers); |
---|
| 421 | + res = stream_->SetFormat(stream_format, &max_buffers, mergeStreamFlag); |
---|
421 | 422 | if (res) { |
---|
422 | 423 | HAL_LOGE("%s: Failed to set stream to correct format for stream: %d.", |
---|
423 | 424 | mStreamType.c_str(), res); |
---|
.. | .. |
---|
543 | 544 | |
---|
544 | 545 | int CameraMainStream::initialize(uint32_t width, |
---|
545 | 546 | uint32_t height, |
---|
546 | | - int format, |
---|
547 | | - uint32_t usage) { |
---|
548 | | - return CameraStream::initialize(width, height, format, usage); |
---|
| 547 | + int format, |
---|
| 548 | + uint32_t usage, |
---|
| 549 | + bool mergeStreamFlag) { |
---|
| 550 | + return CameraStream::initialize(width, |
---|
| 551 | + height, |
---|
| 552 | + format, |
---|
| 553 | + usage, |
---|
| 554 | + mergeStreamFlag); |
---|
549 | 555 | } |
---|
550 | 556 | |
---|
551 | 557 | int CameraMainStream::setFormat(uint32_t width, |
---|
.. | .. |
---|
680 | 686 | int CameraSubStream::initialize(uint32_t width, |
---|
681 | 687 | uint32_t height, |
---|
682 | 688 | int format, |
---|
683 | | - uint32_t usage) { |
---|
684 | | - return CameraStream::initialize(width, height, format, usage); |
---|
| 689 | + uint32_t usage, |
---|
| 690 | + bool mergeStreamFlag) { |
---|
| 691 | + return CameraStream::initialize(width, |
---|
| 692 | + height, |
---|
| 693 | + format, |
---|
| 694 | + usage, |
---|
| 695 | + mergeStreamFlag); |
---|
| 696 | + |
---|
685 | 697 | } |
---|
686 | 698 | |
---|
687 | 699 | int CameraSubStream::setFormat(uint32_t width, |
---|
.. | .. |
---|
803 | 815 | int CameraMainMirrorStream::initialize(uint32_t /*width*/, |
---|
804 | 816 | uint32_t /*height*/, |
---|
805 | 817 | int /*format*/, |
---|
806 | | - uint32_t /*usage*/) { |
---|
| 818 | + uint32_t /*usage*/, |
---|
| 819 | + bool /*mergeStreamFlag*/) { |
---|
807 | 820 | initialized = true; |
---|
808 | 821 | return 0; |
---|
809 | 822 | } |
---|
.. | .. |
---|
935 | 948 | int CameraSubMirrorStream::initialize(uint32_t /*width*/, |
---|
936 | 949 | uint32_t /*height*/, |
---|
937 | 950 | int /*format*/, |
---|
938 | | - uint32_t /*usage*/) { |
---|
| 951 | + uint32_t /*usage*/, |
---|
| 952 | + bool /*mergeStreamFlag*/) { |
---|
939 | 953 | int res = 0; |
---|
940 | 954 | initialized = true; |
---|
941 | 955 | return res; |
---|