Skip to content

Commit

Permalink
Windows 10 Anniversary Update - September 2016 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
oldnewthing committed Sep 15, 2016
2 parents 52e1e0b + 7034d81 commit 6370138
Show file tree
Hide file tree
Showing 123 changed files with 7,948 additions and 1,334 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,10 @@ For additional Windows samples, see [Windows on GitHub](http://microsoft.github.
<table>
<tr>
<td><a href="Samples/HolographicFaceTracking">Holographic face tracking</a></td>
<td><a href="Samples/HolographicMixedRealityCapture">Holographic mixed reality capture</a></td>
<td><a href="Samples/HolographicSpatialMapping">Holographic spatial mapping</a></td>
</tr>
<tr>
<td><a href="Samples/HolographicTagAlong">Tag-along hologram</a></td>
</tr>
</table>
Expand Down
33 changes: 32 additions & 1 deletion Samples/AdaptiveStreaming/cs/Scenario2_EventHandlers.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ private void Source_OpenOperationCompleted(MediaSource sender, MediaSourceOpenOp

// This extension method in MediaPlaybackItemStringExtensions dumps all the properties from all the tracks.
var allProperties = item.ToFormattedString();
Log(allProperties);
Log($"MediaPlaybackItem nested properties: {allProperties}");
// The AdaptiveMediaSource can manage multiple video tracks internally,
// but only a single video track is exposed in the MediaPlaybackItem, not a collection.
}
Expand All @@ -354,6 +354,7 @@ private void RegisterForMediaPlaybackItemEvents(MediaPlaybackItem item)
{
item.AudioTracks.SelectedIndexChanged += AudioTracks_SelectedIndexChanged;
item.AudioTracksChanged += Item_AudioTracksChanged;
item.VideoTracksChanged += Item_VideoTracksChanged;
item.TimedMetadataTracksChanged += Item_TimedMetadataTracksChanged;
}

Expand All @@ -365,11 +366,16 @@ private void UnregisterForMediaPlaybackItemEvents(MediaPlaybackItem item)
}
item.AudioTracks.SelectedIndexChanged -= AudioTracks_SelectedIndexChanged;
item.AudioTracksChanged -= Item_AudioTracksChanged;
item.VideoTracksChanged -= Item_VideoTracksChanged;
item.TimedMetadataTracksChanged -= Item_TimedMetadataTracksChanged;
foreach (AudioTrack audioTrack in item.AudioTracks)
{
audioTrack.OpenFailed -= AudioTrack_OpenFailed;
}
foreach (VideoTrack videoTrack in item.VideoTracks)
{
videoTrack.OpenFailed -= VideoTrack_OpenFailed;
}
}

private void AudioTracks_SelectedIndexChanged(ISingleSelectMediaTrackList sender, object args)
Expand Down Expand Up @@ -412,6 +418,25 @@ private void Item_AudioTracksChanged(MediaPlaybackItem sender, IVectorChangedEve
}
}

private void Item_VideoTracksChanged(MediaPlaybackItem sender, IVectorChangedEventArgs args)
{
Log($"item.VideoTracksChanged: CollectionChange:{args.CollectionChange} Index:{args.Index} Total:{sender.VideoTracks.Count}");

switch (args.CollectionChange)
{
case CollectionChange.Reset:
foreach (VideoTrack track in sender.VideoTracks)
{
track.OpenFailed += VideoTrack_OpenFailed;
}
break;
case CollectionChange.ItemInserted:
VideoTrack newTrack = sender.VideoTracks[(int)args.Index];
newTrack.OpenFailed += VideoTrack_OpenFailed;
break;
}
}

