-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
various codecs support (e.g H.264, HEVC, VP8, VP9, MJPEG, ...)
- extends nhve_hw_config with encoder field - following similar extension of HVE Related to #1
- Loading branch information
Showing
4 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule hardware-video-encoder
updated
6 files
+2 −0 | CMakeLists.txt | |
+21 −10 | README.md | |
+4 −3 | examples/hve_encode_raw_h264.c | |
+154 −0 | examples/hve_encode_raw_hevc10.c | |
+3 −1 | hve.c | |
+33 −4 | hve.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* NHVE Network Hardware Video Encoder C library implementation | ||
* | ||
* Copyright 2019 (C) Bartosz Meglicki <[email protected]> | ||
* Copyright 2019-2020 (C) Bartosz Meglicki <[email protected]> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
|
@@ -31,7 +31,7 @@ struct nhve *nhve_init(const struct nhve_net_config *net_config,const struct nhv | |
struct nhve *n, zero_nhve = {0}; | ||
struct mlsp_config mlsp_cfg = {net_config->ip, net_config->port, 0}; | ||
struct hve_config hve_cfg = {hw_config->width, hw_config->height, hw_config->framerate, hw_config->device, | ||
hw_config->pixel_format, hw_config->profile, hw_config->max_b_frames, hw_config->bit_rate}; | ||
hw_config->encoder, hw_config->pixel_format, hw_config->profile, hw_config->max_b_frames, hw_config->bit_rate}; | ||
|
||
if( ( n = (struct nhve*)malloc(sizeof(struct nhve))) == NULL ) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* NHVE Network Hardware Video Encoder C library header | ||
* | ||
* Copyright 2019 (C) Bartosz Meglicki <[email protected]> | ||
* Copyright 2019-2020 (C) Bartosz Meglicki <[email protected]> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
|
@@ -28,6 +28,7 @@ struct nhve_hw_config | |
int height; //!< height of the encoded frames | ||
int framerate; //!< framerate of the encoded video | ||
const char *device; //!< NULL / "" or device, e.g. "/dev/dri/renderD128" | ||
const char *encoder; //!< NULL / "" or encoder, e.g. "h264_vaapi" | ||
const char *pixel_format; //!< NULL / "" for NV12 or format, e.g. "rgb0", "bgr0", "nv12", "yuv420p" | ||
int profile; //!< 0 to guess from input or profile e.g. FF_PROFILE_H264_MAIN, FF_PROFILE_H264_HIGH | ||
int max_b_frames; //!< maximum number of B-frames between non-B-frames (disable if you need low latency) | ||
|