@@ -87,7 +87,7 @@ int main(void)
87
87
return 0 ;
88
88
}
89
89
90
- printk ("Video device detected, format: %s %ux%u\n " ,
90
+ LOG_INF ("Video device detected, format: %s %ux%u" ,
91
91
VIDEO_FOURCC_TO_STR (fmt .pixelformat ), fmt .width , fmt .height );
92
92
93
93
if (caps .min_line_count != LINE_COUNT_HEIGHT ) {
@@ -107,15 +107,15 @@ int main(void)
107
107
108
108
/* Connection loop */
109
109
do {
110
- printk ("TCP: Waiting for client...\n " );
110
+ LOG_INF ("TCP: Waiting for client..." );
111
111
112
112
client = accept (sock , (struct sockaddr * )& client_addr , & client_addr_len );
113
113
if (client < 0 ) {
114
- printk ("Failed to accept: %d\n " , errno );
114
+ LOG_ERR ("Failed to accept: %d" , errno );
115
115
return 0 ;
116
116
}
117
117
118
- printk ("TCP: Accepted connection\n " );
118
+ LOG_INF ("TCP: Accepted connection" );
119
119
120
120
/* Enqueue Buffers */
121
121
for (i = 0 ; i < ARRAY_SIZE (buffers ); i ++ ) {
@@ -128,7 +128,7 @@ int main(void)
128
128
return 0 ;
129
129
}
130
130
131
- printk ("Stream started\n " );
131
+ LOG_INF ("Stream started" );
132
132
133
133
/* Capture loop */
134
134
i = 0 ;
@@ -140,13 +140,13 @@ int main(void)
140
140
return 0 ;
141
141
}
142
142
143
- printk ( "\rSending frame %d\n " , i ++ );
143
+ LOG_INF ( "Sending frame %d" , i ++ );
144
144
145
145
/* Send video buffer to TCP client */
146
146
ret = sendall (client , vbuf -> buffer , vbuf -> bytesused );
147
147
if (ret && ret != - EAGAIN ) {
148
148
/* client disconnected */
149
- printk ( "\nTCP : Client disconnected %d\n " , ret );
149
+ LOG_ERR ( "TCP : Client disconnected %d" , ret );
150
150
close (client );
151
151
}
152
152
0 commit comments