private void Item_TimedMetadataTracksChanged(MediaPlaybackItem sender, IVectorChangedEventArgs args)
{
Log($"item.TimedMetadataTracksChanged: CollectionChange:{args.CollectionChange} Index:{args.Index} Total:{sender.TimedMetadataTracks.Count}");
Expand All @@ -425,6 +450,12 @@ private void AudioTrack_OpenFailed(AudioTrack sender, AudioTrackOpenFailedEventA
Log($"AudioTrack.OpenFailed: ExtendedError:{args.ExtendedError} DecoderStatus:{sender.SupportInfo.DecoderStatus} MediaSourceStatus:{sender.SupportInfo.MediaSourceStatus}");
}

private void VideoTrack_OpenFailed(VideoTrack sender, VideoTrackOpenFailedEventArgs args)
{
Log($"VideoTrack.OpenFailed: ExtendedError:{args.ExtendedError} DecoderStatus:{sender.SupportInfo.DecoderStatus} MediaSourceStatus:{sender.SupportInfo.MediaSourceStatus}");
}


#endregion

#region AdaptiveMediaSource Event Handlers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,13 @@
//
//*********************************************************
//-----------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Tool: AllJoynCodeGenerator.exe
//
// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn
// Visual Studio Extension in the Visual Studio Gallery.
// <auto-generated>
// This code was generated by a tool.
//
// The generated code should be packaged in a Windows 10 C++/CX Runtime
// Component which can be consumed in any UWP-supported language using
// APIs that are available in Windows.Devices.AllJoyn.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Using AllJoynCodeGenerator - Invoke the following command with a valid
// Introspection XML file and a writable output directory:
// AllJoynCodeGenerator -i <INPUT XML FILE> -o <OUTPUT DIRECTORY>
// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246
// </auto-generated>
//-----------------------------------------------------------------------------
#pragma once
Expand All @@ -46,13 +35,34 @@ if (Windows::Devices::AllJoyn::AllJoynStatus::Ok != alljoynStatus) \
} \
}

namespace com { namespace microsoft { namespace Samples { namespace SecureInterface {

public interface class ISignalEmitter
{
property Windows::Devices::AllJoyn::AllJoynBusObject^ BusObject
{
Windows::Devices::AllJoyn::AllJoynBusObject^ get();
}

property Windows::Devices::AllJoyn::AllJoynSession^ Session
{
Windows::Devices::AllJoyn::AllJoynSession^ get();
}
};

} } } }

