Win a copy of Head First Android this week in the Android forum!

Julien Roubieu

Greenhorn
+ Follow
since Nov 16, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Julien Roubieu

Hello,

I have an object that implements List and that also have some getters that I would like to access using EL.

However, when I write in my jsp page :


I get the following exception:
javax.servlet.jsp.el.ELException: The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.

Is there a way to retrieve the value of a property myObject using EL ?

Thanks,
Julien
14 years ago
JSP
Well, as always, we find the answer just after posting the question:
I had misread the API : the request.getParameterMap() method returns a Map<String, String[]>, to handle multiple parameters with the same name.

I just needed to add the array index to get my parameter printed :


<c:forEach items="${myMap}" var="e">
<input type="hidden" name="${e.key}" value="${e.value[0]}">
</c:forEach>



I hope this will help someone else...
14 years ago
JSP
Hello ranchers,

I've got a problem with printing values from a map to my page.
My code is the following:



"myMap" is actually the map returned by request.getParameterMap(), that I put in a request attribute to be printed into this page.
According to API doc this should be a Map<String,String>.

However, what I get in my page is something like :


Why isn't the String value printed ??
[ March 14, 2007: Message edited by: Bear Bibeault ]
14 years ago
JSP
This is understandable.

Thanks for your answer.
15 years ago
Hi,

I'm trying to do the following for a few hours, and I don't event know if it is possible... What do you think ? :

Knowing that there is a file at a specific location on the hard drive of the client machine which is accessing the webapp (say C:\dir\image.jpg), is it possible to redirect to a file URL (file:///C:/dir/image.jpg) so that the client will see the file locally ?

When I write a "file://" URL in any browser it will actually find the file, but if I put this same URL in a link href in a web page, the browser will just ignore my click...

Could it be a security issue ? Or am I missing something ?
Thanks for your help !

Julien
15 years ago
Hi all,

Is there a way to transform an Integer[] to an int[] and vice-versa without looping through the array ?

Julien
15 years ago
I managed to solve this problem by extending PushBufferDataSource and PushBufferStream instead of PullBuffer...

Now I've got new issues, but that's another story...
16 years ago
You can take a look at existing open source UA.
For example : sip-communicator. Its new 1.0 version is quite complete !
16 years ago
I have a home-made DataSource and SourceStream. They extend the PullBufferDataSource and PullBufferStream, and provide access to audio previously received through LAN.

Creating a Player for this DataSource using the Manager factory works fine and the player can reproduce my audio. Very Well.

Then instead of a Player, I create a Processor (through Manager again), setting its output to RAW_RTP, and I feed it with the very same DataSource. The processor output is then sent to another machine on my local network (with either a SendStream or a DataSink), where I'm running JMFStudio to play the received stream.
But there, the audio is not fine at all.

I discovered that the Player calls the read() method of my SourceStream every second (more or less), whereas the Processor calls it every 10ms !!
Of course, since the SourceStream receives its audio from the network at constant rate, the Processor just drains its buffer... and sends "no sound".

Why is that ?
Why does the RTP Processor not seem to see the bitrate of the stream and calls read() so much ?
16 years ago
Hello,

I'm writing an application which listens to an audio stream on a multicast socket.
The application that sends the audio is written in C++, and I don't manage to find the correct parameters for my SourceStream audio format (returned by the getFormat() of my source stream class), so as the player can reproduce the sound.

Have look at the C++ code that encodes the audio :


Since I didn't manage to match these parameters with the AudioFormat constructor arguments, I tried several formats constructors, such as

trying to add, change and remove values... but in vain.
All I get is an ununderstandable noise, running on OS X (JVM 1.5.0_02-56) with cross-platform JMF.

Then from this page : http://java.sun.com/products/java-media/jmf/2.1.1/formats.html I wondered if the format was not a "Windows only" ACM format, and therefore tried to run my code on Windows with the native JMF 2.1.1 (JVM 1.4.2_10).
Unfortunately, it got worse since the JVM crashes when it comes to decoding the audio... (Exception code=0xc0000005... Java frames : com.ibm.media.codec.audio.gsm.NativeDecoder.decodeNative([BI [BII)V+0)

Anyone knows why the JVM crashes on windows ? Or has an idea of what format parameters I should use to be able to play the audio ?

Thanks for reading me,
Julien
16 years ago