41 #define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
56 { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
57 { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
58 { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
59 { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
60 { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
61 { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
62 { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
63 { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
64 { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
65 { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
66 { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },
67 { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },
96 ((ltc_frame / 10) << 4) |
99 ((tc.tm_sec / 10) << 4) |
102 ((tc.tm_min / 10) << 4) |
106 ((tc.tm_hour / 10) << 4) |
153 ((tc.tm_mday / 10) << 4) |
156 ((tc.tm_mon / 10) << 4) |
158 buf[4] = (((tc.tm_year % 100) / 10) << 4) |
169 ((tc.tm_sec / 10) << 4) |
172 ((tc.tm_min / 10) << 4) |
175 ((tc.tm_hour / 10) << 4) |
179 buf[1] = buf[2] = buf[3] = buf[4] = 0xff;
186 int i, j, d, of,
size;
191 for (j = 0; j < 9; j++) {
193 for (d = 8; d < 80; d+=2) {
201 frame_ptr += 16 * 80;
211 for (buf = frame; buf < frame + c->
sys->
frame_size; buf += 150 * 80) {
213 for (j = 80; j < 80 * 3; j += 80) {
214 for (k = 6; k < 6 * 8; k += 8)
226 for (j = 80*3 + 3; j < 80*6; j += 80) {
257 for (i = 0; i < c->
n_ast && st != c->
ast[i]; i++);
276 for (i=0; i < c->
n_ast; i++) {
310 if (vst)
return NULL;
325 for (i=0; i<c->
n_ast; i++) {
347 for (i=0; i < c->
n_ast; i++) {
366 for (i=0; i < c->
n_ast; i++)
374 "Make sure that you supply exactly two streams:\n"
375 " video: 25fps or 29.97fps, audio: 2ch/48kHz/PCM\n"
376 " (50Mbps allows an optional second audio stream)\n");
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
Rescale a 64-bit integer with specified rounding.
AVDictionaryEntry * av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
Feed data from a user-supplied callback to an AVFifoBuffer.
AVFifoBuffer * audio_data[2]
AVStream ** streams
A list of all streams in the file.
int audio_samples_dist[5]
enum AVPixelFormat pix_fmt
void av_fifo_free(AVFifoBuffer *f)
Free an AVFifoBuffer.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static uint8_t * av_fifo_peek2(const AVFifoBuffer *f, int offs)
Return a pointer to the data stored in a FIFO buffer at a certain offset.
AVDictionary * metadata
Metadata that applies to the whole file.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
AVCodecContext * codec
Codec context associated with this stream.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
const DVprofile * avpriv_dv_codec_profile(AVCodecContext *codec)
struct tm * ff_brktimegm(time_t secs, struct tm *tm)
if(ac->has_optimized_func)
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
#define DV_MAX_FRAME_SIZE
largest possible DV frame, in bytes (1080i50)
a very simple circular buffer FIFO implementation
uint8_t frame_buf[DV_MAX_FRAME_SIZE]
int av_fifo_size(AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
const uint8_t(* audio_shuffle)[9]
AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.
int channels
number of audio channels
void * priv_data
Format private data.
static void write_header(FFV1Context *f)
void av_fifo_drain(AVFifoBuffer *f, int size)
Discard data from the FIFO.
This structure stores compressed data.