السلام عليكم يا شباب ....
1- يرجى منكم التكرم من كان له أدنى فكرة عن حماية ملف الفيديو فلا يبخل علينا بها
2- تخزين ملف Avi صمن DataBase ثم استعراضه
3-تخزين ملف Avi في ملف Dll ثم أستعراضه
يرجى التوضيح أو أمثلة و شكرا
وففكم الله
السلام عليكم يا شباب ....
1- يرجى منكم التكرم من كان له أدنى فكرة عن حماية ملف الفيديو فلا يبخل علينا بها
2- تخزين ملف Avi صمن DataBase ثم استعراضه
3-تخزين ملف Avi في ملف Dll ثم أستعراضه
يرجى التوضيح أو أمثلة و شكرا
وففكم الله
تم تعديل هذه المشاركة بواسطة MS.Programmer في 20 أكتوبر 2003 في 02:52
وعليكم السلام ورحمة الله وبركاته
اقتباس1- يرجى منكم التكرم من كان له أدنى فكرة عن حماية ملف الفيديو فلا يبخل علينا بها
تكرم حبيبي
هل جربت تستعمل الوحدةCRC (Cyclical Redundancy Check)
انا برايي المتواضع افضل حل لعمل compess و decompress لمفات الavi
اقتباس2- تخزين ملف Avi صمن DataBase ثم استعراضه
على حسب نو ع قا عدة البيانات التي سوف تستعملها اعتقد الاغلبية بيهم حقل blod
بامكانك تخزينهم بقاعدة بينات
انا لااحب قواعد البيانات
و برادوكس مثلا او حتى كانت accsess
لن تحتاج لاكثر من تعاملات عادية مع قواعد البيانات وحقولها
بس اللعبة الاحلى بالموضوع انك تنقل الحقول من نوع blod لملفات مشفرة
لانه كما تعرف لم يعد هناك وثوقية بكلا النوعين السابقين !!
بس إذا مصر ممكن اجربلك بمثال
اقتباس3-تخزين ملف Avi في ملف Dll ثم أستعراضه
لتخزينه ستتعامل مع الresorses بس مابعرف بالضبط إذ بتظبط (ساحاول كمان يومين )
الافكار الاولية للحل بانشاء صفوف مثل TResourceStream;
لكن إن كان مخزن بالاصل يمكنك استعراضه كالتالي
procedure TSplash.ShowSplash;
var
ResHandle: Integer;
begin
try
ResHandle := LoadAviAsResource(Animate1, 'MyDll.dll', 'SPLASHAVI');
{ causes exception }
except
ResHandle := LoadAviAsResource(Animate1, 'MyDll.dll', 'SPLASHAVI');
{ this time it works }
end;
if ResHandle > 0 then
begin
Animate1.Visible := True;
Animate1.Repetitions := -1;
Animate1.Active := True
end
else
begin
Animate1.Visible := False;
Animate1.Active := False;
{ Show a static bitmap or something if AVI cannot be displayed }
end;
Show;
end;
function TSplash.LoadAviAsResource(const AviName: TObject; DllName,
ResourceName: string): Integer;
var
ResourceHandle: THandle;
begin
ResourceHandle := LoadLibrary(Pchar(DllName));
TAnimate(AviName).ResName := ResourceName;
TAnimate(AviName).ResHandle := ResourceHandle;
FreeLibrary(ResourceHandle);
result := ResourceHandle;
end;
You used to struggle with C++ libraries for Windows, and Delphi was and still is the best combination of object-oriented programming and visual programming for Windows
مشكور جدا على المشاركة و التوضيح لكن
لو تدعم شرحك بأمثلة أخي الكريم بكون فضلت
لقد بحثت في المنتدى و وجدت الكود الذي تفضلت به لكن أنا ما بعرف كيف بدي خزن ملف
الفيديو في Dll
و لقد استطعت تخزين ملف الفيديو في حقل داتا بيس نوعه بلوب لكن لم أجد طريقة لإستعراضه
إذا كان عندك أي مثال عن الإستفسارات السابقة تكرم علينا بها
و شكرا
أبو جواد ...شكرا لك ........................
أعمل مثال حبيبي.........
تم تعديل هذه المشاركة بواسطة MAX_MAX في 21 أكتوبر 2003 في 20:38
I sorry to being late
tomorro
I will Try to send Some Usfule Source To U
and
this is my Email
reda_sabouri@hotmail.com
اقتباسو وجدت الكود الذي تفضلت به
this code that I put it in the furom
You used to struggle with C++ libraries for Windows, and Delphi was and still is the best combination of object-oriented programming and visual programming for Windows
السلام عليكم
الأخ الكريم جواد شكرا لك
بالنسبة للكود الذي تفضلت به فهو كان لأخ الكريم Reda و ذلك قبل إختراق المنتدى
و إن كان هذا الأخ هو أنت فشكرا لك أكثر و هذا هو الإميل
mseiad@mail.sy
يرجى منك ترسل لس الطريقة و أعيد سؤالي
1- استعراض ملف فيديو مخزن ضمن حقل بلوب في Db دون حفظه على الهارد
أي دون استخراجه من الحقل إلى الهارد
2- طريقة حفظ ملف الفيديو في Dll
مشكووووووور جدا
السلام عليكم
اسف الحاسب كنت على حاسب لايدعم الله العربية
_بامكانك تخزين الملفات داخل Dll باستعمال vc++ يوجد مثال سهل داخل msdn
واتمنى ان يكون المثال ال>ي ارسلته لك مفيدا
بالنسبة للتخزين داخل قاعدة البيانات
فالامر يختلف قليلا عن ملفات wav
حيث ان الاخيرة يمكنك تشغيلها مباشرة بتوابع api من الوحدة mmsytem
لكن هناك طريقة مبسطة
وهي ان تكتب الحقل blob إلى ملفات مؤقتة (لن يعلم المستخدم بها)ومن ثم تجعل القارئ الخاص بك يقراها من الملف نفسه
var
FileName : string;
{This function gets a temporary file name form the system}
function GetTemporaryFileName : string;
{$IFNDEF WIN32}
const MAX_PATH = 44;
{$ENDIF}
var
{$IFDEF WIN32}
lpPathBuffer : PChar;
{$ENDIF}
lpbuffer : PChar;
begin
{Get the file name buffer}
GetMem(lpBuffer, MAX_PATH);
{$IFDEF WIN32}
{Get the temp path buffer}
GetMem(lpPathBuffer, MAX_PATH);
{Get the temp path}
GetTempPath(MAX_PATH, lpPathBuffer);
{Get the temp file name}
GetTempFileName(lpPathBuffer,
'tmp',
0,
lpBuffer);
{Free the temp path buffer}
FreeMem(lpPathBuffer, MAX_PATH);
{$ELSE}
{Get the temp file name}
GetTempFileName(GetTempDrive('C'),
'tmp',
0,
lpBuffer);
{$ENDIF}
{Create a pascal string containg}
{the temp file name and return it}
result := StrPas(lpBuffer);
{Free the file name buffer}
FreeMem(lpBuffer, MAX_PATH);
end;
{Read a AVI file into a blob field}
procedure TForm .Button Click(Sender: TObject);
var
FileStream: TFileStream; {to load the avi file}
BlobStream: TBlobStream; {to save to the blob}
begin
{Allow the button to repaint}
Application.ProcessMessages;
{Turn off the buttons}
Button .Enabled := false;
Button2.Enabled := false;
{Assign the avi file name to read}
FileStream := TFileStream.Create(
'C:\PROGRA~ \BORLAND\DELPHI~ \DEMOS\COOLSTUF\COOL.AVI',
fmOpenRead);
Table .Edit;
{Create a BlobStream for the TField Table AVI}
BlobStream := TBlobStream.Create(Table AVI, bmReadWrite);
{Seek to the Beginning of the stream}
BlobStream.Seek(0, soFromBeginning);
{Delete any data that may be there}
BlobStream.Truncate;
{Copy from the FileStream to the BlobStream}
BlobStream.CopyFrom(FileStream, FileStream.Size);
{Free the streams}
FileStream.Free;
BlobStream.Free;
{Post the record}
Table .Post;
{Enable the buttons}
Button .Enabled := true;
Button2.Enabled := true;
end;ولقراءته وتشغيله
procedure TForm .Button2Click(Sender: TObject);
var
FileStream: TFileStream; {a temp file}
BlobStream: TBlobStream; {the AVI Blob}
begin
{Create a blob stream for the AVI blob}
BlobStream := TBlobStream.Create(Table AVI, bmRead);
if BlobStream.Size = 0 then begin
BlobStream.Free;
Exit;
end;
{Close the media player}
MediaPlayer .Close;
{Reset the file name}
MediaPlayer .FileName := '';
{Refresh the play window}
MediaPlayer .Display := Panel;
Panel .Refresh;
{if we have a temp file then erase it}
if FileName <> '' then
DeleteFile(FileName);
{Get a temp file name}
FileName := GetTemporaryFileName;
{Create a temp file stream}
FileStream := TFileStream.Create(FileName,
fmCreate or fmOpenWrite);
{Copy the blob to the temp file}
FileStream.CopyFrom(BlobStream, BlobStream.Size);
{Free the streams}
FileStream.Free;
BlobStream.Free;
{Setup the Media player to play the AVI file}
MediaPlayer .FileName := filename;
MediaPlayer .DeviceType := dtAviVideo;
MediaPlayer .Open;
MediaPlayer .Play;
end;
procedure TForm .FormDestroy(Sender: TObject);
begin
{Unassign the temp file from the media player}
MediaPlayer .Close;
MediaPlayer .FileName := '';
{Erase the temp file}
if FileName <> '' then
DeleteFile(FileName);
end;ساطلعك على مساوئ الطريقتين السابقتين
التخزين بملف dll يوجد بعض البرامج التي تحول منdll إلى lib
وبالتالي يستطيع الشخص رؤية الملفات
_التخزين بقاعدة الببيانات كما تعلم الpardox يمكن الدخول لمفاتها حتى لو وضع كلمة سر
وبذلك يمكن الدخول لها
_رايي كماسبق وقلت لك افضل بان تستعمل الوحدة crc المخصصة للتشفير والعميليات المعقدة
لكن بصراحة لم اجرب ان اتعامل معها لملفات الavi لكن اعتقد يمكن استعمالها
بالتوفيق اخي الكريم
www.delphi32.com/info_facts/faq/faq_246.asp
You used to struggle with C++ libraries for Windows, and Delphi was and still is the best combination of object-oriented programming and visual programming for Windows
السلام عليكم
كل الشكر و التقدير و الإحترام للأخ رضا(Jawad) و الله إنك معطاء
لقد فكرت في التخزين بقاعدة بيانات Interbase و لكن يجب على المستخدم
تنزيلها قبل تشغيل ملف الفيديو من برنامجي
و لكن عملية تصدير ملف الفيديو ممكن أن تكون لعبة مكشوفة لأنه إذا عمل المستخدم
بحث عن الملفات المحدثة أو المنشأة أثناء عمل البرنامج
فسيظهر له الملف ( أنا لا أتكلم عن مستخدم عادي )
لكن كما تفضلت يبدو أن أفضل طريقة هي التشفير
لك احترامي على البرامج لقد كان فيها فائدة كبيرة
هذا الموضوع مغلق.