forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move VideoDecoderVp8 to VideoDecoderVpx base that will support VP8/9.
BUG=260879 Review URL: https://codereview.chromium.org/26888009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229624 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
wez@chromium.org
committed
Oct 19, 2013
1 parent
ffd8afd
commit a43cfae
Showing
11 changed files
with
348 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "remoting/codec/scoped_vpx_codec.h" | ||
|
||
#include "base/logging.h" | ||
|
||
extern "C" { | ||
#define VPX_CODEC_DISABLE_COMPAT 1 | ||
#include "third_party/libvpx/source/libvpx/vpx/vpx_codec.h" | ||
} | ||
namespace remoting { | ||
|
||
void VpxCodecDeleter::operator()(vpx_codec_ctx_t* codec) { | ||
if (codec) { | ||
vpx_codec_err_t ret = vpx_codec_destroy(codec); | ||
CHECK_EQ(ret, VPX_CODEC_OK) << "Failed to destroy codec"; | ||
delete codec; | ||
} | ||
} | ||
|
||
} // namespace remoting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef REMOTING_CODEC_SCOPED_VPX_CODEC_H_ | ||
#define REMOTING_CODEC_SCOPED_VPX_CODEC_H_ | ||
|
||
#include "base/memory/scoped_ptr.h" | ||
|
||
extern "C" { | ||
typedef struct vpx_codec_ctx vpx_codec_ctx_t; | ||
} | ||
|
||
namespace remoting { | ||
|
||
struct VpxCodecDeleter { | ||
void operator()(vpx_codec_ctx_t* codec); | ||
}; | ||
|
||
typedef scoped_ptr<vpx_codec_ctx_t, VpxCodecDeleter> ScopedVpxCodec; | ||
|
||
} // namespace remoting | ||
|
||
#endif // REMOTING_CODEC_SCOPED_VPX_CODEC_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.