@@ -87,7 +87,7 @@ int main(void)
8787 return 0 ;
8888 }
8989
90- printk ("Video device detected, format: %s %ux%u\n " ,
90+ LOG_INF ("Video device detected, format: %s %ux%u" ,
9191 VIDEO_FOURCC_TO_STR (fmt .pixelformat ), fmt .width , fmt .height );
9292
9393 if (caps .min_line_count != LINE_COUNT_HEIGHT ) {
@@ -107,15 +107,15 @@ int main(void)
107107
108108 /* Connection loop */
109109 do {
110- printk ("TCP: Waiting for client...\n " );
110+ LOG_INF ("TCP: Waiting for client..." );
111111
112112 client = accept (sock , (struct sockaddr * )& client_addr , & client_addr_len );
113113 if (client < 0 ) {
114- printk ("Failed to accept: %d\n " , errno );
114+ LOG_ERR ("Failed to accept: %d" , errno );
115115 return 0 ;
116116 }
117117
118- printk ("TCP: Accepted connection\n " );
118+ LOG_INF ("TCP: Accepted connection" );
119119
120120 /* Enqueue Buffers */
121121 for (i = 0 ; i < ARRAY_SIZE (buffers ); i ++ ) {
@@ -128,7 +128,7 @@ int main(void)
128128 return 0 ;
129129 }
130130
131- printk ("Stream started\n " );
131+ LOG_INF ("Stream started" );
132132
133133 /* Capture loop */
134134 i = 0 ;
@@ -140,13 +140,13 @@ int main(void)
140140 return 0 ;
141141 }
142142
143- printk ( "\rSending frame %d\n " , i ++ );
143+ LOG_INF ( "Sending frame %d" , i ++ );
144144
145145 /* Send video buffer to TCP client */
146146 ret = sendall (client , vbuf -> buffer , vbuf -> bytesused );
147147 if (ret && ret != - EAGAIN ) {
148148 /* client disconnected */
149- printk ( "\nTCP : Client disconnected %d\n " , ret );
149+ LOG_ERR ( "TCP : Client disconnected %d" , ret );
150150 close (client );
151151 }
152152
0 commit comments