comparison mpegts.c @ 1124:d3aff2c607f9 libavformat

Add const to (mostly) char* and make some functions static, which aren't used outside their declaring source file and which have no corresponding prototype. patch by Stefan Huehner stefan^^@^^huehner^^.^^org
author diego
date Sun, 18 Jun 2006 11:33:14 +0000
parents 76c75a88560d
children 55627fca95a1
comparison
equal deleted inserted replaced
1123:6992dd78ff68 1124:d3aff2c607f9
149 av_crc(av_crc04C11DB7, -1, tss->section_buf, tss->section_h_size) == 0) 149 av_crc(av_crc04C11DB7, -1, tss->section_buf, tss->section_h_size) == 0)
150 tss->section_cb(tss->opaque, tss->section_buf, tss->section_h_size); 150 tss->section_cb(tss->opaque, tss->section_buf, tss->section_h_size);
151 } 151 }
152 } 152 }
153 153
154 MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts, unsigned int pid, 154 static MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts, unsigned int pid,
155 SectionCallback *section_cb, void *opaque, 155 SectionCallback *section_cb, void *opaque,
156 int check_crc) 156 int check_crc)
157 157
158 { 158 {
159 MpegTSFilter *filter; 159 MpegTSFilter *filter;
181 return NULL; 181 return NULL;
182 } 182 }
183 return filter; 183 return filter;
184 } 184 }
185 185
186 MpegTSFilter *mpegts_open_pes_filter(MpegTSContext *ts, unsigned int pid, 186 static MpegTSFilter *mpegts_open_pes_filter(MpegTSContext *ts, unsigned int pid,
187 PESCallback *pes_cb, 187 PESCallback *pes_cb,
188 void *opaque) 188 void *opaque)
189 { 189 {
190 MpegTSFilter *filter; 190 MpegTSFilter *filter;
191 MpegTSPESFilter *pes; 191 MpegTSPESFilter *pes;
203 pes->pes_cb = pes_cb; 203 pes->pes_cb = pes_cb;
204 pes->opaque = opaque; 204 pes->opaque = opaque;
205 return filter; 205 return filter;
206 } 206 }
207 207
208 void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter) 208 static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter)
209 { 209 {
210 int pid; 210 int pid;
211 211
212 pid = filter->pid; 212 pid = filter->pid;
213 if (filter->type == MPEGTS_SECTION) 213 if (filter->type == MPEGTS_SECTION)
607 /* remove filter */ 607 /* remove filter */
608 mpegts_close_filter(ts, ts->pat_filter); 608 mpegts_close_filter(ts, ts->pat_filter);
609 ts->pat_filter = NULL; 609 ts->pat_filter = NULL;
610 } 610 }
611 611
612 void mpegts_set_service(MpegTSContext *ts, int sid, 612 static void mpegts_set_service(MpegTSContext *ts, int sid,
613 SetServiceCallback *set_service_cb, void *opaque) 613 SetServiceCallback *set_service_cb, void *opaque)
614 { 614 {
615 ts->set_service_cb = set_service_cb; 615 ts->set_service_cb = set_service_cb;
616 ts->set_service_opaque = opaque; 616 ts->set_service_opaque = opaque;
617 ts->req_sid = sid; 617 ts->req_sid = sid;
694 mpegts_close_filter(ts, ts->sdt_filter); 694 mpegts_close_filter(ts, ts->sdt_filter);
695 ts->sdt_filter = NULL; 695 ts->sdt_filter = NULL;
696 } 696 }
697 697
698 /* scan services in a transport stream by looking at the SDT */ 698 /* scan services in a transport stream by looking at the SDT */
699 void mpegts_scan_sdt(MpegTSContext *ts) 699 static void mpegts_scan_sdt(MpegTSContext *ts)
700 { 700 {
701 ts->sdt_filter = mpegts_open_section_filter(ts, SDT_PID, 701 ts->sdt_filter = mpegts_open_section_filter(ts, SDT_PID,
702 sdt_cb, ts, 1); 702 sdt_cb, ts, 1);
703 } 703 }
704 704
705 /* scan services in a transport stream by looking at the PAT (better 705 /* scan services in a transport stream by looking at the PAT (better
706 than nothing !) */ 706 than nothing !) */
707 void mpegts_scan_pat(MpegTSContext *ts) 707 static void mpegts_scan_pat(MpegTSContext *ts)
708 { 708 {
709 ts->pat_filter = mpegts_open_section_filter(ts, PAT_PID, 709 ts->pat_filter = mpegts_open_section_filter(ts, PAT_PID,
710 pat_scan_cb, ts, 1); 710 pat_scan_cb, ts, 1);
711 } 711 }
712 712