Revision 75f2c209 libavformat/dvenc.c

View differences:

libavformat/dvenc.c
35 35
#include "libavutil/fifo.h"
36 36

  
37 37
struct DVMuxContext {
38
    const DVprofile*  sys;    /* Current DV profile. E.g.: 525/60, 625/50 */
39
    int         n_ast;        /* Number of stereo audio streams (up to 2) */
40
    AVStream   *ast[2];       /* Stereo audio streams */
38
    const DVprofile*  sys;           /* current DV profile, e.g.: 525/60, 625/50 */
39
    int               n_ast;         /* number of stereo audio streams (up to 2) */
40
    AVStream         *ast[2];        /* stereo audio streams */
41 41
    AVFifoBuffer  audio_data[2]; /* FIFO for storing excessive amounts of PCM */
42
    int         frames;       /* Number of a current frame */
43
    time_t      start_time;   /* Start time of recording */
42
    int               frames;        /* current frame number */
43
    time_t            start_time;    /* recording start time */
44 44
    int         has_audio;    /* frame under contruction has audio */
45 45
    int         has_video;    /* frame under contruction has video */
46 46
    uint8_t     frame_buf[DV_MAX_FRAME_SIZE]; /* frame under contruction */
......
85 85
         * minute, unless it is exactly divisible by 10
86 86
         */
87 87
        ltc_frame = (c->frames + 2*ct/60 - 2*ct/600) % c->sys->ltc_divisor;
88
        buf[1] = (0 << 7) | /* Color fame: 0 - unsync; 1 - sync mode */
89
                 (1 << 6) | /* Drop frame timecode: 0 - nondrop; 1 - drop */
90
                 ((ltc_frame / 10) << 4) | /* Tens of frames */
91
                 (ltc_frame % 10);         /* Units of frames */
92
        buf[2] = (1 << 7) | /* Biphase mark polarity correction: 0 - even; 1 - odd */
93
                 ((tc.tm_sec / 10) << 4) | /* Tens of seconds */
94
                 (tc.tm_sec % 10);         /* Units of seconds */
95
        buf[3] = (1 << 7) | /* Binary group flag BGF0 */
96
                 ((tc.tm_min / 10) << 4) | /* Tens of minutes */
97
                 (tc.tm_min % 10);         /* Units of minutes */
98
        buf[4] = (1 << 7) | /* Binary group flag BGF2 */
99
                 (1 << 6) | /* Binary group flag BGF1 */
100
                 ((tc.tm_hour / 10) << 4) | /* Tens of hours */
101
                 (tc.tm_hour % 10);         /* Units of hours */
88
        buf[1] = (0                 << 7) | /* color frame: 0 - unsync; 1 - sync mode */
89
                 (1                 << 6) | /* drop frame timecode: 0 - nondrop; 1 - drop */
90
                 ((ltc_frame / 10)  << 4) | /* tens of frames */
91
                 (ltc_frame % 10);          /* units of frames */
92
        buf[2] = (1                 << 7) | /* biphase mark polarity correction: 0 - even; 1 - odd */
93
                 ((tc.tm_sec / 10)  << 4) | /* tens of seconds */
94
                 (tc.tm_sec % 10);          /* units of seconds */
95
        buf[3] = (1                 << 7) | /* binary group flag BGF0 */
96
                 ((tc.tm_min / 10)  << 4) | /* tens of minutes */
97
                 (tc.tm_min % 10);          /* units of minutes */
98
        buf[4] = (1                 << 7) | /* binary group flag BGF2 */
99
                 (1                 << 6) | /* binary group flag BGF1 */
100
                 ((tc.tm_hour / 10) << 4) | /* tens of hours */
101
                 (tc.tm_hour % 10);         /* units of hours */
102 102
        break;
103 103
    case dv_audio_source:  /* AAUX source pack */
104 104
        va_start(ap, buf);

Also available in: Unified diff