{"action":"created","comment":{"url":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/comments/170659506","pull_request_review_id":99378940,"id":170659506,"diff_hunk":"@@ -0,0 +1,112 @@\n+extern crate glib;\n+extern crate failure;\n+extern crate gio;\n+\n+#[macro_use]\n+extern crate failure_derive;\n+\n+extern crate gstreamer_rtsp_server_sys as ffi;\n+extern crate gstreamer_rtsp_server as gst_rtsp_server;\n+extern crate gstreamer_rtsp as gst_rtsp;\n+extern crate gstreamer as gst;\n+\n+use std::env;\n+use std::ptr;\n+use failure::Error;\n+\n+use glib::translate::*;\n+use gst_rtsp_server::prelude::*;\n+use gst_rtsp_server::*;\n+use gst_rtsp::*;\n+\n+#[path = \"../examples-common.rs\"]\n+mod examples_common;\n+\n+#[derive(Debug, Fail)]\n+#[fail(display = \"Could not get mount points\")]\n+struct NoMountPoints;\n+\n+#[derive(Debug, Fail)]\n+#[fail(display = \"Usage: {} LAUNCH_LINE\", _0)]\n+struct UsageError(String);\n+\n+fn main_loop() -> Result<(), Error> {\n+    let args: Vec<_> = env::args().collect();\n+\n+    if args.len() != 2 {\n+        return Err(Error::from(UsageError(args[0].clone())));\n+    }\n+\n+    let main_loop = glib::MainLoop::new(None, false);\n+    let server = RTSPServer::new();\n+    let factory = RTSPMediaFactory::new();\n+    let mounts = server.get_mount_points().ok_or(NoMountPoints)?;\n+    let auth = RTSPAuth::new();\n+    let mut token = RTSPToken::new(&[(*RTSP_TOKEN_MEDIA_FACTORY_ROLE, &\"user\")]);\n+    let basic = RTSPAuth::make_basic(\"user\", \"password\");\n+    let cert = gio::TlsCertificate::new_from_pem (\n+        \"-----BEGIN CERTIFICATE-----\\\n+        MIICJjCCAY+gAwIBAgIBBzANBgkqhkiG9w0BAQUFADCBhjETMBEGCgmSJomT8ixk\\\n+        ARkWA0NPTTEXMBUGCgmSJomT8ixkARkWB0VYQU1QTEUxHjAcBgNVBAsTFUNlcnRp\\\n+        ZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5jb20xHTAbBgkq\\\n+        hkiG9w0BCQEWDmNhQGV4YW1wbGUuY29tMB4XDTExMDExNzE5NDcxN1oXDTIxMDEx\\\n+        NDE5NDcxN1owSzETMBEGCgmSJomT8ixkARkWA0NPTTEXMBUGCgmSJomT8ixkARkW\\\n+        B0VYQU1QTEUxGzAZBgNVBAMTEnNlcnZlci5leGFtcGxlLmNvbTBcMA0GCSqGSIb3\\\n+        DQEBAQUAA0sAMEgCQQDYScTxk55XBmbDM9zzwO+grVySE4rudWuzH2PpObIonqbf\\\n+        hRoAalKVluG9jvbHI81eXxCdSObv1KBP1sbN5RzpAgMBAAGjIjAgMAkGA1UdEwQC\\\n+        MAAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQEFBQADgYEAYx6fMqT1\\\n+        Gvo0jq88E8mc+bmp4LfXD4wJ7KxYeadQxt75HFRpj4FhFO3DOpVRFgzHlOEo3Fwk\\\n+        PZOKjvkT0cbcoEq5whLH25dHoQxGoVQgFyAP5s+7Vp5AlHh8Y/vAoXeEVyy/RCIH\\\n+        QkhUlAflfDMcrrYjsmwoOPSjhx6Mm/AopX4=\\\n+        -----END CERTIFICATE-----\\\n+        -----BEGIN PRIVATE KEY-----\\\n+        MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEA2EnE8ZOeVwZmwzPc\\\n+        88DvoK1ckhOK7nVrsx9j6TmyKJ6m34UaAGpSlZbhvY72xyPNXl8QnUjm79SgT9bG\\\n+        zeUc6QIDAQABAkBRFJZ32VbqWMP9OVwDJLiwC01AlYLnka0mIQZbT/2xq9dUc9GW\\\n+        U3kiVw4lL8v/+sPjtTPCYYdzHHOyDen6znVhAiEA9qJT7BtQvRxCvGrAhr9MS022\\\n+        tTdPbW829BoUtIeH64cCIQDggG5i48v7HPacPBIH1RaSVhXl8qHCpQD3qrIw3FMw\\\n+        DwIga8PqH5Sf5sHedy2+CiK0V4MRfoU4c3zQ6kArI+bEgSkCIQCLA1vXBiE31B5s\\\n+        bdHoYa1BXebfZVd+1Hd95IfEM5mbRwIgSkDuQwV55BBlvWph3U8wVIMIb4GStaH8\\\n+        W535W8UBbEg=-----END PRIVATE KEY-----\")?;\n+\n+    unsafe {","path":"examples/src/bin/rtsp-server-record.rs","position":null,"original_position":72,"commit_id":"0325e55612a15294a171981d157daa1a323e62c9","original_commit_id":"fb17f8326d5dcbaab1fdc13880f5e6bd4972e3a9","user":{"login":"MathieuDuponchelle","id":1278273,"avatar_url":"https://avatars3.githubusercontent.com/u/1278273?v=4","gravatar_id":"","url":"https://api.github.com/users/MathieuDuponchelle","html_url":"https://github.com/MathieuDuponchelle","followers_url":"https://api.github.com/users/MathieuDuponchelle/followers","following_url":"https://api.github.com/users/MathieuDuponchelle/following{/other_user}","gists_url":"https://api.github.com/users/MathieuDuponchelle/gists{/gist_id}","starred_url":"https://api.github.com/users/MathieuDuponchelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MathieuDuponchelle/subscriptions","organizations_url":"https://api.github.com/users/MathieuDuponchelle/orgs","repos_url":"https://api.github.com/users/MathieuDuponchelle/repos","events_url":"https://api.github.com/users/MathieuDuponchelle/events{/privacy}","received_events_url":"https://api.github.com/users/MathieuDuponchelle/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2018-02-26T16:53:25Z","updated_at":"2018-02-26T16:55:12Z","html_url":"https://github.com/sdroege/gstreamer-rs/pull/86#discussion_r170659506","pull_request_url":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/86","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/comments/170659506"},"html":{"href":"https://github.com/sdroege/gstreamer-rs/pull/86#discussion_r170659506"},"pull_request":{"href":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/86"}},"in_reply_to_id":170545021},"pull_request":{"url":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/86","id":170919391,"html_url":"https://github.com/sdroege/gstreamer-rs/pull/86","diff_url":"https://github.com/sdroege/gstreamer-rs/pull/86.diff","patch_url":"https://github.com/sdroege/gstreamer-rs/pull/86.patch","issue_url":"https://api.github.com/repos/sdroege/gstreamer-rs/issues/86","number":86,"state":"open","locked":false,"title":"Rtsp server record example","user":{"login":"MathieuDuponchelle","id":1278273,"avatar_url":"https://avatars3.githubusercontent.com/u/1278273?v=4","gravatar_id":"","url":"https://api.github.com/users/MathieuDuponchelle","html_url":"https://github.com/MathieuDuponchelle","followers_url":"https://api.github.com/users/MathieuDuponchelle/followers","following_url":"https://api.github.com/users/MathieuDuponchelle/following{/other_user}","gists_url":"https://api.github.com/users/MathieuDuponchelle/gists{/gist_id}","starred_url":"https://api.github.com/users/MathieuDuponchelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MathieuDuponchelle/subscriptions","organizations_url":"https://api.github.com/users/MathieuDuponchelle/orgs","repos_url":"https://api.github.com/users/MathieuDuponchelle/repos","events_url":"https://api.github.com/users/MathieuDuponchelle/events{/privacy}","received_events_url":"https://api.github.com/users/MathieuDuponchelle/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-23T02:37:08Z","updated_at":"2018-02-26T16:55:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1fe0e7970936abc5a6e4ac29bf82b699b4c41a5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/86/commits","review_comments_url":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/86/comments","review_comment_url":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sdroege/gstreamer-rs/issues/86/comments","statuses_url":"https://api.github.com/repos/sdroege/gstreamer-rs/statuses/0325e55612a15294a171981d157daa1a323e62c9","head":{"label":"MathieuDuponchelle:rtsp_server","ref":"rtsp_server","sha":"0325e55612a15294a171981d157daa1a323e62c9","user":{"login":"MathieuDuponchelle","id":1278273,"avatar_url":"https://avatars3.githubusercontent.com/u/1278273?v=4","gravatar_id":"","url":"https://api.github.com/users/MathieuDuponchelle","html_url":"https://github.com/MathieuDuponchelle","followers_url":"https://api.github.com/users/MathieuDuponchelle/followers","following_url":"https://api.github.com/users/MathieuDuponchelle/following{/other_user}","gists_url":"https://api.github.com/users/MathieuDuponchelle/gists{/gist_id}","starred_url":"https://api.github.com/users/MathieuDuponchelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MathieuDuponchelle/subscriptions","organizations_url":"https://api.github.com/users/MathieuDuponchelle/orgs","repos_url":"https://api.github.com/users/MathieuDuponchelle/repos","events_url":"https://api.github.com/users/MathieuDuponchelle/events{/privacy}","received_events_url":"https://api.github.com/users/MathieuDuponchelle/received_events","type":"User","site_admin":false},"repo":{"id":118162411,"name":"gstreamer-rs","full_name":"MathieuDuponchelle/gstreamer-rs","owner":{"login":"MathieuDuponchelle","id":1278273,"avatar_url":"https://avatars3.githubusercontent.com/u/1278273?v=4","gravatar_id":"","url":"https://api.github.com/users/MathieuDuponchelle","html_url":"https://github.com/MathieuDuponchelle","followers_url":"https://api.github.com/users/MathieuDuponchelle/followers","following_url":"https://api.github.com/users/MathieuDuponchelle/following{/other_user}","gists_url":"https://api.github.com/users/MathieuDuponchelle/gists{/gist_id}","starred_url":"https://api.github.com/users/MathieuDuponchelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MathieuDuponchelle/subscriptions","organizations_url":"https://api.github.com/users/MathieuDuponchelle/orgs","repos_url":"https://api.github.com/users/MathieuDuponchelle/repos","events_url":"https://api.github.com/users/MathieuDuponchelle/events{/privacy}","received_events_url":"https://api.github.com/users/MathieuDuponchelle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MathieuDuponchelle/gstreamer-rs","description":"GStreamer bindings for Rust","fork":true,"url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs","forks_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/forks","keys_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/teams","hooks_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/hooks","issue_events_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/issues/events{/number}","events_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/events","assignees_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/assignees{/user}","branches_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/branches{/branch}","tags_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/tags","blobs_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/languages","stargazers_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/stargazers","contributors_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/contributors","subscribers_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/subscribers","subscription_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/subscription","commits_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/contents/{+path}","compare_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/merges","archive_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/downloads","issues_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/issues{/number}","pulls_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/labels{/name}","releases_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/releases{/id}","deployments_url":"https://api.github.com/repos/MathieuDuponchelle/gstreamer-rs/deployments","created_at":"2018-01-19T18:26:15Z","updated_at":"2018-01-19T18:26:17Z","pushed_at":"2018-02-26T16:55:12Z","git_url":"git://github.com/MathieuDuponchelle/gstreamer-rs.git","ssh_url":"git@github.com:MathieuDuponchelle/gstreamer-rs.git","clone_url":"https://github.com/MathieuDuponchelle/gstreamer-rs.git","svn_url":"https://github.com/MathieuDuponchelle/gstreamer-rs","homepage":"","size":3116,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sdroege:master","ref":"master","sha":"4117c01ff2c9ce9b46b8f63315af4dc284788e9b","user":{"login":"sdroege","id":301846,"avatar_url":"https://avatars3.githubusercontent.com/u/301846?v=4","gravatar_id":"","url":"https://api.github.com/users/sdroege","html_url":"https://github.com/sdroege","followers_url":"https://api.github.com/users/sdroege/followers","following_url":"https://api.github.com/users/sdroege/following{/other_user}","gists_url":"https://api.github.com/users/sdroege/gists{/gist_id}","starred_url":"https://api.github.com/users/sdroege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdroege/subscriptions","organizations_url":"https://api.github.com/users/sdroege/orgs","repos_url":"https://api.github.com/users/sdroege/repos","events_url":"https://api.github.com/users/sdroege/events{/privacy}","received_events_url":"https://api.github.com/users/sdroege/received_events","type":"User","site_admin":false},"repo":{"id":91088829,"name":"gstreamer-rs","full_name":"sdroege/gstreamer-rs","owner":{"login":"sdroege","id":301846,"avatar_url":"https://avatars3.githubusercontent.com/u/301846?v=4","gravatar_id":"","url":"https://api.github.com/users/sdroege","html_url":"https://github.com/sdroege","followers_url":"https://api.github.com/users/sdroege/followers","following_url":"https://api.github.com/users/sdroege/following{/other_user}","gists_url":"https://api.github.com/users/sdroege/gists{/gist_id}","starred_url":"https://api.github.com/users/sdroege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdroege/subscriptions","organizations_url":"https://api.github.com/users/sdroege/orgs","repos_url":"https://api.github.com/users/sdroege/repos","events_url":"https://api.github.com/users/sdroege/events{/privacy}","received_events_url":"https://api.github.com/users/sdroege/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sdroege/gstreamer-rs","description":"GStreamer bindings for Rust","fork":false,"url":"https://api.github.com/repos/sdroege/gstreamer-rs","forks_url":"https://api.github.com/repos/sdroege/gstreamer-rs/forks","keys_url":"https://api.github.com/repos/sdroege/gstreamer-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sdroege/gstreamer-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sdroege/gstreamer-rs/teams","hooks_url":"https://api.github.com/repos/sdroege/gstreamer-rs/hooks","issue_events_url":"https://api.github.com/repos/sdroege/gstreamer-rs/issues/events{/number}","events_url":"https://api.github.com/repos/sdroege/gstreamer-rs/events","assignees_url":"https://api.github.com/repos/sdroege/gstreamer-rs/assignees{/user}","branches_url":"https://api.github.com/repos/sdroege/gstreamer-rs/branches{/branch}","tags_url":"https://api.github.com/repos/sdroege/gstreamer-rs/tags","blobs_url":"https://api.github.com/repos/sdroege/gstreamer-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sdroege/gstreamer-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sdroege/gstreamer-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sdroege/gstreamer-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sdroege/gstreamer-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/sdroege/gstreamer-rs/languages","stargazers_url":"https://api.github.com/repos/sdroege/gstreamer-rs/stargazers","contributors_url":"https://api.github.com/repos/sdroege/gstreamer-rs/contributors","subscribers_url":"https://api.github.com/repos/sdroege/gstreamer-rs/subscribers","subscription_url":"https://api.github.com/repos/sdroege/gstreamer-rs/subscription","commits_url":"https://api.github.com/repos/sdroege/gstreamer-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sdroege/gstreamer-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sdroege/gstreamer-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sdroege/gstreamer-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sdroege/gstreamer-rs/contents/{+path}","compare_url":"https://api.github.com/repos/sdroege/gstreamer-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sdroege/gstreamer-rs/merges","archive_url":"https://api.github.com/repos/sdroege/gstreamer-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sdroege/gstreamer-rs/downloads","issues_url":"https://api.github.com/repos/sdroege/gstreamer-rs/issues{/number}","pulls_url":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/sdroege/gstreamer-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/sdroege/gstreamer-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sdroege/gstreamer-rs/labels{/name}","releases_url":"https://api.github.com/repos/sdroege/gstreamer-rs/releases{/id}","deployments_url":"https://api.github.com/repos/sdroege/gstreamer-rs/deployments","created_at":"2017-05-12T12:22:18Z","updated_at":"2018-02-16T15:46:08Z","pushed_at":"2018-02-26T16:55:23Z","git_url":"git://github.com/sdroege/gstreamer-rs.git","ssh_url":"git@github.com:sdroege/gstreamer-rs.git","clone_url":"https://github.com/sdroege/gstreamer-rs.git","svn_url":"https://github.com/sdroege/gstreamer-rs","homepage":"","size":3109,"stargazers_count":72,"watchers_count":72,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":17,"license":null,"forks":23,"open_issues":17,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/86"},"html":{"href":"https://github.com/sdroege/gstreamer-rs/pull/86"},"issue":{"href":"https://api.github.com/repos/sdroege/gstreamer-rs/issues/86"},"comments":{"href":"https://api.github.com/repos/sdroege/gstreamer-rs/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sdroege/gstreamer-rs/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/sdroege/gstreamer-rs/statuses/0325e55612a15294a171981d157daa1a323e62c9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MathieuDuponchelle"}}