 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Markus Guest
|
Posted: Tue Oct 10, 2006 8:11 am Post subject: How can I detect keyframes in a moviefile with DSPack |
|
|
Is it possible to detect keyframes with DSPack
(http://www.progdigy.com/modules.php?name=DSPack) or does anybody know
another way to detect the keyframes?
I want to display the movie with the option to jump to the next/last
keyframe (like in VirtualDub).
Does anybody knows a way how can I do this?
--> The movie is displayed with DSPack.
Thx for all answers.
Markus |
|
| Back to top |
|
 |
Tsviatko Jognov Guest
|
Posted: Fri Oct 13, 2006 1:26 pm Post subject: Re: How can I detect keyframes in a moviefile with DSPack |
|
|
Hi,
IMediaSample has a method "IsSyncPoint" which determines if the beginning of this sample is a synchronization point (start of a key frame).
You can also search the stream for your self, but this will involve writing your own reader, parser and knowing the stream format.
Regards,
Tsviatko Jongov
http://tsviatko.jongov.com
"Markus" <TheRealHawk (AT) Freenet (DOT) de> wrote:
| Quote: | Is it possible to detect keyframes with DSPack
(http://www.progdigy.com/modules.php?name=DSPack) or does anybody know
another way to detect the keyframes?
I want to display the movie with the option to jump to the next/last
keyframe (like in VirtualDub).
Does anybody knows a way how can I do this?
--> The movie is displayed with DSPack.
Thx for all answers.
Markus
|
|
|
| Back to top |
|
 |
Markus Guest
|
Posted: Thu Oct 19, 2006 12:58 am Post subject: Re: How can I detect keyframes in a moviefile with DSPack |
|
|
I tried to modify a procedure in the DSPack-Demo
DSVideoWinDowEx\PlayWin to detect KeyFrames but I had no luck:
This was my try:
procedure TForm1.DSTrackBar1Timer(sender: TObject; CurrentPos,
StopPos: Cardinal);
var
CurrPos : Int64;
Value, H, M, S : Integer;
MediaSeeking: IMediaSeeking;
MediaSample: IMediaSample;
begin
//FilterGraph1.QueryInterface(IMediaSeeking, MediaSeeking);
//with MediaSeeking do
//Begin
// GetCurrentPosition(CurrPos);
// Value := Trunc(CurrPos / 10000000);
// H := value div 3600;
// M := (value mod 3600) div 60;
// S := (value mod 3600) mod 60;
// Panel2.Caption := Format('%d:%2.2d:%2.2d', [H, M, S]);
//End;
FilterGraph1.QueryInterface(IMediaSample, MediaSample);
if MediaSample <> nil then Panel2.Caption := MediaSample.IsSyncPoint;
// At this point I don't know how to convert HResult to string or
boolean (I only want to display a true or false in the label). :-/
else Panel2.Caption := 'nil';
If OsdChanged then
Begin
DSVideoWindowEx1.ClearBack;
OsdChanged := False;
End;
end;
but it doesn't work, because MediaSample is everytime nil. :-/
Can anybody help me?
Thanks
Markus
Tsviatko Jognov schrieb:
| Quote: | Hi,
IMediaSample has a method "IsSyncPoint" which determines if the beginning of this sample is a synchronization point (start of a key frame).
You can also search the stream for your self, but this will involve writing your own reader, parser and knowing the stream format.
Regards,
Tsviatko Jongov
http://tsviatko.jongov.com
"Markus" <TheRealHawk (AT) Freenet (DOT) de> wrote:
Is it possible to detect keyframes with DSPack
(http://www.progdigy.com/modules.php?name=DSPack) or does anybody know
another way to detect the keyframes?
I want to display the movie with the option to jump to the next/last
keyframe (like in VirtualDub).
Does anybody knows a way how can I do this?
--> The movie is displayed with DSPack.
Thx for all answers.
Markus
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|