Skip to content
Browse files

Print whether a frame is a keyframe or not

  • Loading branch information...
1 parent a2a3d85 commit 76f79b827e51cccf25b96c282ee5323cf0a77502 @doublec committed Oct 4, 2011
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)) {

0 comments on commit 76f79b8

Please sign in to comment.
Something went wrong with that request. Please try again.