B
bob smith
Let's say you have a function that plays a movie that is passed in as a FileDescriptor. Is there any way to load the movie into RAM and get a FileDescriptor for the RAM?
bob said:Let's say you have a function that plays a movie that is passed in as a FileDescriptor.
Is there any way to load the movie into RAM and get a FileDescriptor for the RAM?
Let's say you have a function that plays a movie that
is passed in as a FileDescriptor.
Is there any way to load the movie into RAM and get a
FileDescriptor for the RAM?
Looking here:Let's say you have a function that plays a movie that is passed in as a FileDescriptor. Is there any way to load the movie into RAM and get a FileDescriptor for the RAM?
Looking here:
<http://docs.oracle.com/javase/7/docs/api/java/io/class-use/FileDescriptor.html>
the most likely route seems to be java.io.RandomAccessFile.getFD(). But
I don't know what "a FileDescriptor for the RAM" means. Will you clarify?
I'm also not sure what "load the movie into RAM" means to you or forLooking here:
<http://docs.oracle.com/javase/7/docs/api/java/io/class-use/FileDescriptor.html>
the most likely route seems to be java.io.RandomAccessFile.getFD(). But
I don't know what "a FileDescriptor for the RAM" means. Will you clarify?
Java's NIO does actually have this capability (for example, inI doubt it exists as a general concept and thus probably doesn't exist
in Java. I seem to recall that some operating systems from many years
ago let you map a file into RAM and operate on it from there, but I'm
moderately sure that feature either went through the standard file
system stuff and was (nearly) invisible, or you accessed a massive byte
array directly.
The former corresponds to people's advice to use a
FileInputStream amd the latter to a ByteInputStream as appropriate.
Wouldn't your movie exceed the capacity of RAM? or are you limiting
yourself to short ones?
Another idea might be might be to use the JavaFX MediaPlayer, although ILet's say you have a function that plays a movie that is passed in as a FileDescriptor. Is there any way to load the movie into RAM and get a FileDescriptor for the RAM?
That is, to escape all of the RAM/FileDescriptor stuff.Another idea might be might be to use the JavaFX MediaPlayer, although I
haven't tried it yet so I don't know how it works.
bob smith said:Let's say you have a function that plays a movie that is passed in as a FileDescriptor. Is there any way to load the movie into RAM and get a FileDescriptor for the RAM?
Let's say you have a function that plays a movie that is passed in as
a FileDescriptor. Is there any way to load the movie into RAM and
get a FileDescriptor for the RAM?
Java's NIO does actually have this capability (for example, in
MappedByteBuffer)
<http://docs.oracle.com/javase/7/docs/api/java/nio/MappedByteBuffer.html>
bob said:Let's say you have a function that plays a movie that is passed in as a FileDescriptor. Is there any way to load the movie into RAM and get a FileDescriptor for the RAM?
At least it maps files into virtual address space.
Which is probably what David was talking about.
But strictly speaking it is not mapping into RAM.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.