List Info

Thread: How to get stream count and duration




How to get stream count and duration
user name
2007-02-05 20:46:49

In my application, I need to get the stream information of realmedia file i am loading i.e. if it has audio and video and also each streams duration

I tried IHXPlayer::GetSourceCount and IHXPlayer::GetSource, I get 1 source and then tried ; IHXStreamSource::GetStreamCount  and IHXStreamSource::GetStream however I get 0 streams. the file I loaded has both audio and video streams.

also IHXPlayer has Seek method however does't have any method to get the duration of file or streams.


On 1/31/07, Greg Wright < gwrightreal.com">gwrightreal.com&gt; wrote:
Ashok Jaiswal(अशोक जैसवाल) wrote:
>; i am trying to get the video frames from ExampleVideoSurface::OptimizedBlt
> in 24 bit RGB so I return HXR_INVALID_PARAMETER from
> ExampleVideoSurface::BeginOptimizedBlt as following
>
>&nbsp;   ;if( pBitmapInfo->biBitCount != 24 )
>&nbsp; &nbsp; &nbsp; &nbsp; return HXR_INVALID_PARAMETER;
>
> and set the ulType = HX_ARGB; in ExampleVideoSurface::GetPreferredFormat
>;
> however pImageBits data is all white. does that mean pBltter-&gt;Blt() must
> fill the image data? where do I receive the decoded picture?


I am moving this to helix-client-dev mailing list, this really
isn't a player issue.

Ashok, the call to BeginOptimizedBLT() is not really used to
negotiate a format with a video renderer. It is a chance for
the video surface to get ready to convert the incoming format,
generally i420 under Helix, to the output format of the display
device. In your case you would get ready to convert from i420 to
RGB32. It is the responsibility for the surface to do this
conversion.

If you take a look at the real video surface, in video/sitelib/basesurf.cpp
you will see how we load and use the color converters to do this.
BeginOptimzedBlt() will let you know the incoming format. Then, when
the renderers call OptimizedBlt() to display a frame, you can use
your color converter to convert from i420 to RGB32 (or whatever you want).

does that make sense?
--greg.




--
धनयावाद
.: अशोक जैसवाल :.
Re: How to get stream count and duration
user name
2007-02-07 00:48:11
In my application, I need to get the stream information of realmedia file i am loading i.e. if it has audio and video and also each streams duration

I tried IHXPlayer::GetSourceCount and IHXPlayer::GetSource, I get 1 source and then tried ; IHXStreamSource::GetStreamCount
  and IHXStreamSource::GetStream however I get 0 streams. the file I loaded has both audio and video streams.

also IHXPlayer has Seek method however does't have any method to get the duration of file or streams.


On 2/5/07, Ashok Jaiswal(अशोक जैसवाल) < ashok.jaiswalgmail.com">ashok.jaiswalgmail.com> wrote:

In my application, I need to get the stream information of realmedia file i am loading i.e. if it has audio and video and also each streams duration

I tried IHXPlayer::GetSourceCount and IHXPlayer::GetSource, I get 1 source and then tried ; IHXStreamSource::GetStreamCount&nbsp; and IHXStreamSource::GetStream however I get 0 streams. the file I loaded has both audio and video streams.

also IHXPlayer has Seek method however does't have any method to get the duration of file or streams.


On 1/31/07, Greg Wright < gwrightreal.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">gwrightreal.com&gt; wrote:
Ashok Jaiswal(अशोक जैसवाल) wrote:
>; i am trying to get the video frames from ExampleVideoSurface::OptimizedBlt
> in 24 bit RGB so I return HXR_INVALID_PARAMETER from
> ExampleVideoSurface::BeginOptimizedBlt as following
>
>&nbsp;   ;if( pBitmapInfo->biBitCount != 24 )
>&nbsp; &nbsp; &nbsp; &nbsp; return HXR_INVALID_PARAMETER;
>
> and set the ulType = HX_ARGB; in ExampleVideoSurface::GetPreferredFormat
>;
> however pImageBits data is all white. does that mean pBltter-&gt;Blt() must
> fill the image data? where do I receive the decoded picture?


