Forum > Beginners

omxplayer using lazarus

<< < (2/2)

Mike.Cornflake:

--- Quote ---how can we solve this problem???
--- End quote ---

By being more careful when copying code from the forum :-)

I said to use Process, not UTF8Process.  They're different units with different functionality. 
In this case, the difference is the lack of the RunCommand helper routines in UTF8Process.  Switch it back and my code *should* work. (Sure, it's still not tested, so this is a brave call for me to make :-) )

If you need UTF8Process, then have a look in Process.pp, and port RunCommand :-)

hamza:
sorry for late reply but I change the processor but still have problem.
firstly I have the folowing
lazarus  version 0.9.30.4-6
FPC 2.6.0
ARM LINUX gtk 2

then I tried the suggested code
unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, process, LCLIntf, FileUtil, Forms, Controls, Graphics,
  Dialogs, StdCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    RunCommand: TProcess;
    procedure Button1Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
Var
  sOutput: String;
Begin
  RunCommand('omxplayer', ['/home/ppp1/Desktop/Clow.mp4'], sOutput);

end;

end.

but this error appeared(error **on RunCommand('omxplayer', ['/home/ppp1/Desktop/Clow.mp4'], sOutput);**
ERROR : illegal expression


also how can I update fpc and pascal??? in case there are new software??
 

parcel:
How about using full path of omxplayer?

You get it from

--- Code: ---which omxplayer

--- End code ---

hamza:

I used mplayer and omxplayer with full path but still have the same error[illegal expression]

anyway I serached on Google and i find that the RunCommand need FPC 2.6.2, but i have FPC 2.6.0 ??
http://wiki.freepascal.org/Executing_External_Programs

so, if this correct, how can i fpc 2.6.2??

hamza:
can you help me plz~??

Navigation

[0] Message Index

[*] Previous page

Go to full version