Read and write at the same time. Or: Read while the file is being written.

Hello
I'm a student working on a live streaming project. The video i get should be streamed live, so i have to read the file from disk while it is written.
When I try to do this I get an access denied or permission denied (i can provide the detailed error if you need it) which seems obvious to me. Still, is there a way around this?
The file which i try to read is monotonically increasing in size, so it's not a 4gb file which is truncated at the end of the video recording.
I hope someone can help
thanks
lukas
Edited by: Jossnaz on Jun 25, 2008 6:26 AM

Jossnaz wrote:
Hello
I'm a student working on a live streaming project. The video i get should be streamed live, so i have to read the file from disk while it is written.
When I try to do this I get an access denied or permission denied (i can provide the detailed error if you need it) which seems obvious to me. Still, is there a way around this?
So you are getting the Stream from one source, writing to a file, then also steaming it live to a client?
I would use threads, 3 of them I think:
1) Read content from the input stream and send it into two different PippedOutputStreams
2) A consumer thread attached to the end of one of the PippedInputStreams linked to #1 that streams to the client
3) A consumer thread attached to the end of the second PippedInputStream linked to #1 that streams to the file

Similar Messages

  • If I have two appointments at the same time, they overlap in the iOS 7 calendar rather then appearing side-by-side so that I can't read one of them due to the identical colors of the two appointments.  Is there any way to fix this with a setting?

    If I have two appointments at the same time, they overlap in the iOS 7 calendar rather than appearing side-by-side in the daily view, so that I can' read both of them due to the same background color.  Is there a way to change this via a settings change?

    I fyou have "all day" event that are taking up the entire day, check the event. All day event only appear at the top of the time line (and just below the week view). I suspect they are not actually set up as all day, but have specific time frames assigned.
    In teh screen shot below, "Sample" is an all day event; NFL: CAR@SF is not.

  • After reset the SMC, my screen and the keyboard backlighting turn down at the same time when I cover the sensor.

    The keyboard backlighting is still on under the lit. What can I do? Thanks! (MacBook Pro 2011 13' ; Mac OS X; 2.3 GHz Interl Core i5; 4GB 1333 MHz DDR3)

    After reset the SMC, my screen and the keyboard backlighting turn down at the same time when I cover the sensor.
    That's precisely what they're supposed to do.

  • Phone and my husbands iphone ring at the same time when only one of us is being called. How can I stop this from happening?

    Both my iphone and my husbands iphone ring at the same time when only one of us is being called. How can I stop this from happening?

    This post has already been answered. Why are you plugging your own site with an answer that has already been given? Not to mention that the information you are handing out is incorrect. There is no bug, there is no patch, and no one needs to delete any email addresses. If you take the time to read the posts with the correct answers, you will see that the solution is totally different than the erroneous one you have posted.
    GB

  • I have just created a new playlist, at the same time I have updated the ITunes software and that of my ITouch. My problem is that today I have been trying to edit the playlist and the edit playlist is greyed out please help

    I have just created a new playlist, at the same time I have updated the ITunes software and that of my ITouch. My problem is that today I have been trying to edit the playlist and the edit playlist is greyed out please help.
    I have been in preferences and checked manually edit etc and still no joy. I must be missing something.
    Susan

    From Here   http://support.apple.com/kb/HE37
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.

  • I have 5 layers of texts with a white background on the bottom(V1). I want to cross dissolve to black at the same time on all layers. However they all don't disappear at the same time. It seems the top layer fades out last, and so on.

    I have 5 layers of texts with a white background on the bottom(V1). I want to cross dissolve to black at the same time on all layers. However they all don't disappear at the same time. It seems the top layer fades out last, and so on. These are 20 frame dissolves.

    FCP User Manual, page 798.
    You can condense multiple clips that are stacked above each other into a nest. The nest appears as a single clip in the Timeline. If you need to modify the individual clips inside after you have created the nest, it can be expanded again by double clicking it.

  • I want an app to close or browse through open apps at the same time by double tapping the home button i can find the open apps with the minus sign on it and dont move

    I want an app to close or browse through open apps at the same time by double tapping the home button i can find the open apps with the minus sign on it and dont move

    Try a reset: Press the Sleep/Wake button and the Home button at the same time for ten seconds until the Apple logo appears. Note: No data will be lost

  • Ok i need to unlock my ipod but i don't know my password i use itunes but i need to update at the same time this srcews up the itunes and i have to restart the computer i need to restore the ipod please help

    ok i need to unlock my ipod but i don't know my password i use itunes but i need to update at the same time this srcews up the itunes and i have to restart the computer i need to restore the ipod please help

    Connect the iOS device to your computer and restore via iTunes. Place the iPod in Recovery Mode if necessary to allow the restore.
    If recovery mode does not work try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    Maybe here:
    Trouble installing iTunes or QuickTime for Windows
    iOS: Device not recognized in iTunes for Windows
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP

  • How do i go about deleting a large number of files at the same time?  where's the easiest place to do it?

    how do i go about deleting a large number of files at the same time?  where's the easiest place to do it?

    A bit vague as to what you intend, but the simple answer is to select all the files you want to delete then either drag to the Trash or CTRL- or RIGHT-click on the selection and choose Move to Trash from the contextual menu.

  • Hi, i am wondering if i use 4g together with wifi in the same time will this increase the internet speed ?

    Hi, i am wondering if i use 4g together with wifi in the same time will this increase the internet speed ?

    The iPad has a micro-SIM card slot - nothing special or unique about it.
    The iPad is not sold as carrier locked.

  • My business is buying ipads for our technicians.  They all need the same app.  If I buy one app, can more than one user use it at the same time if they have the same apple id?

    My business is buying ipads for our technicians.  How many users can share one apple id & how many users with the same apple id can use the same app at the same time?

    Use VPP.  Select an MDM.  Read the Google doc below and nsdjoey write up.
    IT Resources -- ios & OS X -- This is a fantastic web page.  I like the education site over the business site.
    View documentation, video tutorials, and web pages to help IT professionals develop and deploy education solutions.
        http://www.apple.com/education/ipad/resources/
        scroll down after all the pretty picture.  Click on the words "For It".
        business site is:
        http://www.apple.com/lae/ipad/business/#browse-it-resources
        If necessary, scroll down until you see the Browse IT Resources button.  Click on button.
    Joe Rowe's Excellent guides
    IT managers who are new to configurator and managing a cart of ios devices:
          https://docs.google.com/document/d/1SMBgyzONxcx6_FswgkW9XYLpA4oCt_2y1uw9ceMZ9F4/ edit?pli=1
             [ original announcement  -- https://discussions.apple.com/thread/4256735?tstart=0 ]
    Quick help presentation for students:
         https://docs.google.com/presentation/d/18937JdleX2gymtSb8zfbDczV-76BdR2DIfCV9eJi yOE/edit#slide=id.g1b776944_0_224
    good tips for initial deployment:
    https://discussions.apple.com/message/18942350#18942350
    https://discussions.apple.com/thread/3804209?tstart=0
    See nsdjoey writeup.  See third post.
    https://discussions.apple.com/message/22286109#22286109
    Institutions in the USA and other countries can use the App Store Volume Purchase Program (VPP) to buy Apps.
    https://support.assistiveware.com/index.php?pg=kb.page&id=54
    "Deploying a great quantity of iOS devices means creating a great quantity of Apple IDs. This script allows automated Apple ID creation from a spreadsheet."
    http://www.enterpriseios.com/wiki/Apple_ID_Automation_Builder

  • HT201236 I want to do something so simple that there are no instructions. I just need to have two windows open at the same time so I can transfer files from one to the other by drag

    I want to transfer files from one device (or page ) to another by drag and drop , so i need two windows ope   at the same time,
    I know this can be done but I have forgotten how

    Don't use any full screen options for any app that has them
    Mount your device and double click on it to open it. Drag this window to the upper right of your Desktop and resize it to a bit less than half of your Desktop.
    Open the next folder and position it on the lower left side and resize it so you can still see the previous window.

  • I cannot update from OS 10.9.4 to 10.9.5. I get a message saying: File couldn't be installed error (513). I have configured my OS so that I have read and write permission followed by system with read and writ permission. Can someone help me? Thanks.

    I cannot update from OS X 10.9.4 t0 10.9.5> Whenever I try I get the following message: File couldn't be installed error (513) and something about not having the proper permission.  Under the Macintosh HD sharing and permissions settings I have customized the settings so that (Me) has read and write permission followed by the system with read and write permission, wheel and everyone have Read permissions.
    I have no problems updating apps such as Adobe CC or iTunes but cannot update the operating system, can someone help me? Thanks.

    1. Restart the computer in safe mode. Certain caches maintained by the system will be rebuilt.
    Safe mode is much slower to start up than normal. The next normal startup may also be somewhat slow.
    When the login screen appears, restart as usual (not in safe mode) and test. There's no need to log in while in safe mode.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a software RAID, you can’t start in safe mode. In that case, go to Step 2.
    If there's no change after taking this step, continue.
    2. Back up all data before proceeding.
    Triple-click anywhere in the line below on this page to select it:
    /var/folders
    Right-click or control-click the highlighted line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "folders" selected. Move the selected item to the Trash. You may be prompted for your administrator login password. Restart the computer and empty the Trash.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • I had an email up on my laptop and ipad at the same time... froze the ipad mail

    So, yes, dumb of me.
    I was working on a message, saved it to drafts, then forgot I'd been working on the same message on the laptop.
    I've tried to cancel, send.  I've deleted my account on Ipad, reloaded the account.  The message is still there. 
    Is there a way to start mail on the Ipad to load up before the message can load?

    Not too hard I hope.

  • My computer crashed at the same time I switched to the 4s. how do I upload my stuff from my old Iphone to Itunes?

    What are the odds,my computer crashed at the same I switched to the 4s. I had to download and start all over with Itunes. My question is how do I upload from my old Iphone into Itunes so I can get my music off the old phone?

    Iphone is not a backup device.
    The music sync is one way - computer to iphone.  The only exception is itunes purchases:  Without syncing: File>Transfer Purcahses
    Copy everything from your backup copy of your old computer to the new one.

  • Playing of bbc videos, the player is reloading making an echo as it plays the sound at the same time. what could be the problem?

    when i play a video on the bbc.co.uk webside there is an echo of sound, the video will play for about 10 seconds then it buffers after which the sound is repeated causing an echo. ive tried it on a lesser quality browser (internet explorer ten) and there is no problem. all other sites seem to be fine ie youtube.
    == URL of affected sites ==
    http://www.bbc.co.uk

    Users of our site have reported the same issue. Very strange.

Maybe you are looking for

  • Macbook Pro does not show up on ATV 2

    Have installed ATV 2 - connected to TV with HDMI cable. Appears to connect with Airport Extreme in other room where Macbook Pro is located. However, while I turned on Home Sharing on the Macbook Pro and also on the ATV 2, they aren't finding one anot

  • Problem in displaying Array Position?

    hi, I am having a problem in displaying the array position of a sorted Array for ex: int[] a = {4,3,1,7}for sorting the array i am using Arrays.sort(a); then the output will be a = {1,3,4,7}now according to this i need to display the array position o

  • Keyboard freez in xorg kde.

    Some time ago I was expecting strange keyboard but-key-press-lockal lockups. They are gone now (xorg update maybe). Here is that thread: http://bbs.archlinux.org/viewtopic.php?id=28325 But now I have other problem. My keyboard randomly freezes in KDE

  • An unforeseeable error occurred when generating from the maintenance

    Hi All, When i am activating  LGMST feature i am getting "Unforeseeable error  I am defaulting max wagetypes and allowance grouping (Eg: 40/DD02 ) when i am trying to activate this feature this error is appearing how to solve this error Regards, Sita

  • Safari quit unexpectedly when visiting specific website...

    Hi, my safari crashes when only visiting a specific website any ideas why? This is the error report. Process:         WebProcess [832] Path:            /System/Library/PrivateFrameworks/WebKit2.framework/WebProcess.app/Contents/Mac OS/WebProcess Iden