Implement graphic with MediaPlay

zhaozj2021-02-17  43

Keyword

The younger brother has done the Code (VC, BCB, DEPHI) who wants to open the problem, and the method of starting the younger brother with a copy of the younger brother can also grab a piece of black and call. Later, in a few prawns, VC DirectShow implements this feature. It can be used to achieve playback and original intentions with DirectShow. From then on, I will get into the dead end, always want to combine DirectShow and ActiveMove components, DirectShow with the MediaPlay component, and use iBasicVideo Interface to achieve goals. You can read the header files with this associated DirectSDK, have not found the combination (the prawn is achieved, please point to the younger brother, you will thank you!). Has been suffering, there is no progress, and the books related to the market are all over.

useless! (It can be seen that those so-called "advanced programming skills" are dog fart, and the difficulty is difficult to avoid. All is a chaotic copy, TMD liar), one day you have reread the ibasicvideo interface supports The Video Properties of a Generic Video Window. Generally, this is a video renderer that draws video into a window on the display. (msdn), suddenly remembered reading dephihelp are some similar TPaintBox provides a canvas that applications can use for rendering an image. (dephihelp) then you want to use paintbox might be , try-> success, code as follows: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, MPlayer, ExtCtrls, StdCtrls, Menus; type TForm1 = class (TForm) MainMenu1: TMainMenu ; filw1: TMenuItem; open1: TMenuItem; close1: TMenuItem; Button1: TButton; OpenDialog1: TOpenDialog; PaintBox1: TPaintBox; MediaPlayer1: TMediaPlayer; procedure FormCreate (Sender: TObject); procedure FormClose (Sender: TObject; var Action: TCloseAction); Procedure PaintBox1Paint (Sender: Tobject); Procedure Open1Click (sender: Tobject); Procedure Button1click (Sender: Tob ject); private imgbitmap: TBitmap; {Private declarations} public {Public declarations} end; var Form1: TForm1; implementation {$ R * .dfm} procedure TForm1.FormCreate (Sender: TObject); begin imgbitmap: = TBitmap.Create; imgbitmap.Height: = 200; imgbitmap.Width: = 200; imgbitmap.Canvas.Rectangle (0,0,200,200); end; procedure TForm1.FormClose (Sender: TObject; var Action: TCloseAction); begin imgbitmap.Free; end; procedure TFORM1.PaintBox1Paint (Sender: TOBJECT); Begin PaintBox1.canvas.copyRect (Rect (0,0,200,200), IMGBitmap.canvas, RECT (0, 0, 200, 200)); End; Procedure TFORM1.Open1Click (Sender: TObject);

转载请注明原文地址:https://www.9cbs.com/read-28809.html

New Post(0)