rework android-rmt display, add a few buttons
[goodguy/history.git] / cinelerra-5.0 / cinelerra / asset.C
index 50f3798e2bbe637b8a7fdbb6efc7dafb96dc3103..f5951cf2533771efea0442c12a97da0eacd3e7b5 100644 (file)
@@ -1,21 +1,21 @@
 /*
  * CINELERRA
  * Copyright (C) 2010 Adam Williams <broadcast at earthling dot net>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- * 
+ *
  */
 
 
@@ -30,7 +30,6 @@
 #include "filexml.h"
 #include "format.inc"
 #include "indexstate.h"
-#include "quicktime.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -69,9 +68,9 @@ Asset::~Asset()
 int Asset::init_values()
 {
        path[0] = 0;
-//     format = FILE_MOV;
 // Has to be unknown for file probing to succeed
        format = FILE_UNKNOWN;
+       fformat[0] = 0;
        bits = 0;
        byte_order = 0;
        signed_ = 0;
@@ -80,9 +79,16 @@ int Asset::init_values()
        reset_audio();
        reset_video();
 
-       strcpy(vcodec, QUICKTIME_YUV2);
-       strcpy(acodec, QUICKTIME_TWOS);
-       jpeg_quality = 100;
+       strcpy(vcodec, "");
+       strcpy(acodec, "");
+
+       ff_audio_options[0] = 0;
+       ff_video_options[0] = 0;
+       ff_audio_bitrate = 0;
+       ff_video_bitrate = 0;
+       ff_video_quality = 0;
+
+       jpeg_quality = 80;
        aspect_ratio = -1;
 
        ampeg_bitrate = 256;
@@ -100,14 +106,6 @@ int Asset::init_values()
        theora_keyframe_frequency = 64;
        theora_keyframe_force_frequency = 64;
 
-       mp3_bitrate = 256000;
-
-
-       mp4a_bitrate = 256000;
-       mp4a_quantqual = 100;
-
-
-
 // mpeg parameters
        vmpeg_iframe_distance = 45;
        vmpeg_pframe_distance = 0;
@@ -122,30 +120,6 @@ int Asset::init_values()
        vmpeg_preset = 0;
        vmpeg_field_order = 0;
 
-// Divx parameters.  BC_Hash from encore2
-       divx_bitrate = 2000000;
-       divx_rc_period = 50;
-       divx_rc_reaction_ratio = 45;
-       divx_rc_reaction_period = 10;
-       divx_max_key_interval = 250;
-       divx_max_quantizer = 31;
-       divx_min_quantizer = 1;
-       divx_quantizer = 5;
-       divx_quality = 5;
-       divx_fix_bitrate = 1;
-       divx_use_deblocking = 1;
-
-       h264_bitrate = 2000000;
-       h264_quantizer = 5;
-       h264_fix_bitrate = 0;
-
-       ms_bitrate = 1000000;
-       ms_bitrate_tolerance = 500000;
-       ms_quantization = 10;
-       ms_interlaced = 0;
-       ms_gop_size = 45;
-       ms_fix_bitrate = 1;
-
        ac3_bitrate = 128;
 
        png_use_alpha = 0;
@@ -159,11 +133,6 @@ int Asset::init_values()
 
        id = EDL::next_id();
 
-       pipe[0] = 0;
-       use_pipe = 0;
-
-       reset_timecode();
-
        return 0;
 }
 
@@ -200,23 +169,6 @@ void Asset::boundaries()
 //printf("Asset::boundaries %d %d %f\n", __LINE__, sample_rate, frame_rate);
 }
 
