Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   OOP (https://www.clubdelphi.com/foros/forumdisplay.php?f=5)
-   -   opciones para grabar un video (https://www.clubdelphi.com/foros/showthread.php?t=2853)

jfgonzalez 10-08-2003 20:20:22

opciones para grabar un video
 
Hola

Resulta que desarrollo una aplicacion que me permita grabar videos de extension .avi, pero lo que me no me cuadra son unas opciones que he visto en otros aplicativos... son las de comprimir el archivo con los codecs que incluye el windows.....
como el el "Intel r" algo codecs de ese tipo

Si me refiero a grabar el avi con otros codecs

Gracias Cadetill

estoy usando el savedialog que viene nativo en Delphi 5

¿Còmo hago para incluir esas opciones en el momento de grabar el archivo?

Muchisimas gracias por su positiva atencion

:confused:

__cadetill 10-08-2003 23:21:38

si te refieres a como hcer para mostrar en un TSaveDialog varias opciones para grabar, usa la propiedad Filter.

Si te refieres a como grabar un avi con un codec determinado... ni idea

delphi.com.ar 11-08-2003 16:25:42

Aquí tienes un ejemplo de como "modificar" el TOpenDialog que he bajado ya hace un tiempo de Internet, el tema es que no recuerdo de dónde, por eso te paso el código:

Código:

unit TestDialog;

interface

uses Windows, Messages, SysUtils, CommDlg, Classes, Graphics, Controls,
  Forms, StdCtrls, Dialogs, ComCtrls, ExtCtrls, Dlgs, CommCtrl;

type
  TTestDialog = class(TOpenDialog)
  private
    FPanel: TPanel;
    FStatus: TStatusBar;
  protected
    procedure DoShow; override;
    procedure WndProc(var Message: TMessage); override;
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

constructor TTestDialog.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  Template := 'YOURDLGTEMPLATE';
  Options := [ofHideReadOnly,ofFileMustExist];
  FPanel := TPanel.Create( Self );
  FStatus := TStatusBar.Create( Self );
end;

destructor TTestDialog.Destroy;
begin
  FPanel.Free;
  FStatus.Free;
  inherited Destroy;
end;

procedure TTestDialog.DoShow;
var
  rc: TRect;

begin
  GetClientRect(Handle, Rc);

  FPanel.BoundsRect := Rc;
  FPanel.Left := 424;
  FPanel.BevelOuter := bvNone;
  FPanel.Width := (Rc.Right - Rc.Left) - FPanel.Left;
  FPanel.Caption := 'Hello !';
  FPanel.ParentWindow := Handle;

  FStatus.Align := alNone;
  FStatus.BoundsRect := Rc;
  FStatus.Top := FStatus.Top + FStatus.Height - 30;
  FStatus.Height := 30;
  FStatus.Width := FStatus.Width - FPanel.Width - 2;
  FStatus.SimplePanel := True;
  FStatus.ParentWindow := Handle;
end;

procedure TTestDialog.WndProc(var Message: TMessage);

  function ExtractFileNameOnly( s: String ): String;
  var tmp: String;
  begin
    Result := ExtractFilename( s );
    tmp := ExtractFileExt( Result );
    if tmp <> '' then
      Result := Copy( Result, 1, Length( Result ) - length( tmp ) );
  end;

const
  AddSize = 150;
  cNum = 7;
  Control: Array [0..cNum-1] of integer =
    ( stc3, stc2,    //The two label ctrls
      edt1, cmb1,    //Edit and combo ctrls
      IDOK, IDCANCEL, //The dialog buttons
      lst1 );        //The Explorer window

var
  pLV,LV: HWND;
  Style: Longint;
  I,pos: integer;
  buf: array[0..254] of char;
  S: String;
  wndDlg,wndCtrl: HWND;
  Rc,cRc: TRect;

begin
  Message.Result := 0;
  case Message.Msg of
    WM_INITDIALOG:
    begin
      wndDlg := GetParent(Handle); // Get a pointer to the parent window.
      GetWindowRect(wndDlg,Rc); //Get rect of parent window
      // Change the size of parent window according to
      SetWindowPos( wndDlg, HWND(NiL), 0, 0,
                    Rc.right - Rc.left,
                    Rc.bottom - Rc.top + AddSize,
                    SWP_NOMOVE );
      //Move all controls to a compensate for the new parent size
      for i:=0 to cNum-1 do
      begin
        wndCtrl := GetDlgItem(wndDlg,Control[i]); //Fetch control
        GetWindowRect(wndCtrl, cRc);  //Get control's rect
        MapWindowPoints( 0, wndDlg, cRc, 2 );
        if (Control[i] <> lst1) then //For any control except the lst1
          //move the control appropriately
          SetWindowPos( wndCtrl, HWND(NiL),
                        cRc.left, cRc.top + AddSize,
                        0, 0, SWP_NOSIZE )
        else //size the folder view control appropriately
          SetWindowPos( wndCtrl, HWND(NiL), 0, 0,
                        cRc.right  - cRc.left,
                        cRc.bottom - cRc.top + AddSize,
                        SWP_NOMOVE );
      end;
    end;
    WM_NOTIFY:
    begin
      case POFNotify(Message.LParam)^.hdr.code of
// Can also trap:
// CDN_FILEOK, CDN_FOLDERCHANGE, CDN_HELP, CDN_INITDONE, CDN_SELCHANGE,
// CDN_SHAREVIOLATION, CDN_TYPECHANGE.
        CDN_SELCHANGE:
        begin
          // get the ACTUAL ListView handle (not lst1)
          pLV := GetDlgItem( GetParent(Handle), lst2 );
          LV := GetDlgItem( pLV, 1 );
          Style := GetWindowLong(LV, GWL_STYLE);
          Style := Style and (not LVS_TYPEMASK);
          Style := Style or LVS_ICON;
          SetWindowLong(LV, GWL_STYLE, Style);
          // currently selected item
          pos := ListView_GetNextItem ( LV, -1, LVNI_ALL or LVNI_SELECTED );
          if ( pos <> -1 ) then
          begin
          ListView_GetItemText( LV, pos, 0, buf, 255 );
          S := ExtractFilePath( Filename ) + ExtractFileNameOnly(buf) ;
          if FileExists(S + ExtractFileExt( Filename )) then
            FStatus.SimpleText := 'File: ' + s + ExtractFileExt( Filename )
          else
            FStatus.SimpleText := 'Folder: '+s;
          end;
        end;
      end;
    end;
  end;
  inherited WndProc(Message);
end;

end.

Saludos!


La franja horaria es GMT +2. Ahora son las 18:25:40.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi