I have been entirely unable to create a means of building a DataSource object (and hence a Processor) that gets data from a stream instead of a file, RTP, and so on. I am writing a module for a much larger application that is meant to transparently transcode audio formats. However, by the means I see available in JMF, you can only read data to Process from files and file like device objects (capture devices, URLs, etc). It is utterly absurd to spin the disk to move data between two parts of the same application. It's expensive, potentially adds more bugs, and will defeat the black box functionality of my module. Anyone have any suggestions on how I may proceed?
I have tried creating a DataSource that extends PullDataSource (called StreamDataSource that takes an InputStream object and a ContentDescriptor), but I get this exception. Note that it is properly registered with JMF.
javax.media.NoProcessorException: Cannot find a Processor for: StreamDataSource@6d2633
at javax.media.Manager.createProcessorForSource(Manager.java:1790)
at javax.media.Manager.createProcessor(Manager.java:690)
at AudioTranscoder.configureProcessor(AudioTranscoder.java:90)
at AudioTranscoder.<init>(AudioTranscoder.java:69)
Thanks in advance for any help!
I have tried creating a DataSource that extends PullDataSource (called StreamDataSource that takes an InputStream object and a ContentDescriptor), but I get this exception. Note that it is properly registered with JMF.
javax.media.NoProcessorException: Cannot find a Processor for: StreamDataSource@6d2633
at javax.media.Manager.createProcessorForSource(Manager.java:1790)
at javax.media.Manager.createProcessor(Manager.java:690)
at AudioTranscoder.configureProcessor(AudioTranscoder.java:90)
at AudioTranscoder.<init>(AudioTranscoder.java:69)
Thanks in advance for any help!