realbasic-nug
[Top] [All Lists]

Re: OpenEditablemovie from locked volumes

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: OpenEditablemovie from locked volumes
From: mg3110 at t-online dot de (Michael Gerbes)
Date: Thu, 1 Jul 2004 01:53:46 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
List-help: <mailto:realbasic-nug-request@lists.realsoftware.com?subject=help>
List-id: REALbasic NUG <realbasic-nug.lists.realsoftware.com>
List-post: <mailto:realbasic-nug@lists.realsoftware.com>
References: <E132EF6D-C9E3-11D8-9113-003065D6E8F0 at t-online dot de>
Nobody can help me ?

Am 29.06.2004 um 17:49 schrieb mg:

Hi !

I'm new to RB, so please forgive me if this should be discussed before... (searched in the Archives, but couldn't find anything.

I have an app, which is basically playing a movie, does some editing and saves the results as a Reference File. When trying to open a movie from a locked volume, all i get is nil for the editablemovie.

   dim f as folderitem, em as editablemovie
   If f<>Nil and f.exists then
       em = f.OpenEditableMovie
if em <> Nil then // em= nil, when f is on a locked volume (CD-Rom, ...)
       (...)

Obviuosly: RB doesn't allow editablemovies on locked volumes.
How can I open the movie without copying the whole .mov to the temp folder first ? I came up with the following idea: Let's create a reference movie, store it in the temp folder and open it.

Function TempFile(f as folderitem, length as integer)
  dim origfile, newfile as folderitem
  dim newmovie as editablemovie
  dim origmovie as movie
origfile = f // f is the folderitem of the movie on the locked volume
  newfile = TemporaryFolder.child("temp.mov")

  origmovie = origfile.OpenAsMovie
  if origmovie <> nil then
if newfile.exists = true then newfile.delete // clean up the temp folder
    newmovie = newfile.createMovie
    if newmovie <> nil then
      newmovie.insertMovieSegment(origmovie,0,length,0,true)
    end if
  end if
end function

The App crashes everytime at newmovie.insertMovieSegment. (maybe because movie can't be inserted into an editableMovie. Okay, so lets use some Toolbox calls. Thats where I am stuck. I found some Calls to create a "self-contained" movie, a movie in the memory and so on. But what calls do I have to use to create a reference movie on disk ?

Thanks for your help !
Michael
:-)

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>