#include "filexml.h"
#include "format.inc"
#include "indexstate.h"
-#include "quicktime.h"
#include <stdio.h>
#include <string.h>
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;
reset_audio();
reset_video();
- strcpy(vcodec, QUICKTIME_YUV2);
- strcpy(acodec, QUICKTIME_TWOS);
+ strcpy(vcodec, "");
+ strcpy(acodec, "");
ff_audio_options[0] = 0;
ff_video_options[0] = 0;
//printf("Asset::boundaries %d %d %f\n", __LINE__, sample_rate, frame_rate);
}
-
-void Asset::reset_index()
-{
- index_state->reset();
-}
-
void Asset::copy_from(Asset *asset, int do_index)
{
copy_location(asset);
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;
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.
-
const char* Asset::construct_param(const char *param,
const char *prefix,
char *return_value)
-// Used by filefork
channels = GET_DEFAULT("CHANNELS", 2);
if(!sample_rate) sample_rate = GET_DEFAULT("RATE", 44100);
header = GET_DEFAULT("HEADER", 0);
-// Used by filefork
UPDATE_DEFAULT("CHANNELS", channels);
UPDATE_DEFAULT("RATE", sample_rate);
UPDATE_DEFAULT("HEADER", header);
-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");