]> git.pld-linux.org Git - packages/vlc.git/blob - vlc-libdvbpsi.patch
- updated to 2.0.8a
[packages/vlc.git] / vlc-libdvbpsi.patch
1 Index: modules/access/dtv/en50221.c
2 ===================================================================
3 --- modules/access/dtv/en50221.c.orig
4 +++ modules/access/dtv/en50221.c
5 @@ -2231,13 +2231,13 @@ int en50221_SetCAPMT( cam_t * p_cam, dvb
6  
7              if ( !b_needs_descrambling )
8              {
9 -                dvbpsi_DeletePMT( p_pmt );
10 +                dvbpsi_pmt_delete( p_pmt );
11                  p_pmt = p_cam->pp_selected_programs[i];
12                  p_cam->pp_selected_programs[i] = NULL;
13              }
14              else if( p_pmt != p_cam->pp_selected_programs[i] )
15              {
16 -                dvbpsi_DeletePMT( p_cam->pp_selected_programs[i] );
17 +                dvbpsi_pmt_delete( p_cam->pp_selected_programs[i] );
18                  p_cam->pp_selected_programs[i] = p_pmt;
19              }
20  
21 @@ -2276,7 +2276,7 @@ int en50221_SetCAPMT( cam_t * p_cam, dvb
22  
23      if ( !b_needs_descrambling )
24      {
25 -        dvbpsi_DeletePMT( p_pmt );
26 +        dvbpsi_pmt_delete( p_pmt );
27      }
28  
29      return VLC_SUCCESS;
30 @@ -2651,7 +2651,7 @@ void en50221_End( cam_t * p_cam )
31      {
32          if( p_cam->pp_selected_programs[i] != NULL )
33          {
34 -            dvbpsi_DeletePMT( p_cam->pp_selected_programs[i] );
35 +            dvbpsi_pmt_delete( p_cam->pp_selected_programs[i] );
36          }
37      }
38  
39 Index: modules/demux/ts.c
40 ===================================================================
41 --- modules/demux/ts.c.orig     2013-02-08 13:31:21.000000000 +0100
42 +++ modules/demux/ts.c  2013-07-27 08:34:12.650364561 +0200
43 @@ -272,7 +272,7 @@
44  
45  typedef struct
46  {
47 -    dvbpsi_handle   handle;
48 +    dvbpsi_t   *handle;
49  
50      int             i_version;
51      int             i_number;
52 @@ -286,7 +286,7 @@
53  typedef struct
54  {
55      /* for special PAT/SDT case */
56 -    dvbpsi_handle   handle; /* PAT/SDT/EIT */
57 +    dvbpsi_t   *handle; /* PAT/SDT/EIT */
58      int             i_pat_version;
59      int             i_sdt_version;
60  
61 @@ -407,7 +407,7 @@
62  
63  static void PATCallBack( demux_t *, dvbpsi_pat_t * );
64  static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt );
65 -static void PSINewTableCallBack( demux_t *, dvbpsi_handle,
66 +static void PSINewTableCallBack( demux_t *, dvbpsi_t *,
67                                   uint8_t  i_table_id, uint16_t i_extension );
68  static int ChangeKeyCallback( vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void * );
69  
70 @@ -667,7 +667,8 @@
71      /* Init PAT handler */
72      pat = &p_sys->pid[0];
73      PIDInit( pat, true, NULL );
74 -    pat->psi->handle = dvbpsi_AttachPAT( (dvbpsi_pat_callback)PATCallBack,
75 +    pat->psi->handle = dvbpsi_new(NULL, 0);
76 +    dvbpsi_pat_attach( pat->psi->handle, (dvbpsi_pat_callback)PATCallBack,
77                                           p_demux );
78      if( p_sys->b_dvb_meta )
79      {
80 @@ -675,18 +676,18 @@
81          ts_pid_t *eit = &p_sys->pid[0x12];
82  
83          PIDInit( sdt, true, NULL );
84 -        sdt->psi->handle =
85 -            dvbpsi_AttachDemux( (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
86 +        sdt->psi->handle = dvbpsi_new(NULL, 0);
87 +            dvbpsi_AttachDemux( sdt->psi->handle, (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
88                                  p_demux );
89          PIDInit( eit, true, NULL );
90 -        eit->psi->handle =
91 -            dvbpsi_AttachDemux( (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
92 +        eit->psi->handle = dvbpsi_new(NULL, 0);
93 +            dvbpsi_AttachDemux( eit->psi->handle, (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
94                                  p_demux );
95  #ifdef TS_USE_TDT
96          ts_pid_t *tdt = &p_sys->pid[0x14];
97          PIDInit( tdt, true, NULL );
98 -        tdt->psi->handle =
99 -            dvbpsi_AttachDemux( (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
100 +        tdt->psi->handle = dvbpsi_new(NULL, 0);
101 +            dvbpsi_AttachDemux( tdt->psi->handle, (dvbpsi_demux_new_cb_t)PSINewTableCallBack,
102                                  p_demux );
103  #endif
104          if( p_sys->b_access_control )
105 @@ -850,7 +851,7 @@
106              switch( pid->i_pid )
107              {
108              case 0: /* PAT */
109 -                dvbpsi_DetachPAT( pid->psi->handle );
110 +                dvbpsi_pat_detach( pid->psi->handle );
111                  free( pid->psi );
112                  break;
113              case 1: /* CAT */
114 @@ -1089,13 +1090,13 @@
115              {
116                  if( p_pid->i_pid == 0 || ( p_sys->b_dvb_meta && ( p_pid->i_pid == 0x11 || p_pid->i_pid == 0x12 || p_pid->i_pid == 0x14 ) ) )
117                  {
118 -                    dvbpsi_PushPacket( p_pid->psi->handle, p_pkt->p_buffer );
119 +                    dvbpsi_packet_push( p_pid->psi->handle, p_pkt->p_buffer );
120                  }
121                  else
122                  {
123                      for( int i_prg = 0; i_prg < p_pid->psi->i_prg; i_prg++ )
124                      {
125 -                        dvbpsi_PushPacket( p_pid->psi->prg[i_prg]->handle,
126 +                        dvbpsi_packet_push( p_pid->psi->prg[i_prg]->handle,
127                                             p_pkt->p_buffer );
128                      }
129                  }
130 @@ -1372,7 +1373,8 @@
131      prg->i_pid_pmt  = -1;
132      prg->i_version  = -1;
133      prg->i_number   = i_number != 0 ? i_number : TS_USER_PMT_NUMBER;
134 -    prg->handle     = dvbpsi_AttachPMT( i_number != TS_USER_PMT_NUMBER ? i_number : 1, (dvbpsi_pmt_callback)PMTCallBack, p_demux );
135 +    prg->handle     = dvbpsi_new(NULL, 0);
136 +    dvbpsi_pmt_attach( prg->handle, i_number != TS_USER_PMT_NUMBER ? i_number : 1, (dvbpsi_pmt_callback)PMTCallBack, p_demux );
137      TAB_APPEND( pmt->psi->i_prg, pmt->psi->prg, prg );
138  
139      psz = strchr( psz, '=' );
140 @@ -1588,13 +1590,13 @@
141      if( pid->psi )
142      {
143          if( pid->psi->handle )
144 -            dvbpsi_DetachPMT( pid->psi->handle );
145 +            dvbpsi_pmt_detach( pid->psi->handle );
146          for( int i = 0; i < pid->psi->i_prg; i++ )
147          {
148              if( pid->psi->prg[i]->iod )
149                  IODFree( pid->psi->prg[i]->iod );
150              if( pid->psi->prg[i]->handle )
151 -                dvbpsi_DetachPMT( pid->psi->prg[i]->handle );
152 +                dvbpsi_pmt_detach( pid->psi->prg[i]->handle );
153              free( pid->psi->prg[i] );
154          }
155          free( pid->psi->prg );
156 @@ -2937,14 +2939,14 @@
157          ( !p_sdt->b_current_next ||
158            p_sdt->i_version == sdt->psi->i_sdt_version ) )
159      {
160 -        dvbpsi_DeleteSDT( p_sdt );
161 +        dvbpsi_sdt_delete( p_sdt );
162          return;
163      }
164  
165 -    msg_Dbg( p_demux, "new SDT ts_id=%d version=%d current_next=%d "
166 +/*  msg_Dbg( p_demux, "new SDT ts_id=%d version=%d current_next=%d "
167               "network_id=%d",
168               p_sdt->i_ts_id, p_sdt->i_version, p_sdt->b_current_next,
169 -             p_sdt->i_network_id );
170 +             p_sdt->i_network_id ); */
171  
172      p_sys->b_broken_charset = false;
173  
174 @@ -3055,7 +3057,7 @@
175      }
176  
177      sdt->psi->i_sdt_version = p_sdt->i_version;
178 -    dvbpsi_DeleteSDT( p_sdt );
179 +    dvbpsi_sdt_delete( p_sdt );
180  }
181  
182  /* i_year: year - 1900  i_month: 0-11  i_mday: 1-31 i_hour: 0-23 i_minute: 0-59 i_second: 0-59 */
183 @@ -3125,7 +3127,7 @@
184  
185      p_sys->i_tdt_delta = CLOCK_FREQ * EITConvertStartTime( p_tdt->i_utc_time )
186                           - mdate();
187 -    dvbpsi_DeleteTOT(p_tdt);
188 +    dvbpsi_tot_delete(p_tdt);
189  }
190  #endif
191  
192 @@ -3140,16 +3142,16 @@
193      msg_Dbg( p_demux, "EITCallBack called" );
194      if( !p_eit->b_current_next )
195      {
196 -        dvbpsi_DeleteEIT( p_eit );
197 +        dvbpsi_eit_delete( p_eit );
198          return;
199      }
200  
201 -    msg_Dbg( p_demux, "new EIT service_id=%d version=%d current_next=%d "
202 +/*  msg_Dbg( p_demux, "new EIT service_id=%d version=%d current_next=%d "
203               "ts_id=%d network_id=%d segment_last_section_number=%d "
204               "last_table_id=%d",
205               p_eit->i_service_id, p_eit->i_version, p_eit->b_current_next,
206               p_eit->i_ts_id, p_eit->i_network_id,
207 -             p_eit->i_segment_last_section_number, p_eit->i_last_table_id );
208 +             p_eit->i_segment_last_section_number, p_eit->i_last_table_id ); */
209  
210      p_epg = vlc_epg_New( NULL );
211      for( p_evt = p_eit->p_first_event; p_evt; p_evt = p_evt->p_next )
212 @@ -3277,7 +3279,7 @@
213      }
214      vlc_epg_Delete( p_epg );
215  
216 -    dvbpsi_DeleteEIT( p_eit );
217 +    dvbpsi_eit_delete( p_eit );
218  }
219  static void EITCallBackCurrentFollowing( demux_t *p_demux, dvbpsi_eit_t *p_eit )
220  {
221 @@ -3288,7 +3290,7 @@
222      EITCallBack( p_demux, p_eit, false );
223  }
224  
225 -static void PSINewTableCallBack( demux_t *p_demux, dvbpsi_handle h,
226 +static void PSINewTableCallBack( demux_t *p_demux, dvbpsi_t *h,
227                                   uint8_t  i_table_id, uint16_t i_extension )
228  {
229  #if 0
230 @@ -3300,7 +3302,7 @@
231          msg_Dbg( p_demux, "PSINewTableCallBack: table 0x%x(%d) ext=0x%x(%d)",
232                   i_table_id, i_table_id, i_extension, i_extension );
233  
234 -        dvbpsi_AttachSDT( h, i_table_id, i_extension,
235 +        dvbpsi_sdt_attach( h, i_table_id, i_extension,
236                            (dvbpsi_sdt_callback)SDTCallBack, p_demux );
237      }
238      else if( p_demux->p_sys->pid[0x11].psi->i_sdt_version != -1 &&
239 @@ -3313,7 +3315,7 @@
240          dvbpsi_eit_callback cb = i_table_id == 0x4e ?
241                                      (dvbpsi_eit_callback)EITCallBackCurrentFollowing :
242                                      (dvbpsi_eit_callback)EITCallBackSchedule;
243 -        dvbpsi_AttachEIT( h, i_table_id, i_extension, cb, p_demux );
244 +        dvbpsi_eit_attach( h, i_table_id, i_extension, cb, p_demux );
245      }
246  #ifdef TS_USE_TDT
247      else if( p_demux->p_sys->pid[0x11].psi->i_sdt_version != -1 &&
248 @@ -3321,7 +3323,7 @@
249      {
250           msg_Dbg( p_demux, "PSINewTableCallBack: table 0x%x(%d) ext=0x%x(%d)",
251                   i_table_id, i_table_id, i_extension, i_extension );
252 -         dvbpsi_AttachTOT( h, i_table_id, i_extension,
253 +         dvbpsi_tot_attach( h, i_table_id, i_extension,
254                             (dvbpsi_tot_callback)TDTCallBack, p_demux);
255      }
256  #endif
257 @@ -4118,14 +4120,14 @@
258      if( pmt == NULL )
259      {
260          msg_Warn( p_demux, "unreferenced program (broken stream)" );
261 -        dvbpsi_DeletePMT(p_pmt);
262 +        dvbpsi_pmt_delete(p_pmt);
263          return;
264      }
265  
266      if( prg->i_version != -1 &&
267          ( !p_pmt->b_current_next || prg->i_version == p_pmt->i_version ) )
268      {
269 -        dvbpsi_DeletePMT( p_pmt );
270 +        dvbpsi_pmt_delete( p_pmt );
271          return;
272      }
273  
274 @@ -4354,7 +4356,7 @@
275      if( !ProgramIsSelected( p_demux, prg->i_number )
276       || stream_Control( p_demux->s, STREAM_CONTROL_ACCESS,
277                          ACCESS_SET_PRIVATE_ID_CA, p_pmt ) != VLC_SUCCESS )
278 -        dvbpsi_DeletePMT( p_pmt );
279 +        dvbpsi_pmt_delete( p_pmt );
280  
281      for( int i = 0; i < i_clean; i++ )
282      {
283 @@ -4382,7 +4384,7 @@
284                p_pat->i_version == pat->psi->i_pat_version ) ) ||
285          p_sys->b_user_pmt )
286      {
287 -        dvbpsi_DeletePAT( p_pat );
288 +        dvbpsi_pat_delete( p_pat );
289          return;
290      }
291  
292 @@ -4504,7 +4506,7 @@
293              {
294                  PIDInit( pmt, true, pat->psi );
295                  pmt->psi->prg[pmt->psi->i_prg-1]->handle =
296 -                    dvbpsi_AttachPMT( p_program->i_number,
297 +                    dvbpsi_pmt_attach( p_program->i_number,
298                                        (dvbpsi_pmt_callback)PMTCallBack,
299                                        p_demux );
300                  pmt->psi->prg[pmt->psi->i_prg-1]->i_number =
301 @@ -4526,5 +4528,5 @@
302      }
303      pat->psi->i_pat_version = p_pat->i_version;
304  
305 -    dvbpsi_DeletePAT( p_pat );
306 +    dvbpsi_pat_delete( p_pat );
307  }
308 Index: modules/mux/mpeg/ts.c
309 ===================================================================
310 --- modules/mux/mpeg/ts.c.orig
311 +++ modules/mux/mpeg/ts.c
312 @@ -2333,15 +2333,15 @@ static void GetPAT( sout_mux_t *p_mux,
313      dvbpsi_psi_section_t *p_section;
314      int i;
315  
316 -    dvbpsi_InitPAT( &pat, p_sys->i_tsid, p_sys->i_pat_version_number,
317 +    dvbpsi_pat_init( &pat, p_sys->i_tsid, p_sys->i_pat_version_number,
318                      1 );      /* b_current_next */
319      /* add all programs */
320      for ( i = 0; i < p_sys->i_num_pmt; i++ )
321 -        dvbpsi_PATAddProgram( &pat,
322 +        dvbpsi_pat_program_add( &pat,
323                                p_sys->i_pmt_program_number[i],
324                                p_sys->pmt[i].i_pid );
325  
326 -    p_section = dvbpsi_GenPATSections( &pat,
327 +    p_section = dvbpsi_pat_sections_generate( &pat,
328                                         0 );     /* max program per section */
329  
330      p_pat = WritePSISection( p_mux->p_sout, p_section );
331 @@ -2349,7 +2349,7 @@ static void GetPAT( sout_mux_t *p_mux,
332      PEStoTS( p_mux->p_sout, c, p_pat, &p_sys->pat );
333  
334      dvbpsi_DeletePSISections( p_section );
335 -    dvbpsi_EmptyPAT( &pat );
336 +    dvbpsi_pat_empty( &pat );
337  }
338  
339  static uint32_t GetDescriptorLength24b( int i_length )
340 @@ -2394,11 +2394,11 @@ static void GetPMT( sout_mux_t *p_mux, s
341      }
342  
343      if( p_sys->b_sdt )
344 -        dvbpsi_InitSDT( &sdt, p_sys->i_tsid, 1, 1, p_sys->i_netid );
345 +        dvbpsi_sdt_init( &sdt, p_sys->i_tsid, 1, 1, p_sys->i_netid );
346  
347      for( i = 0; i < p_sys->i_num_pmt; i++ )
348      {
349 -        dvbpsi_InitPMT( &p_sys->dvbpmt[i],
350 +        dvbpsi_pmt_init( &p_sys->dvbpmt[i],
351                          p_sys->i_pmt_program_number[i],   /* program number */
352                          p_sys->i_pmt_version_number,
353                          1,      /* b_current_next */
354 @@ -2406,7 +2406,7 @@ static void GetPMT( sout_mux_t *p_mux, s
355  
356          if( p_sys->b_sdt )
357          {
358 -            p_service = dvbpsi_SDTAddService( &sdt,
359 +            p_service = dvbpsi_sdt_service_add( &sdt,
360                  p_sys->i_pmt_program_number[i],  /* service id */
361                  0,         /* eit schedule */
362                  0,         /* eit present */
363 @@ -2435,7 +2435,7 @@ static void GetPMT( sout_mux_t *p_mux, s
364                      memcpy( &psz_sdt_desc[3+strlen(psz_sdtprov)], psz_sdtserv,
365                              strlen(psz_sdtserv) );
366  
367 -                    dvbpsi_SDTServiceAddDescriptor( p_service, 0x48,
368 +                    dvbpsi_sdt_service_descriptor_add( p_service, 0x48,
369                              3 + strlen(psz_sdtprov) + strlen(psz_sdtserv),
370                              (uint8_t *)psz_sdt_desc );
371                      free( psz_sdt_desc );
372 @@ -2590,13 +2590,13 @@ static void GetPMT( sout_mux_t *p_mux, s
373          p_usepid = bsearch( &p_usepid, p_sys->pmtmap, p_sys->i_num_pmt,
374                              sizeof(pmt_map_t), pmtcompare );
375          if( p_usepid != NULL )
376 -            dvbpsi_PMTAddDescriptor(
377 +            dvbpsi_pmt_descriptor_add(
378                      &p_sys->dvbpmt[((pmt_map_t *)p_usepid)->i_prog], 0x1d,
379                      bits.i_data, bits.p_data );
380          else
381              msg_Err( p_mux, "Received an unmapped PID" );
382  #else
383 -        dvbpsi_PMTAddDescriptor( &p_sys->dvbpmt[0], 0x1d, bits.i_data,
384 +        dvbpsi_pmt_descriptor_add( &p_sys->dvbpmt[0], 0x1d, bits.i_data,
385                                   bits.p_data );
386  #endif
387      }
388 @@ -2612,12 +2612,12 @@ static void GetPMT( sout_mux_t *p_mux, s
389                              sizeof(pmt_map_t), intcompare );
390  
391          if( p_usepid != NULL )
392 -            p_es = dvbpsi_PMTAddES(
393 +            p_es = dvbpsi_pmt_es_add(
394                      &p_sys->dvbpmt[((pmt_map_t *)p_usepid)->i_prog],
395                      p_stream->i_stream_type, p_stream->i_pid );
396          else
397              /* If there's an error somewhere, dump it to the first pmt */
398 -            p_es = dvbpsi_PMTAddES( &p_sys->dvbpmt[0], p_stream->i_stream_type,
399 +            p_es = dvbpsi_pmt_es_add( &p_sys->dvbpmt[0], p_stream->i_stream_type,
400                                      p_stream->i_pid );
401  
402          if( p_stream->i_stream_id == 0xfa || p_stream->i_stream_id == 0xfb )
403 @@ -2627,7 +2627,7 @@ static void GetPMT( sout_mux_t *p_mux, s
404              /* SL descriptor */
405              es_id[0] = (p_stream->i_es_id >> 8)&0xff;
406              es_id[1] = (p_stream->i_es_id)&0xff;
407 -            dvbpsi_PMTESAddDescriptor( p_es, 0x1f, 2, es_id );
408 +            dvbpsi_pmt_es_descriptor_add( p_es, 0x1f, 2, es_id );
409          }
410          else if( p_stream->i_stream_type == 0xa0 )
411          {
412 @@ -2648,21 +2648,21 @@ static void GetPMT( sout_mux_t *p_mux, s
413              }
414  
415              /* 0xa0 is private */
416 -            dvbpsi_PMTESAddDescriptor( p_es, 0xa0, i_extra + 10, data );
417 +            dvbpsi_pmt_es_descriptor_add( p_es, 0xa0, i_extra + 10, data );
418          }
419          else if( p_stream->i_stream_type == 0x81 )
420          {
421              uint8_t format[4] = { 0x41, 0x43, 0x2d, 0x33 };
422  
423              /* "registration" descriptor : "AC-3" */
424 -            dvbpsi_PMTESAddDescriptor( p_es, 0x05, 4, format );
425 +            dvbpsi_pmt_es_descriptor_add( p_es, 0x05, 4, format );
426          }
427          else if( p_stream->i_codec == VLC_CODEC_DIRAC )
428          {
429              /* Dirac registration descriptor */
430  
431              uint8_t data[4] = { 'd', 'r', 'a', 'c' };
432 -            dvbpsi_PMTESAddDescriptor( p_es, 0x05, 4, data );
433 +            dvbpsi_pmt_es_descriptor_add( p_es, 0x05, 4, data );
434          }
435          else if( p_stream->i_codec == VLC_CODEC_DTS )
436          {
437 @@ -2670,18 +2670,18 @@ static void GetPMT( sout_mux_t *p_mux, s
438  
439              /* DTS format identifier, frame size 1024 - FIXME */
440              uint8_t data[4] = { 0x44, 0x54, 0x53, 0x32 };
441 -            dvbpsi_PMTESAddDescriptor( p_es, 0x05, 4, data );
442 +            dvbpsi_pmt_es_descriptor_add( p_es, 0x05, 4, data );
443          }
444          else if( p_stream->i_codec == VLC_CODEC_EAC3 )
445          {
446              uint8_t data[1] = { 0x00 };
447 -            dvbpsi_PMTESAddDescriptor( p_es, 0x7a, 1, data );
448 +            dvbpsi_pmt_es_descriptor_add( p_es, 0x7a, 1, data );
449          }
450          else if( p_stream->i_codec == VLC_CODEC_TELETEXT )
451          {
452              if( p_stream->i_decoder_specific_info )
453              {
454 -                dvbpsi_PMTESAddDescriptor( p_es, 0x56,
455 +                dvbpsi_pmt_es_descriptor_add( p_es, 0x56,
456                                             p_stream->i_decoder_specific_info,
457                                             p_stream->p_decoder_specific_info );
458              }
459 @@ -2693,7 +2693,7 @@ static void GetPMT( sout_mux_t *p_mux, s
460              if( p_stream->i_decoder_specific_info )
461              {
462                  /* pass-through from the TS demux */
463 -                dvbpsi_PMTESAddDescriptor( p_es, 0x59,
464 +                dvbpsi_pmt_es_descriptor_add( p_es, 0x59,
465                                             p_stream->i_decoder_specific_info,
466                                             p_stream->p_decoder_specific_info );
467              }
468 @@ -2714,7 +2714,7 @@ static void GetPMT( sout_mux_t *p_mux, s
469  
470                  p_descr = dvbpsi_GenSubtitlingDr( &descr, 0 );
471                  /* Work around bug in old libdvbpsi */ p_descr->i_length = 8;
472 -                dvbpsi_PMTESAddDescriptor( p_es, p_descr->i_tag,
473 +                dvbpsi_pmt_es_descriptor_add( p_es, p_descr->i_tag,
474                                             p_descr->i_length, p_descr->p_data );
475              }
476              continue;
477 @@ -2733,22 +2733,22 @@ static void GetPMT( sout_mux_t *p_mux, s
478                  data[i*4+2] = p_stream->lang[i*3+2];
479                  data[i*4+3] = 0x00; /* audio type: 0x00 undefined */
480              }
481 -            dvbpsi_PMTESAddDescriptor( p_es, 0x0a, 4*p_stream->i_langs, data );
482 +            dvbpsi_pmt_es_descriptor_add( p_es, 0x0a, 4*p_stream->i_langs, data );
483          }
484      }
485  
486      for( i = 0; i < p_sys->i_num_pmt; i++ )
487      {
488 -        p_section[i] = dvbpsi_GenPMTSections( &p_sys->dvbpmt[i] );
489 +        p_section[i] = dvbpsi_pmt_sections_generate( &p_sys->dvbpmt[i] );
490          p_pmt[i] = WritePSISection( p_mux->p_sout, p_section[i] );
491          PEStoTS( p_mux->p_sout, c, p_pmt[i], &p_sys->pmt[i] );
492          dvbpsi_DeletePSISections( p_section[i] );
493 -        dvbpsi_EmptyPMT( &p_sys->dvbpmt[i] );
494 +        dvbpsi_pmt_empty( &p_sys->dvbpmt[i] );
495      }
496  
497      if( p_sys->b_sdt )
498      {
499 -        p_section2 = dvbpsi_GenSDTSections( &sdt );
500 +        p_section2 = dvbpsi_sdt_sections_generate( &sdt );
501          p_sdt = WritePSISection( p_mux->p_sout, p_section2 );
502          PEStoTS( p_mux->p_sout, c, p_sdt, &p_sys->sdt );
503          dvbpsi_DeletePSISections( p_section2 );
504 --- modules/demux/ts.c.orig     2013-08-08 19:38:57.049290576 +0200
505 +++ modules/demux/ts.c  2013-08-09 16:06:44.526199046 +0200
506 @@ -3264,7 +3264,7 @@
507      {
508          if( b_current_following &&
509              (  p_sys->i_current_program == -1 ||
510 -               p_sys->i_current_program == p_eit->i_service_id ) )
511 +               p_sys->i_current_program == p_eit->i_extension ) )
512          {
513              p_sys->i_dvb_length = 0;
514              p_sys->i_dvb_start = 0;
515 @@ -3275,7 +3275,7 @@
516                  p_sys->i_dvb_length = CLOCK_FREQ * p_epg->p_current->i_duration;
517              }
518          }
519 -        es_out_Control( p_demux->out, ES_OUT_SET_GROUP_EPG, p_eit->i_service_id, p_epg );
520 +        es_out_Control( p_demux->out, ES_OUT_SET_GROUP_EPG, p_eit->i_extension, p_epg );
521      }
522      vlc_epg_Delete( p_epg );
523  
524 @@ -4506,7 +4506,8 @@
525              {
526                  PIDInit( pmt, true, pat->psi );
527                  pmt->psi->prg[pmt->psi->i_prg-1]->handle =
528 -                    dvbpsi_pmt_attach( p_program->i_number,
529 +                   dvbpsi_new(NULL, 0);
530 +                dvbpsi_pmt_attach(pmt->psi->prg[pmt->psi->i_prg-1]->handle, p_program->i_number,
531                                        (dvbpsi_pmt_callback)PMTCallBack,
532                                        p_demux );
533                  pmt->psi->prg[pmt->psi->i_prg-1]->i_number =
534 --- modules/mux/mpeg/ts.c.orig  2013-08-09 16:18:12.519503507 +0200
535 +++ modules/mux/mpeg/ts.c       2013-08-09 17:30:33.465988000 +0200
536 @@ -2341,8 +2341,10 @@
537                                p_sys->i_pmt_program_number[i],
538                                p_sys->pmt[i].i_pid );
539  
540 -    p_section = dvbpsi_pat_sections_generate( &pat,
541 +    dvbpsi_t *dvbpsi = dvbpsi_new(NULL, 0);
542 +    p_section = dvbpsi_pat_sections_generate( dvbpsi, &pat,
543                                         0 );     /* max program per section */
544 +    dvbpsi_delete(dvbpsi);
545  
546      p_pat = WritePSISection( p_mux->p_sout, p_section );
547  
548 @@ -2394,7 +2396,7 @@
549      }
550  
551      if( p_sys->b_sdt )
552 -        dvbpsi_sdt_init( &sdt, p_sys->i_tsid, 1, 1, p_sys->i_netid );
553 +        dvbpsi_sdt_init( &sdt, p_sys->i_tsid, 1, 1, false, p_sys->i_netid );
554  
555      for( i = 0; i < p_sys->i_num_pmt; i++ )
556      {
557 @@ -2737,9 +2739,10 @@
558          }
559      }
560  
561 +    dvbpsi_t *dvbpsi = dvbpsi_new(NULL, 0);
562      for( i = 0; i < p_sys->i_num_pmt; i++ )
563      {
564 -        p_section[i] = dvbpsi_pmt_sections_generate( &p_sys->dvbpmt[i] );
565 +        p_section[i] = dvbpsi_pmt_sections_generate( dvbpsi, &p_sys->dvbpmt[i] );
566          p_pmt[i] = WritePSISection( p_mux->p_sout, p_section[i] );
567          PEStoTS( p_mux->p_sout, c, p_pmt[i], &p_sys->pmt[i] );
568          dvbpsi_DeletePSISections( p_section[i] );
569 @@ -2748,10 +2751,11 @@
570  
571      if( p_sys->b_sdt )
572      {
573 -        p_section2 = dvbpsi_sdt_sections_generate( &sdt );
574 +        p_section2 = dvbpsi_sdt_sections_generate( dvbpsi, &sdt );
575          p_sdt = WritePSISection( p_mux->p_sout, p_section2 );
576          PEStoTS( p_mux->p_sout, c, p_sdt, &p_sys->sdt );
577          dvbpsi_DeletePSISections( p_section2 );
578 -        dvbpsi_EmptySDT( &sdt );
579 +        dvbpsi_sdt_empty( &sdt );
580      }
581 +    dvbpsi_delete(dvbpsi);
582  }
This page took 0.128526 seconds and 3 git commands to generate.