OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/gpu/android_video_encode_accelerator.h" | 5 #include "media/gpu/android_video_encode_accelerator.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <set> | 8 #include <set> |
9 #include <tuple> | 9 #include <tuple> |
10 | 10 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 switch (status) { | 376 switch (status) { |
377 case MEDIA_CODEC_DEQUEUE_OUTPUT_AGAIN_LATER: | 377 case MEDIA_CODEC_DEQUEUE_OUTPUT_AGAIN_LATER: |
378 return; | 378 return; |
379 | 379 |
380 case MEDIA_CODEC_ERROR: | 380 case MEDIA_CODEC_ERROR: |
381 RETURN_ON_FAILURE(false, "Codec error", kPlatformFailureError); | 381 RETURN_ON_FAILURE(false, "Codec error", kPlatformFailureError); |
382 // Unreachable because of previous statement, but included for clarity. | 382 // Unreachable because of previous statement, but included for clarity. |
383 return; | 383 return; |
384 | 384 |
385 case MEDIA_CODEC_OUTPUT_FORMAT_CHANGED: | 385 case MEDIA_CODEC_OUTPUT_FORMAT_CHANGED: |
386 RETURN_ON_FAILURE(false, "Unexpected output format change", | |
387 kPlatformFailureError); | |
388 break; | 386 break; |
389 | 387 |
390 case MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED: | 388 case MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED: |
391 break; | 389 break; |
392 | 390 |
393 case MEDIA_CODEC_OK: | 391 case MEDIA_CODEC_OK: |
394 DCHECK_GE(buf_index, 0); | 392 DCHECK_GE(buf_index, 0); |
395 break; | 393 break; |
396 | 394 |
397 default: | 395 default: |
(...skipping 19 matching lines...) Expand all Loading... |
417 --num_buffers_at_codec_; | 415 --num_buffers_at_codec_; |
418 | 416 |
419 base::ThreadTaskRunnerHandle::Get()->PostTask( | 417 base::ThreadTaskRunnerHandle::Get()->PostTask( |
420 FROM_HERE, | 418 FROM_HERE, |
421 base::Bind(&VideoEncodeAccelerator::Client::BitstreamBufferReady, | 419 base::Bind(&VideoEncodeAccelerator::Client::BitstreamBufferReady, |
422 client_ptr_factory_->GetWeakPtr(), bitstream_buffer.id(), size, | 420 client_ptr_factory_->GetWeakPtr(), bitstream_buffer.id(), size, |
423 key_frame, base::Time::Now() - base::Time())); | 421 key_frame, base::Time::Now() - base::Time())); |
424 } | 422 } |
425 | 423 |
426 } // namespace media | 424 } // namespace media |
OLD | NEW |