Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Print whether a frame is a keyframe or not

  • Loading branch information...
commit 76f79b827e51cccf25b96c282ee5323cf0a77502 1 parent a2a3d85
@doublec authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 webm.cpp
View
6 webm.cpp
@@ -187,6 +187,12 @@ void play_webm(char const* name) {
r = nestegg_packet_data(packet, j, &data, &length);
assert(r == 0);
+ vpx_codec_stream_info_t si;
+ memset(&si, 0, sizeof(si));
+ si.sz = sizeof(si);
+ vpx_codec_peek_stream_info(interface, data, length, &si);
+ cout << "keyframe: " << (si.is_kf ? "yes" : "no") << " ";
+
cout << "length: " << length << " ";
/* Decode the frame */
if(vpx_codec_decode(&codec, data, length, NULL, 0)) {
Please sign in to comment.
Something went wrong with that request. Please try again.