/*
 * Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef decodeoutput_h
#define decodeoutput_h

#include "vppinputoutput.h"
#include <Yami.h>

#include <string>
#include <cassert>

class DecodeOutput
{
public:
    static DecodeOutput* create(int renderMode, uint32_t fourcc, const char* inputFile, const char* outputFile);
    virtual bool output(const SharedPtr<VideoFrame>& frame) = 0;
    SharedPtr<NativeDisplay> nativeDisplay();
    virtual ~DecodeOutput() {}
protected:
    virtual bool setVideoSize(uint32_t with, uint32_t height);

    virtual bool init();

    uint32_t m_width;
    uint32_t m_height;
    SharedPtr<VADisplay> m_vaDisplay;
    SharedPtr<NativeDisplay> m_nativeDisplay;
};

#endif //decodeoutput_h
