47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2025 Amlogic Corporation.
|
|
*
|
|
* 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 VIDEO_PIPE_ADAPTER_H
|
|
#define VIDEO_PIPE_ADAPTER_H
|
|
|
|
#include <cstdint>
|
|
#include <linux/ioctl.h>
|
|
|
|
#define ADAPTER_NAME "/dev/video_pipe_adapter"
|
|
|
|
struct video_delay_arg_t {
|
|
uint32_t input_fps;
|
|
uint32_t output_fps;
|
|
uint32_t video_delay;
|
|
};
|
|
|
|
#define VIDEO_PIPE_ADAPTER_IOC_MAGIC 'V'
|
|
#define VIDEO_PIPE_ADAPTER_GET_VIDEO_DELAY \
|
|
_IOWR(VIDEO_PIPE_ADAPTER_IOC_MAGIC, 0x01, struct video_delay_arg_t)
|
|
|
|
class VideoPipeAdapter {
|
|
public:
|
|
VideoPipeAdapter();
|
|
~VideoPipeAdapter();
|
|
|
|
int getVideoDelay(int fps, int outfps);
|
|
|
|
public:
|
|
int mDevFd = -1;
|
|
};
|
|
|
|
#endif
|