Skip to content

Commit 87046c9

Browse files
committed
Update main.c
1 parent bed4ae4 commit 87046c9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ DL="https://github.com/openipc/firmware/releases/download/toolchain"
33

44
if [ "$1" = "vdec" ] || [ "$1" = "osd" ]; then
55
CC=toolchain.hisilicon-hi3536dv100
6+
elif [ "$1" = "venc-goke" ]; then
7+
CC=toolchain.goke-gk7205v200
68
else
79
CC=toolchain.hisilicon-hi3516ev200
810
fi

venc/main.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ int main(int argc, const char* argv[]) {
921921

922922
// Enable slices (not available in frame mode)
923923
switch (rc_codec) {
924-
case PT_H264:
924+
case PT_H264: {
925925
VENC_H264_SLICE_SPLIT_S avc_param;
926926
HI_MPI_VENC_GetH264SliceSplit(venc_second_ch_id, &avc_param);
927927
avc_param.bSplitEnable = 1;
@@ -943,8 +943,9 @@ int main(int argc, const char* argv[]) {
943943
printf("> H264 slices is [%s] | Slice size = %d lines\n",
944944
avc_param.bSplitEnable ? "Enabled" : "Disabled", avc_param.u32MbLineNum);
945945
break;
946+
}
946947

947-
case PT_H265:
948+
case PT_H265: {
948949
VENC_H265_SLICE_SPLIT_S hevc_param;
949950
HI_MPI_VENC_GetH265SliceSplit(venc_second_ch_id, &hevc_param);
950951
hevc_param.bSplitEnable = 1;
@@ -966,6 +967,7 @@ int main(int argc, const char* argv[]) {
966967
printf("> H265 slices is [%s] | Slice size = %d lines\n",
967968
hevc_param.bSplitEnable ? "Enabled" : "Disabled", hevc_param.u32LcuLineNum);
968969
break;
970+
}
969971
}
970972

971973
VENC_REF_PARAM_S ref_param;
@@ -1211,7 +1213,7 @@ void transmit(int socket_handle, uint8_t* tx_buffer, uint32_t tx_size,
12111213
break;
12121214

12131215
// RTP mode
1214-
case 1:
1216+
case 1: {
12151217
struct RTPHeader rtp_header;
12161218
rtp_header.version = 0x80;
12171219
rtp_header.sequence = htobe16(rtp_sequence++);
@@ -1233,6 +1235,7 @@ void transmit(int socket_handle, uint8_t* tx_buffer, uint32_t tx_size,
12331235

12341236
sendmsg(socket_handle, &msg, 0);
12351237
break;
1238+
}
12361239
}
12371240
}
12381241

0 commit comments

Comments
 (0)