Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(972)

Unified Diff: media/omx/omx_video_decoder.cc

Issue 391030: Test program for OpenMAX video decoding (Closed)
Patch Set: comments Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/omx/omx_video_decoder.cc
diff --git a/media/omx/omx_video_decoder.cc b/media/omx/omx_video_decoder.cc
index 4142ab85a45d858c33f04abaf2d90dff15f73352..1b2f4160dabfa93294f05729638d5c81130aa1b5 100644
--- a/media/omx/omx_video_decoder.cc
+++ b/media/omx/omx_video_decoder.cc
@@ -35,13 +35,14 @@ OmxVideoDecoder::~OmxVideoDecoder() {
DCHECK(output_queue_.empty());
}
-void OmxVideoDecoder::Setup(Codec codec) {
- DCHECK_EQ(kEmpty, GetState());
+void OmxVideoDecoder::Setup(const char* component, Codec codec) {
+ DCHECK_EQ(kEmpty, state_);
+ component_ = component;
codec_ = codec;
}
void OmxVideoDecoder::SetErrorCallback(Callback* callback) {
- DCHECK_EQ(kEmpty, GetState());
+ DCHECK_EQ(kEmpty, state_);
error_callback_.reset(callback);
}
@@ -278,7 +279,8 @@ void OmxVideoDecoder::Transition_EmptyToLoaded() {
// 2. Get the handle to the component. After OMX_GetHandle(),
// the component is in loaded state.
- component = GetComponentName(codec_);
+ // TODO(hclam): We should have a list of componant names instead.
+ component = component_;
omxresult = OMX_GetHandle((OMX_HANDLETYPE*)(&decoder_handle_),
(OMX_STRING)component, this, &callback);
if (omxresult != OMX_ErrorNone) {

Powered by Google App Engine
This is Rietveld 408576698