mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 03:28:27 +00:00
file id string
max short startcode distance Originally committed as revision 3223 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0da6315a70
commit
ca6ecf50f9
@ -49,6 +49,8 @@
|
||||
#define INDEX_STARTCODE (0xDD672F23E64EULL + (((uint64_t)('N'<<8) + 'X')<<48))
|
||||
#define INFO_STARTCODE (0xAB68B596BA78ULL + (((uint64_t)('N'<<8) + 'I')<<48))
|
||||
|
||||
#define ID_STRING "nut/multimedia container\0"
|
||||
|
||||
#define MAX_DISTANCE (1024*16-1)
|
||||
#define MAX_SHORT_DISTANCE (1024*4-1)
|
||||
|
||||
@ -84,6 +86,7 @@ typedef struct {
|
||||
uint64_t next_startcode; ///< stores the next startcode if it has alraedy been parsed but the stream isnt seekable
|
||||
StreamContext *stream;
|
||||
int max_distance;
|
||||
int max_short_distance;
|
||||
int rate_num;
|
||||
int rate_den;
|
||||
int short_startcode;
|
||||
@ -510,6 +513,11 @@ static int nut_write_header(AVFormatContext *s)
|
||||
|
||||
nut->stream =
|
||||
av_mallocz(sizeof(StreamContext)*s->nb_streams);
|
||||
|
||||
|
||||
put_buffer(bc, ID_STRING, strlen(ID_STRING));
|
||||
put_byte(bc, 0);
|
||||
nut->packet_start[2]= url_ftell(bc);
|
||||
|
||||
/* main header */
|
||||
put_be64(bc, MAIN_STARTCODE);
|
||||
@ -517,6 +525,7 @@ static int nut_write_header(AVFormatContext *s)
|
||||
put_v(bc, 2); /* version */
|
||||
put_v(bc, s->nb_streams);
|
||||
put_v(bc, MAX_DISTANCE);
|
||||
put_v(bc, MAX_SHORT_DISTANCE);
|
||||
|
||||
put_v(bc, nut->rate_num=1);
|
||||
put_v(bc, nut->rate_den=2);
|
||||
@ -869,6 +878,7 @@ static int decode_main_header(NUTContext *nut){
|
||||
|
||||
nut->stream_count = get_v(bc);
|
||||
nut->max_distance = get_v(bc);
|
||||
nut->max_short_distance = get_v(bc);
|
||||
nut->rate_num= get_v(bc);
|
||||
nut->rate_den= get_v(bc);
|
||||
nut->short_startcode= get_v(bc);
|
||||
|
@ -22,12 +22,9 @@ b57e3c4e0f27cbd0bf7b7fafb142fe7f *./data/b-libav.ffm
|
||||
95a85df5f6cc6745235298e56920e3f4 *./data/b-libav.mov
|
||||
369865 ./data/b-libav.mov
|
||||
./data/b-libav.mov CRC=48f5a90d
|
||||
7d75403dd8fead169b92c18be36e7116 *./data/b-libav.nut
|
||||
332388 ./data/b-libav.nut
|
||||
fea20ced22451312dd463110e594eda6 *./data/b-libav.nut
|
||||
332415 ./data/b-libav.nut
|
||||
./data/b-libav.nut CRC=001a3415
|
||||
25b1c16cce152be411351dd092668d88 *./data/b-libav.dv
|
||||
3600000 ./data/b-libav.dv
|
||||
./data/b-libav.dv CRC=74d854aa
|
||||
9a9da315747599f7718cc9a9a09c21ff *./data/b-libav.pbm
|
||||
317075 ./data/b-libav.pbm
|
||||
./data/b-libav.pbm CRC=a1057fd1
|
||||
|
@ -516,9 +516,9 @@ do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -a
|
||||
do_ffmpeg_crc $file -i $file
|
||||
|
||||
# dv
|
||||
file=${outfile}libav.dv
|
||||
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -ar 48000 -r 25 -s pal -ac 2 $file
|
||||
do_ffmpeg_crc $file -i $file
|
||||
#file=${outfile}libav.dv
|
||||
#do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src -ar 48000 -r 25 -s pal -ac 2 $file
|
||||
#do_ffmpeg_crc $file -i $file
|
||||
|
||||
# XXX: need mpegts tests (add bitstreams or add output capability in ffmpeg)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user