Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Saving

kitkat007kitkat007 Posts: 14Registered Users
I have 3 buttons a label and a view.

First button: records and sets the label (a unique serial string generated).
Second button: save's it to a database So that the unique ID gets pulled when selecting the video again.
Third button: Selects the saved recording (display in view) and returns the unique string (in the label)

I have a problem with the 2 button.

I was thinking of Saving the recording to a SQL (BLOB) and label but I don't think that is a good idea.. ( performance )

Does somebody have a good idea how to do it ?
Post edited by kitkat007 on

Replies

  • kitkat007kitkat007 Posts: 14Registered Users
    kitkat007;434763 said:
    I have 3 buttons a label and a view.

    First button: records and sets the label (a unique serial string generated).
    Second button: save's it to a database So that the unique ID gets pulled when selecting the video again.
    Third button: Selects the saved recording (display in view) and returns the unique string (in the label)

    I have a problem with the 2 button.

    I was thinking of Saving the recording to a SQL (BLOB) and label but I don't think that is a good idea.. ( performance )

    Does somebody have a good idea how to do it ?

    really no one knows ?
  • Duncan CDuncan C Posts: 8,033Tutorial Authors, Registered Users
    kitkat007;434763 said:
    I have 3 buttons a label and a view.

    First button: records and sets the label (a unique serial string generated).
    Second button: save's it to a database So that the unique ID gets pulled when selecting the video again.
    Third button: Selects the saved recording (display in view) and returns the unique string (in the label)

    I have a problem with the 2 button.

    I was thinking of Saving the recording to a SQL (BLOB) and label but I don't think that is a good idea.. ( performance )

    Does somebody have a good idea how to do it ?
    Do you have an sql database in your app already, that's storing all kinds of other data?

    sql is massive overkill for storing a single video recording.

    Your post is also pretty unclear. In first button you say "records and sets a label." Records a video and sets a label with a unique ID? Or records a unique ID?

    In the description of "second button" you say "save it to a database". Save what? The video, the unique ID, or both? You mention BLOBs, which implies that you want to save the video, but you are not clear about that.

    If you just need to save a video, save it to a file in the user's documents directory and save the filename and unique ID into userDefaults.

    If the video is a logical part of the data you are storing to an existing sql database, then by all means, save it to your database. Just make sure you make the BLOB a separate entity that's linked, not part of another entity.
    Regards,

    Duncan C
    WareTo

    mug

    Animated GIF created with Face Dancer, available for free in the app store.
  • kitkat007kitkat007 Posts: 14Registered Users
    Duncan C;435486 said:
    Do you have an sql database in your app already, that's storing all kinds of other data?

    sql is massive overkill for storing a single video recording.

    Your post is also pretty unclear. In first button you say "records and sets a label." Records a video and sets a label with a unique ID? Or records a unique ID?

    In the description of "second button" you say "save it to a database". Save what? The video, the unique ID, or [I][I]both[/I][/I]? You mention BLOBs, which implies that you want to save the video, but you are not clear about that.

    If you just need to save a video, save it to a file in the user's documents directory and save the filename and unique ID into userDefaults.

    If the video is a logical part of the data you are storing to an existing sql database, then by all means, save it to your database. Just make sure you make the BLOB a separate entity that's linked, not part of another entity.
    I made a sql but not use it (its only for storing the movie/string)
    The idea is simple... the user can make a recording (video), when he pushes the "start recording" button, it does 2 things

    1) It starts recording. (for the record, you can make multiple recordings)
    2) Calls a method that generates a unique string and shows it in the label.

    now i want to save the recording but when i save it i want to save the unique string too linked to the movie, for every recording it should save the unique string...
    so when someone exits the app and comes back and selects the saved recording it automaticly pastes the unique string that was made when that recording has begon.

    so if you recorded a bunch of movies
    VIDEO01.mov (string: "123.abc")
    VIDEO02.mov (string: "456.def") etc

    when someone selects the recording again (in a picker or list)

    you get the selected movie back with the saved string.


    whats the best way to do this ?
  • Duncan CDuncan C Posts: 8,033Tutorial Authors, Registered Users
    kitkat007;435552 said:
    I made a sql but not use it (its only for storing the movie/string)
    The idea is simple... the user can make a recording (video), when he pushes the "start recording" button, it does 2 things

    1) It starts recording. (for the record, you can make multiple recordings)
    2) Calls a method that generates a unique string and shows it in the label.

    now i want to save the recording but when i save it i want to save the unique string too linked to the movie, for every recording it should save the unique string...
    so when someone exits the app and comes back and selects the saved recording it automaticly pastes the unique string that was made when that recording has begon.

    so if you recorded a bunch of movies
    VIDEO01.mov (string: "123.abc")
    VIDEO02.mov (string: "456.def") etc

    when someone selects the recording again (in a picker or list)

    you get the selected movie back with the saved string.


    whats the best way to do this ?

    To quote my previous post:
    If you just need to save a video, save it to a file in the user's documents directory and save the filename and unique ID into userDefaults.
    Regards,

    Duncan C
    WareTo

    mug

    Animated GIF created with Face Dancer, available for free in the app store.
  • kitkat007kitkat007 Posts: 14Registered Users
    Duncan C;435579 said:
    To quote my previous post:

    i tought NSUserDefaults is only used for saving settings etc ?
  • Duncan CDuncan C Posts: 8,033Tutorial Authors, Registered Users
    kitkat007;435595 said:
    i tought NSUserDefaults is only used for saving settings etc ?
    It's used for saving whatever you want to save. You don't want to save vast amounts of data on exit/launch, since the watchdog timer may terminate your app for taking too long to launch/quit, but aside from that, you have pretty great latitude in using user defaults.
    Regards,

    Duncan C
    WareTo

    mug

    Animated GIF created with Face Dancer, available for free in the app store.
Sign In or Register to comment.