BCM70012/BCM70015 Module under Linux

From LEXWiKi

(Difference between revisions)
Jump to: navigation, search
(How to use the DEMO application)
Line 2: Line 2:
driver : [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/BCM70012_70015_Linux/crystalhd.tar.gz crystalhd]
driver : [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/BCM70012_70015_Linux/crystalhd.tar.gz crystalhd]
 +
== The Sample code source you can download form ==
== The Sample code source you can download form ==
Line 7: Line 8:
Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/BCM70012_70015_Linux/BCM70012_70015_Demo_Linux_Bin.rar BCM70012_70015_Demo_Linux_Bin.rar]
Binary file: [ftp://ftp.lex.com.tw/Engineer/SoftSupport/AP_Module/BCM70012_70015_Linux/BCM70012_70015_Demo_Linux_Bin.rar BCM70012_70015_Demo_Linux_Bin.rar]
 +
== How to use the DEMO application ==
== How to use the DEMO application ==
Line 23: Line 25:
4.After choose the video file , the video will play.
4.After choose the video file , the video will play.
 +
 +
== Sample code Introduction ==
== Sample code Introduction ==

Revision as of 16:20, 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:bcmpic1.jpg

Image:BCM2.jpg

Image:BCM3.jpg


1.The button used to open the video file.

2.The button used to stop the video.

3.After press the OpenFile button,you can choose the video file in this dialog.

4.After choose the video file , the video will play.


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