Skip to content

How to setup a stream with 'default' resolution using VDO API? #128

Closed Answered by marbali8
bsriramprasad asked this question in Q&A
Discussion options

You must be logged in to vote

Hello again,

We should firstly differentiate between single and multi sensor cameras. For one sensor cameras, you can:

GError *error = NULL;

// 1. Create an empty settings map:
VdoMap *settings = vdo_map_new();

// 2. Create a video stream:
stream = vdo_stream_new(settings, NULL, &error);

// 3. Read resulting default resolution, like the width and height:
VdoMap *settings = vdo_stream_get_settings(stream, &error);
vdo_map_get_uint32(settings, "width", 0);
vdo_map_get_uint32(settings, "height", 0);

// 4. Read resulting default dimension after any potential rotation:
VdoMap *info = vdo_stream_get_info(stream, &error);
vdo_map_get_uint32(info, "width", 0);
vdo_map_get_uint32(info, "height", 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pataxis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants