Srt Parsing

33 views
Skip to first unread message

Emanuele Bragagnolo

unread,
Mar 9, 2012, 7:15:25 AM3/9/12
to mp4parser-...@googlegroups.com
Hi! I am trying to use the class com.googlecode.mp4parser.srt.SrtParser.

It returns a TextTrackImpl object and i can get subtitle with  method public List<Line> getSubs() {
        return subs;
    }



The problem is that I cannot access Line field because the visibility is set to package, and there no public getters.

Is this a bug? or am I using the class in the wrong way?

Sebastian Annies

unread,
Mar 9, 2012, 7:50:24 AM3/9/12
to mp4parser-...@googlegroups.com
Hi Emanuele, 

It's a bit awkward that these field are not accessible but in most cases that shouldn't harm. The TextTrackImpl is just used for writing the a 3gtx to a file and you wouldn't need to access the data since you are the one who put it there!
What are trying to do? 

Best Regards,
Sebastian


2012/3/9 Emanuele Bragagnolo <emanuele....@gmail.com>

Emanuele Bragagnolo

unread,
Mar 9, 2012, 8:13:02 AM3/9/12
to mp4parser-...@googlegroups.com
Hi Sebastian!

Thanks for the quick reply.

I am simple looking for a function that parse srt files. SrtParser.parse do exactly this but I cannot access the result. Naturally I can write it, but why reinvent the wheel?

PS Great probject MP4 Parser.
PPS The link to google group in http://code.google.com/p/mp4parser/ is broken. There's a pipe at the end.

Emanuele

Sebastian Annies

unread,
Mar 9, 2012, 8:17:19 AM3/9/12
to mp4parser-...@googlegroups.com
Thank you for reporting the typo.  Perhaps that will prevent people from mailing me directly.
I just added getters to the line in the trunk. A release of that will need to wait until the codebase has settled after the last refactoring.  

2012/3/9 Emanuele Bragagnolo <emanuele....@gmail.com>

Sebastian Annies

unread,
Mar 9, 2012, 8:17:36 AM3/9/12
to mp4parser-...@googlegroups.com
PS.: What you try to do seems perfectly reasonable

2012/3/9 Sebastian Annies <sebastia...@gmail.com>

Emanuele Bragagnolo

unread,
Mar 9, 2012, 8:35:39 AM3/9/12
to mp4parser-...@googlegroups.com
Perfect, thank you.

One last thing. I download the source from svn and build ISO Parser in Netbeans. Everything fine.

 But when I import in my project with
 
    <dependency>
      <groupId>com.googlecode.mp4parser</groupId>
      <artifactId>isoparser</artifactId>
      <version>1.0-RC-1-SNAPSHOT</version>
    </dependency>

and compile I get

error: error while loading Track, Missing dependency 'class com.coremedia.iso.boxes.TimeToSampleBox$Entry', required by C:\Users\emanuele.bragagnolo\.m2\repository\com\googlecode\mp4parser\isoparser\1.0-RC-1-SNAPSHOT\isoparser-1.0-RC-1-SNAPSHOT.jar(com/googlecode/mp4parser/authoring/Track.class)


one error found


It's not a big problem, but I just want to warn you. I never found error like this in maven.




Emanuele
Reply all
Reply to author
Forward
0 new messages