How to close a jmf rtp session when the entire file is sent.
I use jmf to stream a video file from one client to another, everything seems to work fine except for the fact that I don't know how to close the prosessor and the session/datasink on the transmission side when customers the clientis done streaming, I can close lets say after 60 seconds of starting, but I am not able to understand how to stop when the entire record is streaming. I tried to use the datasinklistner when sending the video and the following codepublic void dataSinkUpdate(DataSinkEvent event) {
if (event instanceof javax.media.datasink.EndOfStreamEvent) {
endOfStream = true;
}
}
but the endofstream event is never received from the data source.the problem is that it works very well if I using 20 second video and I close the datasink and the processor in 60 seconds, the entire file get listened to but if I have a file for more than 60 seconds, then just file is reduced to 60 seconds.
I also tried to use a sessionmanager a sessionlistener and a sendStreamListener with the following code
/**
* SessionListener.
*/
public synchronized void update(SessionEvent evt) {
}
/**
* SendStreamListener
*/
public synchronized void update( SendStreamEvent evt) {
System.out.println(evt);
if (evt instanceof InactiveSendStreamEvent) {
flag=true;
System.out.println("done");
}
if (evt instanceof ActiveSendStreamEvent) {
System.out.println("start");
}
}
I ran the code and send files and everything, but neither an activestreamevent nor an inactivestreamevent happens but the file is currently distributed correctly
user13490676 wrote:
could this be a problem with jmf itself that the endofstream don't get generated for the playing of a file data source
In this case, that would be the problem... more that likely there is something odd about the file, maybe it doesn't have a duration set in the header and JMF treats it as a live stream.
You can always write a custom data source that passes right through the entrance of a normal data source and then generate the EndOfStream event yourself... maybe based on a timeout counter or failure? I have not received all the data in x seconds or after x attempts, so I guess that the file is... Or when you have read enough data that the file cannot have more (read > = file header / data file)...
Tags: Java
Similar Questions
-
How to configure an application automatically starts when the unit is turned on
I used the instructions in:
How to-configure an application automatically starts when the unit is turned on
Article number: DB-00002
1. - in the BlackBerry JDE, right click on the project and select Properties.
2. - in the Application tab, check the function of automatic execution on startup checkbox.
3. - If you want your application to run in the background and not appear on the Ribbon, select the Module system.My application starts automatically in debugging, but not in my BB8100 pearl.
Any ideas? THX...
If you are looking for in the unit LOG immediately after startup, you should find out the reason. I suggest to you that what follows is the most likely reasons:
(a) application not signed
(b) developed for a different level than the device OS.
-
I need a file to an exact width and height and it must be in png format, because it allows to translucency. My graphics are only the top of the page and when I export only the graph is not exported the entire file. How can I get the entire file of export including blank parts?
in the export dialog box, you have chcked 'use of work plans? ''
-
How to cancel my membership creative cloud when the option "manage the plan" does not appear as an option on my screen?
-
How can I create a scroll effect when the manuscripts of user to the bottom of the image will be blurred?
Hello
You can create a scrolling movement where the image fade out the scroll, you must use the tab opacity under the effects of scroll Panel.
If you need especially be blur on the image, then you must change this image in any editing program like blurry image to make a copy of this image, then place the two images (real and blurry) on this page and use the scrolling motion or fade option to replace the images.
-
How can you download pro Prime Minister when the iucon doesent exist cloud?
In order to download the software, your computer must meet the system requirements to run the software.
http://helpx.Adobe.com/x-productkb/policy-pricing/system-requirements-Premiere-Pro.html http://www.Adobe.com/products/premiere/tech-specs.html
The usual for not being able to download reason is that Premiere Pro (and other video applications such as After Effects) are 64-bit only what they need for a 64-bit computer and a 64-bit operating system.
If you use a 32-bit computer and operating system, and then you see the icon of Premiere Pro as the software will not work on your computer.
-
How do you keep Windows automatically passing the entire file name when editing?
When I copy a file to a folder and rename the file, that I right click once on the file name to select it and again to place the cursor where I want to change the name in the name of the original file. However, until I'm able to start typing the computer automatically highlights the entire file name, so that when I start typing deletes the original file name and replace it with what I typed. Is there a way to avoid this and allow me to change the name of original rather than delete it and start from scratch?
If I press ESC to restore the original name and follow the same steps again, that it allows me to change the name of the original file as you wish. That is to say, I see only this product the first time I try to change the file name.
After he highlights the entire name, press any cursor movement: home, end, left arrow, right arrow key. Who will be development of the United Nations name and allow you to move the cursor in the right place to start to edit. Boulder computer Maven
Most Microsoft Valuable Professional -
Image shows two NEF + JPEG, how do I know if I'm editing the RAW file?
In the library module, I have images that show the NEF + JPEG. When I click on the image and move the develop module, how can I know that I am editing the RAW file?
ILoveMyNikon wrote:
NEF + JPEG
Interpret as follows: raw file 'NAVE' a 'sidecar' jpeg disk file too, which was not imported, but is "follow-up." i.e. it is a NEF file.
The best way to develop the module file is raw or jpeg is to look at the cursor to temperature: temperature of jpeg is incremental, centered at 0, gross temperature is in degrees kelvin.
Rob
-
How can I delete a file on my iOS device that I downloaded from my iCloud? I just want to keep the Preview on my iOS device without using my storage iOS for the entire file. This means that the file is still in the iCloud and available to be downloaded to any device.
In practice, I want to be able to scan and download through my documents located in my iCloud and once I didn't need them on my iOS device I would like 'load their return to the cloud' to my storage of the iOS device is not used.
Thank you in advance to the community!
Max
The only way I found to do that once a file has been downloaded is to remove it and add it again through either from Finder on Mac or iCloud.com.
-
What happens when the error report are sent to Microsoft from my computer?
I received a call from a Clayton asked for a Windows Service Center. He called about the error reports that were sent from my computer to Microsoft. He gave his phone number as 91 9008 37 23295 in Calcutta, India. If this has nothing to do with Microsoft or Windows?
John is correct. And to answer your direct question: "what happens when the error report are sent to Microsoft from my computer? -Not much. If these reports are used at all, they are used for the statistical analysis and do not respond to individuals.
-
some how my taskbar stuck upside... but the entire screen is as usual so how do return to normal please reply soon
Hi Prakash,
Thanks for posting this question in the Microsoft Community.
As I understand it, the taskbar are stuck in reverse. I will certainly help you to get the problem resolved.
Follow the steps and check out them.
Simple move your mouse cursor over an empty area of the taskbar, click and hold the left mouse button and drag your mouse to the bottom of the screen.
To keep it from moving again, you can do a right click on the taskbar and left-click on the option for 'Lock the taskbar'.
You can navigate on the article for more information on the taskbar.
Hope this information was helpful and let us know if you need more assistance. We will be happy to help you.
-
Mixture of Photoshop mobile app. How can you save an edited photo in the same file as the original?
Hey there Mopi2!
Currently, there is no way to save your new image instead of the original image. For now, you need to manually delete the original. It is however a great request! Please share with the team by typing "give us feedback" in the app menu (tap on the app icon in the upper left corner of the screen while inside the app).
Let me know if that helps!
-Kathleen
-
How to search for text in all of the PDF files on a mobile device?
How to search for text in all of the PDF files on a mobile device?
Not possible on mobile devices.
-
Photoshop CS4 - is - does anyone know how to find out if two people use the same file?
Photoshop CS4 - is - does anyone know how to find out if two people use the same file?
Yes, I assumed that was the case, and I thought that this link addressed to her. I would have thought it was more a function of your network and the OS than Photoshop.
-
How can I save by iPad 3 when the screen is black and nothing appears?
How can I save my iPad in ITunes or iCloud 3 when the screen is black and nothing appears?
Is the empty screen, because just the screen is broken, or is the iPad just dead? Have you tried a soft-reset/reboot it?
At least you can see what you touch on the screen of the iPad, you cannot force a backup to iCloud.
If the iPad still works and is connected to wifi, a backup should automatically happen (if iCloud backups are enabled) if it is connected and the locked screen.
Maybe you are looking for
-
My screen on my laptop has come loose.Anyone know how I can fix this problem? Thank you
-
Pixel white dot on Satellite A100. What can I do?
Hello I have two of them (these are white dots that can be on the white pages) I am currently using software undead pixelWhat can I do? I don't want theirIt's terrible.My Satellite A100 237 I have warranty related it a week agoIt works on this situat
-
Equium A110-233 - cannot find Steromix
Hi every1 I have a prob on my computer model of Toshiba laptop satellite A110-233. I want to play songs in the chatroom through Stero mix but I found no table of mixing stereo or another that I could play songs without speakers, because normally ther
-
Can someone convert my VI´s?
I have some files I've done in labview 9, but I need for school in labview 7 and my labview test 9 expired so I can't convert me. It is a zip file with the files that need to be converted http://www.sendspace.com/file/3r0q85 If someone could make thi
-
What is a part of Windows 7? ETDCtrl.exe
I got an alert will appear on the start saying:-C:\Program Files\Elantech\ETDCtrl.exe "This application has requested execution to terminate in an unusual way." I have not installed this software and the site of momentum (which seems to be associated