I need write red line in the middle of TPanel where is displaying RTSP stream. I have add new component to my application (TPaintBox) and draw over canvas but method:
libvlc_media_player_play(vlcMediaPlayer);
overrite this red line.
Can You help me?
Code: Select all
procedure TkbSDVLCLib.Play(const pRTSPAddr: PAnsiChar;
const pDisplay: THandle; const pRec: boolean);
var
vname: string;
begin
if (Assigned(vlcMediaPlayer) and (libvlc_media_player_is_playing(vlcMediaPlayer) = 1)) then
exit;
vlcMedia := libvlc_media_new_location(vlcInstance, pRTSPAddr);
vlcMediaPlayer := libvlc_media_player_new_from_media(vlcMedia);
if pRec then
begin
FRTSPAddr := pRTSPAddr;
FDisplay := pDisplay;
vTimer.Interval := FRecordTimeInMiliseconds;
vTimer.Enabled := true;
vname :=FPath+'\'+ DateTimeToStr(Now,FS) + '_'+FName + '.mp4';
FFileList.Add(vName);
libvlc_media_add_option(vlcMedia,PAnsiChar(AnsiString(':sout=#duplicate{dst=display,dst=std{access=file,mux=mp4,dst="'+vname +'"}}')));
end;
libvlc_media_release(vlcMedia);
libvlc_media_player_set_hwnd(vlcMediaPlayer, Pointer(pDisplay));
libvlc_media_player_play(vlcMediaPlayer);
end;
Code: Select all
pbLine.Canvas.Pen.Color := clRed;
pbLine.Canvas.MoveTo(0,round(pbLine.Height/2));
pbLine.Canvas.LineTo(pbLine.Width,Round(pbLine.Height/2));