-
-void Asset::reset_index()
-{
-       index_state->reset();
-}
-
-int Asset::reset_timecode()
-{
-       strcpy(reel_name, "cin0000");
-       reel_number = 0;
-       tcstart = 0;
-       tcend = 0;
-       tcformat = 0;
-       
-       return 0;
-}
-
 void Asset::copy_from(Asset *asset, int do_index)
 {
        copy_location(asset);
@@ -235,6 +187,7 @@ void Asset::copy_format(Asset *asset, int do_index)
 
        audio_data = asset->audio_data;
        format = asset->format;
+       strcpy(fformat, asset->fformat);
        channels = asset->channels;
        sample_rate = asset->sample_rate;
        bits = asset->bits;
@@ -243,8 +196,6 @@ void Asset::copy_format(Asset *asset, int do_index)
        header = asset->header;
        dither = asset->dither;
        mp3_bitrate = asset->mp3_bitrate;
-       mp4a_bitrate = asset->mp4a_bitrate;
-       mp4a_quantqual = asset->mp4a_quantqual;
        use_header = asset->use_header;
        aspect_ratio = asset->aspect_ratio;
 
@@ -259,6 +210,12 @@ void Asset::copy_format(Asset *asset, int do_index)
        strcpy(vcodec, asset->vcodec);
        strcpy(acodec, asset->acodec);
 
+       strcpy(ff_audio_options, asset->ff_audio_options);
+       strcpy(ff_video_options, asset->ff_video_options);
+       ff_audio_bitrate = asset->ff_audio_bitrate;
+       ff_video_bitrate = asset->ff_video_bitrate;
+       ff_video_quality = asset->ff_video_quality;
+
        this->audio_length = asset->audio_length;
        this->video_length = asset->video_length;
 
@@ -272,7 +229,7 @@ void Asset::copy_format(Asset *asset, int do_index)
        vorbis_bitrate = asset->vorbis_bitrate;
        vorbis_max_bitrate = asset->vorbis_max_bitrate;
 
-       
+
        theora_fix_bitrate = asset->theora_fix_bitrate;
        theora_bitrate = asset->theora_bitrate;
        theora_quality = asset->theora_quality;
@@ -297,34 +254,8 @@ void Asset::copy_format(Asset *asset, int do_index)
        vmpeg_preset = asset->vmpeg_preset;
        vmpeg_field_order = asset->vmpeg_field_order;
 
-
-       divx_bitrate = asset->divx_bitrate;
-       divx_rc_period = asset->divx_rc_period;
-       divx_rc_reaction_ratio = asset->divx_rc_reaction_ratio;
-       divx_rc_reaction_period = asset->divx_rc_reaction_period;
-       divx_max_key_interval = asset->divx_max_key_interval;
-       divx_max_quantizer = asset->divx_max_quantizer;
-       divx_min_quantizer = asset->divx_min_quantizer;
-       divx_quantizer = asset->divx_quantizer;
-       divx_quality = asset->divx_quality;
-       divx_fix_bitrate = asset->divx_fix_bitrate;
-       divx_use_deblocking = asset->divx_use_deblocking;
-
-       h264_bitrate = asset->h264_bitrate;
-       h264_quantizer = asset->h264_quantizer;
-       h264_fix_bitrate = asset->h264_fix_bitrate;
-
-
-       ms_bitrate = asset->ms_bitrate;
-       ms_bitrate_tolerance = asset->ms_bitrate_tolerance;
-       ms_interlaced = asset->ms_interlaced;
-       ms_quantization = asset->ms_quantization;
-       ms_gop_size = asset->ms_gop_size;
-       ms_fix_bitrate = asset->ms_fix_bitrate;
-
-       
        ac3_bitrate = asset->ac3_bitrate;
-       
+
        png_use_alpha = asset->png_use_alpha;
        exr_use_alpha = asset->exr_use_alpha;
        exr_compression = asset->exr_compression;
@@ -346,31 +277,18 @@ int64_t Asset::get_index_size(int channel)
 
 char* Asset::get_compression_text(int audio, int video)
 {
-       if(audio)
-       {
-               switch(format)
-               {
-                       case FILE_MOV:
-                       case FILE_AVI:
-                               if(acodec[0])
-                                       return quicktime_acodec_title(acodec);
-                               else
-                                       return 0;
-                               break;
+       if(audio) {
+               switch(format) {
+               case FILE_FFMPEG:
+                       if( acodec[0] ) return acodec;
+                       break;
                }
        }
-       else
-       if(video)
-       {
-               switch(format)
-               {
-                       case FILE_MOV:
-                       case FILE_AVI:
-                               if(vcodec[0])
-                                       return quicktime_vcodec_title(vcodec);
-                               else
-                                       return 0;
-                               break;
+       if(video) {
+               switch(format) {
+               case FILE_FFMPEG:
+                       if( vcodec[0] ) return vcodec;
+                       break;
                }
        }
        return 0;
@@ -385,34 +303,45 @@ printf("Asset::operator=\n");
 }
 
 
-int Asset::equivalent(Asset &asset, 
-       int test_audio, 
+int Asset::equivalent(Asset &asset,
+       int test_audio,
        int test_video)
 {
        int result = (!strcmp(asset.path, path) &&
                format == asset.format);
 
+       if(result && format == FILE_FFMPEG)
+               result = !strcmp(fformat, asset.fformat);
+
        if(test_audio && result)
        {
-               result = (channels == asset.channels && 
-                       sample_rate == asset.sample_rate && 
-                       bits == asset.bits && 
-                       byte_order == asset.byte_order && 
-                       signed_ == asset.signed_ && 
-                       header == asset.header && 
+               result = (channels == asset.channels &&
+                       sample_rate == asset.sample_rate &&
+                       bits == asset.bits &&
+                       byte_order == asset.byte_order &&
+                       signed_ == asset.signed_ &&
+                       header == asset.header &&
                        dither == asset.dither &&
                        !strcmp(acodec, asset.acodec));
+               if(result && format == FILE_FFMPEG)
+                       result = !strcmp(ff_audio_options, asset.ff_audio_options) &&
+                               ff_audio_bitrate == asset.ff_audio_bitrate;
+
        }
 
 
        if(test_video && result)
        {
-               result = (layers == asset.layers && 
-                       program == asset.program && 
+               result = (layers == asset.layers &&
+                       program == asset.program &&
                        frame_rate == asset.frame_rate &&
                        width == asset.width &&
                        height == asset.height &&
                        !strcmp(vcodec, asset.vcodec));
+               if(result && format == FILE_FFMPEG)
+                       result = !strcmp(ff_video_options, asset.ff_video_options) &&
+                               ff_video_bitrate == asset.ff_video_bitrate &&
+                               ff_video_quality == asset.ff_video_quality;
        }
 
        return result;
@@ -421,8 +350,8 @@ int Asset::equivalent(Asset &asset,
 int Asset::operator==(Asset &asset)
 {
 
-       return equivalent(asset, 
-               1, 
+       return equivalent(asset,
+               1,
                1);
 }
 
@@ -433,9 +362,9 @@ int Asset::operator!=(Asset &asset)
 
 int Asset::test_path(const char *path)
 {
-       if(!strcasecmp(this->path, path)) 
-               return 1; 
-       else 
+       if(!strcasecmp(this->path, path))
+               return 1;
+       else
                return 0;
 }
 
@@ -444,7 +373,7 @@ int Asset::test_plugin_title(const char *path)
        return 0;
 }
 
-int Asset::read(FileXML *file, 
+int Asset::read(FileXML *file,
        int expand_relative)
 {
        int result = 0;
@@ -501,8 +430,9 @@ int Asset::read(FileXML *file,
                        {
                                const char *string = file->tag.get_property("TYPE");
                                format = File::strtoformat(string);
-                               use_header = 
+                               use_header =
                                        file->tag.get_property("USE_HEADER", use_header);
+                               file->tag.get_property("FFORMAT", fformat);
                        }
                        else
                        if(file->tag.title_is("FOLDER"))
@@ -536,9 +466,9 @@ int Asset::read_audio(FileXML *file)
 {
        if(file->tag.title_is("AUDIO")) audio_data = 1;
        channels = file->tag.get_property("CHANNELS", 2);
-// This is loaded from the index file after the EDL but this 
+// This is loaded from the index file after the EDL but this
 // should be overridable in the EDL.
-       if(!sample_rate) sample_rate = file->tag.get_property("RATE", 44100);
+       if(!sample_rate) sample_rate = file->tag.get_property("RATE", 48000);
        bits = file->tag.get_property("BITS", 16);
        byte_order = file->tag.get_property("BYTE_ORDER", 1);
        signed_ = file->tag.get_property("SIGNED", 1);
@@ -548,9 +478,6 @@ int Asset::read_audio(FileXML *file)
        audio_length = file->tag.get_property("AUDIO_LENGTH", (int64_t)0);
        acodec[0] = 0;
        file->tag.get_property("ACODEC", acodec);
-       
-
-
 
        return 0;
 }
@@ -564,7 +491,7 @@ int Asset::read_video(FileXML *file)
        width = file->tag.get_property("WIDTH", width);
        layers = file->tag.get_property("LAYERS", layers);
        program = file->tag.get_property("PROGRAM", program);
-// This is loaded from the index file after the EDL but this 
+// This is loaded from the index file after the EDL but this
 // should be overridable in the EDL.
        if(EQUIV(frame_rate, 0)) frame_rate = file->tag.get_property("FRAMERATE", frame_rate);
        vcodec[0] = 0;
@@ -581,16 +508,11 @@ int Asset::read_index(FileXML *file)
        return 0;
 }
 
-int Asset::write_index(const char *path, int data_bytes)
-{
-       return index_state->write_index(path, data_bytes, this, audio_length);
-}
-
 // Output path is the path of the output file if name truncation is desired.
 // It is a "" if complete names should be used.
 
-int Asset::write(FileXML *file, 
-       int include_index, 
+int Asset::write(FileXML *file,
+       int include_index,
        const char *output_path)
 {
        char new_path[BCTEXTLEN];
@@ -600,7 +522,7 @@ int Asset::write(FileXML *file,
 
 // Make path relative
        fs.extract_dir(asset_directory, path);
-       if(output_path && output_path[0]) 
+       if(output_path && output_path[0])
                fs.extract_dir(output_directory, output_path);
        else
                output_directory[0] = 0;
@@ -630,22 +552,23 @@ int Asset::write(FileXML *file,
 // Write the format information
        file->tag.set_title("FORMAT");
 
-       file->tag.set_property("TYPE", 
+       file->tag.set_property("TYPE",
                File::formattostr(format));
        file->tag.set_property("USE_HEADER", use_header);
+       file->tag.set_property("FFORMAT", fformat);
 
        file->append_tag();
        file->append_newline();
 
 // Requiring data to exist caused batch render to lose settings.
-// But the only way to know if an asset doesn't have audio or video data 
+// But the only way to know if an asset doesn't have audio or video data
 // is to not write the block.
 // So change the block name if the asset doesn't have the data.
        write_audio(file);
        write_video(file);
 // index goes after source
-       if(index_state->index_status == INDEX_READY && include_index) 
-               write_index(file);  
+       if(index_state->index_status == INDEX_READY && include_index)
+               write_index(file);
 
        file->tag.set_title("/ASSET");
        file->append_tag();
@@ -670,7 +593,7 @@ int Asset::write_audio(FileXML *file)
        file->tag.set_property("DITHER", dither);
        if(acodec[0])
                file->tag.set_property("ACODEC", acodec);
-       
+
        file->tag.set_property("AUDIO_LENGTH", audio_length);
 
 
@@ -679,14 +602,14 @@ int Asset::write_audio(FileXML *file)
 
 //     file->tag.set_property("AMPEG_BITRATE", ampeg_bitrate);
 //     file->tag.set_property("AMPEG_DERIVATIVE", ampeg_derivative);
-// 
+//
 //     file->tag.set_property("VORBIS_VBR", vorbis_vbr);
 //     file->tag.set_property("VORBIS_MIN_BITRATE", vorbis_min_bitrate);
 //     file->tag.set_property("VORBIS_BITRATE", vorbis_bitrate);
 //     file->tag.set_property("VORBIS_MAX_BITRATE", vorbis_max_bitrate);
-// 
+//
 //     file->tag.set_property("MP3_BITRATE", mp3_bitrate);
-// 
+//
 
 
 
@@ -729,9 +652,8 @@ int Asset::write_index(FileXML *file)
 
 
 
-
-const char* Asset::construct_param(const char *param, 
-       const char *prefix, 
+const char* Asset::construct_param(const char *param,
+       const char *prefix,
        char *return_value)
 {
        if(prefix)
@@ -744,8 +666,8 @@ const char* Asset::construct_param(const char *param,
 #define UPDATE_DEFAULT(x, y) defaults->update(construct_param(x, prefix, string), y);
 #define GET_DEFAULT(x, y) defaults->get(construct_param(x, prefix, string), y);
 
-void Asset::load_defaults(BC_Hash *defaults, 
-       const char *prefix, 
+void Asset::load_defaults(BC_Hash *defaults,
+       const char *prefix,
        int do_format,
        int do_compression,
        int do_path,
@@ -772,6 +694,7 @@ void Asset::load_defaults(BC_Hash *defaults,
        {
                format = GET_DEFAULT("FORMAT", format);
                use_header = GET_DEFAULT("USE_HEADER", use_header);
+               GET_DEFAULT("FFORMAT", fformat);
        }
 
        if(do_data_types)
@@ -789,9 +712,8 @@ void Asset::load_defaults(BC_Hash *defaults,
 
 
 
-// Used by filefork
                channels = GET_DEFAULT("CHANNELS", 2);
-               if(!sample_rate) sample_rate = GET_DEFAULT("RATE", 44100);
+               if(!sample_rate) sample_rate = GET_DEFAULT("RATE", 48000);
                header = GET_DEFAULT("HEADER", 0);
                audio_length = GET_DEFAULT("AUDIO_LENGTH", (int64_t)0);
 
@@ -820,13 +742,15 @@ void Asset::load_defaults(BC_Hash *defaults,
        theora_quality = GET_DEFAULT("THEORA_QUALITY", theora_quality);
        theora_sharpness = GET_DEFAULT("THEORA_SHARPNESS", theora_sharpness);
        theora_keyframe_frequency = GET_DEFAULT("THEORA_KEYFRAME_FREQUENCY", theora_keyframe_frequency);
-       theora_keyframe_force_frequency = GET_DEFAULT("THEORA_FORCE_KEYFRAME_FEQUENCY", theora_keyframe_force_frequency);
-
+       theora_keyframe_force_frequency = GET_DEFAULT("THEORA_FORCE_KEYFRAME_FREQUENCY", theora_keyframe_force_frequency);
 
+       GET_DEFAULT("FF_AUDIO_OPTIONS", ff_audio_options);
+       ff_audio_bitrate = GET_DEFAULT("FF_AUDIO_BITRATE", ff_audio_bitrate);
+       GET_DEFAULT("FF_VIDEO_OPTIONS", ff_video_options);
+       ff_video_bitrate = GET_DEFAULT("FF_VIDEO_BITRATE", ff_video_bitrate);
+       ff_video_quality = GET_DEFAULT("FF_VIDEO_QUALITY", ff_video_quality);
 
        mp3_bitrate = GET_DEFAULT("MP3_BITRATE", mp3_bitrate);
-       mp4a_bitrate = GET_DEFAULT("MP4A_BITRATE", mp4a_bitrate);
-       mp4a_quantqual = GET_DEFAULT("MP4A_QUANTQUAL", mp4a_quantqual);
 
        jpeg_quality = GET_DEFAULT("JPEG_QUALITY", jpeg_quality);
        aspect_ratio = GET_DEFAULT("ASPECT_RATIO", aspect_ratio);
@@ -845,30 +769,6 @@ void Asset::load_defaults(BC_Hash *defaults,
        vmpeg_preset = GET_DEFAULT("VMPEG_PRESET", vmpeg_preset);
        vmpeg_field_order = GET_DEFAULT("VMPEG_FIELD_ORDER", vmpeg_field_order);
 
-       h264_bitrate = GET_DEFAULT("H264_BITRATE", h264_bitrate);
-       h264_quantizer = GET_DEFAULT("H264_QUANTIZER", h264_quantizer);
-       h264_fix_bitrate = GET_DEFAULT("H264_FIX_BITRATE", h264_fix_bitrate);
-
-
-       divx_bitrate = GET_DEFAULT("DIVX_BITRATE", divx_bitrate);
-       divx_rc_period = GET_DEFAULT("DIVX_RC_PERIOD", divx_rc_period);
-       divx_rc_reaction_ratio = GET_DEFAULT("DIVX_RC_REACTION_RATIO", divx_rc_reaction_ratio);
-       divx_rc_reaction_period = GET_DEFAULT("DIVX_RC_REACTION_PERIOD", divx_rc_reaction_period);
-       divx_max_key_interval = GET_DEFAULT("DIVX_MAX_KEY_INTERVAL", divx_max_key_interval);
-       divx_max_quantizer = GET_DEFAULT("DIVX_MAX_QUANTIZER", divx_max_quantizer);
-       divx_min_quantizer = GET_DEFAULT("DIVX_MIN_QUANTIZER", divx_min_quantizer);
-       divx_quantizer = GET_DEFAULT("DIVX_QUANTIZER", divx_quantizer);
-       divx_quality = GET_DEFAULT("DIVX_QUALITY", divx_quality);
-       divx_fix_bitrate = GET_DEFAULT("DIVX_FIX_BITRATE", divx_fix_bitrate);
-       divx_use_deblocking = GET_DEFAULT("DIVX_USE_DEBLOCKING", divx_use_deblocking);
-
-       ms_bitrate = GET_DEFAULT("MS_BITRATE", ms_bitrate);
-       ms_bitrate_tolerance = GET_DEFAULT("MS_BITRATE_TOLERANCE", ms_bitrate_tolerance);
-       ms_interlaced = GET_DEFAULT("MS_INTERLACED", ms_interlaced);
-       ms_quantization = GET_DEFAULT("MS_QUANTIZATION", ms_quantization);
-       ms_gop_size = GET_DEFAULT("MS_GOP_SIZE", ms_gop_size);
-       ms_fix_bitrate = GET_DEFAULT("MS_FIX_BITRATE", ms_fix_bitrate);
-
        ac3_bitrate = GET_DEFAULT("AC3_BITRATE", ac3_bitrate);
 
        png_use_alpha = GET_DEFAULT("PNG_USE_ALPHA", png_use_alpha);
@@ -880,7 +780,7 @@ void Asset::load_defaults(BC_Hash *defaults,
        boundaries();
 }
 
-void Asset::save_defaults(BC_Hash *defaults, 
+void Asset::save_defaults(BC_Hash *defaults,
        const char *prefix,
        int do_format,
        int do_compression,
@@ -899,6 +799,7 @@ void Asset::save_defaults(BC_Hash *defaults,
        {
                UPDATE_DEFAULT("FORMAT", format);
                UPDATE_DEFAULT("USE_HEADER", use_header);
+               UPDATE_DEFAULT("FFORMAT", fformat);
        }
 
        if(do_data_types)
@@ -920,23 +821,22 @@ void Asset::save_defaults(BC_Hash *defaults,
                UPDATE_DEFAULT("VORBIS_BITRATE", vorbis_bitrate);
                UPDATE_DEFAULT("VORBIS_MAX_BITRATE", vorbis_max_bitrate);
 
+               UPDATE_DEFAULT("FF_AUDIO_OPTIONS", ff_audio_options);
+               UPDATE_DEFAULT("FF_AUDIO_BITRATE", ff_audio_bitrate);
+               UPDATE_DEFAULT("FF_VIDEO_OPTIONS", ff_video_options);
+               UPDATE_DEFAULT("FF_VIDEO_BITRATE", ff_video_bitrate);
+               UPDATE_DEFAULT("FF_VIDEO_QUALITY", ff_video_quality);
 
                UPDATE_DEFAULT("THEORA_FIX_BITRATE", theora_fix_bitrate);
                UPDATE_DEFAULT("THEORA_BITRATE", theora_bitrate);
                UPDATE_DEFAULT("THEORA_QUALITY", theora_quality);
                UPDATE_DEFAULT("THEORA_SHARPNESS", theora_sharpness);
                UPDATE_DEFAULT("THEORA_KEYFRAME_FREQUENCY", theora_keyframe_frequency);
-               UPDATE_DEFAULT("THEORA_FORCE_KEYFRAME_FEQUENCY", theora_keyframe_force_frequency);
+               UPDATE_DEFAULT("THEORA_FORCE_KEYFRAME_FREQUENCY", theora_keyframe_force_frequency);
 
 
 
                UPDATE_DEFAULT("MP3_BITRATE", mp3_bitrate);
-               UPDATE_DEFAULT("MP4A_BITRATE", mp4a_bitrate);
-               UPDATE_DEFAULT("MP4A_QUANTQUAL", mp4a_quantqual);
-
-
-
-
 
                UPDATE_DEFAULT("JPEG_QUALITY", jpeg_quality);
                UPDATE_DEFAULT("ASPECT_RATIO", aspect_ratio);
@@ -955,29 +855,6 @@ void Asset::save_defaults(BC_Hash *defaults,
                UPDATE_DEFAULT("VMPEG_PRESET", vmpeg_preset);
                UPDATE_DEFAULT("VMPEG_FIELD_ORDER", vmpeg_field_order);
 
-               UPDATE_DEFAULT("H264_BITRATE", h264_bitrate);
-               UPDATE_DEFAULT("H264_QUANTIZER", h264_quantizer);
-               UPDATE_DEFAULT("H264_FIX_BITRATE", h264_fix_bitrate);
-
-               UPDATE_DEFAULT("DIVX_BITRATE", divx_bitrate);
-               UPDATE_DEFAULT("DIVX_RC_PERIOD", divx_rc_period);
-               UPDATE_DEFAULT("DIVX_RC_REACTION_RATIO", divx_rc_reaction_ratio);
-               UPDATE_DEFAULT("DIVX_RC_REACTION_PERIOD", divx_rc_reaction_period);
-               UPDATE_DEFAULT("DIVX_MAX_KEY_INTERVAL", divx_max_key_interval);
-               UPDATE_DEFAULT("DIVX_MAX_QUANTIZER", divx_max_quantizer);
-               UPDATE_DEFAULT("DIVX_MIN_QUANTIZER", divx_min_quantizer);
-               UPDATE_DEFAULT("DIVX_QUANTIZER", divx_quantizer);
-               UPDATE_DEFAULT("DIVX_QUALITY", divx_quality);
-               UPDATE_DEFAULT("DIVX_FIX_BITRATE", divx_fix_bitrate);
-               UPDATE_DEFAULT("DIVX_USE_DEBLOCKING", divx_use_deblocking);
-
-
-               UPDATE_DEFAULT("MS_BITRATE", ms_bitrate);
-               UPDATE_DEFAULT("MS_BITRATE_TOLERANCE", ms_bitrate_tolerance);
-               UPDATE_DEFAULT("MS_INTERLACED", ms_interlaced);
-               UPDATE_DEFAULT("MS_QUANTIZATION", ms_quantization);
-               UPDATE_DEFAULT("MS_GOP_SIZE", ms_gop_size);
-               UPDATE_DEFAULT("MS_FIX_BITRATE", ms_fix_bitrate);
 
                UPDATE_DEFAULT("AC3_BITRATE", ac3_bitrate);
 
@@ -1001,7 +878,6 @@ void Asset::save_defaults(BC_Hash *defaults,
 
 
 
-// Used by filefork
                UPDATE_DEFAULT("CHANNELS", channels);
                UPDATE_DEFAULT("RATE", sample_rate);
                UPDATE_DEFAULT("HEADER", header);
@@ -1029,24 +905,18 @@ void Asset::save_defaults(BC_Hash *defaults,
 
 
 
-int Asset::update_path(char *new_path)
-{
-       strcpy(path, new_path);
-       return 0;
-}
-
-void Asset::update_index(Asset *asset)
-{
-       index_state->copy_from(asset->index_state);
-}
-
-
 int Asset::dump(FILE *fp)
 {
        fprintf(fp,"  asset::dump\n");
        fprintf(fp,"   this=%p path=%s\n", this, path);
        fprintf(fp,"   index_status %d\n", index_state->index_status);
        fprintf(fp,"   format %d\n", format);
+       fprintf(fp,"   fformat=\"%s\"\n", fformat);
+       fprintf(fp,"   ff_audio_options=\"%s\"\n", ff_audio_options);
+       fprintf(fp,"   ff_audio_bitrate=%d\n", ff_audio_bitrate);
+       fprintf(fp,"   ff_video_options=\"%s\"\n", ff_video_options);
+       fprintf(fp,"   ff_video_bitrate=%d\n", ff_video_bitrate);
+       fprintf(fp,"   ff_video_quality=%d\n", ff_video_quality);
        fprintf(fp,"   audio_data %d channels %d samplerate %d bits %d"
                " byte_order %d signed %d header %d dither %d acodec %c%c%c%c\n",
                audio_data, channels, sample_rate, bits, byte_order, signed_,
@@ -1057,13 +927,6 @@ int Asset::dump(FILE *fp)
                video_data, layers, program, frame_rate, width, height,
                vcodec[0], vcodec[1], vcodec[2], vcodec[3], aspect_ratio);
        fprintf(fp,"   video_length " _LD " \n", video_length);
-       fprintf(fp,"   ms_bitrate_tolerance=%d\n", ms_bitrate_tolerance);
-       fprintf(fp,"   ms_quantization=%d\n", ms_quantization);
-       fprintf(fp,"   ms_fix_bitrate=%d\n", ms_fix_bitrate);
-       fprintf(fp,"   ms_interlaced=%d\n", ms_interlaced);
-       fprintf(fp,"   h264_bitrate=%d\n", h264_bitrate);
-       fprintf(fp,"   h264_quantizer=%d\n", h264_quantizer);
-       fprintf(fp,"   h264_fix_bitrate=%d\n", h264_fix_bitrate);
        return 0;
 }