class AllJoynHelpers
{
public:
// The Windows::Devices::AllJoyn::AllJoynBusAttachment class wraps the alljoyn_busattachment type. This
// function gets the underlying alljoyn_busattachment.
static alljoyn_busattachment GetInternalBusAttachment(_In_ Windows::Devices::AllJoyn::AllJoynBusAttachment^ busAttachment);

// The Windows::Devices::AllJoyn::AllJoynBusObject class wraps the alljoyn_busobject type. This
// function gets the underlying alljoyn_busobject.
static alljoyn_busobject AllJoynHelpers::GetInternalBusObject(_In_ Windows::Devices::AllJoyn::AllJoynBusObject^ busObject);

// Create the alljoyn_interfacedescriptions described in introspectionXml and add them to the busAttachment.
static QStatus CreateInterfaces(_Inout_ Windows::Devices::AllJoyn::AllJoynBusAttachment^ busAttachment, _In_ PCSTR introspectionXml);

Expand All @@ -69,21 +79,6 @@ class AllJoynHelpers
// Determine whether the supplied set of AuthenticationMechanisms is sufficient for securing an AllJoyn connection.
static bool CanSecure(_In_ Windows::Foundation::Collections::IVector<Windows::Devices::AllJoyn::AllJoynAuthenticationMechanism>^ authenticationMechanisms);

// Callback for alljoyn_about_announced_ptr.
// This callback expects the context to be of type T, which must implement the OnAnnounce function.
template<class T>
static void AJ_CALL AnnounceHandler(
_In_ const void* context,
_In_ PCSTR name,
_In_ uint16_t version,
_In_ alljoyn_sessionport port,
_In_ alljoyn_msgarg objectDescriptionArg,
_In_ const alljoyn_msgarg aboutDataArg)
{
T^ caller = static_cast<const Platform::WeakReference*>(context)->Resolve<T>();
caller->OnAnnounce(name, version, port, objectDescriptionArg, aboutDataArg);
}

// Callback for alljoyn_proxybusobject_listener_propertieschanged_ptr.
// This callback expects the context to be of type T, which must implement the OnPropertyChanged function.
template<class T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@ namespace com { namespace microsoft { namespace Samples { namespace SecureInterf
public interface class ISecureInterfaceService
{
public:
// "Concatenate two input strings and returns the concatenated string as output"
// Implement this function to handle calls to the Concatenate method.
Windows::Foundation::IAsyncOperation<SecureInterfaceConcatenateResult^>^ ConcatenateAsync(_In_ Windows::Devices::AllJoyn::AllJoynMessageInfo^ info , _In_ Platform::String^ interfaceMemberInStr1, _In_ Platform::String^ interfaceMemberInStr2);

// "Determine if the output of the Concatenate method is returned as upper case string or not"
// Implement this function to handle requests for the value of the IsUpperCaseEnabled property.
//
// Currently, info will always be null, because no information is available about the requestor.
Windows::Foundation::IAsyncOperation<SecureInterfaceGetIsUpperCaseEnabledResult^>^ GetIsUpperCaseEnabledAsync(Windows::Devices::AllJoyn::AllJoynMessageInfo^ info);

// "Determine if the output of the Concatenate method is returned as upper case string or not"
// Implement this function to handle requests to set the IsUpperCaseEnabled property.
//
// Currently, info will always be null, because no information is available about the requestor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,18 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\shared\AllJoynBusObjectManager.h" />
<ClInclude Include="..\..\shared\AllJoynHelpers.h" />
<ClInclude Include="AllJoynHelpers.h" />
<ClInclude Include="ISecureInterfaceService.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="SecureInterfaceConsumer.h" />
<ClInclude Include="SecureInterfaceEventArgs.h" />
<ClInclude Include="SecureInterfaceLegacySignals.h" />
<ClInclude Include="SecureInterfaceMethodResults.h" />
<ClInclude Include="SecureInterfaceProducer.h" />
<ClInclude Include="SecureInterfaceServiceEventAdapter.h" />
<ClInclude Include="SecureInterfaceServiceEventArgs.h" />
<ClInclude Include="SecureInterfaceSignals.h" />
<ClInclude Include="SecureInterfaceStructures.h" />
<ClInclude Include="SecureInterfaceWatcher.h" />
<ClInclude Include="..\..\shared\TypeConversionHelpers.h" />
</ItemGroup>
<ItemGroup>
Expand All @@ -247,11 +247,11 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="SecureInterfaceConsumer.cpp" />
<ClCompile Include="SecureInterfaceLegacySignals.cpp" />
<ClCompile Include="SecureInterfaceProducer.cpp" />
<ClCompile Include="SecureInterfaceServiceEventAdapter.cpp" />
<ClCompile Include="SecureInterfaceServiceEventArgs.cpp" />
<ClCompile Include="SecureInterfaceSignals.cpp" />
<ClCompile Include="SecureInterfaceWatcher.cpp" />
<ClCompile Include="..\..\shared\TypeConversionHelpers.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
<ClCompile Include="..\..\shared\AllJoynBusObjectManager.cpp" />
<ClCompile Include="..\..\shared\AllJoynHelpers.cpp" />
<ClCompile Include="SecureInterfaceConsumer.cpp" />
<ClCompile Include="SecureInterfaceLegacySignals.cpp" />
<ClCompile Include="SecureInterfaceProducer.cpp" />
<ClCompile Include="SecureInterfaceServiceEventAdapter.cpp" />
<ClCompile Include="SecureInterfaceServiceEventArgs.cpp" />
<ClCompile Include="SecureInterfaceSignals.cpp" />
<ClCompile Include="SecureInterfaceWatcher.cpp" />
<ClCompile Include="..\..\shared\TypeConversionHelpers.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="..\..\shared\AllJoynBusObjectManager.h" />
<ClInclude Include="..\..\shared\AllJoynHelpers.h" />
<ClInclude Include="AllJoynHelpers.h" />
<ClInclude Include="ISecureInterfaceService.h" />
<ClInclude Include="SecureInterfaceConsumer.h" />
<ClInclude Include="SecureInterfaceEventArgs.h" />
<ClInclude Include="SecureInterfaceLegacySignals.h" />
<ClInclude Include="SecureInterfaceMethodResults.h" />
<ClInclude Include="SecureInterfaceProducer.h" />
<ClInclude Include="SecureInterfaceServiceEventAdapter.h" />
<ClInclude Include="SecureInterfaceServiceEventArgs.h" />
<ClInclude Include="SecureInterfaceSignals.h" />
<ClInclude Include="SecureInterfaceStructures.h" />
<ClInclude Include="SecureInterfaceWatcher.h" />
<ClInclude Include="..\..\shared\TypeConversionHelpers.h" />
</ItemGroup>
</Project>
Loading

0 comments on commit 6370138

Please sign in to comment.