| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 /* Everything look ok, set the mmap in the decoder */ | 219 /* Everything look ok, set the mmap in the decoder */ |
| 220 res = ctx->iface->set_mmap(ctx, mmap); | 220 res = ctx->iface->set_mmap(ctx, mmap); |
| 221 | 221 |
| 222 if (res) | 222 if (res) |
| 223 break; | 223 break; |
| 224 } | 224 } |
| 225 } | 225 } |
| 226 | 226 |
| 227 return SAVE_STATUS(ctx, res); | 227 return SAVE_STATUS(ctx, res); |
| 228 } | 228 } |
| 229 |
| 230 vpx_codec_err_t vpx_codec_set_frame_buffer_functions( |
| 231 vpx_codec_ctx_t *ctx, vpx_get_frame_buffer_cb_fn_t cb_get, |
| 232 vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv) { |
| 233 vpx_codec_err_t res; |
| 234 |
| 235 if (!ctx || !cb_get || !cb_release) { |
| 236 res = VPX_CODEC_INVALID_PARAM; |
| 237 } else if (!ctx->iface || !ctx->priv || |
| 238 !(ctx->iface->caps & VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER)) { |
| 239 res = VPX_CODEC_ERROR; |
| 240 } else { |
| 241 res = ctx->iface->dec.set_fb_fn(ctx->priv->alg_priv, cb_get, cb_release, |
| 242 cb_priv); |
| 243 } |
| 244 |
| 245 return SAVE_STATUS(ctx, res); |
| 246 } |
| OLD | NEW |