Fight Against Spammer
*

  Home Help Login Register  
Welcome, Guest. Please login or register.
February 06, 2012, 07:03:17 PM

Login with username, password and session length

TOP 20 of 72,539 Spammer was hit me

NO IP Address Total Hits Country
1. 178.73.63.145 1,975
2. 77.93.2.81 1,057
3. 46.251.237.99 851
4. 87.250.252.240 588
5. 94.23.208.144 550
6. 77.65.48.239 443
7. 178.73.17.204 364
8. 109.230.216.120 359
9. 109.230.220.62 351
10. 91.121.19.189 343
11. 109.230.244.148 342
12. 91.201.66.76 336
13. 91.121.21.8 330
14. 211.193.254.175 325
15. 218.236.10.31 317
16. 188.143.232.39 313
17. 46.17.96.151 310
18. 74.63.249.178 291
19. 199.15.234.117 223
20. 65.49.14.79 217

we will slaughter spammers

Search:
    Advanced search
86 Posts in 41 Topics by 40 Members
Latest Member: yudi zulkarnain

The Free CGI Web Proxy

i-cakrawangsa CGI Proxy

terserahlu CGI Proxy

Search In The Holly Quran

Pages: [1]   Go Down
  Print  
Author Topic: Playing TV Tuner Using DSPACK Component  (Read 3517 times)
Uwa Semar
Administrator
Newbie
*****
Offline Posts: 30



« on: March 03, 2010, 12:32:34 AM »

Before Try This Source the first step Dowload DSPACK Component from SourceForge.net
This is my TV Tuner Routine
Code:

Procedure Set_TVTuner(CapEnum           : TSysDevEnum;
                      TvGraph           : TFilterGraph;
                      TvWindow          : TVideoWindow;
                      var TVTuner       : IAMTVTuner;
                      var TVVolume      : IbasicAudio;
                      var DeviceReady   : Boolean);
Const
  DefaultCountry = 62;
  DefaultChanel = 309;
var
  TunerF,CaptureF : IbaseFilter;
  VideoDecoder     : IAMAnalogVideoDecoder;
  TunerFInfo,
  CaptureFInfo      : String;
  hr                     : cardinal;
  outpin               : Ipin;

begin
  TvGraph.Active := True;
//Enumerated TVTuner
  capEnum.SelectGUIDCategory(AM_KSCATEGORY_TVTUNER);
  TunerF := CapEnum.GetBaseFilter(0);
  try
    TunerFInfo :=  CapEnum.Filters[0].FriendlyName;
  except
    DeviceReady := false;
    TvGraph.Active := false;
    Exit;
  end;

//Enumerated TVDevice
   CapEnum.SelectGUIDCategory(AM_KSCATEGORY_CAPTURE);
   CaptureF := CapEnum.GetBaseFilter(3);
   CaptureFInfo := CapEnum.Filters[3].FriendlyName;

//Set TV System
   CaptureF.QueryInterface(IID_IAMAnalogVideoDecoder, VideoDecoder);
   VideoDecoder.put_TVFormat(AnalogVideo_PAL_B);

//Create TvTuner
   TunerF.QueryInterface(IID_IAMTVTuner, TVTuner);

//Set TV Tuner
   TvTuner.put_InputType(0,TunerInputCable);
   TvTuner.put_TuningSpace(0);

   TvTuner.put_CountryCode(DefaultCountry);
   TvTuner.put_Channel(DefaultChanel,0,0);

   (TVGraph as IGraphBuilder).AddFilter(CaptureF, PwideChar(CaptureFInfo));

//Render Audio Output
   hr := CaptureF.FindPin('3', OutPin);
   if hr = 0 then
        (TVGraph as IGraphBuilder).Render(OutPin);
// now render streams
   with TVGraph as ICaptureGraphBuilder2 do
      RenderStream(@PIN_CATEGORY_PREVIEW, nil, CaptureF as IBaseFilter,
                   nil, TvWindow as IBaseFilter);
   TVGraph.QueryInterface(IBasicAudio,TVVolume);
   DeviceReady := True;
   sleep(wait1);
End;

This Routine was tested on My system using MS XP SP3
TVTuner Gadmei USB TVBOX Type UTV330
Sound Card Conextant HDAudio
DirectX 9C
VGA Card Intel Mobile GM950
The result Audio And Video Are Working Fine.

Hope My Code Can Help....
Logged
freris
Newbie
*
Offline Posts: 1


« Reply #1 on: January 06, 2011, 05:33:38 AM »

Have a good day Uwa.

Searching to know about dsPack, found you!

Can you please upload all the project? I try this example code, but don't work for me.

Thanks in advance

Freris
Athens - Greece
Logged
Uwa Semar
Administrator
Newbie
*****
Offline Posts: 30



« Reply #2 on: January 06, 2011, 11:39:56 PM »

Hi freris
Glad to know you

here is my simple project, i use Gadmei USB TV Box for this project,please change the default country code with your country code, and the default channel to

Code:
unit main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DSPack,DsUtil,DirectShow9;

type
  TForm1 = class(TForm)
    TVGraph: TFilterGraph;
    TvWindow: TDSVideoWindowEx2;
    Label1: TLabel;
    Edit1: TEdit;
    Button1: TButton;
    Button2: TButton;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
  public
  end;
Const
  DefaultCountry =  62;
  DefaultChanel  = 309;
 
var
  Form1: TForm1;
  TVEnum         : TSysDevEnum;
  CrossBar       : IAMCrossbar;
  TVTuner        : IAMTVTuner;
  TVVolume       : IbasicAudio;
  TVReady        : Boolean;
  ListDevice     : TstringList;

implementation

{$R *.dfm}

Procedure Set_TVTuner(CapEnum           : TSysDevEnum;
                      IDCapture         : Integer;
                      Var TVGraph       : TFilterGraph;
                      Var TVScreen      : TDSVideoWindowEx2;
                      Var CrossBar      : IAMCrossbar;
                      var TVTuner       : IAMTVTuner;
                      var DeviceReady   : Boolean);
var
  TvFilter,TunerF,CrossBarF  : IbaseFilter;
  CaptureFInfo      : String;
  s                 : String;
  VideoDecoder      : IAMAnalogVideoDecoder;
  TVDeviceName      : String;
  Hr                : Cardinal;
  OutPin            : Ipin;

Procedure XError;
Begin
    DeviceReady := false;
End;

begin
//Enumerated TVDevice
  TVFilter       := CapEnum.GetBaseFilter(IDCapture);
  try
    CaptureFInfo := CapEnum.Filters[IDCapture].FriendlyName;
    TVDeviceName := CaptureFInfo;
  except
    XError;
    Exit;
  end;

//Enumerated TVTuner
  capEnum.SelectGUIDCategory(AM_KSCATEGORY_TVTUNER);
  TunerF := CapEnum.GetBaseFilter(0);
  try
    s := CapEnum.Filters[0].FriendlyName;
  except
    XError;
    Exit;
  end;

//Set TV System
   try
     TVFilter.QueryInterface(IID_IAMAnalogVideoDecoder, VideoDecoder);
     Try
       VideoDecoder.put_TVFormat(AnalogVideo_PAL_B);
     Except
       XError;
       Exit;
     end;
    except
       xError;
       Exit;
    end;

//Get CrossBar
  capEnum.SelectGUIDCategory(AM_KSCATEGORY_CROSSBAR);
  CrossbarF := CapEnum.GetBaseFilter(0);
  try
    s := CapEnum.Filters[0].FriendlyName;
  except
    XError;
    Exit;
  end;

//Create CrossBar
  CrossbarF.QueryInterface(IID_IAMCrossBar,CrossBar);
  Crossbar.Route(0,0);

//Create TvTuner
  TunerF.QueryInterface(IID_IAMTVTuner, TVTuner);

//Set TV Tuner
  TvTuner.put_InputType(0,TunerInputCable);
  TvTuner.put_TuningSpace(0);
  TvTuner.put_CountryCode(DefaultCountry);
  TvTuner.put_Channel(DefaultChanel,0,0);

  (TVGraph as IGraphBuilder).AddFilter(TVFilter, PwideChar(CaptureFInfo));
//Render Audio Output
   hr := TVFilter.FindPin('3', OutPin);
   if hr = 0 then
        (TVGraph as IGraphBuilder).Render(OutPin);

   with TVGraph as ICaptureGraphBuilder2 do
       RenderStream(@PIN_CATEGORY_PREVIEW, nil, TVFilter as IBaseFilter,
                   nil, TVScreen as IBaseFilter);
  sleep(1);
  DeviceReady := True;
End;


procedure TForm1.FormCreate(Sender: TObject);
var
  tvDevice : string;
  i : integer;
