1 /* 2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved. 3 * 4 * This source code is subject to the terms of the BSD 2 Clause License and 5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License 6 * was not distributed with this source code in the LICENSE file, you can 7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open 8 * Media Patent License 1.0 was not distributed with this source code in the 9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent. 10 */ 11 12 #ifndef AOM_AV1_DECODER_DTHREAD_H_ 13 #define AOM_AV1_DECODER_DTHREAD_H_ 14 15 #include "config/aom_config.h" 16 17 #include "aom/internal/aom_codec_internal.h" 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 struct AV1Common; 24 struct AV1Decoder; 25 struct ThreadData; 26 27 typedef struct DecWorkerData { 28 struct ThreadData *td; 29 const uint8_t *data_end; 30 struct aom_internal_error_info error_info; 31 } DecWorkerData; 32 33 // WorkerData for the FrameWorker thread. It contains all the information of 34 // the worker and decode structures for decoding a frame. 35 typedef struct FrameWorkerData { 36 struct AV1Decoder *pbi; 37 const uint8_t *data; 38 const uint8_t *data_end; 39 size_t data_size; 40 void *user_priv; 41 int received_frame; 42 int frame_context_ready; // Current frame's context is ready to read. 43 int frame_decoded; // Finished decoding current frame. 44 } FrameWorkerData; 45 46 #ifdef __cplusplus 47 } // extern "C" 48 #endif 49 50 #endif // AOM_AV1_DECODER_DTHREAD_H_ 51