コード例 #1
0
ファイル: x264Encode.c プロジェクト: lukechampine/mkvsynth
Value x264Encode_AST(argList *a) {
	struct x264EncodeParams *params = malloc(sizeof(struct x264EncodeParams));

	checkArgs(a, 2, typeClip, typeStr);
	MkvsynthOutput *output = MANDCLIP(0);
	params->filename = strdup(MANDSTR(1));
	params->x264params = strdup(OPTSTR("params", ""));
	params->input = createInputBuffer(output);

	if(isMetaDataValid(params->input->metaData) != 1)
		MkvsynthError("invalid colorspace!");

	mkvsynthQueue((void *)params, x264Encode);
    RETURNNULL();
}
コード例 #2
0
ファイル: writeRawFile.c プロジェクト: lukechampine/mkvsynth
Value writeRawFile_AST(argList *a) {
	struct writeRawFileParams *params = malloc(sizeof(struct writeRawFileParams));

	checkArgs(a, 2, typeClip, typeStr);
	MkvsynthOutput *output = MANDCLIP(0);
	char *filename = MANDSTR(1);

	////////////////////
	// Error Checking //
	////////////////////
	params->file = fopen(filename, "w");
	if(params->file == NULL)
		MkvsynthError("Could not open the output file!");

	params->input = createInputBuffer(output);

	mkvsynthQueue((void *)params, writeRawFile);
    RETURNNULL();
}
コード例 #3
0
ファイル: writeRawFile.c プロジェクト: DavidVorick/mkvsynth
void writeRawFile_AST(ASTnode *p, ASTnode *args) {
	struct writeRawFileParams *params = malloc(sizeof(struct writeRawFileParams));

	checkArgs("writeRawFile", args, 2, typeClip, typeStr);
	MkvsynthOutput *output = MANDCLIP();
	char *filename = MANDSTR();

	////////////////////
	// Error Checking //
	////////////////////
	params->file = fopen(filename, "w");
	if(params->file == NULL) {
		printf("Could not open the output file!\n");	
		exit(0);
	}

	params->input = createInputBuffer(output);

	mkvsynthQueue((void *)params, writeRawFile);
}