Author Topic: remaining card space update frequency  (Read 6926 times)

silvertonesx24

  • Freshman
  • **
  • Posts: 73
  • 5Dii
remaining card space update frequency
« on: February 17, 2014, 08:50:17 PM »
Is there any way at some point to more frequently update the space remaining after each raw take? Or maybe even calculate the actual time remaining roughly based on the average data rate for the selected resolution.

I know if you cycle the camera sometimes it'll update but right now I've been working blind and dumping the card anytime I suspect that a take may be interrupted due to running out or having a supervisor track the space for each take.

pascal

  • Freshman
  • **
  • Posts: 90
Re: remaining card space update frequency
« Reply #1 on: February 18, 2014, 02:07:09 PM »
If you turn off/on the camera the space meter is correct. It would be indeed a nifty addition if the card space was updated on Save Finish. You can request this as a feature. Is probably just 1 line of code.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12422
Re: remaining card space update frequency
« Reply #2 on: February 18, 2014, 02:09:39 PM »
Is probably just 1 line of code.

If so, feel free to submit a pull request.

pascal

  • Freshman
  • **
  • Posts: 90
Re: remaining card space update frequency
« Reply #3 on: February 18, 2014, 04:29:53 PM »
Is probably just 1 line of code.
If the original implementation was well designed that is.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12422
Re: remaining card space update frequency
« Reply #4 on: February 18, 2014, 04:31:20 PM »

pascal

  • Freshman
  • **
  • Posts: 90
Re: remaining card space update frequency
« Reply #5 on: February 18, 2014, 07:15:17 PM »
You forgot about this: http://en.wikipedia.org/wiki/Reverse_engineering
Ok I see. That is unfortunate. When opening the format card menu I think it shows the free card capacity. Is probably a starting point.

silvertonesx24

  • Freshman
  • **
  • Posts: 73
  • 5Dii
Re: remaining card space update frequency
« Reply #6 on: February 18, 2014, 10:39:58 PM »
Might there be a way to run a small process to continuously track the used space? Maybe through the file manager? I don't think we need accuracy down to the second/megabite, just a rough approximation of how much we can shoot until a card swap is needed.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12422
Re: remaining card space update frequency
« Reply #7 on: February 18, 2014, 10:54:06 PM »
Yes, that's the solution I have in mind: tracking all the FIO_WriteFile calls.

arrinkiiii

  • Hero Member
  • *****
  • Posts: 1101
  • ML ADDICTED 7D
Re: remaining card space update frequency
« Reply #8 on: February 18, 2014, 11:51:27 PM »

Would be a good function to have  :)

jose_ugs

  • Member
  • ***
  • Posts: 243
  • 5DM3
Re: remaining card space update frequency
« Reply #9 on: March 09, 2014, 05:45:14 PM »
...or at least refresh the value after the last shot? This way you'll know how much you have left before you start the next take...
@a1ex, is tracking going to affect write speed?

marekk

  • Senior
  • ****
  • Posts: 331
  • www.oddajmisie.com
Re: remaining card space update frequency
« Reply #10 on: March 09, 2014, 06:44:59 PM »
a1ex, it should be something like LVINFO_UPDATE_FUNC in bitrate.c ?

Code: [Select]
static LVINFO_UPDATE_FUNC(indicator)
{
    LVINFO_BUFFER(8);
   
    if(!RECORDING_H264)
    {
        /* Hide this LVINFO item if not recording H264 */
        return;
    }
   
    int elapsed_time = get_seconds_clock() - movie_start_timestamp;
    int bytes_written_32k = MVR_BYTES_WRITTEN / 32768;
    int remaining_time = get_free_space_32k(get_shooting_card()) * elapsed_time / bytes_written_32k;
    int avg_bitrate = MVR_BYTES_WRITTEN / 1024 * 8 / 1024 / elapsed_time;

    switch(rec_indicator)
    {
        case 0: // elapsed
            snprintf(
                buffer,
                sizeof(buffer),
                "%3d:%02d",
                elapsed_time / 60,
                elapsed_time % 60
            );
            return;
        case 1: // remaining
            snprintf(
                buffer,
                sizeof(buffer),
                "%d:%02d",
                remaining_time / 60,
                remaining_time % 60
            );
            if (remaining_time < time_indic_warning)
            {
                item->color_bg = COLOR_WHITE;
                item->color_fg = COLOR_RED;
            }
            return;
        case 2: // avg bitrate
            snprintf(
                buffer,
                sizeof(buffer),
                "%dMb/s",
                avg_bitrate
            );
            return;
        case 3: //instant bitrate
            snprintf(
                buffer,
                sizeof(buffer),
                "%dMb/s",
                measured_bitrate
             );
    }
}

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12422
Re: remaining card space update frequency
« Reply #11 on: March 09, 2014, 06:56:15 PM »
@marekk: frontend != backend ;)

@jose_ugs: yes; whether that would be 1e-5% or 1%, I can't tell without implementing it first.

tuckertota

  • New to the forum
  • *
  • Posts: 20
Re: remaining card space update frequency
« Reply #12 on: November 23, 2015, 11:51:55 PM »
Would be great if this could be implemented in some way. Even a ballpark figure would be helpful. I use the Canon format menu to check space and that's a little dangerous, one small click from accidentally formatting my card.