I am moving this to helix-client-dev mailing list, this really
isn't a player issue.

Ashok, the call to BeginOptimizedBLT() is not really used to
negotiate a format with a video renderer. It is a chance for
the video surface to get ready to convert the incoming format,
generally i420 under Helix, to the output format of the display
device. In your case you would get ready to convert from i420 to
RGB32. It is the responsibility for the surface to do this
conversion.

If you take a look at the real video surface, in video/sitelib/basesurf.cpp
you will see how we load and use the color converters to do this.
BeginOptimzedBlt() will let you know the incoming format. Then, when
the renderers call OptimizedBlt() to display a frame, you can use
your color converter to convert from i420 to RGB32 (or whatever you want).

does that make sense?
--greg.




--
धनयावाद
.: अशोक जैसवाल :.



--
धनयावाद
.: अशोक जैसवाल :.
RE: Re: How to get stream count and duration
country flaguser name
United States
2007-04-08 20:18:54
WHEN ARE YOU CALLING GETSTREAMCOUNT()? THAT SHOULD
CERTAINLY WORK, BUT IF YOU CALL IT TOO EARLY, THEN
YOU MAY NOT GET CORRECT RESULTS?

ERIC

=============================================
ERIC HYCHE (EHYCHEREAL.COM)
TECHNICAL LEAD
REALNETWORKS, INC.  

> -----ORIGINAL MESSAGE-----
> FROM: HELIX-CLIENT-DEV-BOUNCESHELIXCOMMUNITY.ORG 
> [MAILTO:HELIX-CLIENT-DEV-BOUNCESHELIXCOMMUNITY.ORG] ON 
> BEHALF OF ASHOK JAISWAL(???? ??????)
> SENT: WEDNESDAY, FEBRUARY 07, 2007 1:48 AM
> TO: GREG WRIGHT
> CC: HELIX-CLIENT-DEVHELIXCOMMUNITY.ORG
> SUBJECT: [HELIX-CLIENT-DEV] RE: HOW TO GET STREAM COUNT
AND DURATION
> 
> IN MY APPLICATION, I NEED TO GET THE STREAM INFORMATION
OF 
> REALMEDIA FILE I AM LOADING I.E. IF IT HAS AUDIO AND
VIDEO 
> AND ALSO EACH STREAMS DURATION
> 
> I TRIED IHXPLAYER::GETSOURCECOUNT AND
IHXPLAYER::GETSOURCE, I 
> GET 1 SOURCE AND THEN TRIED 
IHXSTREAMSOURCE::GETSTREAMCOUNT
>   AND IHXSTREAMSOURCE::GETSTREAM HOWEVER I GET 0
STREAMS. THE 
> FILE I LOADED HAS BOTH AUDIO AND VIDEO STREAMS. 
> 
> ALSO IHXPLAYER HAS SEEK METHOD HOWEVER DOES'T HAVE ANY
METHOD 
> TO GET THE DURATION OF FILE OR STREAMS.
> 
> 
> ON 2/5/07, ASHOK JAISWAL($…$¶%‹$• $œ%ˆ$¸$œ$¾$²)
<ASHOK.JAISWALGMAIL.COM> WROTE:
> 
> 
> 	IN MY APPLICATION, I NEED TO GET THE STREAM
INFORMATION 
> OF REALMEDIA FILE I AM LOADING I.E. IF IT HAS AUDIO AND
VIDEO 
> AND ALSO EACH STREAMS DURATION
> 	
> 	I TRIED IHXPLAYER::GETSOURCECOUNT AND 
> IHXPLAYER::GETSOURCE, I GET 1 SOURCE AND THEN TRIED  
> IHXSTREAMSOURCE::GETSTREAMCOUNT  AND 
> IHXSTREAMSOURCE::GETSTREAM HOWEVER I GET 0 STREAMS. THE
FILE 
> I LOADED HAS BOTH AUDIO AND VIDEO STREAMS. 
> 	
> 	ALSO IHXPLAYER HAS SEEK METHOD HOWEVER DOES'T HAVE ANY

> METHOD TO GET THE DURATION OF FILE OR STREAMS.
> 	
> 	
> 	
>
<HTTPS://COMMON.HELIXCOMMUNITY.ORG/NONAV/2003/HCS_SDK_R5/
HTMFI
LES/PLAYER.HTM#129110> 
	ON 1/31/07, GREG WRIGHT <GWRIGHTREAL.COM> WROTE: 

		ASHOK JAISWAL($…$¶%‹$• $œ%ˆ$¸$œ$¾$²) WROTE:
		> I AM TRYING TO GET THE VIDEO FRAMES FROM
EXAMPLEVIDEOSURFACE::OPTIMIZEDBLT
		> IN 24 BIT RGB SO I RETURN HXR_INVALID_PARAMETER FROM
		> EXAMPLEVIDEOSURFACE::BEGINOPTIMIZEDBLT AS FOLLOWING 
		>
		>    IF( PBITMAPINFO->BIBITCOUNT != 24 )
		>        RETURN HXR_INVALID_PARAMETER;
		>
		> AND SET THE ULTYPE = HX_ARGB; IN
EXAMPLEVIDEOSURFACE::GETPREFERREDFORMAT
		>
		> HOWEVER PIMAGEBITS DATA IS ALL WHITE. DOES THAT MEAN
PBLTTER->BLT() MUST 
		> FILL THE IMAGE DATA? WHERE DO I RECEIVE THE DECODED
PICTURE?
		
		
		I AM MOVING THIS TO HELIX-CLIENT-DEV MAILING LIST, THIS
REALLY
		ISN'T A PLAYER ISSUE.
		
		ASHOK, THE CALL TO BEGINOPTIMIZEDBLT() IS NOT REALLY USED
TO 
		NEGOTIATE A FORMAT WITH A VIDEO RENDERER. IT IS A CHANCE
FOR
		THE VIDEO SURFACE TO GET READY TO CONVERT THE INCOMING
FORMAT,
		GENERALLY I420 UNDER HELIX, TO THE OUTPUT FORMAT OF THE
DISPLAY
		DEVICE. IN YOUR CASE YOU WOULD GET READY TO CONVERT FROM
I420 TO 
		RGB32. IT IS THE RESPONSIBILITY FOR THE SURFACE TO DO
THIS
		CONVERSION.
		
		IF YOU TAKE A LOOK AT THE REAL VIDEO SURFACE, IN
VIDEO/SITELIB/BASESURF.CPP
		YOU WILL SEE HOW WE LOAD AND USE THE COLOR CONVERTERS TO
DO THIS. 
		BEGINOPTIMZEDBLT() WILL LET YOU KNOW THE INCOMING FORMAT.
THEN, WHEN
		THE RENDERERS CALL OPTIMIZEDBLT() TO DISPLAY A FRAME, YOU
CAN USE
		YOUR COLOR CONVERTER TO CONVERT FROM I420 TO RGB32 (OR
WHATEVER YOU WANT).
		
		DOES THAT MAKE SENSE?
		--GREG.
		
		




	-- 
	$§$¨$¯$¾$œ$¾$¦
	.: $…$¶%‹$• $œ%ˆ$¸$œ$¾$² :. 




-- 
$§$¨$¯$¾$œ$¾$¦
.: $…$¶%‹$• $œ%ˆ$¸$œ$¾$² :. 


_______________________________________________
HELIX-CLIENT-DEV MAILING LIST
HELIX-CLIENT-DEVHELIXCOMMUNITY.ORG
HTTP://LISTS.HELIXCOMMUNITY.ORG/MAILMAN/LISTINFO/HELIX-CLIEN
T-DEV

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )