Mercurial > libavformat.hg
comparison raw.c @ 64:b0e0eb595e29 libavformat
* static,const,compiler warning cleanup
author | kabi |
---|---|
date | Mon, 10 Feb 2003 09:35:32 +0000 |
parents | 8329ba7cbd01 |
children | a58a8a53eb46 |
comparison
equal
deleted
inserted
replaced
63:8329ba7cbd01 | 64:b0e0eb595e29 |
---|---|
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 */ | 18 */ |
19 #include "avformat.h" | 19 #include "avformat.h" |
20 | 20 |
21 /* simple formats */ | 21 /* simple formats */ |
22 int raw_write_header(struct AVFormatContext *s) | 22 static int raw_write_header(struct AVFormatContext *s) |
23 { | 23 { |
24 return 0; | 24 return 0; |
25 } | 25 } |
26 | 26 |
27 int raw_write_packet(struct AVFormatContext *s, | 27 static int raw_write_packet(struct AVFormatContext *s, int stream_index, |
28 int stream_index, | 28 unsigned char *buf, int size, int force_pts) |
29 unsigned char *buf, int size, int force_pts) | |
30 { | 29 { |
31 put_buffer(&s->pb, buf, size); | 30 put_buffer(&s->pb, buf, size); |
32 put_flush_packet(&s->pb); | 31 put_flush_packet(&s->pb); |
33 return 0; | 32 return 0; |
34 } | 33 } |
35 | 34 |
36 int raw_write_trailer(struct AVFormatContext *s) | 35 static int raw_write_trailer(struct AVFormatContext *s) |
37 { | 36 { |
38 return 0; | 37 return 0; |
39 } | 38 } |
40 | 39 |
41 /* raw input */ | 40 /* raw input */ |
42 static int raw_read_header(AVFormatContext *s, | 41 static static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) |
43 AVFormatParameters *ap) | |
44 { | 42 { |
45 AVStream *st; | 43 AVStream *st; |
46 int id; | 44 int id; |
47 | 45 |
48 st = av_new_stream(s, 0); | 46 st = av_new_stream(s, 0); |
76 return 0; | 74 return 0; |
77 } | 75 } |
78 | 76 |
79 #define RAW_PACKET_SIZE 1024 | 77 #define RAW_PACKET_SIZE 1024 |
80 | 78 |
81 int raw_read_packet(AVFormatContext *s, | 79 static int raw_read_packet(AVFormatContext *s, AVPacket *pkt) |
82 AVPacket *pkt) | |
83 { | 80 { |
84 int ret, size; | 81 int ret, size; |
85 // AVStream *st = s->streams[0]; | 82 // AVStream *st = s->streams[0]; |
86 | 83 |
87 size= RAW_PACKET_SIZE; | 84 size= RAW_PACKET_SIZE; |
99 packet */ | 96 packet */ |
100 pkt->size = ret; | 97 pkt->size = ret; |
101 return ret; | 98 return ret; |
102 } | 99 } |
103 | 100 |
104 int raw_read_close(AVFormatContext *s) | 101 static int raw_read_close(AVFormatContext *s) |
105 { | 102 { |
106 return 0; | 103 return 0; |
107 } | 104 } |
108 | 105 |
109 /* mp3 read */ | 106 /* mp3 read */ |
388 "ul", CODEC_ID_PCM_MULAW) | 385 "ul", CODEC_ID_PCM_MULAW) |
389 | 386 |
390 PCMDEF(alaw, "pcm A law format", | 387 PCMDEF(alaw, "pcm A law format", |
391 "al", CODEC_ID_PCM_ALAW) | 388 "al", CODEC_ID_PCM_ALAW) |
392 | 389 |
393 int rawvideo_read_packet(AVFormatContext *s, | 390 static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) |
394 AVPacket *pkt) | |
395 { | 391 { |
396 int packet_size, ret, width, height; | 392 int packet_size, ret, width, height; |
397 AVStream *st = s->streams[0]; | 393 AVStream *st = s->streams[0]; |
398 | 394 |
399 width = st->codec.width; | 395 width = st->codec.width; |