LoginSignup
1
5

More than 5 years have passed since last update.

VisualStudio Community 2017 で Gstreamer tutorial を実行する

Last updated at Posted at 2018-12-02

動作環境

windows 10 バージョン 1803 osビルド 17134.407 64bit
VisualStudio Community 2017 version 15.9.3
windows sdk 10.0.17763.0
gstreamer-1.0-x86_64-1.14.4.msi
gstreamer-1.0-devel-x86_64-1.14.4.msi

手順

手順1 Gstreamerのインストール
動作環境にあるgstreamerをインストールする。
インストール時にはCompleteを選択する。
↓ダウンロード先
https://gstreamer.freedesktop.org/data/pkg/windows/1.14.4/

2. 環境変数の設定
ユーザー環境変数
変数名 : GSTREAMER_1_0_ROOT_X86_64
変数値 : C:\gstreamer\1.0\x86_64\

ユーザー環境変数のPathに下記を追加
変数名 : Path
変数値 : %GSTREAMER_1_0_ROOT_X86_64%\bin

システム環境変数のPathにも追加
変数名 : Path
変数値 : %GSTREAMER_1_0_ROOT_X86_64%\bin

※Pathはどちらかだけでもいいかもだが。。。

3. プロジェクトの作成および設定
Visual C++ ⇒Windows コンソールアプリケーションを選択。
プロジェクトが作成できれば、
画面上の 表示(V)⇒その他ウィンドウ⇒プロパティマネージャー を選択。
プロパティマネージャーの既存のプロパティシートを追加をクリック

C:\gstreamer\1.0\x86_64\share\vs\2010\libs
にある gstreamer-1.0.props を適用する

↓適用後このようになる
image

4. ソースコード
下記を参考にmain関数を作成する。
https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html

5. 最終
https://gist.github.com/satoru-naruko/9c37c36c2b2bc8ed8bd2d3f8881e16af

実行するとこんな感じのウィンドウが表示される。
image

tutorial1~3 までは動作できました。
2,3ではそのままだとコンパイルエラーがでますが簡単に修正できます。

参考
↓公式
https://gstreamer.freedesktop.org/documentation/installing/on-windows.html

↓とても参考になりました
https://qiita.com/tetsukuz/items/9a9b0f7bccc227b70de8

1
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
5