Home > Back-end >  Delphi MediaPlayer broadcast video capture
Delphi MediaPlayer broadcast video capture

Time:09-19

Consult a great god Delphi MediaPlayer broadcast video, how to use button again to intercept frame pictures and save into BMP images?

CodePudding user response:

Beginners Delphi, please everyone a great god guidance,,,,,,,,

CodePudding user response:

To download pspack control packets, there is a Demo with you want to do the same

CodePudding user response:

Sorry, wrong number, it is DSPack

CodePudding user response:

Didn't read the code, can you help me to explain?

CodePudding user response:

Delphi MediaPlayer play video, the function is more, but unfavorable refinement, if you want to do a very modify a personalized r player,
Suggest you use third-party DSPack control, it can achieve your requirement,

CodePudding user response:

Procedure TForm1. BitBtn5Click (Sender: TObject);
The begin
If OpenDialog1. Execute then//open the video file
The begin
MediaPlayer1. Close;
MediaPlayer1. FileName:=opendialog1. FileName;
MediaPlayer1. Open;
MediaPlayer1. Display:=Panel2;
MediaPlayer1. DisplayRect:=the rect (0, 0, Panel2. Width, Panel2. Height);
end;
end;

procedure TForm1.FormCreate(Sender: TObject);
The begin
Imgbitmap:=TBitmap. Create;
Imgbitmap. Height:=Panel2. Width;
Imgbitmap. Width:=Panel2. Height;
Imgbitmap. Canvas. A Rectangle (0, 0, Panel2. Width, Panel2. Height);
end;

Procedure TForm1. PaintBox1Click (Sender: TObject);
The begin
PaintBox1. Canvas. CopyRect (the Rect (0, 0, Panel2. Width, Panel2. Height), imgbitmap. The Canvas, the Rect (0, 0, Panel2. Width, Panel2. Height));
end;

Procedure TForm1. BitBtn6Click (Sender: TObject);
The begin
If SavePictureDialog1. Execute then
Imgbitmap. Canvas. CopyRect (the Rect (0, 0, Panel2. Width, Panel2. Height), form1, Canvas, the Rect (0, 0, Panel2. Width, Panel2. Height));
PaintBox1. Invalidate;
Imgbitmap. SaveToFile:=SavePictureDialog1. FileName;
end;

Give the error message is:
[error] Unit3. Pas (176) : Not enough actual parameters
Is the above imgbitmap. SaveToFile:=SavePictureDialog1. The FileName;
What is the problem?
  • Related