Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th January 2013, 13:00   #1  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 715
Writing to and reading from a file for a 2 pass filter plugin

I remember that long time back there was a facility in Avisynth for plugins to save a string but when I used it, I could not read back even within the same frame it was written. I do not know whether it still exists. My search for writing a file failed to get useful results
I am trying to code a plugin that operates in two passes ( or two plugins second operating after first one finishes , communicating through a text or hex file. Is it possible to do such I/O operations from within plugin? Similar to something from a script one can do a writeFile?
Can such a facility be available as an input spec in filter creation (c,s,i,f,a)
__________________
mohan
my plugins are now hosted here
vcmohan is online now   Reply With Quote
Old 27th January 2013, 15:12   #2  |  Link
Mystery Keeper
Beyond Kawaii
 
Mystery Keeper's Avatar
 
Join Date: Feb 2008
Location: Russia
Posts: 684
Nothing prevents you from creating, reading and writing files within your plugin. Nothing prevents you to do anything at all within your plugin. You can even do as much as create windows to display custom information every time a frame is requested, or even put controls in them to adjust your filter on the fly.
__________________
...desu!
Mystery Keeper is offline   Reply With Quote
Old 28th January 2013, 04:28   #3  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 715
Thanks for the information. But I have not come across any plugin that use such features. Can you give links to some such plugins?
__________________
mohan
my plugins are now hosted here
vcmohan is online now   Reply With Quote
Old 28th January 2013, 05:10   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
Code:
FILE *fp;

fopen_s(&fp, "stuff.txt", "w");
if (fp == 0)
{
    printf("Cannot open stuff file.\n");
    return 0;
}

fprintf(fp, "%s\n", "Some data.\n");

fclose(fp);
You can do the open and close in your constructor and destructor, and do the write in GetFrame() for example.
Guest is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.