begin
  tvgraph.GraphEdit := True;
  tvgraph.Mode := gmCapture;
  tvgraph.Active := true;
  tvDevice := 'USB TV Device'; // This is my TV Device
  ListDevice := TstringList.Create;
  TvEnum     := TsysDevEnum.Create;
  TVEnum.SelectGUIDCategory(AM_KSCATEGORY_Capture);

  for i:= 0 to TvEnum.CountFilters - 1 do
        ListDevice.Add(TVEnum.Filters[i].FriendlyName);

   for i := 0 to ListDevice.Count-1 do
    begin
      if ListDevice.Strings[i] = tvDevice Then Break;
    end;

  Set_TVTuner(TvEnum,i, TvGraph,
             TVWindow, CrossBar,
             TVTuner, TVReady);

  If Not TVReady Then
  begin
     Showmessage('Failed To Initialized '+tvDevice);
     application.Terminate
  end;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  TVEnum.Free;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  tvgraph.Play;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
   TvTuner.put_Channel(strtoint(edit1.Text),0,0);
end;

end.
Logged
sams
Newbie
*
Offline Posts: 1


« Reply #3 on: April 04, 2011, 04:20:56 PM »

have a nice day uwa

thank's for your script. I want to develop application with feature : TV, news, and announcement.
and i've tried your script, but I have problem. it's not work.  can you help me to send your file of project to my email ? mr.s4m5@yahoo.co.id

thanks

sams
Logged
Uwa Semar
Administrator
Newbie
*****
Offline Posts: 30



« Reply #4 on: April 07, 2011, 08:51:09 PM »

hi sams,
glad to know you
I have finished making the same application, if you are interested then I will send my sample project.
Can you send me details of tvtuner
try using graphedit, to find out what is required by your tvtuner. and post it here so we can analyze

sorry my bad english
Logged
picas.line
Newbie
*
Offline Posts: 4


« Reply #5 on: June 29, 2011, 12:26:50 AM »

Dear Uwa,

i using AVERMEDIA averTV hybrid volar HD
do you have experience use this type of USB TV Tuner?

I want your source code too in delphi project, can you send me?
please send to my email picas.line[at]gmail.com

i want to develop application like this..


im newbie programmer and first time in delphi..need best practise to install DSPAck..Do You Have the steps by step?
your help would be GREAT..

Logged
picas.line
Newbie
*
Offline Posts: 4


« Reply #6 on: June 30, 2011, 02:13:54 AM »

I found error List Index out of Bound (2) and Can't initialize USB TV
what should i do with line

Code:
tvDevice := 'USB TV Device'; // This is my TV Device


if my Device was AverMedia H830 USB Hybrid DVB-T

Please help....... Huh
Logged
Uwa Semar
Administrator
Newbie
*****
Offline Posts: 30



« Reply #7 on: July 01, 2011, 06:41:48 AM »

Code:
tvDevice := 'USB TV Device'; // This is my TV Device
the value of tvDevice change by your own tvdevice name
Logged
picas.line
Newbie
*
Offline Posts: 4


« Reply #8 on: July 08, 2011, 02:45:14 AM »

Thank UWA
I Got it Work, the tvDevice should be like this (i still don't understand why it show different name in Device Manager  Huh)

Code:
tvDevice := 'AVerMedia USB Polaris Analog Capture'; // This is my TV Device

But how to get the broadcast,
My Country Was Indonesia (Surabaya), what value must be set on this Constanta ?
example iwant to get metro TV or TV one.

Code:
Const
  DefaultCountry =  62;
  DefaultChanel  = 309;
 
Logged
Uwa Semar
Administrator
Newbie
*****
Offline Posts: 30



« Reply #9 on: July 09, 2011, 01:39:36 AM »

to get the channel number on your site, do the scanning with the tools provided by your TV Tuner
the default value in my sample i'ts for Metro TV Jakarta Indonesia
the 62 is for country code Indonesia
hope this help...
good luck
Logged
picas.line
Newbie
*
Offline Posts: 4


« Reply #10 on: July 09, 2011, 04:50:24 AM »

Thanks UWA.

I need suggestion for stable application, because my tv tuner app wasn't good / not stable..

Operating System: Win XP SP2
Programming Language: Delphi
Pluggin : DSPack
TV Tuner Hardware Type: USB
Optimal Screen Resolution: ??
TV Tuner Hardware Merk: ??
TV Width on Program: ??
TV Height on Program: ??

Logged
Uwa Semar
Administrator
Newbie
*****
Offline Posts: 30



« Reply #11 on: July 09, 2011, 11:11:45 AM »

My experience using the usb tvbox gadmei UTV 330 is quite stable in os win xp32 sp2, maximum screen resolution of 1920 x 1080

This is my PC Configuration
OS: win xp sp 2 32
Processor: Intel Pentium IV
Memory: 2GB
VGA Card: Nvidia Gforce 256 Mb
Compiler: Delphi 7 Second Edition
Directx: 9.c
TV Tuner: USB Gadmei TVbox UTV 330 (pretty cheap)
Nonstop Running Test: 3 x 24 hours without any problems
Logged
Pages: [1]   Go Up
  Print  
  
Jump to: