Jump to content
Sign in to follow this  
TommyN

Access teletext programatically?

Recommended Posts

TommyN

Hi,

 

I'm using DVBViewer Pro and I would like to access the data that is displayed in the Telext window (File-Teletext) without having DVBViewer up and running. What I would like to do is create my own application where I can display the teletext. Does anyone here know how to go about doing this? Any pointers would be greatly appreciated.

 

Cheers,

-Tommy

Share this post


Link to post
Griga
What I would like to do is create my own application where I can display the teletext.

Stand-alone without any connection to DVBViewer? Is it supposed to receive the original transport stream from a DVB device? Or read the data from a file? Please be more specific.

Share this post


Link to post
TommyN
Stand-alone without any connection to DVBViewer? Is it supposed to receive the original transport stream from a DVB device? Or read the data from a file? Please be more specific.

 

Well, thinking about it, it does not necessarily have to be stand-alone. What I would like to do is tune my DVB card to a channel and get access to the teletext (I guess I need to interprete the VBI?). I would then programatically change teletext page, read all the text in the teletext page and display in a custom view/window in my application. Does that make sense? ;)

 

Is it perhaps possible to do by writing a plugin to DVBViewer instead of doing it stand-alone?

 

Thanks,

-Tommy

Share this post


Link to post
Lars_MQ

you could use the COM Interface. The IVideotext.GetPageAsRaw delivers a Psafearray of Byte with the raw ttx Data. It's up to you to interpret the data.

Share this post


Link to post
TommyN
you could use the COM Interface. The IVideotext.GetPageAsRaw delivers a Psafearray of Byte with the raw ttx Data. It's up to you to interpret the data.

 

Thanks! The interface seems to contain exactly what I need ;)

 

Cheers,

-Tommy

Share this post


Link to post
TommyN
you could use the COM Interface. The IVideotext.GetPageAsRaw delivers a Psafearray of Byte with the raw ttx Data. It's up to you to interpret the data.

 

I downloaded Visual C# Express and had a go at it but I was not able to get it to work properly. DVBViewer starts up and tunes to the correct channel, but I don't get anything back from the Videotext methods.

When calling server.Videotext.GetPageAsRaw(201, 0, out t);

the last var/out parameter is always nil.

 

Sample code:

DVBViewerServer.DVBViewerClass server = new DVBViewerServer.DVBViewerClass();

 

private void button1_Click(object sender, EventArgs e)

{

server.CurrentChannelNr = 227;

server.Videotext.onDataArrive += new DVBViewerServer.ITeletextEvents_onDataArriveEventHandler(Videotext_onDataArrive)

;

textBox1.Text = server.Videotext.GetPageAsHTML(201, -1);

object t;

server.Videotext.GetPageAsRaw(201, 0, out t);

if (t != null)

textBox1.Text = t.ToString();

 

if (server.Videotext.FindPage(201, 1))

{

MessageBox.Show("Yes");

}

}

 

void Videotext_onDataArrive(int PageNr, int SubPageNr)

{

textBox1.Text = "Data arrived";

}

 

 

Any idea what might be wrong?

 

Thanks for your help!

-Tommy

Share this post


Link to post
JMS

Actually I don't know the API but from the names of the methods and your code I would guess that you should call GetPageAs* inside the onDataArrive event handler with the parameters it gets - and filter on the page you would like to process. Normally video text pages come by in the data stream so requesting one at a given point would force the application to wait for it.

 

Jochen

 

PS: And by the way it may (?) be a bad idea to access controls from inside the event handler as long as you are not sure that the event producer (i.e. DVBViewer) makes sure that the event is reported on the GUI (main) thread [don't known if this is so but in normal host applications of this kind this is not the case because it makes few sense for the host].

Edited by JMS

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...