parser high level class implementation (#10)
* rocDecode api defintions added for decoder and parser
* addressed review comments and changed struct names to CamelCase
* minot reformatting
* parser high level class implementation
[ROCm/rocdecode commit: 0a991c1776]
Tento commit je obsažen v:
@@ -19,18 +19,26 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
#include "rocparser.h"
|
||||
#include "parser_handle.h"
|
||||
|
||||
|
||||
#include "roc_video_parser.h"
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* @brief Initializes any parser related stuff for all parsers
|
||||
*
|
||||
* @param pData
|
||||
* @return rocDecodeStatus
|
||||
* @return rocDecStatus : ROCDEC_SUCCESS on success
|
||||
*/
|
||||
rocDecStatus RocVideoParser::ParseVideoData(RocdecSourceDataPacket *pData) {
|
||||
// todo:
|
||||
rocDecStatus RocVideoParser::Initialize(RocdecParserParams *pParams) {
|
||||
if(pParams == nullptr) {
|
||||
ERR(STR("Parser parameters are not set for the parser"));
|
||||
return ROCDEC_NOT_INITIALIZED;
|
||||
}
|
||||
// Initialize callback function pointers
|
||||
pfn_sequece_cb_ = pParams->pfnSequenceCallback; /**< Called before decoding frames and/or whenever there is a fmt change */
|
||||
pfn_decode_picture_cb_ = pParams->pfnDecodePicture; /**< Called when a picture is ready to be decoded (decode order) */
|
||||
pfn_display_picture_cb_ = pParams->pfnDisplayPicture; /**< Called whenever a picture is ready to be displayed (display order) */
|
||||
pfn_get_sei_message_cb_ = pParams->pfnGetSEIMsg; /**< Called when all SEI messages are parsed for particular frame */
|
||||
|
||||
parser_params_ = pParams;
|
||||
|
||||
return ROCDEC_SUCCESS;
|
||||
}
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele