linuxOS_D21X/source/artinchip/qtlauncher/views/aicvideoview.h

69 lines
1.3 KiB
C
Raw Normal View History

2024-11-29 08:33:21 +00:00
/*
2025-06-05 06:33:02 +00:00
* Copyright (C) 2024-2025 ArtInChip Technology Co. Ltd
2024-11-29 08:33:21 +00:00
*
* SPDX-License-Identifier: Apache-2.0
2025-06-05 06:33:02 +00:00
*
* Author: Huahui Mai <huahui.mai@artinchip.com>
2024-11-29 08:33:21 +00:00
*/
#ifndef AICVIDEOVIEW_H
#define AICVIDEOVIEW_H
#include <QWidget>
#include <QLabel>
#include <QDebug>
#include <QPainter>
#include <QPaintEvent>
#include "../video/aicvideothread.h"
#include "../video/aicimagedecoder.h"
2025-06-05 06:33:02 +00:00
#ifdef QTLAUNCHER_GE_SUPPORT
2024-11-29 08:33:21 +00:00
#include <linux/fb.h>
#include <video/artinchip_fb.h>
#include <video/mpp_types.h>
#include <linux/dma-heap.h>
#include <dma_allocator.h>
#include <frame_allocator.h>
#include <mpp_decoder.h>
#include <mpp_ge.h>
#endif
class AiCVideoView : public QWidget
{
Q_OBJECT
public:
2025-06-05 06:33:02 +00:00
explicit AiCVideoView(QSize size, QWidget *parent = NULL);
2024-11-29 08:33:21 +00:00
~AiCVideoView();
void videoStop(void);
private:
void initView(int width, int height);
#ifdef QTLAUNCHER_GE_SUPPORT
public:
void geBgFill();
void geBtnBlt();
protected:
virtual void paintEvent(QPaintEvent *event);
virtual bool eventFilter(QObject *obj, QEvent *event);
private:
int mScreenW;
int mScreenH;
int mFbStride;
mpp_pixel_format mFbFormat;
unsigned int mFbPhy;
QLabel *mPlayLabel;
AiCVideoThread *mVideoThread;
AiCImageDecoder *mImageDecoder;
#endif
};
#endif // AICVIDEOVIEW_H