MCPcopy Create free account
hub / github.com/ARM-software/AVH / init_streams

Function init_streams

example/FVP_Video/project/app_main.c:77–104  ·  view source on GitHub ↗

Initialize streams. This function initializes the input and output streams, registers the event callbacks and sets up the stream buffers. */

Source from the content-addressed store, hash-verified

75 event callbacks and sets up the stream buffers.
76*/
77static void init_streams (void) {
78 int32_t rval;
79 void *out_block;
80
81 /* Setup input stream */
82 rval = vStream_VideoIn->Initialize(VideoIn_Event_Callback);
83 ASSERT(rval == VSTREAM_OK);
84
85 rval = vStream_VideoIn->SetBuf(video_in_buf, sizeof(video_in_buf), VIDEO_IN_BUF_BLOCK_SIZE);
86 ASSERT(rval == VSTREAM_OK);
87
88 /* Setup output stream */
89 rval = vStream_VideoOut->Initialize(VideoOut_Event_Callback);
90 ASSERT(rval == VSTREAM_OK);
91
92 rval = vStream_VideoOut->SetBuf(video_out_buf, sizeof(video_out_buf), VIDEO_OUT_BUF_BLOCK_SIZE);
93 ASSERT(rval == VSTREAM_OK);
94
95 /* Output stream will fail to start without data to output. */
96 /* Prepare first block of data and release it to the driver. */
97 out_block = vStream_VideoOut->GetBlock();
98 ASSERT(out_block != NULL);
99
100 memset(out_block, 0x00, VIDEO_OUT_BUF_BLOCK_SIZE);
101
102 rval = vStream_VideoOut->ReleaseBlock();
103 ASSERT(rval == VSTREAM_OK);
104}
105
106/*
107 Application main thread.

Callers 1

app_main_threadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected