OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This class interacts with OmxCodec and the VideoDecoderImpl | 5 // This class interacts with OmxCodec and the VideoDecoderImpl |
6 // in the media pipeline. | 6 // in the media pipeline. |
7 // | 7 // |
8 // THREADING SEMANTICS | 8 // THREADING SEMANTICS |
9 // | 9 // |
10 // This class is created by OmxVideoDecoder and lives on the thread | 10 // This class is created by OmxVideoDecoder and lives on the thread |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 if (omxresult != OMX_ErrorNone) { | 508 if (omxresult != OMX_ErrorNone) { |
509 LOG(ERROR) << "GetParameter(OMX_IndexParamPortDefinition) failed"; | 509 LOG(ERROR) << "GetParameter(OMX_IndexParamPortDefinition) failed"; |
510 client_state_ = kClientError; | 510 client_state_ = kClientError; |
511 return false; | 511 return false; |
512 } | 512 } |
513 if (OMX_DirInput != port_format.eDir) { | 513 if (OMX_DirInput != port_format.eDir) { |
514 LOG(ERROR) << "Expected input port"; | 514 LOG(ERROR) << "Expected input port"; |
515 client_state_ = kClientError; | 515 client_state_ = kClientError; |
516 return false; | 516 return false; |
517 } | 517 } |
518 input_buffer_count_ = port_format.nBufferCountMin; | 518 input_buffer_count_ = port_format.nBufferCountActual; |
519 input_buffer_size_ = port_format.nBufferSize; | 519 input_buffer_size_ = port_format.nBufferSize; |
520 | 520 |
521 // 8. Obtain the information about the output port. | 521 // 8. Obtain the information about the output port. |
522 ResetParamHeader(*this, &port_format); | 522 ResetParamHeader(*this, &port_format); |
523 port_format.nPortIndex = output_port_; | 523 port_format.nPortIndex = output_port_; |
524 omxresult = OMX_GetParameter(component_handle_, | 524 omxresult = OMX_GetParameter(component_handle_, |
525 OMX_IndexParamPortDefinition, | 525 OMX_IndexParamPortDefinition, |
526 &port_format); | 526 &port_format); |
527 if (omxresult != OMX_ErrorNone) { | 527 if (omxresult != OMX_ErrorNone) { |
528 LOG(ERROR) << "GetParameter(OMX_IndexParamPortDefinition) failed"; | 528 LOG(ERROR) << "GetParameter(OMX_IndexParamPortDefinition) failed"; |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 NewRunnableMethod(decoder, | 1333 NewRunnableMethod(decoder, |
1334 &OmxVideoDecodeEngine::FillBufferDoneTask, buffer)); | 1334 &OmxVideoDecodeEngine::FillBufferDoneTask, buffer)); |
1335 return OMX_ErrorNone; | 1335 return OMX_ErrorNone; |
1336 } | 1336 } |
1337 | 1337 |
1338 } // namespace media | 1338 } // namespace media |
1339 | 1339 |
1340 // Disable refcounting for this object because this object only lives | 1340 // Disable refcounting for this object because this object only lives |
1341 // on the video decoder thread and there's no need to refcount it. | 1341 // on the video decoder thread and there's no need to refcount it. |
1342 DISABLE_RUNNABLE_METHOD_REFCOUNT(media::OmxVideoDecodeEngine); | 1342 DISABLE_RUNNABLE_METHOD_REFCOUNT(media::OmxVideoDecodeEngine); |
OLD | NEW |