Advertisement
Guest User

Untitled

a guest
Nov 18th, 2014
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. diff --git a/doc/muxers.texi b/doc/muxers.texi
  2. index c6ba604..34afaf9 100644
  3. --- a/doc/muxers.texi
  4. +++ b/doc/muxers.texi
  5. @@ -677,6 +677,9 @@ Set the transport_stream_id (default 0x0001). This identifies a
  6. transponder in DVB.
  7. @item -mpegts_service_id @var{number}
  8. Set the service_id (default 0x0001) also known as program in DVB.
  9. +@item -mpegts_service_type @var{number}
  10. +Set the program service_type (default 0x01 - TV). For the list of valid
  11. +values see ETSI 300 468.
  12. @item -mpegts_pmt_start_pid @var{number}
  13. Set the first PID for PMT (default 0x1000, max 0x1f00).
  14. @item -mpegts_start_pid @var{number}
  15. diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
  16. index d73b75f..b8f89f7 100644
  17. --- a/libavformat/mpegtsenc.c
  18. +++ b/libavformat/mpegtsenc.c
  19. @@ -76,6 +76,7 @@ typedef struct MpegTSWrite {
  20. int transport_stream_id;
  21. int original_network_id;
  22. int service_id;
  23. + int service_type;
  24.  
  25. int pmt_start_pid;
  26. int start_pid;
  27. @@ -521,7 +522,7 @@ static void mpegts_write_sdt(AVFormatContext *s)
  28. *q++ = 0x48;
  29. desc_len_ptr = q;
  30. q++;
  31. - *q++ = 0x01; /* digital television service */
  32. + *q++ = ts->service_type;
  33. putstr8(&q, service->provider_name);
  34. putstr8(&q, service->name);
  35. desc_len_ptr[0] = q - desc_len_ptr - 1;
  36. @@ -1433,6 +1434,9 @@ static const AVOption options[] = {
  37. { "mpegts_service_id", "Set service_id field.",
  38. offsetof(MpegTSWrite, service_id), AV_OPT_TYPE_INT,
  39. { .i64 = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM },
  40. + { "mpegts_service_type", "Set service_type field.",
  41. + offsetof(MpegTSWrite, service_type), AV_OPT_TYPE_INT,
  42. + { .i64 = 0x0001 }, 0x00, 0xff, AV_OPT_FLAG_ENCODING_PARAM },
  43. { "mpegts_pmt_start_pid", "Set the first pid of the PMT.",
  44. offsetof(MpegTSWrite, pmt_start_pid), AV_OPT_TYPE_INT,
  45. { .i64 = 0x1000 }, 0x0010, 0x1f00, AV_OPT_FLAG_ENCODING_PARAM },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement