mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-03 00:06:06 +00:00
Fix compilation of OMX video output
This commit is contained in:
parent
82d2ec9098
commit
dfc51b345f
@ -24,6 +24,8 @@ pkg_check_modules(EVDEV REQUIRED libevdev)
|
||||
pkg_check_modules(AVAHI REQUIRED avahi-client)
|
||||
|
||||
if(BROADCOM_FOUND)
|
||||
aux_source_directory(./ilclient SRC_LIST)
|
||||
aux_source_directory(./h264bitstream SRC_LIST)
|
||||
list(APPEND SRC_LIST ./src/video/omx.c)
|
||||
elseif(FREESCALE_FOUND)
|
||||
list(APPEND SRC_LIST ./src/video/imx.c)
|
||||
@ -35,9 +37,6 @@ add_executable(moonlight ${SRC_LIST})
|
||||
set_property(TARGET moonlight PROPERTY C_STANDARD 11)
|
||||
|
||||
if(BROADCOM_FOUND)
|
||||
aux_source_directory(./ilclient SRC_LIST)
|
||||
aux_source_directory(./h264bitstream SRC_LIST)
|
||||
|
||||
include_directories(./ilclient ./h264bitstream ${BROADCOM_INCLUDE_DIRS})
|
||||
target_link_libraries (moonlight PUBLIC ${BROADCOM_LIBRARIES})
|
||||
set_property(TARGET moonlight PROPERTY COMPILE_DEFINITIONS ${BROADCOM_DEFINITIONS})
|
||||
|
@ -50,7 +50,15 @@ static unsigned char *dest;
|
||||
static int port_settings_changed;
|
||||
static int first_packet;
|
||||
|
||||
static h264_stream_t* stream;
|
||||
|
||||
static void decoder_renderer_setup(int width, int height, int redrawRate, void* context, int drFlags) {
|
||||
stream = h264_new();
|
||||
if (stream == NULL) {
|
||||
fprintf(stderr, "Not enough memory\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
bcm_host_init();
|
||||
|
||||
OMX_VIDEO_PARAM_PORTFORMATTYPE format;
|
||||
@ -178,7 +186,7 @@ static int decoder_renderer_submit_decode_unit(PDECODE_UNIT decodeUnit) {
|
||||
|
||||
PLENTRY entry = decodeUnit->bufferList;
|
||||
if (entry != NULL && entry->data[4] == 0x67) {
|
||||
read_debug_nal_unit(stream, entry->data+4, entry->length-4);
|
||||
read_nal_unit(stream, entry->data+4, entry->length-4);
|
||||
stream->sps->num_ref_frames = 1;
|
||||
stream->sps->vui.bitstream_restriction_flag = 1;
|
||||
stream->sps->vui.motion_vectors_over_pic_boundaries_flag = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user