Skip to content

Instantly share code, notes, and snippets.

@dwbuiten
Created April 3, 2019 14:11
Show Gist options
  • Save dwbuiten/fc55a5516f37952eff5d3f1bc9ce4bcf to your computer and use it in GitHub Desktop.
Save dwbuiten/fc55a5516f37952eff5d3f1bc9ce4bcf to your computer and use it in GitHub Desktop.
vimeo@vimeo-dev:~/crav1e/c-examples$ git diff
diff --git a/c-examples/simple_encoding.c b/c-examples/simple_encoding.c
index 0a11d54..68621b4 100644
--- a/c-examples/simple_encoding.c
+++ b/c-examples/simple_encoding.c
@@ -38,6 +38,8 @@ int main(int argc, char **argv)
goto clean;
}
+ rav1e_config_parse(rac, "low_latency", "true");
+
ret = rav1e_config_set_color_description(rac, 2, 2, 2);
if (ret < 0) {
printf("Unable to configure color properties\n");
@@ -99,6 +101,16 @@ int main(int argc, char **argv)
}
ret = 0;
+ while (ret == 0) {
+ RaPacket *p;
+ rav1e_send_frame(rax, NULL);
+ ret = rav1e_receive_packet(rax, &p);
+ if (ret == 0)
+ printf("Packet %"PRIu64"\n", p->number);
+ }
+ printf("%d\n", ret);
+
+ ret = 0;
clean:
rav1e_frame_unref(f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment