BCM70012/BCM70015 Module under Linux

From LEXWiKi

(Difference between revisions)
Jump to: navigation, search
(Play video)
(Stop video)
Line 57: Line 57:
===Stop video===
===Stop video===
-
void backend_stop (void)
+
void BCM70012_70015_Demo_stop (void)
{
{
if (pipeline)
if (pipeline)

Revision as of 15:51, 24 February 2011

Contents

You can download the Linux driver form

driver : crystalhd

The Sample code source you can download form

Source file: BCM70012_70015_Demo_Linux_Src.rar

Binary file: BCM70012_70015_Demo_Linux_Bin.rar

How to use the DEMO application

Image:BCM70012AP.jpg

1.Open the video file to play , the file will play automatically.

2.The button used to play the video.

3.The button used to pause the video.

4.The button used to stop the video.

5.Full screen.

6.To show the status of the video and you can pull the bar to change the video's play status.

7.Where the video play in.

8.You can input the words. The words can show on the video such as 11.

9.Choose the speed of the word run on the video , the speed will be chang after press the Set button(10).

10.Show the words.


Sample code Introduction

Play video

void BCM70012_70015_Demo_play (const char *uri)
{
   BCM70012_70015_Demo_stop ();
   pipeline = gst_pipeline_new ("gst-player");

   bin = gst_element_factory_make ("playbin", "bin");

   gst_bin_add (GST_BIN (pipeline), bin);

   {
       GstBus *bus;
       bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
       gst_bus_add_watch (bus, bus_cb, NULL);
       gst_object_unref (bus);
   }

   g_object_set (G_OBJECT (bin), "uri", uri, NULL);

   gst_element_set_state (pipeline, GST_STATE_PLAYING);
}

Stop video

void BCM70012_70015_Demo_stop (void)
{
   if (pipeline)
   {
       gst_element_set_state (pipeline, GST_STATE_NULL);
       gst_object_unref (GST_OBJECT (pipeline));
       pipeline = NULL;
   }
}
Personal tools