⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fmpeg4.h

📁 基于Linux的ffmepg decoder
💻 H
字号:
/* fmpeg4.h */
#ifndef _FMPEG4_H_
#define _FMPEG4_H_

#include <linux/config.h>
#include <linux/module.h>
#include <linux/version.h>

#include <linux/init.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/poll.h>
#include <linux/string.h>
#include <linux/ioport.h>       /* request_region */
#include <linux/interrupt.h>    /* mark_bh */
#include <linux/miscdevice.h>
#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/pci.h>
#include <asm/io.h>
#include <asm/arch/cpe/cpe.h>

#define             FMPEG4_IOCTL_DECODE_INIT    0x4170
#define             FMPEG4_IOCTL_DECODE_DESTROY 0x4171
#define             FMPEG4_IOCTL_DECODE_FRAME   0x4172

#define             FMPEG4_IOCTL_ENCODE_INIT    0x4173
#define             FMPEG4_IOCTL_ENCODE_DESTROY 0x4174
#define             FMPEG4_IOCTL_ENCODE_FRAME   0x4175

#define             BIT_STREAM_SIZE             (1024*1024)

#define             FMPEG4_DECODER_MINOR    20
#define             FMPEG4_ENCODER_MINOR    21


typedef struct fmpeg4_parm{
    unsigned int input_phy_y;       //input Y phy address or RGB address
    unsigned int input_phy_u;       //input U phy address
    unsigned int input_phy_v;       //input V phy address
    unsigned int output_phy_y;      //output Y phy address or RGB address
    unsigned int output_phy_u;      //output U phy address
    unsigned int output_phy_v;      //output V phy address
    unsigned int length;
    unsigned int got_picture;
    unsigned int width;
    unsigned int height;
    unsigned int bit_rate;
    unsigned int frame_rate;
    unsigned int fb_rgb_stride;
    unsigned int fb_rgb_height;
    unsigned int enc_frame_type;
}fmpeg4_parm_t;

#if 0
unsigned int fmpeg4_mempool_alloc(unsigned int size,unsigned int *phy);
unsigned int fmpeg4_mempool_free(unsigned int addr, unsigned int size);
#endif
int fmpeg4_encoder_open(struct inode *inode, struct file *filp);
int fmpeg4_encoder_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);
int fmpeg4_encoder_release(struct inode *inode, struct file *filp);
int fmpeg4_decoder_open(struct inode *inode, struct file *filp);
int fmpeg4_decoder_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);
int fmpeg4_decoder_release(struct inode *inode, struct file *filp);

#if 1
#define F_DEBUG(fmt, args...) printk(KERN_ALERT "FMEG4: " fmt, ## args)
#else
#define F_DEBUG(a...)
#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -