Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DVB subtitle support #705

Closed
wants to merge 807 commits into from
Closed

Add DVB subtitle support #705

wants to merge 807 commits into from

Conversation

tresvecesseis
Copy link
Contributor

This is a first patch to bring DVB subtitle support to Exoplayer, it is working we SD and HD subtitle format. DVB subs is the standard subtitling format in the countries that use the DVB-t/s/c for TV broadcasting and the IP providers based the DVB-IPI standards. We have implemented a DvbSubtitlesTrackRenderer() but we could change it to a generic GraphicTextTrackRenderer() if you want to have other graphic subtitle formats as the DVD VOBSUBs .

}
}

public DvbSubtitlesParser (Paint paint, Bitmap bitmap) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space?

andrewlewis and others added 27 commits February 2, 2016 19:42
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=113373670
DTS Express (which is DTS LBR according to http://www.mp4ra.org/codecs.html) is
not supported for passthrough playback currently. Associate a different MIME
type with it so that we don't try to use DTS passthrough for playing DTS
Express.

The MIME type for DTS Express is just vnd.dts.hd, with a profile parameter
indicating that it's DTS Express rather than one of the other formats.
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=113502646
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=113504366
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=113564300
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=113569520
Issue: google#1195
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=113635051
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=113982743
Issue: google#497
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114089692
In general, I think mimeType is sufficient for decoder selection. In
ExoPlayer V2 we'll be asking renderers whether they can handle individual
(non-adaptive) streams, and also whether the renderer is adaptive capable
for a given mimeType (to determine whether we can combine streams into an
adaptive one). This model doesn't work unless the same decoder is selected
for a given mimeType, regardless of any other properties of the format.
There are more complicated models, but I think they end up getting pretty
messy, so I'd rather go this way for now.
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114146950
- readFully calls when reading a string or varint may have 0 length.
  The behavior of a 0 length read isn't well defined either at the
  ExtractorInput or DataSource level, particularly when the read may
  also coincide with EOS. We'll work on defining these cases properly
  going forward, but in the meantime this fix avoids attempting 0
  length reads.
- [Aside] UTF8 the is guaranteed default charset on Android.
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114155058
…ut).

- Use it to simplify a bunch of tests.
- Will also replace RecordableExtractorInput in a subsequent CL.
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114161162
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114177978
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114229446
This avoids accessing PtsTimestampAdjuster through a thunk method,
and allows the PesReader classes to be static, which is nice in
general.
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114238880
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114245075
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114298016
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114310729
Issue: google#1235
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114317492
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114329545
Failing to parse a UUID from a ContentProtection should only
result in filtering if there was actually a cenc:pssh element
there for us to get it from.

Issue: google#1256
-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=114429992
@cooliobr
Copy link

Hi, one question, this commit are working with DVBSUB ?
i try some streams but not work

@tresvecesseis
Copy link
Contributor Author

Yep we use it, but the patch is old, i will try to rebase it to the current
code base.
El 26 may. 2016 6:06 p. m., "cooliobr" [email protected] escribió:

Hi, one question, this commit are working with DVBSUB ?
i try some streams but not work


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#705 (comment)

@cooliobr
Copy link

please, if you update let me know, and if possible try this stream
http://200.194.237.226:8182/live/fox1/playlist.m3u8?x1=test&x2=test&canal=FOX1&mac=cc:2d:8c:aa:02:c2&ipaddr=187.58.37.123

@tresvecesseis
Copy link
Contributor Author

@cooliobr your stream have two subs tracks, one DVB and other SCTE, both are correctly signalled and the DVB one should be decoded, tomorrow when I have access to an android device I will test your stream

@cooliobr
Copy link

Thanks, i will appreciate your help.

@cooliobr
Copy link

Hi, any news to me ?

@tresvecesseis
Copy link
Contributor Author

We hace just finished a patch to be able to render your subs, I will push
it soon
El 30 may. 2016 4:43 p. m., "cooliobr" [email protected] escribió:

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#705 (comment), or mute
the thread
https:/notifications/unsubscribe/AJ99v0rPj9N2lp7r0VwhhCXrOipYfgXVks5qGvd3gaJpZM4FphYb
.

@tresvecesseis
Copy link
Contributor Author

This patch should do the trick, The TsExtractor part solves an issue with the audio language parsing, and  the DvbSubtitlesParse solves the subtitile visualization problema, we can´t connect to your HLS stream but the dumped ts segments work propelry:

diff --git a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

diff --git a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 25b997f..ea1f1b6 100644

--- a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

+++ b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

@@ -347,7 +347,7 @@ public final class TsExtractor implements Extractor {

           // Read descriptors in PES packets containing private data.

           streamType = readPrivateDataStreamType(sectionData, esInfoLength);

         } else {

-          if (streamType == TS_STREAM_TYPE_MPA || streamType == TS_STREAM_TYPE_MPA_LSF) {

+          if ((streamType == TS_STREAM_TYPE_MPA || streamType == TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) {

             descriptorScratch = new ParsableBitArray(new byte[esInfoLength]);

             sectionData.readBytes(descriptorScratch, esInfoLength);

           } else {

@@ -364,21 +364,25 @@ public final class TsExtractor implements Extractor {

         int type = -1;

         switch (streamType) {

           case TS_STREAM_TYPE_MPA:

-            type = descriptorScratch.readBits(8);

-            switch (type) {

-              case 0x0a:

-                language = readDescriptorAudio(descriptorScratch);

-                break;

+            if (esInfoLength > 0) {

+              type = descriptorScratch.readBits(8);

+              switch (type) {

+                case 0x0a:

+                  language = readDescriptorAudio(descriptorScratch);

+                  break;

+              }

             }

             pesPayloadReader = new MpegAudioReader(output.track(elementaryPid), language);

             pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA);

             break;

           case TS_STREAM_TYPE_MPA_LSF:

-            type = descriptorScratch.readBits(8);

-            switch (type) {

-              case 0x0a:

-                language = readDescriptorAudio(descriptorScratch);

-                break;

+            if (esInfoLength > 0) {

+              type = descriptorScratch.readBits(8);

+              switch (type) {

+                case 0x0a:

+                  language = readDescriptorAudio(descriptorScratch);

+                  break;

+              }

             }

             pesPayloadReader = new MpegAudioReader(output.track(elementaryPid), language);

             pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF);

diff --git a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 6084f7d..af47b26 100644

--- a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

+++ b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

@@ -264,7 +264,7 @@ public class DvbSubtitlesParser {

       if(displayCounter == 0) {

         displays = new DvbSubDisplay[1];

         displays[0] = new DvbSubDisplay();

-        displayCounter = 0;

+        displayCounter = 1;

       } else {

         displays = Arrays.copyOf(displays, displayCounter + 1);

         displayCounter++;

2.8.1

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Monday 30 May 2016 at 16:43
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Author [email protected]
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@cooliobr
Copy link

is possible you put this diff in your repository ?
https:/tresvecesseis/ExoPlayer will be better for me

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:

This patch should do the trick, The TsExtractor part solves an issue with
the audio language parsing, and the DvbSubtitlesParse solves the subtitile
visualization problema, we can´t connect to your HLS stream but the dumped
ts segments work propelry:

diff --git
a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java
b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

diff --git
a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java
b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 25b997f..ea1f1b6 100644


a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

+++
b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

@@ -347,7 +347,7 @@ public final class TsExtractor implements Extractor {

       // Read descriptors in PES packets containing private data.

       streamType = readPrivateDataStreamType(sectionData,

esInfoLength);

     } else {
  •      if (streamType == TS_STREAM_TYPE_MPA || streamType ==
    

    TS_STREAM_TYPE_MPA_LSF) {

  •      if ((streamType == TS_STREAM_TYPE_MPA || streamType ==
    

    TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) {

         descriptorScratch = new ParsableBitArray(new
    

    byte[esInfoLength]);

         sectionData.readBytes(descriptorScratch, esInfoLength);
    
       } else {
    

@@ -364,21 +364,25 @@ public final class TsExtractor implements Extractor {

     int type = -1;

     switch (streamType) {

       case TS_STREAM_TYPE_MPA:
  •        type = descriptorScratch.readBits(8);
    
  •        switch (type) {
    
  •          case 0x0a:
    
  •            language = readDescriptorAudio(descriptorScratch);
    
  •            break;
    
  •        if (esInfoLength > 0) {
    
  •          type = descriptorScratch.readBits(8);
    
  •          switch (type) {
    
  •            case 0x0a:
    
  •              language = readDescriptorAudio(descriptorScratch);
    
  •              break;
    
  •          }
    
         }
    
         pesPayloadReader = new
    

    MpegAudioReader(output.track(elementaryPid), language);

         pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA);
    
         break;
    
       case TS_STREAM_TYPE_MPA_LSF:
    
  •        type = descriptorScratch.readBits(8);
    
  •        switch (type) {
    
  •          case 0x0a:
    
  •            language = readDescriptorAudio(descriptorScratch);
    
  •            break;
    
  •        if (esInfoLength > 0) {
    
  •          type = descriptorScratch.readBits(8);
    
  •          switch (type) {
    
  •            case 0x0a:
    
  •              language = readDescriptorAudio(descriptorScratch);
    
  •              break;
    
  •          }
    
         }
    
         pesPayloadReader = new
    

    MpegAudioReader(output.track(elementaryPid), language);

         pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF);
    

diff --git
a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java
b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 6084f7d..af47b26 100644


a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

+++
b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

@@ -264,7 +264,7 @@ public class DvbSubtitlesParser {

   if(displayCounter == 0) {

     displays = new DvbSubDisplay[1];

     displays[0] = new DvbSubDisplay();
  •    displayCounter = 0;
    
  •    displayCounter = 1;
    

    } else {

     displays = Arrays.copyOf(displays, displayCounter + 1);
    
     displayCounter++;
    

2.8.1

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Monday 30 May 2016 at 16:43
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Author <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment), or mute
the thread
https:/notifications/unsubscribe/AEKBih92EUkz4SI84T4GqioWs36fJ723ks5qHBLagaJpZM4FphYb
.

@tresvecesseis
Copy link
Contributor Author

It will take a while, I´m rebasing all our trees  to the current dev tree, sadly I didn’t began with the DVB subs one

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:08
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment [email protected]
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

is possible you put this diff in your repository ?
https:/tresvecesseis/ExoPlayer will be better for me

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:

This patch should do the trick, The TsExtractor part solves an issue with
the audio language parsing, and the DvbSubtitlesParse solves the subtitile
visualization problema, we can´t connect to your HLS stream but the dumped
ts segments work propelry:

diff --git
a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java
b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

diff --git
a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java
b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 25b997f..ea1f1b6 100644


a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

+++
b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

@@ -347,7 +347,7 @@ public final class TsExtractor implements Extractor {

// Read descriptors in PES packets containing private data.

streamType = readPrivateDataStreamType(sectionData,
esInfoLength);

} else {

  • if (streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) {
  • if ((streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) {

descriptorScratch = new ParsableBitArray(new
byte[esInfoLength]);

sectionData.readBytes(descriptorScratch, esInfoLength);

} else {

@@ -364,21 +364,25 @@ public final class TsExtractor implements Extractor {

int type = -1;

switch (streamType) {

case TS_STREAM_TYPE_MPA:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA);

break;

case TS_STREAM_TYPE_MPA_LSF:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF);

diff --git
a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java
b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 6084f7d..af47b26 100644


a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

+++
b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

@@ -264,7 +264,7 @@ public class DvbSubtitlesParser {

if(displayCounter == 0) {

displays = new DvbSubDisplay[1];

displays[0] = new DvbSubDisplay();

  • displayCounter = 0;
  • displayCounter = 1;

} else {

displays = Arrays.copyOf(displays, displayCounter + 1);

displayCounter++;

2.8.1

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Monday 30 May 2016 at 16:43
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Author <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment), or mute
the thread
https:/notifications/unsubscribe/AEKBih92EUkz4SI84T4GqioWs36fJ723ks5qHBLagaJpZM4FphYb
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@cooliobr
Copy link

how i can do checkout of this source ?
sorry if i do many questions but, i will appreciate your help

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:29 GMT-03:00 tresvecesseis [email protected]:

It will take a while, I´m rebasing all our trees to the current dev tree,
sadly I didn’t began with the DVB subs one

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:08
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>

Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

is possible you put this diff in your repository ?
https:/tresvecesseis/ExoPlayer will be better for me

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:

This patch should do the trick, The TsExtractor part solves an issue with
the audio language parsing, and the DvbSubtitlesParse solves the
subtitile
visualization problema, we can´t connect to your HLS stream but the
dumped
ts segments work propelry:

diff --git

a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 25b997f..ea1f1b6 100644


a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

+++

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

@@ -347,7 +347,7 @@ public final class TsExtractor implements Extractor {

// Read descriptors in PES packets containing private data.

streamType = readPrivateDataStreamType(sectionData,
esInfoLength);

} else {

  • if (streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) {
  • if ((streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) {

descriptorScratch = new ParsableBitArray(new
byte[esInfoLength]);

sectionData.readBytes(descriptorScratch, esInfoLength);

} else {

@@ -364,21 +364,25 @@ public final class TsExtractor implements
Extractor {

int type = -1;

switch (streamType) {

case TS_STREAM_TYPE_MPA:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA);

break;

case TS_STREAM_TYPE_MPA_LSF:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF);

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 6084f7d..af47b26 100644


a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

+++

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

@@ -264,7 +264,7 @@ public class DvbSubtitlesParser {

if(displayCounter == 0) {

displays = new DvbSubDisplay[1];

displays[0] = new DvbSubDisplay();

  • displayCounter = 0;
  • displayCounter = 1;

} else {

displays = Arrays.copyOf(displays, displayCounter + 1);

displayCounter++;

2.8.1

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Monday 30 May 2016 at 16:43
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Author <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<
https:/notifications/unsubscribe/AEKBih92EUkz4SI84T4GqioWs36fJ723ks5qHBLagaJpZM4FphYb

.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment), or mute
the thread
https:/notifications/unsubscribe/AEKBivvg6Nh-09I6CzUXCP8Hh-P3STyAks5qHGHmgaJpZM4FphYb
.

@tresvecesseis
Copy link
Contributor Author

Our tres are private and based in an old Exoplayer versión, I’ll update my github when I complete the update of the trees to the current dev tree, It could take a couple of days, maybe less.

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:46
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment [email protected]
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

how i can do checkout of this source ?
sorry if i do many questions but, i will appreciate your help

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:29 GMT-03:00 tresvecesseis [email protected]:

It will take a while, I´m rebasing all our trees to the current dev tree,
sadly I didn’t began with the DVB subs one

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:08
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>

Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

is possible you put this diff in your repository ?
https:/tresvecesseis/ExoPlayer will be better for me

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:

This patch should do the trick, The TsExtractor part solves an issue with
the audio language parsing, and the DvbSubtitlesParse solves the
subtitile
visualization problema, we can´t connect to your HLS stream but the
dumped
ts segments work propelry:

diff --git

a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 25b997f..ea1f1b6 100644


a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

+++

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

@@ -347,7 +347,7 @@ public final class TsExtractor implements Extractor {

// Read descriptors in PES packets containing private data.

streamType = readPrivateDataStreamType(sectionData,
esInfoLength);

} else {

  • if (streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) {
  • if ((streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) {

descriptorScratch = new ParsableBitArray(new
byte[esInfoLength]);

sectionData.readBytes(descriptorScratch, esInfoLength);

} else {

@@ -364,21 +364,25 @@ public final class TsExtractor implements
Extractor {

int type = -1;

switch (streamType) {

case TS_STREAM_TYPE_MPA:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA);

break;

case TS_STREAM_TYPE_MPA_LSF:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF);

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 6084f7d..af47b26 100644


a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

+++

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

@@ -264,7 +264,7 @@ public class DvbSubtitlesParser {

if(displayCounter == 0) {

displays = new DvbSubDisplay[1];

displays[0] = new DvbSubDisplay();

  • displayCounter = 0;
  • displayCounter = 1;

} else {

displays = Arrays.copyOf(displays, displayCounter + 1);

displayCounter++;

2.8.1

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Monday 30 May 2016 at 16:43
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Author <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<
https:/notifications/unsubscribe/AEKBih92EUkz4SI84T4GqioWs36fJ723ks5qHBLagaJpZM4FphYb

.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment), or mute
the thread
https:/notifications/unsubscribe/AEKBivvg6Nh-09I6CzUXCP8Hh-P3STyAks5qHGHmgaJpZM4FphYb
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@cooliobr
Copy link

ok, thanks for your help :D
if you need stream channels from Brasil i can give you

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:50 GMT-03:00 tresvecesseis [email protected]:

Our tres are private and based in an old Exoplayer versión, I’ll update my
github when I complete the update of the trees to the current dev tree, It
could take a couple of days, maybe less.

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:46

To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

how i can do checkout of this source ?
sorry if i do many questions but, i will appreciate your help

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:29 GMT-03:00 tresvecesseis [email protected]:

It will take a while, I´m rebasing all our trees to the current dev tree,
sadly I didn’t began with the DVB subs one

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:08
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>

Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

is possible you put this diff in your repository ?
https:/tresvecesseis/ExoPlayer will be better for me

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:

This patch should do the trick, The TsExtractor part solves an issue
with
the audio language parsing, and the DvbSubtitlesParse solves the
subtitile
visualization problema, we can´t connect to your HLS stream but the
dumped
ts segments work propelry:

diff --git

a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 25b997f..ea1f1b6 100644


a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

+++

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

@@ -347,7 +347,7 @@ public final class TsExtractor implements
Extractor {

// Read descriptors in PES packets containing private data.

streamType = readPrivateDataStreamType(sectionData,
esInfoLength);

} else {

  • if (streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) {
  • if ((streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) {

descriptorScratch = new ParsableBitArray(new
byte[esInfoLength]);

sectionData.readBytes(descriptorScratch, esInfoLength);

} else {

@@ -364,21 +364,25 @@ public final class TsExtractor implements
Extractor {

int type = -1;

switch (streamType) {

case TS_STREAM_TYPE_MPA:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA);

break;

case TS_STREAM_TYPE_MPA_LSF:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF);

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 6084f7d..af47b26 100644


a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

+++

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

@@ -264,7 +264,7 @@ public class DvbSubtitlesParser {

if(displayCounter == 0) {

displays = new DvbSubDisplay[1];

displays[0] = new DvbSubDisplay();

  • displayCounter = 0;
  • displayCounter = 1;

} else {

displays = Arrays.copyOf(displays, displayCounter + 1);

displayCounter++;

2.8.1

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Monday 30 May 2016 at 16:43
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Author <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<

https:/notifications/unsubscribe/AEKBih92EUkz4SI84T4GqioWs36fJ723ks5qHBLagaJpZM4FphYb

.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<
https:/notifications/unsubscribe/AEKBivvg6Nh-09I6CzUXCP8Hh-P3STyAks5qHGHmgaJpZM4FphYb

.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#705 (comment), or mute
the thread
https:/notifications/unsubscribe/AEKBinYdHsmWbShsGlJgMsPVL0XkTeCvks5qHGbOgaJpZM4FphYb
.

@tresvecesseis
Copy link
Contributor Author

How did you configure the exoplayer library to process your streams?, we were unable to do that and we had to dump your TSs to be able to debug the problem.

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:55
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment [email protected]
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

ok, thanks for your help :D
if you need stream channels from Brasil i can give you

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:50 GMT-03:00 tresvecesseis [email protected]:

Our tres are private and based in an old Exoplayer versión, I’ll update my
github when I complete the update of the trees to the current dev tree, It
could take a couple of days, maybe less.

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:46

To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

how i can do checkout of this source ?
sorry if i do many questions but, i will appreciate your help

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:29 GMT-03:00 tresvecesseis [email protected]:

It will take a while, I´m rebasing all our trees to the current dev tree,
sadly I didn’t began with the DVB subs one

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:08
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>

Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

is possible you put this diff in your repository ?
https:/tresvecesseis/ExoPlayer will be better for me

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:

This patch should do the trick, The TsExtractor part solves an issue
with
the audio language parsing, and the DvbSubtitlesParse solves the
subtitile
visualization problema, we can´t connect to your HLS stream but the
dumped
ts segments work propelry:

diff --git

a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 25b997f..ea1f1b6 100644


a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

+++

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

@@ -347,7 +347,7 @@ public final class TsExtractor implements
Extractor {

// Read descriptors in PES packets containing private data.

streamType = readPrivateDataStreamType(sectionData,
esInfoLength);

} else {

  • if (streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) {
  • if ((streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) {

descriptorScratch = new ParsableBitArray(new
byte[esInfoLength]);

sectionData.readBytes(descriptorScratch, esInfoLength);

} else {

@@ -364,21 +364,25 @@ public final class TsExtractor implements
Extractor {

int type = -1;

switch (streamType) {

case TS_STREAM_TYPE_MPA:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA);

break;

case TS_STREAM_TYPE_MPA_LSF:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF);

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 6084f7d..af47b26 100644


a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

+++

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

@@ -264,7 +264,7 @@ public class DvbSubtitlesParser {

if(displayCounter == 0) {

displays = new DvbSubDisplay[1];

displays[0] = new DvbSubDisplay();

  • displayCounter = 0;
  • displayCounter = 1;

} else {

displays = Arrays.copyOf(displays, displayCounter + 1);

displayCounter++;

2.8.1

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Monday 30 May 2016 at 16:43
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Author <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<

https:/notifications/unsubscribe/AEKBih92EUkz4SI84T4GqioWs36fJ723ks5qHBLagaJpZM4FphYb

.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<
https:/notifications/unsubscribe/AEKBivvg6Nh-09I6CzUXCP8Hh-P3STyAks5qHGHmgaJpZM4FphYb

.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#705 (comment), or mute
the thread
https:/notifications/unsubscribe/AEKBinYdHsmWbShsGlJgMsPVL0XkTeCvks5qHGbOgaJpZM4FphYb
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@tresvecesseis
Copy link
Contributor Author

I just updated our github with a current versión of the dvbsubs tree:

https:/tresvecesseis/ExoPlayer/tree/dev-dvbsubs

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:55
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment [email protected]
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

ok, thanks for your help :D
if you need stream channels from Brasil i can give you

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:50 GMT-03:00 tresvecesseis [email protected]:

Our tres are private and based in an old Exoplayer versión, I’ll update my
github when I complete the update of the trees to the current dev tree, It
could take a couple of days, maybe less.

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:46

To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

how i can do checkout of this source ?
sorry if i do many questions but, i will appreciate your help

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:29 GMT-03:00 tresvecesseis [email protected]:

It will take a while, I´m rebasing all our trees to the current dev tree,
sadly I didn’t began with the DVB subs one

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:08
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>

Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

is possible you put this diff in your repository ?
https:/tresvecesseis/ExoPlayer will be better for me

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:

This patch should do the trick, The TsExtractor part solves an issue
with
the audio language parsing, and the DvbSubtitlesParse solves the
subtitile
visualization problema, we can´t connect to your HLS stream but the
dumped
ts segments work propelry:

diff --git

a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 25b997f..ea1f1b6 100644


a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

+++

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

@@ -347,7 +347,7 @@ public final class TsExtractor implements
Extractor {

// Read descriptors in PES packets containing private data.

streamType = readPrivateDataStreamType(sectionData,
esInfoLength);

} else {

  • if (streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) {
  • if ((streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) {

descriptorScratch = new ParsableBitArray(new
byte[esInfoLength]);

sectionData.readBytes(descriptorScratch, esInfoLength);

} else {

@@ -364,21 +364,25 @@ public final class TsExtractor implements
Extractor {

int type = -1;

switch (streamType) {

case TS_STREAM_TYPE_MPA:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA);

break;

case TS_STREAM_TYPE_MPA_LSF:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF);

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 6084f7d..af47b26 100644


a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

+++

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

@@ -264,7 +264,7 @@ public class DvbSubtitlesParser {

if(displayCounter == 0) {

displays = new DvbSubDisplay[1];

displays[0] = new DvbSubDisplay();

  • displayCounter = 0;
  • displayCounter = 1;

} else {

displays = Arrays.copyOf(displays, displayCounter + 1);

displayCounter++;

2.8.1

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Monday 30 May 2016 at 16:43
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Author <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<

https:/notifications/unsubscribe/AEKBih92EUkz4SI84T4GqioWs36fJ723ks5qHBLagaJpZM4FphYb

.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<
https:/notifications/unsubscribe/AEKBivvg6Nh-09I6CzUXCP8Hh-P3STyAks5qHGHmgaJpZM4FphYb

.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#705 (comment), or mute
the thread
https:/notifications/unsubscribe/AEKBinYdHsmWbShsGlJgMsPVL0XkTeCvks5qHGbOgaJpZM4FphYb
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@tresvecesseis
Copy link
Contributor Author

Could you test it?

From: "[email protected]" [email protected]
Date: Tuesday 31 May 2016 at 19:33
To: google/ExoPlayer [email protected], google/ExoPlayer [email protected]
Cc: Comment [email protected]
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

How did you configure the exoplayer library to process your streams?, we were unable to do that and we had to dump your TSs to be able to debug the problem.

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:55
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment [email protected]
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

ok, thanks for your help :D
if you need stream channels from Brasil i can give you

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:50 GMT-03:00 tresvecesseis [email protected]:

Our tres are private and based in an old Exoplayer versión, I’ll update my
github when I complete the update of the trees to the current dev tree, It
could take a couple of days, maybe less.

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:46

To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

how i can do checkout of this source ?
sorry if i do many questions but, i will appreciate your help

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 13:29 GMT-03:00 tresvecesseis [email protected]:

It will take a while, I´m rebasing all our trees to the current dev tree,
sadly I didn’t began with the DVB subs one

Sergio

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Tuesday 31 May 2016 at 18:08
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Comment <
[email protected]>

Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

is possible you put this diff in your repository ?
https:/tresvecesseis/ExoPlayer will be better for me

Att.

Rafael Machado
REGS IT LTDA.
ANTIK Business Representative BRASIL
"Believe in the future, believe in your success"
"Não existe patch para a estupidez humana"
"Nós somos o que pensamos (só não pense que você é um super-herói e não
tente voar)"

2016-05-31 7:52 GMT-03:00 tresvecesseis [email protected]:

This patch should do the trick, The TsExtractor part solves an issue
with
the audio language parsing, and the DvbSubtitlesParse solves the
subtitile
visualization problema, we can´t connect to your HLS stream but the
dumped
ts segments work propelry:

diff --git

a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 25b997f..ea1f1b6 100644


a/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

+++

b/library/src/main/java/com/google/android/exoplayer/extractor/ts/TsExtractor.java

@@ -347,7 +347,7 @@ public final class TsExtractor implements
Extractor {

// Read descriptors in PES packets containing private data.

streamType = readPrivateDataStreamType(sectionData,
esInfoLength);

} else {

  • if (streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) {
  • if ((streamType == TS_STREAM_TYPE_MPA || streamType ==
    TS_STREAM_TYPE_MPA_LSF) && esInfoLength != 0) {

descriptorScratch = new ParsableBitArray(new
byte[esInfoLength]);

sectionData.readBytes(descriptorScratch, esInfoLength);

} else {

@@ -364,21 +364,25 @@ public final class TsExtractor implements
Extractor {

int type = -1;

switch (streamType) {

case TS_STREAM_TYPE_MPA:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA);

break;

case TS_STREAM_TYPE_MPA_LSF:

  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • if (esInfoLength > 0) {
  • type = descriptorScratch.readBits(8);
  • switch (type) {
  • case 0x0a:
  • language = readDescriptorAudio(descriptorScratch);
  • break;
  • }

}

pesPayloadReader = new
MpegAudioReader(output.track(elementaryPid), language);

pidToTypeMap.put(elementaryPid, TS_STREAM_TYPE_MPA_LSF);

diff --git

a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

index 6084f7d..af47b26 100644


a/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

+++

b/library/src/main/java/com/google/android/exoplayer/text/dvbsubs/DvbSubtitlesParser.java

@@ -264,7 +264,7 @@ public class DvbSubtitlesParser {

if(displayCounter == 0) {

displays = new DvbSubDisplay[1];

displays[0] = new DvbSubDisplay();

  • displayCounter = 0;
  • displayCounter = 1;

} else {

displays = Arrays.copyOf(displays, displayCounter + 1);

displayCounter++;

2.8.1

From: cooliobr [email protected]
Reply-To: google/ExoPlayer [email protected]
Date: Monday 30 May 2016 at 16:43
To: google/ExoPlayer [email protected]
Cc: "[email protected]" [email protected], Author <
[email protected]>
Subject: Re: [google/ExoPlayer] Add DVB subtitle support (#705)

Hi, any news to me ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<

https:/notifications/unsubscribe/AEKBih92EUkz4SI84T4GqioWs36fJ723ks5qHBLagaJpZM4FphYb

.


You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#705 (comment),
or mute
the thread
<
https:/notifications/unsubscribe/AEKBivvg6Nh-09I6CzUXCP8Hh-P3STyAks5qHGHmgaJpZM4FphYb

.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#705 (comment), or mute
the thread
https:/notifications/unsubscribe/AEKBinYdHsmWbShsGlJgMsPVL0XkTeCvks5qHGbOgaJpZM4FphYb
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot googlebot added cla: no and removed cla: yes labels Jun 2, 2016
@ojw28 ojw28 closed this Jul 28, 2016
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.