4 #include "gstsmptetimecode.h"
8 #define NTSC_FRAMES_PER_10_MINS (10*60*30 - 10*2 + 2)
9 #define NTSC_FRAMES_PER_HOUR (6*NTSC_FRAMES_PER_10_MINS)
13 main (int argc, char *argv[])
19 for (min = 0; min < 3; min++) {
20 g_print ("--- minute %d ---\n", min);
21 for (i = min * 60 * 30 - 5; i <= min * 60 * 30 + 5; i++) {
22 gst_smpte_time_code_from_frame_number (GST_SMPTE_TIME_CODE_SYSTEM_30, &tc,
24 g_print ("%d %02d:%02d:%02d:%02d\n", i, tc.hours, tc.minutes, tc.seconds,
29 for (min = 9; min < 12; min++) {
30 g_print ("--- minute %d ---\n", min);
31 for (i = min * 60 * 30 - 5 - 18; i <= min * 60 * 30 + 5 - 18; i++) {
32 gst_smpte_time_code_from_frame_number (GST_SMPTE_TIME_CODE_SYSTEM_30, &tc,
34 g_print ("%d %02d:%02d:%02d:%02d\n", i, tc.hours, tc.minutes, tc.seconds,
39 for (min = -1; min < 2; min++) {
40 int offset = NTSC_FRAMES_PER_HOUR;
42 g_print ("--- minute %d ---\n", min);
43 for (i = offset + min * 60 * 30 - 5; i <= offset + min * 60 * 30 + 5; i++) {
44 gst_smpte_time_code_from_frame_number (GST_SMPTE_TIME_CODE_SYSTEM_30, &tc,
46 g_print ("%d %02d:%02d:%02d:%02d\n", i, tc.hours, tc.minutes, tc.seconds,
51 for (min = 0; min < 1; min++) {
52 int offset = NTSC_FRAMES_PER_HOUR;
54 g_print ("--- minute %d ---\n", min);
55 for (i = 24 * offset - 5; i <= 24 * offset + 5; i++) {
56 gst_smpte_time_code_from_frame_number (GST_SMPTE_TIME_CODE_SYSTEM_30, &tc,
58 g_print ("%d %02d:%02d:%02d:%02d\n", i, tc.hours, tc.minutes, tc.seconds,
63 for (i = 0; i < 24 * NTSC_FRAMES_PER_HOUR; i++) {
67 gst_smpte_time_code_from_frame_number (GST_SMPTE_TIME_CODE_SYSTEM_30, &tc,
70 ret = gst_smpte_time_code_get_frame_number (GST_SMPTE_TIME_CODE_SYSTEM_30,
73 g_print ("bad valid at %d\n", i);
76 g_print ("index mismatch %d != %d\n", fn, i);