Initial version.
authorXavi Artigas <xartigas@fluendo.com>
Tue, 26 Jun 2012 16:21:52 +0000 (18:21 +0200)
committerXavi Artigas <xartigas@fluendo.com>
Tue, 26 Jun 2012 16:21:52 +0000 (18:21 +0200)
gst-sdk/tutorials/playback-tutorial-7.c [new file with mode: 0644]
gst-sdk/tutorials/vs2010/playback-tutorial-7/playback-tutorial-7.vcxproj [new file with mode: 0644]
gst-sdk/tutorials/vs2010/playback-tutorial-7/playback-tutorial-7.vcxproj.filters [new file with mode: 0644]
gst-sdk/tutorials/vs2010/tutorials.sln

diff --git a/gst-sdk/tutorials/playback-tutorial-7.c b/gst-sdk/tutorials/playback-tutorial-7.c
new file mode 100644 (file)
index 0000000..da0570b
--- /dev/null
@@ -0,0 +1,54 @@
+#include <gst/gst.h>\r
+  \r
+int main(int argc, char *argv[]) {\r
+  GstElement *pipeline, *bin, *equalizer, *sink;\r
+  GstPad *pad, *ghost_pad;\r
+  GstBus *bus;\r
+  GstMessage *msg;\r
+  \r
+  /* Initialize GStreamer */\r
+  gst_init (&argc, &argv);\r
+  \r
+  /* Build the pipeline */\r
+  pipeline = gst_parse_launch ("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);\r
+  \r
+  /* Create the elements inside the sink bin */\r
+  equalizer = gst_element_factory_make ("equalizer-3bands", "equalizer");\r
+  sink = gst_element_factory_make ("autoaudiosink", "audio_sink");\r
+  if (!equalizer || !sink) {\r
+    g_printerr ("Not all elements could be created.\n");\r
+    return -1;\r
+  }\r
+  \r
+  /* Create the sink bin, add the elements and link them */\r
+  bin = gst_bin_new ("audio_sink_bin");\r
+  gst_bin_add_many (GST_BIN (bin), equalizer, sink, NULL);\r
+  gst_element_link (equalizer, sink);\r
+  pad = gst_element_get_static_pad (equalizer, "sink");\r
+  ghost_pad = gst_ghost_pad_new ("sink", pad);\r
+  gst_pad_set_active (ghost_pad, TRUE);\r
+  gst_element_add_pad (bin, ghost_pad);\r
+  gst_object_unref (pad);\r
+  \r
+  /* Configure the equalizer */\r
+  g_object_set (G_OBJECT (equalizer), "band1", (gdouble)-24.0, NULL);\r
+  g_object_set (G_OBJECT (equalizer), "band2", (gdouble)-24.0, NULL);\r
+  \r
+  /* Set playbin2's audio sink to be our sink bin */\r
+  g_object_set (GST_OBJECT (pipeline), "audio-sink", bin, NULL);\r
+  \r
+  /* Start playing */\r
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);\r
+  \r
+  /* Wait until error or EOS */\r
+  bus = gst_element_get_bus (pipeline);\r
+  msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);\r
+  \r
+  /* Free resources */\r
+  if (msg != NULL)\r
+    gst_message_unref (msg);\r
+  gst_object_unref (bus);\r
+  gst_element_set_state (pipeline, GST_STATE_NULL);\r
+  gst_object_unref (pipeline);\r
+  return 0;\r
+}
\ No newline at end of file
diff --git a/gst-sdk/tutorials/vs2010/playback-tutorial-7/playback-tutorial-7.vcxproj b/gst-sdk/tutorials/vs2010/playback-tutorial-7/playback-tutorial-7.vcxproj
new file mode 100644 (file)
index 0000000..b365433
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup Label="ProjectConfigurations">\r
+    <ProjectConfiguration Include="Debug|Win32">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Debug|x64">\r
+      <Configuration>Debug</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|Win32">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>Win32</Platform>\r
+    </ProjectConfiguration>\r
+    <ProjectConfiguration Include="Release|x64">\r
+      <Configuration>Release</Configuration>\r
+      <Platform>x64</Platform>\r
+    </ProjectConfiguration>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <ClCompile Include="..\..\playback-tutorial-7.c" />\r
+  </ItemGroup>\r
+  <PropertyGroup Label="Globals">\r
+    <Keyword>Win32Proj</Keyword>\r
+    <ProjectGuid>{9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}</ProjectGuid>\r
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+  <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseDebugLibraries>true</UseDebugLibraries>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">\r
+    <ConfigurationType>Application</ConfigurationType>\r
+    <UseDebugLibraries>false</UseDebugLibraries>\r
+    <WholeProgramOptimization>true</WholeProgramOptimization>\r
+    <CharacterSet>Unicode</CharacterSet>\r
+  </PropertyGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+  <ImportGroup Label="ExtensionSettings">\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Platform)'=='Win32'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="$(GSTREAMER_SDK_ROOT_X86)\share\vs\2010\libs\gstreamer-0.10.props" Condition="exists('$(GSTREAMER_SDK_ROOT_X86)\share\vs\2010\libs\gstreamer-0.10.props')" />\r
+    <Import Project="$(GSTREAMER_SDK_ROOT_X86)\share\vs\2010\msvc\x86.props" Condition="exists('$(GSTREAMER_SDK_ROOT_X86)\share\vs\2010\msvc\x86.props')" />\r
+  </ImportGroup>\r
+  <ImportGroup Label="PropertySheets" Condition="'$(Platform)'=='x64'">\r
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+    <Import Project="$(GSTREAMER_SDK_ROOT_X86_64)\share\vs\2010\libs\gstreamer-0.10.props" Condition="exists('$(GSTREAMER_SDK_ROOT_X86_64)\share\vs\2010\libs\gstreamer-0.10.props')" />\r
+    <Import Project="$(GSTREAMER_SDK_ROOT_X86_64)\share\vs\2010\msvc\x86_64.props" Condition="exists('$(GSTREAMER_SDK_ROOT_X86_64)\share\vs\2010\msvc\x86_64.props')" />\r
+  </ImportGroup>\r
+  <PropertyGroup Label="UserMacros" />\r
+  <PropertyGroup Condition="'$(Configuration)'=='Debug'">\r
+    <LinkIncremental>true</LinkIncremental>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)'=='Release'">\r
+    <LinkIncremental>false</LinkIncremental>\r
+  </PropertyGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">\r
+    <ClCompile>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <Optimization>Disabled</Optimization>\r
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Console</SubSystem>\r
+      <GenerateDebugInformation>true</GenerateDebugInformation>\r
+      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
+      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">\r
+    <ClCompile>\r
+      <WarningLevel>Level3</WarningLevel>\r
+      <PrecompiledHeader>\r
+      </PrecompiledHeader>\r
+      <Optimization>MaxSpeed</Optimization>\r
+      <FunctionLevelLinking>true</FunctionLevelLinking>\r
+      <IntrinsicFunctions>true</IntrinsicFunctions>\r
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+    </ClCompile>\r
+    <Link>\r
+      <SubSystem>Console</SubSystem>\r
+      <GenerateDebugInformation>false</GenerateDebugInformation>\r
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+    </Link>\r
+  </ItemDefinitionGroup>\r
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+  <ImportGroup Label="ExtensionTargets">\r
+  </ImportGroup>\r
+</Project>
\ No newline at end of file
diff --git a/gst-sdk/tutorials/vs2010/playback-tutorial-7/playback-tutorial-7.vcxproj.filters b/gst-sdk/tutorials/vs2010/playback-tutorial-7/playback-tutorial-7.vcxproj.filters
new file mode 100644 (file)
index 0000000..46528cc
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <ItemGroup>\r
+    <ClCompile Include="..\..\playback-tutorial-7.c" />\r
+  </ItemGroup>\r
+</Project>
\ No newline at end of file
index cb04202..249a539 100644 (file)
@@ -33,6 +33,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playback-tutorial-5", "play
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playback-tutorial-6", "playback-tutorial-6\playback-tutorial-6.vcxproj", "{D6293AFD-41DA-44B6-AE57-F1EEE74338AC}"\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "playback-tutorial-7", "playback-tutorial-7\playback-tutorial-7.vcxproj", "{9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}"\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                Debug|Win32 = Debug|Win32\r
@@ -169,6 +171,14 @@ Global
                {D6293AFD-41DA-44B6-AE57-F1EEE74338AC}.Release|Win32.Build.0 = Release|Win32\r
                {D6293AFD-41DA-44B6-AE57-F1EEE74338AC}.Release|x64.ActiveCfg = Release|x64\r
                {D6293AFD-41DA-44B6-AE57-F1EEE74338AC}.Release|x64.Build.0 = Release|x64\r
+               {9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}.Debug|Win32.Build.0 = Debug|Win32\r
+               {9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}.Debug|x64.ActiveCfg = Debug|x64\r
+               {9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}.Debug|x64.Build.0 = Debug|x64\r
+               {9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}.Release|Win32.ActiveCfg = Release|Win32\r
+               {9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}.Release|Win32.Build.0 = Release|Win32\r
+               {9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}.Release|x64.ActiveCfg = Release|x64\r
+               {9C06FA1E-E571-42EA-B4AA-B91F9DA77D5A}.Release|x64.Build.0 = Release|x64\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r